mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-03-11 17:15:39 +00:00
fix: trakt tv not showing up in the folders
Some checks are pending
Build and Deploy / build_windows (push) Waiting to run
Build and Deploy / build_android (push) Waiting to run
Build and Deploy / build_android_tv (push) Waiting to run
Build and Deploy / build_ipa (push) Waiting to run
Build and Deploy / build_linux (push) Waiting to run
Build and Deploy / build_macos (push) Waiting to run
Some checks are pending
Build and Deploy / build_windows (push) Waiting to run
Build and Deploy / build_android (push) Waiting to run
Build and Deploy / build_android_tv (push) Waiting to run
Build and Deploy / build_ipa (push) Waiting to run
Build and Deploy / build_linux (push) Waiting to run
Build and Deploy / build_macos (push) Waiting to run
This commit is contained in:
parent
4829d7470c
commit
91e0968cd8
3 changed files with 12 additions and 7 deletions
|
|
@ -87,10 +87,10 @@ class StremioService extends BaseConnectionService {
|
|||
},
|
||||
).toList();
|
||||
|
||||
if (resources.contains("catalog")) {
|
||||
if (resources.contains("catalog") ||
|
||||
manifest.catalogs?.isNotEmpty == true) {
|
||||
for (final item
|
||||
in (manifest.catalogs ?? [] as List<StremioManifestCatalog>)) {
|
||||
print(item.toJson());
|
||||
result.add(
|
||||
FolderItem(
|
||||
title: item.name == null
|
||||
|
|
|
|||
|
|
@ -175,9 +175,14 @@ class StremioConnectionService extends BaseConnectionService {
|
|||
cacheDuration: const Duration(hours: 8),
|
||||
),
|
||||
queryFn: () async {
|
||||
_logger.finer('Fetching catalog from URL: $url');
|
||||
final httpBody = await http.get(Uri.parse(url));
|
||||
return StrmioMeta.fromJson(jsonDecode(httpBody.body));
|
||||
try {
|
||||
_logger.finer('Fetching catalog from URL: $url');
|
||||
final httpBody = await http.get(Uri.parse(url));
|
||||
return StrmioMeta.fromJson(jsonDecode(httpBody.body));
|
||||
} catch (e, stack) {
|
||||
_logger.severe('Error parsing catalog', e, stack);
|
||||
rethrow;
|
||||
}
|
||||
},
|
||||
key: url,
|
||||
)
|
||||
|
|
@ -186,7 +191,7 @@ class StremioConnectionService extends BaseConnectionService {
|
|||
.first
|
||||
.then((docs) {
|
||||
if (docs.error != null) {
|
||||
_logger.severe('Error fetching catalog: ${docs.error}');
|
||||
_logger.severe('Error fetching catalog', docs.error);
|
||||
throw docs.error!;
|
||||
}
|
||||
return docs.data!;
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ class Meta extends LibraryItem {
|
|||
class BehaviorHints {
|
||||
@JsonKey(name: "defaultVideoId")
|
||||
final dynamic defaultVideoId;
|
||||
@JsonKey(name: "hasScheduledVideos")
|
||||
@JsonKey(name: "hasScheduledVideos", defaultValue: false)
|
||||
final bool hasScheduledVideos;
|
||||
|
||||
BehaviorHints({
|
||||
|
|
|
|||
Loading…
Reference in a new issue