mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: archive: episode btn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -87,30 +87,35 @@ class _MemberVideoState extends State<MemberVideo>
|
|||||||
style: const TextStyle(fontSize: 13),
|
style: const TextStyle(fontSize: 13),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_controller.episodicButton != null) ...[
|
Obx(
|
||||||
const SizedBox(width: 5),
|
() => _controller.episodicButton.value.uri != null
|
||||||
SizedBox(
|
? Container(
|
||||||
height: 35,
|
height: 35,
|
||||||
child: TextButton.icon(
|
padding: const EdgeInsets.only(left: 5),
|
||||||
onPressed: _controller.toViewPlayAll,
|
child: TextButton.icon(
|
||||||
icon: Icon(
|
onPressed: _controller.toViewPlayAll,
|
||||||
Icons.play_circle_outline_rounded,
|
icon: Icon(
|
||||||
size: 16,
|
Icons.play_circle_outline_rounded,
|
||||||
color:
|
size: 16,
|
||||||
Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context)
|
||||||
),
|
.colorScheme
|
||||||
label: Text(
|
.secondary,
|
||||||
_controller.episodicButton?.text ?? '播放全部',
|
),
|
||||||
style: TextStyle(
|
label: Text(
|
||||||
fontSize: 13,
|
_controller
|
||||||
color: Theme.of(context)
|
.episodicButton.value.text ??
|
||||||
.colorScheme
|
'播放全部',
|
||||||
.secondary,
|
style: TextStyle(
|
||||||
),
|
fontSize: 13,
|
||||||
),
|
color: Theme.of(context)
|
||||||
),
|
.colorScheme
|
||||||
),
|
.secondary,
|
||||||
],
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const SizedBox.shrink(),
|
||||||
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 35,
|
height: 35,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class MemberVideoCtr extends CommonController {
|
|||||||
late RxString sort = 'desc'.obs;
|
late RxString sort = 'desc'.obs;
|
||||||
RxInt count = (-1).obs;
|
RxInt count = (-1).obs;
|
||||||
int? next;
|
int? next;
|
||||||
EpisodicButton? episodicButton;
|
Rx<EpisodicButton> episodicButton = EpisodicButton().obs;
|
||||||
final String? username;
|
final String? username;
|
||||||
final String? title;
|
final String? title;
|
||||||
|
|
||||||
@@ -55,7 +55,8 @@ class MemberVideoCtr extends CommonController {
|
|||||||
@override
|
@override
|
||||||
bool customHandleResponse(Success response) {
|
bool customHandleResponse(Success response) {
|
||||||
Data data = response.response;
|
Data data = response.response;
|
||||||
episodicButton = data.episodicButton;
|
episodicButton.value = data.episodicButton ?? EpisodicButton();
|
||||||
|
episodicButton.refresh();
|
||||||
next = data.next;
|
next = data.next;
|
||||||
aid = data.item?.lastOrNull?.param;
|
aid = data.item?.lastOrNull?.param;
|
||||||
isEnd =
|
isEnd =
|
||||||
@@ -98,9 +99,9 @@ class MemberVideoCtr extends CommonController {
|
|||||||
if (loadingState.value is Success) {
|
if (loadingState.value is Success) {
|
||||||
List<Item> list = (loadingState.value as Success).response;
|
List<Item> list = (loadingState.value as Success).response;
|
||||||
|
|
||||||
if (episodicButton?.text == '继续播放') {
|
if (episodicButton.value.text == '继续播放') {
|
||||||
dynamic oid = RegExp(r'oid=([\d]+)')
|
dynamic oid = RegExp(r'oid=([\d]+)')
|
||||||
.firstMatch('${episodicButton?.uri}')
|
.firstMatch('${episodicButton.value.uri}')
|
||||||
?.group(1);
|
?.group(1);
|
||||||
dynamic bvid = IdUtils.av2bv(int.tryParse(oid) ?? 0);
|
dynamic bvid = IdUtils.av2bv(int.tryParse(oid) ?? 0);
|
||||||
dynamic cid = await SearchHttp.ab2c(aid: oid, bvid: bvid);
|
dynamic cid = await SearchHttp.ab2c(aid: oid, bvid: bvid);
|
||||||
@@ -111,18 +112,19 @@ class MemberVideoCtr extends CommonController {
|
|||||||
'sourceType': 'archive',
|
'sourceType': 'archive',
|
||||||
'mediaId': seasonId ?? seriesId ?? mid,
|
'mediaId': seasonId ?? seriesId ?? mid,
|
||||||
'oid': oid,
|
'oid': oid,
|
||||||
'favTitle': '$username: ${title ?? episodicButton?.text ?? '播放全部'}',
|
'favTitle':
|
||||||
|
'$username: ${title ?? episodicButton.value.text ?? '播放全部'}',
|
||||||
if (seriesId == null) 'count': count.value,
|
if (seriesId == null) 'count': count.value,
|
||||||
if (seasonId != null || seriesId != null)
|
if (seasonId != null || seriesId != null)
|
||||||
'mediaType': RegExp(r'page_type=([\d]+)')
|
'mediaType': RegExp(r'page_type=([\d]+)')
|
||||||
.firstMatch('${episodicButton?.uri}')
|
.firstMatch('${episodicButton.value.uri}')
|
||||||
?.group(1),
|
?.group(1),
|
||||||
'desc': RegExp(r'desc=([\d]+)')
|
'desc': RegExp(r'desc=([\d]+)')
|
||||||
.firstMatch('${episodicButton?.uri}')
|
.firstMatch('${episodicButton.value.uri}')
|
||||||
?.group(1) ==
|
?.group(1) ==
|
||||||
'1',
|
'1',
|
||||||
'sortField': RegExp(r'sort_field=([\d]+)')
|
'sortField': RegExp(r'sort_field=([\d]+)')
|
||||||
.firstMatch('${episodicButton?.uri}')
|
.firstMatch('${episodicButton.value.uri}')
|
||||||
?.group(1),
|
?.group(1),
|
||||||
'isContinuePlaying': true,
|
'isContinuePlaying': true,
|
||||||
},
|
},
|
||||||
@@ -153,11 +155,11 @@ class MemberVideoCtr extends CommonController {
|
|||||||
'mediaId': seasonId ?? seriesId ?? mid,
|
'mediaId': seasonId ?? seriesId ?? mid,
|
||||||
'oid': IdUtils.bv2av(element.bvid!),
|
'oid': IdUtils.bv2av(element.bvid!),
|
||||||
'favTitle':
|
'favTitle':
|
||||||
'$username: ${title ?? episodicButton?.text ?? '播放全部'}',
|
'$username: ${title ?? episodicButton.value.text ?? '播放全部'}',
|
||||||
if (seriesId == null) 'count': count.value,
|
if (seriesId == null) 'count': count.value,
|
||||||
if (seasonId != null || seriesId != null)
|
if (seasonId != null || seriesId != null)
|
||||||
'mediaType': RegExp(r'page_type=([\d]+)')
|
'mediaType': RegExp(r'page_type=([\d]+)')
|
||||||
.firstMatch('${episodicButton?.uri}')
|
.firstMatch('${episodicButton.value.uri}')
|
||||||
?.group(1),
|
?.group(1),
|
||||||
'desc': desc,
|
'desc': desc,
|
||||||
if (type == ContributeType.video)
|
if (type == ContributeType.video)
|
||||||
|
|||||||
Reference in New Issue
Block a user