Skip to content
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 author for album playlists on the playlist page #3838

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

absidue
Copy link
Member

@absidue absidue commented Aug 1, 2023

Fix author for album playlists on the playlist page

Pull Request Type

  • Bugfix

Description

With the addition of the releases tab, it is now a lot easier to stumble across the auto-generated album playlists, previously you would only get them if you copied a link from YouTube Music. Unlike normal playlists, these album playlists don't belong to a channel, so the playlist page doesn't contain any author information for them (no name, id, link, avatar), instead it has a subtitle in this format: {artist/artists separated by commas} • Album.

This pull request adds support for those playlists in the local API, so it will now show the subtitle instead of a blank link with the channel ID undefined (before the 5.8.0 YouTube.js update, that added support for them, it would say N/A instead). This doesn't show any text for the Invidious API as that currently doesn't return it, but it does avoid it generating the undefined link.

Screenshots

before:
before

after (local API):
after

Testing

Example playlists:
One artist: https://www.youtube.com/playlist?list=OLAK5uy_lM3m05hKVY9vbzZH5lJpVKZKUQ-v_iTz4
Two artists: https://www.youtube.com/playlist?list=OLAK5uy_mYnfMbIG74obySLdWtKKGj_MJ-YZqVTu0

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 1, 2023
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) August 1, 2023 11:36
@ChunkyProgrammer
Copy link
Member

I don't think Album would get translated

@absidue
Copy link
Member Author

absidue commented Aug 1, 2023

Nothing gets translated at the moment, it returns the string unchanged from YouTube.

PikachuEXE
PikachuEXE previously approved these changes Aug 2, 2023
@absidue
Copy link
Member Author

absidue commented Aug 2, 2023

@ChunkyProgrammer Would you like it to display just the artists?

Happy to make changes, just need to know what I should do.

@ChunkyProgrammer
Copy link
Member

Imo we should only display the artist(s) unless we are translating "Album"

@absidue
Copy link
Member Author

absidue commented Aug 4, 2023

Updated.

@absidue absidue requested a review from PikachuEXE August 4, 2023 17:40
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FreeTubeBot FreeTubeBot merged commit e0fceed into FreeTubeApp:development Aug 4, 2023
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Aug 4, 2023
@absidue absidue deleted the album-playlists branch August 4, 2023 23:33
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 5, 2023
* development: (33 commits)
  Miscellaneous CSS cleanup (FreeTubeApp#3847)
  Fix empty channels showing up as errored with RSS (FreeTubeApp#3824)
  Fix author for album playlists on the playlist page (FreeTubeApp#3838)
  Update Snap Source Host Location (FreeTubeApp#3844)
  * Show error message in popular tab when instance does not support it (FreeTubeApp#3841)
  Use video durations from the watch history for RSS (FreeTubeApp#3839)
  ! Fix unnecessary error message display in toast when paused before video started playing on load (FreeTubeApp#3835)
  Use emit and props instead of $parent (FreeTubeApp#3834)
  Add custom toast event bus for Vue 3 compatiblity (FreeTubeApp#3833)
  Fix handling of DeArrow titles (FreeTubeApp#3825)
  * Update top nav bar icon to remove focus state style (FreeTubeApp#3792)
  Update ft-input for top navbar search input to behave more like Youtube one (FreeTubeApp#3793)
  Translated using Weblate (Hungarian)
  Fix: importing subscriptions with terminated channels (FreeTubeApp#3816)
  Fix outdated subscription cache clearing code when "Remove All Subscriptions / Profiles" performed (FreeTubeApp#3817)
  Translated using Weblate (Croatian)
  Bump eslint-plugin-import from 2.27.5 to 2.28.0 (FreeTubeApp#3827)
  Bump eslint from 8.45.0 to 8.46.0 (FreeTubeApp#3829)
  Bump eslint-plugin-unicorn from 48.0.0 to 48.0.1 (FreeTubeApp#3828)
  Bump lefthook from 1.4.6 to 1.4.7 (FreeTubeApp#3830)
  ...

# Conflicts:
#	src/renderer/components/ft-list-video/ft-list-video.js
#	src/renderer/components/playlist-info/playlist-info.js
#	src/renderer/components/playlist-info/playlist-info.vue
#	src/renderer/components/watch-video-info/watch-video-info.js
PikachuEXE added a commit to PikachuEXE/FreeTube that referenced this pull request Aug 5, 2023
* feature/playlist-2023-05: (31 commits)
  Miscellaneous CSS cleanup (FreeTubeApp#3847)
  Fix empty channels showing up as errored with RSS (FreeTubeApp#3824)
  Fix author for album playlists on the playlist page (FreeTubeApp#3838)
  Update Snap Source Host Location (FreeTubeApp#3844)
  * Show error message in popular tab when instance does not support it (FreeTubeApp#3841)
  Use video durations from the watch history for RSS (FreeTubeApp#3839)
  ! Fix unnecessary error message display in toast when paused before video started playing on load (FreeTubeApp#3835)
  Use emit and props instead of $parent (FreeTubeApp#3834)
  Add custom toast event bus for Vue 3 compatiblity (FreeTubeApp#3833)
  Fix handling of DeArrow titles (FreeTubeApp#3825)
  * Update top nav bar icon to remove focus state style (FreeTubeApp#3792)
  Update ft-input for top navbar search input to behave more like Youtube one (FreeTubeApp#3793)
  Translated using Weblate (Hungarian)
  Fix: importing subscriptions with terminated channels (FreeTubeApp#3816)
  Fix outdated subscription cache clearing code when "Remove All Subscriptions / Profiles" performed (FreeTubeApp#3817)
  Translated using Weblate (Croatian)
  Bump eslint-plugin-import from 2.27.5 to 2.28.0 (FreeTubeApp#3827)
  Bump eslint from 8.45.0 to 8.46.0 (FreeTubeApp#3829)
  Bump eslint-plugin-unicorn from 48.0.0 to 48.0.1 (FreeTubeApp#3828)
  Bump lefthook from 1.4.6 to 1.4.7 (FreeTubeApp#3830)
  ...
@absidue absidue mentioned this pull request Aug 18, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants