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({
|
||||
required int type,
|
||||
required dynamic type,
|
||||
required int bizId,
|
||||
required int ps,
|
||||
int? oid,
|
||||
|
||||
@@ -113,7 +113,11 @@ class MemberVideoCtr extends CommonController {
|
||||
'oid': IdUtils.bv2av(element.bvid!), // TODO: continue playing
|
||||
'favTitle':
|
||||
'$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;
|
||||
|
||||
@@ -329,16 +329,17 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
void getMediaList() async {
|
||||
if (mediaList.length >= Get.arguments['count']) {
|
||||
if (Get.arguments['count'] != null &&
|
||||
mediaList.length >= Get.arguments['count']) {
|
||||
return;
|
||||
}
|
||||
var res = await UserHttp.getMediaList(
|
||||
type: _mediaType,
|
||||
type: Get.arguments['mediaType'] ?? _mediaType,
|
||||
bizId: Get.arguments['mediaId'] ?? -1,
|
||||
ps: 20,
|
||||
oid: mediaList.isEmpty ? null : mediaList.last.id,
|
||||
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['data'].isNotEmpty) {
|
||||
|
||||
@@ -1415,9 +1415,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
return Stack(
|
||||
children: [
|
||||
introPanel(),
|
||||
AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeInOut,
|
||||
Positioned(
|
||||
left: 12,
|
||||
right: 12,
|
||||
bottom: MediaQuery.of(context).padding.bottom + 12,
|
||||
|
||||
@@ -27,7 +27,7 @@ class MediaListPanel extends StatefulWidget {
|
||||
final String? panelTitle;
|
||||
final String? bvid;
|
||||
final VoidCallback loadMoreMedia;
|
||||
final int count;
|
||||
final int? count;
|
||||
|
||||
@override
|
||||
State<MediaListPanel> createState() => _MediaListPanelState();
|
||||
@@ -84,7 +84,8 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
||||
itemBuilder: ((context, index) {
|
||||
var item = widget.mediaList[index];
|
||||
if (index == widget.mediaList.length - 1 &&
|
||||
widget.mediaList.length < widget.count) {
|
||||
(widget.count == null ||
|
||||
widget.mediaList.length < widget.count!)) {
|
||||
widget.loadMoreMedia();
|
||||
}
|
||||
return InkWell(
|
||||
@@ -158,6 +159,10 @@ class _MediaListPanelState extends State<MediaListPanel> {
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
fontWeight:
|
||||
item.bvid == widget.bvid
|
||||
? FontWeight.bold
|
||||
: null,
|
||||
color: item.bvid == widget.bvid
|
||||
? Theme.of(context)
|
||||
.colorScheme
|
||||
|
||||
Reference in New Issue
Block a user