OzymandiasTheGreat / mopidy-ytmusic

Mopidy extension for playling music/managing playlists in Youtube Music
Apache License 2.0
80 stars 28 forks source link

Unable to view/play uploaded music. #30

Open theli-ua opened 3 years ago

theli-ua commented 3 years ago

WIth errors like these:

ERROR    2021-05-17 15:08:48,475 [232453:YTMusicBackend-6] mopidy_ytmusic
  YTMusic failed getting tracks for album "FEmusic_library_privately_owned_release_detailb_po_CNfAr8vt1Y-cDxIaYmFjayB0byBjaG9wcGVkIGRvd24gcm9vdHMiA2dwbQ"
Traceback (most recent call last):
  File "~/.local/lib/python3.8/site-packages/mopidy_ytmusic/library.py", line 417, in lookup
    tracks = self.albumToTracks(res, bId)
  File "~/.local/lib/python3.8/site-packages/mopidy_ytmusic/library.py", line 863, in albumToTracks
    if type(album["artist"]) is list:
KeyError: 'artist'
theli-ua commented 3 years ago

I checked album object and it really doesn't have an artist field

impliedchaos commented 3 years ago

I'm unable to replicate this error, however I don't see a reason why we can't put in a single if statement to prevent this error if there's no artist data in the album. I'll commit a fix in a minute.

theli-ua commented 3 years ago

I wonder how this will end up working. Weirdly enough in YT native interface all those tracks are part of proper album and are showing correct artist

impliedchaos commented 3 years ago

OK, just released 0.2.4 which should hopefully solve this.

OzymandiasTheGreat commented 3 years ago

Sorry for the delay, 0.2.4 has been pushed to PyPI.

theli-ua commented 3 years ago

It no longer has the exception but you still can't navigate , it just doesn't show any tracks for albums, any albums for artists. I'm not sure how to help anyone repro this, those albums were uploaded to gmusic over 8 years ago

impliedchaos commented 3 years ago

those albums were uploaded to gmusic over 8 years ago

Yeah, all of mine were the same and uploaded to gmusic a long time ago. I thought these must have been new songs, so I tried to upload new music to youtube to try to duplicate this, and that worked fine for me as well.

...still can't navigate , it just doesn't show any tracks for albums, any albums for artists.

This sounds like you're unauthenticated. Can you try doing a reauth? The updated ytmusicapi is using a couple of extra headers now than it used to as well.