Skip to content

Commit

Permalink
Load all episodes if we're coming from the testRename page. (#10465)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles authored Mar 31, 2022
1 parent 444da64 commit 017f97f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
13 changes: 11 additions & 2 deletions themes-default/slim/src/components/display-show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ export default {
_getEpisodes(showSlug);
},
initializeEpisodes() {
initializeEpisodes(force = false) {
const { getEpisodes, showSlug, setRecentShow, show } = this;
if (!show.seasons && show.seasonCount) {
if (force || (!show.seasons && show.seasonCount)) {
// Load episodes for the first page.
this.loadEpisodes(1);
// Always get special episodes if available.
Expand Down Expand Up @@ -1010,6 +1010,15 @@ export default {
sceneObjectToString(value) {
return `${value.season}x${value.episode}`;
}
},
watch: {
$route(to, from) {
if (to.name === 'show' && from.name === 'testRename') {
// Load all episodes if we're coming from the testRename page.
this.initializeEpisodes(true);
}
}
}
};
</script>
Expand Down
Loading

0 comments on commit 017f97f

Please sign in to comment.