-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix playlist view on the watch page not reacting to playlist changes #3897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix playlist view on the watch page not reacting to playlist changes #3897
Conversation
efb4f5ff-1298-471a-8973-3d47447115dc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| } | ||
| }, | ||
| playlistId: function (newVal, oldVal) { | ||
| if (oldVal !== newVal) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this conditional...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to refetch the playlist if the id is the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's called when value not updated too? (It's inside watch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, we definitely set the property every time the video changes, but i'm not sure if watch is triggered on every set or just when the value changes. We have this pattern inside watches in a few places which made me think it might get triggered for every set but i'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can always remove the check later, if we find out that it's redundant.
* development: Fix playlist view on the watch page not reacting to playlist changes (FreeTubeApp#3897) Bump version number to v0.19.0 Fix linting issues Translated using Weblate (Bulgarian) Ignore broken audio tracks for videos with multiple audio tracks (FreeTubeApp#3851) local API: Add support for PageHeader hashtag header (FreeTubeApp#3896) Translated using Weblate (German) Translated using Weblate (Swedish) Upgrade YouTube.js to version 6.0 (FreeTubeApp#3895) # Conflicts: # src/renderer/components/ft-list-playlist/ft-list-playlist.vue # src/renderer/components/watch-video-playlist/watch-video-playlist.vue
* feature/playlist-2023-05: Fix playlist view on the watch page not reacting to playlist changes (FreeTubeApp#3897) Bump version number to v0.19.0 Fix linting issues Translated using Weblate (Bulgarian) Ignore broken audio tracks for videos with multiple audio tracks (FreeTubeApp#3851) local API: Add support for PageHeader hashtag header (FreeTubeApp#3896) Translated using Weblate (German) Translated using Weblate (Swedish) Upgrade YouTube.js to version 6.0 (FreeTubeApp#3895)
Fix playlist view on the watch page not reacting to playlist changes
Pull Request Type
Related issue
#3895 (comment)
Description
Currently the playlist view on the watch page doesn't react to the playlist changing, when you jump directly from one playlist to another one, without leaving the watch page in between.
This bug exists because unlike the other components on the watch page, the playlist view stays mounted when the video changes, this is to avoid refetching the playlist for every video in the same playlist.
Screenshots
Screenshot from the comment:

Testing
Paste the first playlist URL into the search bar, afterwards the second one, the playlist view on the watch page should update to the second playlist instead of continuing to show the first one.
playlist 1: https://www.youtube.com/watch?v=xEyR5dCQs60&list=PLa4zmfXkL4P2khNoEOGA8NEOgFwHIWGIX
playlist 2: https://www.youtube.com/watch?v=HUlR6zQjTmw&list=PLa4zmfXkL4P0UaXti2bPFpsyi3K_IE0rB