Skip to content

Conversation

@wispl
Copy link

@wispl wispl commented Aug 5, 2024

Adds the linked album to the song when doing a ytmusic search. This is a draft and the current change is not visible. Some questions:

  1. To expose the linked album for use, is it alright to modify StreamInfoItem to add a new method called getPlaylist?
  2. Currently the code just returns the browseId of the album, is there any preferred structure to also return the name of the album as well?

The browseId currently does nothing, hopefully I can try to get the browse endpoint working for ytmusic. I also plan to add a method to get the linked artist as well.

@TobiGr TobiGr added enhancement New feature or request youtube service, https://www.youtube.com/ labels Aug 15, 2024
@akashsriramganapathy
Copy link

is this still in progress ?

@wispl
Copy link
Author

wispl commented Jul 4, 2025

Kind of, it has been a while so I have to see if the changes even work now.

@wispl wispl marked this pull request as ready for review August 25, 2025 22:33
@wispl
Copy link
Author

wispl commented Aug 25, 2025

I added a new method (getPlaylistId) to StreamInfoItem. This PR introduces an useful value for the playlistId only for youtube music searches which is the browseId.

@wispl
Copy link
Author

wispl commented Aug 27, 2025

A better idea might be to replace the playlistId with the url of the playlist?

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Thank you! Sorry for not reviewing earlier, I somehow didn't notice this PR.

}

@Override
public String getPlaylistId() throws ParsingException {
Copy link
Member

Choose a reason for hiding this comment

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

This should be getPlaylistUrl() and return the playlist URL, rather than the ID, just like we have getUploaderUrl(). Also, you could also add getPlaylistName() since YouTube music seems to provide that information too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request youtube service, https://www.youtube.com/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants