mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: media type
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -510,7 +510,7 @@ class UserHttp {
|
|||||||
|
|
||||||
// 稍后再看列表
|
// 稍后再看列表
|
||||||
static Future getMediaList({
|
static Future getMediaList({
|
||||||
required int type,
|
required dynamic type,
|
||||||
required int bizId,
|
required int bizId,
|
||||||
required int ps,
|
required int ps,
|
||||||
int? oid,
|
int? oid,
|
||||||
|
|||||||
@@ -113,7 +113,11 @@ class MemberVideoCtr extends CommonController {
|
|||||||
'oid': IdUtils.bv2av(element.bvid!), // TODO: continue playing
|
'oid': IdUtils.bv2av(element.bvid!), // TODO: continue playing
|
||||||
'favTitle':
|
'favTitle':
|
||||||
'$username: ${title ?? episodicButton?.text ?? '播放全部'}',
|
'$username: ${title ?? episodicButton?.text ?? '播放全部'}',
|
||||||
'count': count.value,
|
if (seriesId == null) 'count': count.value,
|
||||||
|
if (seasonId != null || seriesId != null)
|
||||||
|
'mediaType': RegExp(r'page_type=([\d]+)')
|
||||||
|
.firstMatch('${episodicButton?.uri}')
|
||||||
|
?.group(1),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -329,16 +329,17 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void getMediaList() async {
|
void getMediaList() async {
|
||||||
if (mediaList.length >= Get.arguments['count']) {
|
if (Get.arguments['count'] != null &&
|
||||||
|
mediaList.length >= Get.arguments['count']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var res = await UserHttp.getMediaList(
|
var res = await UserHttp.getMediaList(
|
||||||
type: _mediaType,
|
type: Get.arguments['mediaType'] ?? _mediaType,
|
||||||
bizId: Get.arguments['mediaId'] ?? -1,
|
bizId: Get.arguments['mediaId'] ?? -1,
|
||||||
ps: 20,
|
ps: 20,
|
||||||
oid: mediaList.isEmpty ? null : mediaList.last.id,
|
oid: mediaList.isEmpty ? null : mediaList.last.id,
|
||||||
otype: mediaList.isEmpty ? null : mediaList.last.type,
|
otype: mediaList.isEmpty ? null : mediaList.last.type,
|
||||||
desc: _mediaType == 2 ? false : true,
|
desc: _mediaType == 2 || Get.arguments['mediaType'] == '8' ? false : true,
|
||||||
);
|
);
|
||||||
if (res['status']) {
|
if (res['status']) {
|
||||||
if (res['data'].isNotEmpty) {
|
if (res['data'].isNotEmpty) {
|
||||||
|
|||||||
@@ -1415,9 +1415,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
introPanel(),
|
introPanel(),
|
||||||
AnimatedPositioned(
|
Positioned(
|
||||||
duration: const Duration(milliseconds: 400),
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
left: 12,
|
left: 12,
|
||||||
right: 12,
|
right: 12,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 12,
|
bottom: MediaQuery.of(context).padding.bottom + 12,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class MediaListPanel extends StatefulWidget {
|
|||||||
final String? panelTitle;
|
final String? panelTitle;
|
||||||
final String? bvid;
|
final String? bvid;
|
||||||
final VoidCallback loadMoreMedia;
|
final VoidCallback loadMoreMedia;
|
||||||
final int count;
|
final int? count;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MediaListPanel> createState() => _MediaListPanelState();
|
State<MediaListPanel> createState() => _MediaListPanelState();
|
||||||
@@ -84,7 +84,8 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
|||||||
itemBuilder: ((context, index) {
|
itemBuilder: ((context, index) {
|
||||||
var item = widget.mediaList[index];
|
var item = widget.mediaList[index];
|
||||||
if (index == widget.mediaList.length - 1 &&
|
if (index == widget.mediaList.length - 1 &&
|
||||||
widget.mediaList.length < widget.count) {
|
(widget.count == null ||
|
||||||
|
widget.mediaList.length < widget.count!)) {
|
||||||
widget.loadMoreMedia();
|
widget.loadMoreMedia();
|
||||||
}
|
}
|
||||||
return InkWell(
|
return InkWell(
|
||||||
@@ -158,6 +159,10 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
|||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
fontWeight:
|
||||||
|
item.bvid == widget.bvid
|
||||||
|
? FontWeight.bold
|
||||||
|
: null,
|
||||||
color: item.bvid == widget.bvid
|
color: item.bvid == widget.bvid
|
||||||
? Theme.of(context)
|
? Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
|
|||||||
Reference in New Issue
Block a user