bugfix: video preview click next or prev button subtitles not update #2410

This commit is contained in:
uliian 2023-04-20 11:46:17 +08:00
parent 1a5b999545
commit 6595d7140c

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]);