mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video cover
This commit is contained in:
@@ -122,14 +122,18 @@ class _ListSheetContentState extends State<ListSheetContent> {
|
||||
}
|
||||
SmartDialog.showToast('切换到:$title');
|
||||
widget.onClose();
|
||||
if (episode is bangumi.EpisodeItem && episode.cover != null) {
|
||||
widget.changeFucCall(
|
||||
episode.bvid, episode.cid, episode.aid, episode.cover);
|
||||
} else if (episode.runtimeType.toString() == "EpisodeItem") {
|
||||
widget.changeFucCall(episode.bvid, episode.cid, episode.aid, null);
|
||||
} else {
|
||||
widget.changeFucCall(widget.bvid!, episode.cid, widget.aid!, null);
|
||||
}
|
||||
widget.changeFucCall(
|
||||
episode.runtimeType.toString() == "EpisodeItem"
|
||||
? episode.bvid
|
||||
: widget.bvid,
|
||||
episode.cid,
|
||||
episode.aid,
|
||||
episode is video.EpisodeItem
|
||||
? episode.arc?.pic
|
||||
: episode is bangumi.EpisodeItem
|
||||
? episode.cover
|
||||
: null,
|
||||
);
|
||||
},
|
||||
dense: false,
|
||||
leading: (episode is video.EpisodeItem && episode.arc?.pic != null) ||
|
||||
|
||||
@@ -254,7 +254,6 @@ class VideoHttp {
|
||||
return {
|
||||
'status': true,
|
||||
'data': result.data!,
|
||||
'pic': result.data?.pic ?? '',
|
||||
};
|
||||
} else {
|
||||
// Map errMap = {
|
||||
|
||||
@@ -123,7 +123,14 @@ class VideoIntroController extends GetxController {
|
||||
var result = await VideoHttp.videoIntro(bvid: bvid);
|
||||
if (result['status']) {
|
||||
videoDetail.value = result['data']!;
|
||||
videoDetailController.videoItem['pic'] = result['pic']!;
|
||||
if (videoDetailController.videoItem['pic'] == null ||
|
||||
videoDetailController.videoItem['pic'] == '') {
|
||||
try {
|
||||
videoDetailController.videoItem['pic'] = result['data'].pic;
|
||||
} catch (e) {
|
||||
debugPrint(e.toString());
|
||||
}
|
||||
}
|
||||
if (videoDetail.value.pages != null &&
|
||||
videoDetail.value.pages!.isNotEmpty &&
|
||||
lastPlayCid.value == 0) {
|
||||
@@ -475,7 +482,7 @@ class VideoIntroController extends GetxController {
|
||||
videoDetailCtr.oid.value = aid ?? IdUtils.bv2av(bvid);
|
||||
videoDetailCtr.cid.value = cid;
|
||||
if (cover is String && cover.isNotEmpty) {
|
||||
videoItem!['pic'] = cover;
|
||||
videoDetailCtr.videoItem['pic'] = cover;
|
||||
}
|
||||
videoDetailCtr.danmakuCid.value = cid;
|
||||
videoDetailCtr.queryVideoUrl();
|
||||
|
||||
Reference in New Issue
Block a user