mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-25 21:05:52 +08:00
opt view fav
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -624,19 +624,21 @@ class PiliScheme {
|
||||
?.group(1);
|
||||
if (bvid != null) {
|
||||
if (mediaId != null) {
|
||||
final int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
'sourceType': 'playlist',
|
||||
'favTitle': '播放列表',
|
||||
'mediaId': mediaId,
|
||||
'mediaType': 3,
|
||||
'desc': true,
|
||||
'isContinuePlaying': true,
|
||||
},
|
||||
);
|
||||
final int? cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
if (cid != null) {
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
'sourceType': 'playlist',
|
||||
'favTitle': '播放列表',
|
||||
'mediaId': mediaId,
|
||||
'mediaType': 3,
|
||||
'desc': true,
|
||||
'isContinuePlaying': true,
|
||||
},
|
||||
);
|
||||
}
|
||||
} else {
|
||||
videoPush(null, bvid, off: off);
|
||||
}
|
||||
@@ -852,7 +854,7 @@ class PiliScheme {
|
||||
if (showDialog) {
|
||||
SmartDialog.showLoading<dynamic>(msg: '获取中...');
|
||||
}
|
||||
final int cid = await SearchHttp.ab2c(
|
||||
final int? cid = await SearchHttp.ab2c(
|
||||
bvid: bvid,
|
||||
aid: aid,
|
||||
part: part != null ? int.tryParse(part) : null,
|
||||
@@ -860,16 +862,18 @@ class PiliScheme {
|
||||
if (showDialog) {
|
||||
SmartDialog.dismiss();
|
||||
}
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': null,
|
||||
'heroTag': Utils.makeHeroTag(aid),
|
||||
if (progress != null) 'progress': int.tryParse(progress),
|
||||
},
|
||||
off: off,
|
||||
preventDuplicates: false,
|
||||
);
|
||||
if (cid != null) {
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': null,
|
||||
'heroTag': Utils.makeHeroTag(aid),
|
||||
if (progress != null) 'progress': int.tryParse(progress),
|
||||
},
|
||||
off: off,
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
SmartDialog.dismiss();
|
||||
SmartDialog.showToast('video获取失败: $e');
|
||||
|
||||
@@ -393,15 +393,17 @@ class PageUtils {
|
||||
try {
|
||||
String bvid = item.modules.moduleDynamic!.major!.archive!.bvid!;
|
||||
String cover = item.modules.moduleDynamic!.major!.archive!.cover!;
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
int? cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
if (cid != null) {
|
||||
toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
}
|
||||
@@ -456,15 +458,17 @@ class PageUtils {
|
||||
int aid = ugcSeason.aid!;
|
||||
String bvid = IdUtils.av2bv(aid);
|
||||
String cover = ugcSeason.cover!;
|
||||
int cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
int? cid = await SearchHttp.ab2c(bvid: bvid);
|
||||
if (cid != null) {
|
||||
toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: {
|
||||
'pic': cover,
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
/// 番剧查看
|
||||
|
||||
@@ -49,15 +49,17 @@ class UrlUtils {
|
||||
int? aid = matchRes['AV'];
|
||||
String? bvid = matchRes['BV'];
|
||||
bvid ??= IdUtils.av2bv(aid!);
|
||||
final int cid = await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': '',
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
final int? cid = await SearchHttp.ab2c(aid: aid, bvid: bvid);
|
||||
if (cid != null) {
|
||||
PageUtils.toVideoPage(
|
||||
'bvid=$bvid&cid=$cid',
|
||||
arguments: <String, String?>{
|
||||
'pic': '',
|
||||
'heroTag': Utils.makeHeroTag(bvid),
|
||||
},
|
||||
preventDuplicates: false,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (redirectUrl.isNotEmpty) {
|
||||
PageUtils.handleWebview(redirectUrl);
|
||||
|
||||
Reference in New Issue
Block a user