Skip to content

Commit

Permalink
fix: video preview click next or prev button subtitles not update (fi…
Browse files Browse the repository at this point in the history
…lebrowser#2423)

(cherry picked from commit 6744cd4)
  • Loading branch information
uliian authored and langren1353 committed Jul 31, 2023
1 parent 80c14e0 commit 9c1b544
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/views/files/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ export default {
nextLink: "",
listing: null,
name: "",
subtitles: [],
fullSize: false,
showNav: true,
navTimeout: null,
Expand Down Expand Up @@ -208,6 +207,12 @@ export default {
isResizeEnabled() {
return resizePreview;
},
subtitles() {
if (this.req.subtitles) {
return api.getSubtitlesURL(this.req);
}
return [];
},
},
watch: {
$route: function () {
Expand Down Expand Up @@ -274,10 +279,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]);
Expand Down

0 comments on commit 9c1b544

Please sign in to comment.