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.39k stars 51 forks source link

YouTube Music: Playback fails on some tracks with error that "disc_number" field is None #2585

Closed ImSorryButWho closed 4 months ago

ImSorryButWho commented 4 months ago

What version of Music Assistant has the issue?

2.1.0b13

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

Trying to play back tracks from the album "Descendants (Original TV Movie Soundtrack) (https://music.youtube.com/playlist?list=OLAK5uy_lsRsYDAtiDJ19r_zN_gnBH0kn4mCB0aWQ) from YouTube Music fails with an error stating Field "disc_number" of type int in Track has invalid value None. The same error appears trying to play a playlist which includes any of the tracks from this album.

This playlist worked correctly in 2.1.0b9.

How to reproduce

Search for this album in Music Assistant from YouTube Music and attempt to play it.

Music Providers

YouTube Music - displays problem

I don't have any other providers to try.

Player Providers

Sonos and Chromecast both display the problem.

Full log output

musicassistant.log

Additional information

No response

What version of Home Assistant Core are your running

2024.7.1

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

melwinek commented 4 months ago

Try clearing the cache in cache controller in settings.

MarvinSchenkel commented 4 months ago

^ this. If that does not work, please confirm that it still happens after a fresh install (ie deleting the addon and reinstalling it). Just had a look at the code and there should be no cases of None for disc number.

ImSorryButWho commented 4 months ago

Thank you - clearing the cache does solve the problem. Sorry for not trying that myself!

OzGav commented 4 months ago

That is in the troubleshooting steps that you said you did…..

ImSorryButWho commented 4 months ago

Mea culpa - you're absolutely right. The issue template refers to, but doesn't link to the troubleshooting FAQ. In looking for that I found the link to the Q&A section in the README, which links to the Github discussion, which on first glance is empty. There is a link to a link at the top, but banner blindness struck and I (wrongly) assumed that it wasn't written yet. I did search the issues, and thought I had done my part.

I'm very sorry. Could I suggest linking directly to the troubleshooting page in the issue template?

OzGav commented 4 months ago

There actually is a link but I have added another one

image