fix: video preview click next or prev button subtitles not update (#2423)

This commit is contained in:
ULiiAn 2023-05-01 19:09:44 +08:00 committed by GitHub
parent a4ef02a47b
commit 6744cd47ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -167,7 +167,6 @@ export default {
nextLink: "",
listing: null,
name: "",
subtitles: [],
fullSize: false,
showNav: true,
navTimeout: null,
@ -201,6 +200,12 @@ export default {
isResizeEnabled() {
return resizePreview;
},
subtitles() {
if (this.req.subtitles) {
return api.getSubtitlesURL(this.req);
}
return [];
},
},
watch: {
$route: function () {
@ -266,10 +271,6 @@ export default {
this.autoPlay = false;
}
if (this.req.subtitles) {
this.subtitles = api.getSubtitlesURL(this.req);
}
let dirs = this.$route.fullPath.split("/");
this.name = decodeURIComponent(dirs[dirs.length - 1]);