mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: save subtitle
Closes #495 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1373,6 +1373,7 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
}
|
||||
|
||||
dynamic subtitles;
|
||||
late List<Map<String, String>> _vttSubtitles = <Map<String, String>>[];
|
||||
int? vttSubtitlesIndex;
|
||||
late bool showVP = true;
|
||||
@@ -1499,6 +1500,7 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
|
||||
if (res["data"] is List && res["data"].isNotEmpty) {
|
||||
subtitles = res["data"];
|
||||
var result = await VideoHttp.vttSubtitles(res["data"]);
|
||||
if (result != null) {
|
||||
_vttSubtitles = result;
|
||||
@@ -1569,6 +1571,7 @@ class VideoDetailController extends GetxController
|
||||
savedDanmaku = null;
|
||||
|
||||
// subtitle
|
||||
subtitles = null;
|
||||
vttSubtitlesIndex = null;
|
||||
_vttSubtitles.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user