mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
opt playlist jump
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -688,7 +688,7 @@ class UserHttp {
|
|||||||
// 稍后再看列表
|
// 稍后再看列表
|
||||||
static Future getMediaList({
|
static Future getMediaList({
|
||||||
required dynamic type,
|
required dynamic type,
|
||||||
required int bizId,
|
required bizId,
|
||||||
required int ps,
|
required int ps,
|
||||||
dynamic oid,
|
dynamic oid,
|
||||||
int? otype,
|
int? otype,
|
||||||
|
|||||||
@@ -220,11 +220,11 @@ class VideoDetailController extends GetxController
|
|||||||
late RxList<MediaVideoItemModel> mediaList = <MediaVideoItemModel>[].obs;
|
late RxList<MediaVideoItemModel> mediaList = <MediaVideoItemModel>[].obs;
|
||||||
late String watchLaterTitle = '';
|
late String watchLaterTitle = '';
|
||||||
bool get isPlayAll =>
|
bool get isPlayAll =>
|
||||||
const ['watchLater', 'fav', 'archive'].contains(sourceType);
|
const ['watchLater', 'fav', 'archive', 'playlist'].contains(sourceType);
|
||||||
int get _mediaType => switch (sourceType) {
|
int get _mediaType => switch (sourceType) {
|
||||||
'archive' => 1,
|
'archive' => 1,
|
||||||
'watchLater' => 2,
|
'watchLater' => 2,
|
||||||
'fav' => 3,
|
'fav' || 'playlist' => 3,
|
||||||
_ => -1,
|
_ => -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class PiliScheme {
|
|||||||
|
|
||||||
listener?.cancel();
|
listener?.cancel();
|
||||||
listener = appLinks.uriLinkStream.listen((uri) {
|
listener = appLinks.uriLinkStream.listen((uri) {
|
||||||
debugPrint('onAppLink: $uri');
|
|
||||||
routePush(uri);
|
routePush(uri);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -66,6 +65,8 @@ class PiliScheme {
|
|||||||
int? businessId,
|
int? businessId,
|
||||||
int? oid,
|
int? oid,
|
||||||
}) async {
|
}) async {
|
||||||
|
// debugPrint('onAppLink: $uri');
|
||||||
|
|
||||||
final String scheme = uri.scheme;
|
final String scheme = uri.scheme;
|
||||||
final String host = uri.host;
|
final String host = uri.host;
|
||||||
final String path = uri.path;
|
final String path = uri.path;
|
||||||
@@ -624,12 +625,32 @@ class PiliScheme {
|
|||||||
}
|
}
|
||||||
return hasMatch;
|
return hasMatch;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
|
// http://m.bilibili.com/playlist/pl12345678?bvid=BVxxxxxxxx&page_type=4
|
||||||
|
String? mediaId = RegExp(r'/pl(\d+)', caseSensitive: false)
|
||||||
|
.firstMatch(path)
|
||||||
|
?.group(1);
|
||||||
String? bvid = uri.queryParameters['bvid'] ??
|
String? bvid = uri.queryParameters['bvid'] ??
|
||||||
RegExp(r'/(BV[a-z\d]{10})', caseSensitive: false)
|
RegExp(r'/(BV[a-z\d]{10})', caseSensitive: false)
|
||||||
.firstMatch(path)
|
.firstMatch(path)
|
||||||
?.group(1);
|
?.group(1);
|
||||||
if (bvid != null) {
|
if (bvid != null) {
|
||||||
videoPush(null, bvid, off: off);
|
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,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
videoPush(null, bvid, off: off);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
launchURL();
|
launchURL();
|
||||||
|
|||||||
Reference in New Issue
Block a user