mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-22 09:08:45 +00:00
opt audio playlist
Closes #1547 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -40,6 +40,7 @@ class AudioController extends GetxController
|
||||
late Int64 oid;
|
||||
late List<Int64> subId;
|
||||
late int itemType;
|
||||
Int64? extraId;
|
||||
late final PlaylistSource from;
|
||||
late final isVideo = itemType == 1;
|
||||
|
||||
@@ -86,6 +87,10 @@ class AudioController extends GetxController
|
||||
itemType = args['itemType'];
|
||||
from = args['from'];
|
||||
_start = args['start'];
|
||||
final int? extraId = args['extraId'];
|
||||
if (extraId != null) {
|
||||
this.extraId = Int64(extraId);
|
||||
}
|
||||
if (args['heroTag'] case String heroTag) {
|
||||
try {
|
||||
_videoDetailController = Get.find<VideoDetailController>(tag: heroTag);
|
||||
@@ -134,6 +139,7 @@ class AudioController extends GetxController
|
||||
: isLoadNext
|
||||
? _next
|
||||
: null,
|
||||
extraId: extraId,
|
||||
);
|
||||
if (res.isSuccess) {
|
||||
final PlaylistResp data = res.data;
|
||||
@@ -193,7 +199,7 @@ class AudioController extends GetxController
|
||||
(e) => e.id <= cacheAudioQa,
|
||||
(a, b) => a.id > b.id ? a : b,
|
||||
);
|
||||
_onOpenMedia(VideoUtils.getCdnUrl(audio.baseUrl));
|
||||
_onOpenMedia(VideoUtils.getCdnUrl(audio));
|
||||
} else if (playInfo.hasPlayUrl()) {
|
||||
final playUrl = playInfo.playUrl;
|
||||
final durls = playUrl.durl;
|
||||
|
||||
@@ -39,6 +39,7 @@ class AudioPage extends StatefulWidget {
|
||||
String? heroTag,
|
||||
Duration? start,
|
||||
String? audioUrl,
|
||||
int? extraId,
|
||||
}) => Get.toNamed(
|
||||
'/audio',
|
||||
arguments: {
|
||||
@@ -50,6 +51,7 @@ class AudioPage extends StatefulWidget {
|
||||
'heroTag': ?heroTag,
|
||||
'start': ?start,
|
||||
'audioUrl': ?audioUrl,
|
||||
'extraId': ?extraId,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user