music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.2k stars 44 forks source link

Youtube Music Provider fails to fully sync #2526

Open Hulumanu opened 6 days ago

Hulumanu commented 6 days ago

What version of Music Assistant has the issue?

2.0.7

What version of the Home Assistant Integration have you got installed?

2024.6.2

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

Fresh install of MASS, added Youtube Music Provider... when it tries to sync, it only takes like 5 seconds and returns. When I look at the items downloaded... there are only about 10 items, no albums, no playlists, .... I tried removing YT as provider and re-add... same result. I tried uninstalling MASS and reinstalling... same result.
Attached - mass log file and (paired down) hass debug log ;-)

I do have ytube_music_player installed ( I installed that after trying all the above), and it has no issue with loading all of my items from youtube. I do have a premium Youtube account..

How to reproduce

Install Music Assistant and set up, add Youtube Music as provider, let it synchronize... notice sparse items on home page. Click syncronize - no change to number of items, Click reload - no change, Re-install - no change

Music Providers

Youtube Music

Player Providers

DLNA

Full log output

mass.log

Additional information

Debug info

2024-06-22 22:14:08.833 DEBUG (MainThread) [music_assistant.client.connection] Received message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"event":"providers_updated","object_id":null,"data":[{"type":"music","domain":"builtin","name":"Music Assistant","instance_id":"builtin--62Rivrof","supported_features":["browse","library_tracks","library_radios","library_playlists","library_tracks_edit","library_radios_edit","playlist_create","playlist_tracks_edit"],"available":true,"is_streaming_provider":false},{"type":"metadata","domain":"fanarttv","name":"fanart.tv Metadata provider","instance_id":"fanarttv--dvGePhEV","supported_features":["artist_metadata","album_metadata"],"available":true,"is_streaming_provider":null},{"type":"metadata","domain":"theaudiodb","name":"TheAudioDB Metadata provider","instance_id":"theaudiodb--bP2agMVe","supported_features":["artist_metadata","album_metadata","track_metadata"],"available":true,"is_streaming_provider":null},{"type":"metadata","domain":"musicbrainz","name":"MusicBrainz Metadata provider","instance_id":"musicbrainz--3woevY6m","supported_features":[],"available":true,"is_streaming_provider":null},{"type":"player","domain":"ugp","name":"Universal Group Player","instance_id":"ugp--bzuSDHVp","supported_features":["player_group_create"],"available":true,"is_streaming_provider":null},{"type":"player","domain":"dlna","name":"UPnP/DLNA Player provider","instance_id":"dlna--zrY4C9BJ","supported_features":[],"available":true,"is_streaming_provider":null}]}', extra='')

2024-06-22 22:14:08.834 DEBUG (MainThread) [music_assistant.client] Received event: MassEvent(event=<EventType.PROVIDERS_UPDATED: 'providers_updated'>, object_id=None, data=[{'type': 'music', 'domain': 'builtin', 'name': 'Music Assistant', 'instance_id': 'builtin--62Rivrof', 'supported_features': ['browse', 'library_tracks', 'library_radios', 'library_playlists', 'library_tracks_edit', 'library_radios_edit', 'playlist_create', 'playlist_tracks_edit'], 'available': True, 'is_streaming_provider': False}, {'type': 'metadata', 'domain': 'fanarttv', 'name': 'fanart.tv Metadata provider', 'instance_id': 'fanarttv--dvGePhEV', 'supported_features': ['artist_metadata', 'album_metadata'], 'available': True, 'is_streaming_provider': None}, {'type': 'metadata', 'domain': 'theaudiodb', 'name': 'TheAudioDB Metadata provider', 'instance_id': 'theaudiodb--bP2agMVe', 'supported_features': ['artist_metadata', 'album_metadata', 'track_metadata'], 'available': True, 'is_streaming_provider': None}, {'type': 'metadata', 'domain': 'musicbrainz', 'name': 'MusicBrainz Metadata provider', 'instance_id': 'musicbrainz--3woevY6m', 'supported_features': [], 'available': True, 'is_streaming_provider': None}, {'type': 'player', 'domain': 'ugp', 'name': 'Universal Group Player', 'instance_id': 'ugp--bzuSDHVp', 'supported_features': ['player_group_create'], 'available': True, 'is_streaming_provider': None}, {'type': 'player', 'domain': 'dlna', 'name': 'UPnP/DLNA Player provider', 'instance_id': 'dlna--zrY4C9BJ', 'supported_features': [], 'available': True, 'is_streaming_provider': None}]) 2024-06-22 22:14:09.807 DEBUG (MainThread) [music_assistant.client.connection] Received message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"event":"providers_updated","object_id":null,"data":[{"type":"music","domain":"builtin","name":"Music Assistant","instance_id":"builtin--62Rivrof","supported_features":["browse","library_tracks","library_radios","library_playlists","library_tracks_edit","library_radios_edit","playlist_create","playlist_tracks_edit"],"available":true,"is_streaming_provider":false},{"type":"metadata","domain":"fanarttv","name":"fanart.tv Metadata provider","instance_id":"fanarttv--dvGePhEV","supported_features":["artist_metadata","album_metadata"],"available":true,"is_streaming_provider":null},{"type":"metadata","domain":"theaudiodb","name":"TheAudioDB Metadata provider","instance_id":"theaudiodb--bP2agMVe","supported_features":["artist_metadata","album_metadata","track_metadata"],"available":true,"is_streaming_provider":null},{"type":"metadata","domain":"musicbrainz","name":"MusicBrainz Metadata provider","instance_id":"musicbrainz--3woevY6m","supported_features":[],"available":true,"is_streaming_provider":null},{"type":"player","domain":"ugp","name":"Universal Group Player","instance_id":"ugp--bzuSDHVp","supported_features":["player_group_create"],"available":true,"is_streaming_provider":null},{"type":"player","domain":"dlna","name":"UPnP/DLNA Player provider","instance_id":"dlna--zrY4C9BJ","supported_features":[],"available":true,"is_streaming_provider":null},{"type":"music","domain":"ytmusic","name":"YouTube Music","instance_id":"ytmusic--KhyPWECC","supported_features":["library_artists","library_albums","library_tracks","library_playlists","browse","search","artist_albums","artist_toptracks","similar_tracks"],"available":true,"is_streaming_provider":true}]}', extra='')

2024-06-22 22:14:09.807 DEBUG (MainThread) [music_assistant.client] Received event: MassEvent(event=<EventType.PROVIDERS_UPDATED: 'providers_updated'>, object_id=None, data=[{'type': 'music', 'domain': 'builtin', 'name': 'Music Assistant', 'instance_id': 'builtin--62Rivrof', 'supported_features': ['browse', 'library_tracks', 'library_radios', 'library_playlists', 'library_tracks_edit', 'library_radios_edit', 'playlist_create', 'playlist_tracks_edit'], 'available': True, 'is_streaming_provider': False}, {'type': 'metadata', 'domain': 'fanarttv', 'name': 'fanart.tv Metadata provider', 'instance_id': 'fanarttv--dvGePhEV', 'supported_features': ['artist_metadata', 'album_metadata'], 'available': True, 'is_streaming_provider': None}, {'type': 'metadata', 'domain': 'theaudiodb', 'name': 'TheAudioDB Metadata provider', 'instance_id': 'theaudiodb--bP2agMVe', 'supported_features': ['artist_metadata', 'album_metadata', 'track_metadata'], 'available': True, 'is_streaming_provider': None}, {'type': 'metadata', 'domain': 'musicbrainz', 'name': 'MusicBrainz Metadata provider', 'instance_id': 'musicbrainz--3woevY6m', 'supported_features': [], 'available': True, 'is_streaming_provider': None}, {'type': 'player', 'domain': 'ugp', 'name': 'Universal Group Player', 'instance_id': 'ugp--bzuSDHVp', 'supported_features': ['player_group_create'], 'available': True, 'is_streaming_provider': None}, {'type': 'player', 'domain': 'dlna', 'name': 'UPnP/DLNA Player provider', 'instance_id': 'dlna--zrY4C9BJ', 'supported_features': [], 'available': True, 'is_streaming_provider': None}, {'type': 'music', 'domain': 'ytmusic', 'name': 'YouTube Music', 'instance_id': 'ytmusic--KhyPWECC', 'supported_features': ['library_artists', 'library_albums', 'library_tracks', 'library_playlists', 'browse', 'search', 'artist_albums', 'artist_toptracks', 'similar_tracks'], 'available': True, 'is_streaming_provider': True}]) 2024-06-22 22:14:09.808 DEBUG (MainThread) [music_assistant.client.connection] Received message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"event":"sync_tasks_updated","object_id":null,"data":[{"provider_domain":"ytmusic","provider_instance":"ytmusic--KhyPWECC","media_types":["artist","album","track","playlist","radio"]}]}', extra='')

2024-06-22 22:14:09.809 DEBUG (MainThread) [music_assistant.client] Received event: MassEvent(event=<EventType.SYNC_TASKS_UPDATED: 'sync_tasks_updated'>, object_id=None, data=[{'provider_domain': 'ytmusic', 'provider_instance': 'ytmusic--KhyPWECC', 'media_types': ['artist', 'album', 'track', 'playlist', 'radio']}]) 2024-06-22 22:14:14.363 DEBUG (MainThread) [music_assistant.client.connection] Received message: WSMessage(type=<WSMsgType.TEXT: 1>, data='{"event":"sync_tasks_updated","object_id":null,"data":[]}', extra='')

2024-06-22 22:14:14.363 DEBUG (MainThread) [music_assistant.client] Received event: MassEvent(event=<EventType.SYNC_TASKS_UPDATED: 'sync_tasks_updated'>, object_id=None, data=[])

What version of Home Assistant Core are your running

2024.6.4

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Linux

MarvinSchenkel commented 6 days ago

Could you please restart MA and include a full log? You can download it via the settings. The log you provided doesn't show anything interesting

Hulumanu commented 5 days ago

Sure.... here are various logs: Log from MA => Core => Server Logging MASS Log from Core Page.txt

Log from HA => Settings => Add-ons MASS Log from Add On.txt

Debug Log from HA => Settings => Integrations => Music Assistant (Enable debug logging) ==> MASS => Youtube Music Provider => Synchronize Now home-assistant_mass_2024-06-23T18-05-48.703Z.log

Log from HA => Settings => System => Logs home-assistant_2024-06-23T18-10-55.598Z.log

Thanks for the help! This is an amazing product!!! Frank

MarvinSchenkel commented 5 days ago

Hey Frank!

Sorry, but debug logging is not enabled on the one place I actually need it (:.

Can you enable verbose logging for YT Music in MA? So go to MA > Settings > YT Music provider > Advanced > Set log level to 'verbose'. Then, try the sync process again and include the logs from MA. The one you provided ast the first one is enough (Log from MA => Core => Server Logging).

Hulumanu commented 4 days ago

Ah, sure... here it is! verboselog.txt

Looks like it doesn't like Journey? LOL

MarvinSchenkel commented 4 days ago

Well that error is related to playback and not the sync. I actually fixed that today and released it in beta 8. Could you maybe install the beta addon and see if that works for you? If not, please include a verbose log for YouTube music 💪

Op ma 24 jun 2024 om 17:52 schreef Hulumanu @.***>

Ah, sure... here it is! verboselog.txt https://github.com/user-attachments/files/15958145/verboselog.txt

Looks like it doesn't like Journey? LOL

— Reply to this email directly, view it on GitHub https://github.com/music-assistant/hass-music-assistant/issues/2526#issuecomment-2186893571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG2MJ27RYYVFBGITPCVRG3ZJA6CJAVCNFSM6AAAAABJYCAHUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWHA4TGNJXGE . You are receiving this because you were assigned.Message ID: @.***>

Hulumanu commented 4 days ago

I figured it out!!!!! There was a playlist in Youtube Music that seems to have had an error (no songs, no title, and I couldn't delete it). I actually added a song (random), and named the playlist... then I was able to delete it. Now MA seems to be syncing fine.

Question (maybe feature requests?)

  1. ytube_music_player gets lists that include uploaded music: ytube Can this be added?

  2. when MA downloads Playlists - it is including lists from videos that I have saved in a list from regular youtube: youtubevids Work is a 'playlist' of youtube videos I saved while watching youtube..... can we filter these out somehow?

(and lastly)

  1. I go to search for an artist (let's say Queen)... I don't have any Queen in my current library, and it asks me if I want to do a Global Search - is there a way to just do a global search by default?

Thanks for your help!!!
I will be sending coffee (beer?) money soon... where can I do that?

Good job on MA! Frank