mirror of
https://github.com/madari-media/madari-oss.git
synced 2026-01-11 22:40:23 +00:00
fix: explore page issue with other addons
This commit is contained in:
parent
a38b3d1235
commit
ca8fb57c2f
3 changed files with 35 additions and 28 deletions
|
|
@ -27,7 +27,8 @@ class _ExploreAddonState extends State<ExploreAddon> {
|
|||
String? selectedType;
|
||||
String? selectedId;
|
||||
String? selectedGenre;
|
||||
StremioManifest? selectedAddon;
|
||||
final Map<String, StremioManifest> _selectedAddon = {};
|
||||
|
||||
static const int pageSize = 20;
|
||||
final service = StremioAddonService.instance;
|
||||
|
||||
|
|
@ -71,7 +72,9 @@ class _ExploreAddonState extends State<ExploreAddon> {
|
|||
_logger.info('Fetching catalog for page: $page');
|
||||
try {
|
||||
final addonManifest = await service
|
||||
.validateManifest(selectedAddon!.manifestUrl!)
|
||||
.validateManifest(
|
||||
_selectedAddon["${selectedType}_$selectedId"]!.manifestUrl!,
|
||||
)
|
||||
.queryFn();
|
||||
|
||||
List<ConnectionFilterItem> items = [];
|
||||
|
|
@ -117,6 +120,8 @@ class _ExploreAddonState extends State<ExploreAddon> {
|
|||
}
|
||||
|
||||
if (selectedType == value.type && selectedId == value.id) {
|
||||
_selectedAddon["${value.type}_${value.id}"] = item;
|
||||
|
||||
final extra = value.extra?.firstWhereOrNull((extra) {
|
||||
return extra.name == "genre";
|
||||
});
|
||||
|
|
@ -134,8 +139,6 @@ class _ExploreAddonState extends State<ExploreAddon> {
|
|||
}
|
||||
}
|
||||
|
||||
this.selectedAddon = selectedAddon;
|
||||
|
||||
this.genres = genres.toList();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import 'package:madari_client/features/settings/pages/settings/profile_selector.
|
|||
import 'package:madari_client/features/settings/service/selected_profile.dart';
|
||||
|
||||
class SettingsPage extends StatelessWidget {
|
||||
const SettingsPage({super.key});
|
||||
const SettingsPage({
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
|||
|
|
@ -318,32 +318,34 @@ class _CatalogGridState extends State<CatalogGrid> implements Refreshable {
|
|||
),
|
||||
),
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
height: 34,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
final query = getQuery();
|
||||
if (!widget.pluginContext.hasSearch)
|
||||
SizedBox(
|
||||
height: 34,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
final query = getQuery();
|
||||
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CatalogFullView(
|
||||
title: title,
|
||||
initialItems: allItems,
|
||||
queryBuilder: () {
|
||||
return query;
|
||||
},
|
||||
prefix: widget.pluginContext.hasSearch.toString() +
|
||||
widget.pluginContext.index.toString() +
|
||||
widget.config["description"] +
|
||||
widget.config["id"] +
|
||||
widget.config["type"],
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CatalogFullView(
|
||||
title: title,
|
||||
initialItems: allItems,
|
||||
queryBuilder: () {
|
||||
return query;
|
||||
},
|
||||
prefix:
|
||||
widget.pluginContext.hasSearch.toString() +
|
||||
widget.pluginContext.index.toString() +
|
||||
widget.config["description"] +
|
||||
widget.config["id"] +
|
||||
widget.config["type"],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: const Text("Show more"),
|
||||
);
|
||||
},
|
||||
child: const Text("Show more"),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
|
|
|
|||
Loading…
Reference in a new issue