mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 05:03:57 +08:00
respect enablePlayAll property in fav/later search page
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
import 'package:PiliPlus/pages/common/search/common_search_controller.dart';
|
||||
import 'package:PiliPlus/pages/fav_detail/controller.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -28,6 +29,8 @@ class FavSearchController
|
||||
late dynamic count;
|
||||
late dynamic title;
|
||||
|
||||
late final enablePlayAll = Pref.enablePlayAll;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
final args = Get.arguments;
|
||||
@@ -76,16 +79,18 @@ class FavSearchController
|
||||
cover: item.cover,
|
||||
title: item.title,
|
||||
dimension: part?.dimension,
|
||||
extraArguments: {
|
||||
'videoIntro': videoIntro,
|
||||
'sourceType': SourceType.fav,
|
||||
'mediaId': mediaId,
|
||||
'oid': item.id,
|
||||
'favTitle': title,
|
||||
'count': count,
|
||||
'desc': true,
|
||||
'isContinuePlaying': true,
|
||||
},
|
||||
extraArguments: enablePlayAll
|
||||
? {
|
||||
'videoIntro': videoIntro,
|
||||
'sourceType': SourceType.fav,
|
||||
'mediaId': mediaId,
|
||||
'oid': item.id,
|
||||
'favTitle': title,
|
||||
'count': count,
|
||||
'desc': true,
|
||||
'isContinuePlaying': true,
|
||||
}
|
||||
: {'videoIntro': videoIntro},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/pages/later_search/controller.dart';
|
||||
import 'package:PiliPlus/utils/grid.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/request_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -20,6 +21,8 @@ class LaterSearchPage extends StatefulWidget {
|
||||
|
||||
class _LaterSearchPageState
|
||||
extends CommonSearchPageState<LaterSearchPage, LaterData, LaterItemModel> {
|
||||
late final enablePlayAll = Pref.enablePlayAll;
|
||||
|
||||
@override
|
||||
final LaterSearchController controller = Get.put(
|
||||
LaterSearchController(),
|
||||
@@ -80,15 +83,17 @@ class _LaterSearchPageState
|
||||
cover: item.pic,
|
||||
title: item.title,
|
||||
dimension: item.dimension,
|
||||
extraArguments: {
|
||||
'oid': item.aid,
|
||||
'sourceType': SourceType.watchLater,
|
||||
'count': controller.count,
|
||||
'favTitle': '稍后再看',
|
||||
'mediaId': controller.mid,
|
||||
'desc': false,
|
||||
'isContinuePlaying': index != 0,
|
||||
},
|
||||
extraArguments: enablePlayAll
|
||||
? {
|
||||
'oid': item.aid,
|
||||
'sourceType': SourceType.watchLater,
|
||||
'count': controller.count,
|
||||
'favTitle': '稍后再看',
|
||||
'mediaId': controller.mid,
|
||||
'desc': false,
|
||||
'isContinuePlaying': index != 0,
|
||||
}
|
||||
: null,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user