mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt audio playlist
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -817,7 +817,10 @@ class _AudioPageState extends State<AudioPage> {
|
|||||||
),
|
),
|
||||||
if (audioItem.arc.hasDesc()) ...[
|
if (audioItem.arc.hasDesc()) ...[
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
SelectableText(audioItem.arc.desc),
|
SelectableText(
|
||||||
|
audioItem.arc.desc,
|
||||||
|
scrollPhysics: const NeverScrollableScrollPhysics(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import 'dart:ui';
|
|||||||
|
|
||||||
import 'package:PiliPlus/common/widgets/pair.dart';
|
import 'package:PiliPlus/common/widgets/pair.dart';
|
||||||
import 'package:PiliPlus/common/widgets/progress_bar/segment_progress_bar.dart';
|
import 'package:PiliPlus/common/widgets/progress_bar/segment_progress_bar.dart';
|
||||||
|
import 'package:PiliPlus/grpc/bilibili/app/listener/v1.pbenum.dart'
|
||||||
|
show PlaylistSource;
|
||||||
import 'package:PiliPlus/http/constants.dart';
|
import 'package:PiliPlus/http/constants.dart';
|
||||||
import 'package:PiliPlus/http/fav.dart';
|
import 'package:PiliPlus/http/fav.dart';
|
||||||
import 'package:PiliPlus/http/init.dart';
|
import 'package:PiliPlus/http/init.dart';
|
||||||
@@ -1749,16 +1751,33 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void toAudioPage() {
|
void toAudioPage() {
|
||||||
|
int? id;
|
||||||
|
int? extraId;
|
||||||
|
PlaylistSource from = PlaylistSource.UP_ARCHIVE;
|
||||||
|
if (isPlayAll) {
|
||||||
|
id = args['mediaId'];
|
||||||
|
extraId = sourceType.extraId;
|
||||||
|
from = sourceType.playlistSource;
|
||||||
|
} else if (isUgc) {
|
||||||
|
try {
|
||||||
|
final ctr = Get.find<UgcIntroController>(tag: heroTag);
|
||||||
|
id = ctr.videoDetail.value.ugcSeason?.id;
|
||||||
|
if (id != null) {
|
||||||
|
extraId = 8;
|
||||||
|
from = PlaylistSource.MEDIA_LIST;
|
||||||
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
AudioPage.toAudioPage(
|
AudioPage.toAudioPage(
|
||||||
itemType: 1,
|
itemType: 1,
|
||||||
id: args['mediaId'],
|
id: id,
|
||||||
oid: aid,
|
oid: aid,
|
||||||
subId: [cid.value],
|
subId: [cid.value],
|
||||||
from: sourceType.playlistSource,
|
from: from,
|
||||||
heroTag: autoPlay.value ? heroTag : null,
|
heroTag: autoPlay.value ? heroTag : null,
|
||||||
start: playedTime,
|
start: playedTime,
|
||||||
audioUrl: audioUrl,
|
audioUrl: audioUrl,
|
||||||
extraId: sourceType.extraId,
|
extraId: extraId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1156,7 +1156,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
_removeDmAction();
|
_removeDmAction();
|
||||||
} else if (item != _suspendedDm) {
|
} else if (item != _suspendedDm) {
|
||||||
if (item.content.extra == null) {
|
if (item.content.extra == null) {
|
||||||
assert(false, 'empty extra: $item');
|
|
||||||
_removeDmAction();
|
_removeDmAction();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user