mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 21:24:02 +08:00
tweaks (#2032)
* fix: 1080p * opt: import export * opt: downloader * opt: skeleton * opt: parseColor * tweak * opt: sb seek * opt: rxn
This commit is contained in:
@@ -741,8 +741,8 @@ class VideoDetailController extends GetxController
|
||||
|
||||
bool isQuerying = false;
|
||||
|
||||
final Rx<List<LanguageItem>?> languages = Rx<List<LanguageItem>?>(null);
|
||||
final Rx<String?> currLang = Rx<String?>(null);
|
||||
final languages = Rxn<List<LanguageItem>>();
|
||||
final currLang = Rxn<String>();
|
||||
void setLanguage(String language) {
|
||||
if (currLang.value == language) return;
|
||||
if (!isLoginVideo) {
|
||||
|
||||
@@ -467,14 +467,21 @@ class _PostPanelState extends State<PostPanel>
|
||||
final player = plPlayerController.videoPlayerController;
|
||||
if (player != null) {
|
||||
final start = (item.segment.first * 1000).round();
|
||||
Future<void> seekTo() => player.seek(
|
||||
Duration(milliseconds: (item.segment.second * 1000).round()),
|
||||
);
|
||||
if (start <= 0) {
|
||||
seekTo();
|
||||
if (!player.state.playing) {
|
||||
await player.play();
|
||||
}
|
||||
return;
|
||||
}
|
||||
final seek = max(0, start - 2000);
|
||||
await player.seek(Duration(milliseconds: seek));
|
||||
if (!player.state.playing) {
|
||||
await player.play();
|
||||
}
|
||||
Future<void> seekTo() => player.seek(
|
||||
Duration(milliseconds: (item.segment.second * 1000).round()),
|
||||
);
|
||||
if (start > seek) {
|
||||
final posSub = player.stream.position.listen(
|
||||
null,
|
||||
|
||||
@@ -32,7 +32,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
int replyType;
|
||||
|
||||
bool hasRoot = false;
|
||||
final Rx<ReplyInfo?> firstFloor = Rx(null);
|
||||
final firstFloor = Rxn<ReplyInfo>();
|
||||
|
||||
final index = RxnInt();
|
||||
|
||||
|
||||
@@ -645,7 +645,10 @@ class HeaderControlState extends State<HeaderControl>
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
try {
|
||||
final result = await FilePicker.pickFiles();
|
||||
final result = await FilePicker.pickFiles(
|
||||
type: .custom,
|
||||
allowedExtensions: const ['json', 'vtt', 'srt'],
|
||||
);
|
||||
if (result != null) {
|
||||
final file = result.files.single;
|
||||
final path = file.path;
|
||||
|
||||
Reference in New Issue
Block a user