OzymandiasTheGreat / mopidy-ytmusic

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

KeyError: 'musicShelfRenderer' #28

Open rebernet opened 3 years ago

rebernet commented 3 years ago

I see this error with sudo journalctl -u mopidy:

Apr 01 09:11:04 ubuntu mopidy[4449]: Traceback (most recent call last):
Apr 01 09:11:04 ubuntu mopidy[4449]:   File "/usr/local/lib/python3.8/dist-packages/mopidy_ytmusic/library.py", line 168, in browse
Apr 01 09:11:04 ubuntu mopidy[4449]:     res = self.backend.api.get_history()
Apr 01 09:11:04 ubuntu mopidy[4449]:   File "/usr/local/lib/python3.8/dist-packages/ytmusicapi/mixins/library.py", line 202, in get_history
Apr 01 09:11:04 ubuntu mopidy[4449]:     data = content['musicShelfRenderer']['contents']
Apr 01 09:11:04 ubuntu mopidy[4449]: KeyError: 'musicShelfRenderer'

Installed newest release v0.2.3. No artist or listening history shown either. Authentication seemed to work...

Is this extension working for you guys?

OzymandiasTheGreat commented 3 years ago

Can confirm that the extension works as intended, been using it for months every day. This looks like Google is rolling out changes to Youtube Music and these are not yet reflected on ytmusicapi. I'm a little pressed for time today, so I'll investigate further tomorrow.

rebernet commented 3 years ago

Thanks for your work and fast reply! Is there a way to check if the authentication worked?

Let me know if i can assist you or if you need more debug information.

impliedchaos commented 3 years ago

You could try playing back an entire track on mopidy, then going to music.youtube.com and checking your history to see if it shows it having been played last. If you're not authenticated, then it won't be able to scrobble the track to your ytmusic history.

rebernet commented 3 years ago

Okay, so tuns out I'm authenticated. I tried your suggestion. Thanks. I am using iris as a frontend. Seems like that iris is not capable of showing the artist etc. (under Browse -> Youtube Music). With the Mopidy Mobile App on android it works and I am able to search for artists. Am I missing something? What frontend for mopidy do you guys use to control the Youtube Music extension? (Sorry, very new to this)

OzymandiasTheGreat commented 3 years ago

Personally, I use ginger, a front-end of my own making. I tried several front-ends, and while there are great front-ends on android, desktop front-ends kinda suck. ginger is beta at best tho, browsing and controlling playback works, but search is broken and I won't have time to fix it for a while. On the up side, it works as webapp and as a native android app. Oh and you can't control volume with it currently. I usually adjust volume directly on the speakers, so I forgot to implement it in ginger... :sweat_smile:

DIYglenn commented 3 years ago

Okay, so tuns out I'm authenticated. I tried your suggestion. Thanks. I am using iris as a frontend. Seems like that iris is not capable of showing the artist etc. (under Browse -> Youtube Music). With the Mopidy Mobile App on android it works and I am able to search for artists. Am I missing something? What frontend for mopidy do you guys use to control the Youtube Music extension? (Sorry, very new to this)

I’m new as well. I haven’t figured out how to start music from Iris, so I use Mopidy on desktop to start music, and can then click next/previous on my Iris client.

rebernet commented 3 years ago

What do you mean by Mopidy on desktop? What kind of application is this?

OzymandiasTheGreat commented 3 years ago

Something like Cantata, it's an MPD client, but last time I checked it worked for Mopidy pretty well. Looks rather dated tho. To use it with Mopidy, you need to install Mopidy-MPD plugin.

DIYglenn commented 3 years ago

What do you mean by Mopidy on desktop? What kind of application is this?

It was one of the other web UI’s I think. I’ll double check next time that I boot up.

My goal is to have an RPi as a stand-alone unit in my car, so I might test Ginger. Otherwise Iris looks nice but doesn’t integrate well with yt.

rebernet commented 3 years ago

Thanks @OzymandiasTheGreat , I'll might also test Ginger.

@DIYglenn It appears that I am able to search the Youtube Music Library in Iris with Search -> and then add YtMusic to the Sources. Playing directly a track works but when selecting an album the tracks are missing...