None
closed
nobody
gmusic (2)
2018-07-06
2018-07-04
David Stilwell
No

When playing a playlist using gmusic plugin the list of playlists is presented but when you try to select an individual playlist it fails.

OS: Raspbian using Moode audio player

Client: BubbleUPNP

Latest version version of code.

The session.py is throwing an exception resulting in an empty array then trying to get playlist tracks.

To get the stack trace I removed the try block and also dumped trkl[0]

diff --git a/src/mediaserver/cdplugins/gmusic/session.py b/src/mediaserver/cdplugins/gmusic/session.py
index 29684b2..40e3d2a 100644
--- a/src/mediaserver/cdplugins/gmusic/session.py
+++ b/src/mediaserver/cdplugins/gmusic/session.py
@@ -100,10 +100,11 @@ class Session(object):
for item in data if item['id'] == playlist_id]
if not trkl:
return []
- try:
- return [self.lib_tracks[track['trackId']] for track in trkl[0]]
- except:
- return []
+ self.dmpdata("user_playlist_content", trkl[0])
+ #try:
+ return [self.lib_tracks[track['trackId']] for track in trkl[0]]
+ #except:
+ # return []

here is the log:

Jul  4 08:38:55 moto upmpdcli[25319]: user_playlist_content: [
Jul  4 08:38:55 moto upmpdcli[25319]:     {
Jul  4 08:38:55 moto upmpdcli[25319]:         "kind": "sj#playlistEntry",
Jul  4 08:38:55 moto upmpdcli[25319]:         "deleted": false,
Jul  4 08:38:55 moto upmpdcli[25319]:         "trackId": "Ts4kgatazvraki5hmrafq6vvwxq",
Jul  4 08:38:55 moto upmpdcli[25319]:         "lastModifiedTimestamp": "1530702235510914",
Jul  4 08:38:55 moto upmpdcli[25319]:         "playlistId": "15b79d0e-34dd-43f4-a396-ee4a0c7b78d2",
Jul  4 08:38:55 moto upmpdcli[25319]:         "clientId": "58e46f75-40e5-46f3-8641-8b715b61665d",
Jul  4 08:38:55 moto upmpdcli[25319]:         "source": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:         "track": {
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumArtRef": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 {
Jul  4 08:38:55 moto upmpdcli[25319]:                     "url": "http://lh4.ggpht.com/ZX8BnZYmS3yRo8kyb1vp5T__noItI37Su2mN6cta1kkGevjkpFEPNOc5UWGFzFSDUyj5UDiE",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "kind": "sj#imageRef",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "aspectRatio": "1",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "autogen": false
Jul  4 08:38:55 moto upmpdcli[25319]:                 }
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "artistId": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 "Amye57j6ccit4r342ciwjldj6qu"
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "composer": "",
Jul  4 08:38:55 moto upmpdcli[25319]:             "year": 1977,
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackAvailableForSubscription": true,
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackType": "7",
Jul  4 08:38:55 moto upmpdcli[25319]:             "album": "Sweet Forgiveness",
Jul  4 08:38:55 moto upmpdcli[25319]:             "title": "Runaway (Remastered)",
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumArtist": "Bonnie Raitt",
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackNumber": 2,
Jul  4 08:38:55 moto upmpdcli[25319]:             "discNumber": 1,
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumAvailableForPurchase": false,
Jul  4 08:38:55 moto upmpdcli[25319]:             "explicitType": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackAvailableForPurchase": true,
Jul  4 08:38:55 moto upmpdcli[25319]:             "storeId": "Ts4kgatazvraki5hmrafq6vvwxq",
Jul  4 08:38:55 moto upmpdcli[25319]:             "nid": "s4kgatazvraki5hmrafq6vvwxq",
Jul  4 08:38:55 moto upmpdcli[25319]:             "estimatedSize": "9498149",
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumId": "B7nodbdrkl2ieeoaelboy6ccjim",
Jul  4 08:38:55 moto upmpdcli[25319]:             "genre": "Rock",
Jul  4 08:38:55 moto upmpdcli[25319]:             "artistArtRef": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 {
Jul  4 08:38:55 moto upmpdcli[25319]:                     "url": "http://lh3.googleusercontent.com/WcA8tQ1hMj2VuxToD80eT_-PkWYFQvrm7hJJs-aFlsFcEhAuLEVjb9yuXlyWtruROtuHojTmoA",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "kind": "sj#imageRef",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "aspectRatio": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "autogen": false
Jul  4 08:38:55 moto upmpdcli[25319]:                 }
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "kind": "sj#track",
Jul  4 08:38:55 moto upmpdcli[25319]:             "artist": "Bonnie Raitt",
Jul  4 08:38:55 moto upmpdcli[25319]:             "durationMillis": "237000"
Jul  4 08:38:55 moto upmpdcli[25319]:         },
Jul  4 08:38:55 moto upmpdcli[25319]:         "absolutePosition": "01729382256910270462",
Jul  4 08:38:55 moto upmpdcli[25319]:         "creationTimestamp": "1530702235510914",
Jul  4 08:38:55 moto upmpdcli[25319]:         "id": "e37d1c01-a438-3a6f-b051-53e825d4d03d"
Jul  4 08:38:55 moto upmpdcli[25319]:     },
Jul  4 08:38:55 moto upmpdcli[25319]:     {
Jul  4 08:38:55 moto upmpdcli[25319]:         "kind": "sj#playlistEntry",
Jul  4 08:38:55 moto upmpdcli[25319]:         "deleted": false,
Jul  4 08:38:55 moto upmpdcli[25319]:         "trackId": "Tbl33cjiwp3oxwnc2bam4l3nrzy",
Jul  4 08:38:55 moto upmpdcli[25319]:         "lastModifiedTimestamp": "1530702459356877",
Jul  4 08:38:55 moto upmpdcli[25319]:         "playlistId": "15b79d0e-34dd-43f4-a396-ee4a0c7b78d2",
Jul  4 08:38:55 moto upmpdcli[25319]:         "clientId": "153423c5-1746-423b-9215-bacf495168a7",
Jul  4 08:38:55 moto upmpdcli[25319]:         "source": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:         "track": {
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumArtRef": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 {
Jul  4 08:38:55 moto upmpdcli[25319]:                     "url": "http://lh3.googleusercontent.com/rNwT0xIrs9NHsdvLyTOx3SUfpD60Qbr47XJ6x073ndtKfWcZaL0oU9WVnfReolfG8qGm_dJuLQ",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "kind": "sj#imageRef",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "aspectRatio": "1",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "autogen": false
Jul  4 08:38:55 moto upmpdcli[25319]:                 }
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "artistId": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 "Akr7r2ux5neoky3wbgrfxi6zb4u"
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "composer": "",
Jul  4 08:38:55 moto upmpdcli[25319]:             "year": 1991,
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackAvailableForSubscription": true,
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackType": "7",
Jul  4 08:38:55 moto upmpdcli[25319]:             "album": "The Commitments (Soundtrack)",
Jul  4 08:38:55 moto upmpdcli[25319]:             "title": "Try A Little Tenderness",
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumArtist": "The Commitments",
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackNumber": 7,
Jul  4 08:38:55 moto upmpdcli[25319]:             "discNumber": 1,
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumAvailableForPurchase": false,
Jul  4 08:38:55 moto upmpdcli[25319]:             "explicitType": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:             "trackAvailableForPurchase": true,
Jul  4 08:38:55 moto upmpdcli[25319]:             "storeId": "Tbl33cjiwp3oxwnc2bam4l3nrzy",
Jul  4 08:38:55 moto upmpdcli[25319]:             "nid": "bl33cjiwp3oxwnc2bam4l3nrzy",
Jul  4 08:38:55 moto upmpdcli[25319]:             "estimatedSize": "10934894",
Jul  4 08:38:55 moto upmpdcli[25319]:             "albumId": "Bgkroyijxcfw72o5p3teq4s6kmu",
Jul  4 08:38:55 moto upmpdcli[25319]:             "genre": "Soundtracks",
Jul  4 08:38:55 moto upmpdcli[25319]:             "playCount": 1,
Jul  4 08:38:55 moto upmpdcli[25319]:             "artistArtRef": [
Jul  4 08:38:55 moto upmpdcli[25319]:                 {
Jul  4 08:38:55 moto upmpdcli[25319]:                     "url": "http://lh3.googleusercontent.com/Oju7EIzFI0KqWuAGxL9ZSYM6EUgNM6o8aDzTJA5ajeqriNtkAvN9IjRPWkww8aWsWXig2UPJHw",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "kind": "sj#imageRef",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "aspectRatio": "2",
Jul  4 08:38:55 moto upmpdcli[25319]:                     "autogen": false
Jul  4 08:38:55 moto upmpdcli[25319]:                 }
Jul  4 08:38:55 moto upmpdcli[25319]:             ],
Jul  4 08:38:55 moto upmpdcli[25319]:             "kind": "sj#track",
Jul  4 08:38:55 moto upmpdcli[25319]:             "artist": "The Commitments",
Jul  4 08:38:55 moto upmpdcli[25319]:             "durationMillis": "273000"
Jul  4 08:38:55 moto upmpdcli[25319]:         },
Jul  4 08:38:55 moto upmpdcli[25319]:         "absolutePosition": "02017612633061982205",
Jul  4 08:38:55 moto upmpdcli[25319]:         "creationTimestamp": "1530702459356877",
Jul  4 08:38:55 moto upmpdcli[25319]:         "id": "76816520-19a0-3b3c-aa45-ef39e23ac81d"
Jul  4 08:38:55 moto upmpdcli[25319]:     }
Jul  4 08:38:55 moto upmpdcli[25319]: ]
Jul  4 08:38:55 moto upmpdcli[25319]: CMDTALK: gmusic-app.py: processmessage: processor raised: [u'Ts4kgatazvraki5hmrafq6vvwxq']
Jul  4 08:38:55 moto upmpdcli[25319]: Traceback (most recent call last):
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalk.py", line 172, in processmessage
Jul  4 08:38:55 moto upmpdcli[25319]:     outfields = processor.process(params)
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 54, in process
Jul  4 08:38:55 moto upmpdcli[25319]:     return self.dispatcher.run(params[prcnmkey], params)
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 37, in run
Jul  4 08:38:55 moto upmpdcli[25319]:     return func(params)
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/gmusic/gmusic-app.py", line 167, in browse
Jul  4 08:38:55 moto upmpdcli[25319]:     plugin.run([idpath])
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/pycommon/routing.py", line 115, in run
Jul  4 08:38:55 moto upmpdcli[25319]:     self._dispatch(path)
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/pycommon/routing.py", line 126, in _dispatch
Jul  4 08:38:55 moto upmpdcli[25319]:     view_func(**kwargs)
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/gmusic/gmusic-app.py", line 277, in playlist_view
Jul  4 08:38:55 moto upmpdcli[25319]:     track_list(session.get_user_playlist_tracks(playlist_id))
Jul  4 08:38:55 moto upmpdcli[25319]:   File "/usr/share/upmpdcli/cdplugins/gmusic/session.py", line 105, in get_user_playlist_tracks
Jul  4 08:38:55 moto upmpdcli[25319]:     return [self.lib_tracks[track['trackId']] for track in trkl[0]]
Jul  4 08:38:55 moto upmpdcli[25319]: KeyError: u'Ts4kgatazvraki5hmrafq6vvwxq'
Jul  4 08:38:55 moto upmpdcli[25319]: :4:src/mediaserver/cdplugins/cmdtalk-fixed.cpp:140::CmdTalk: Got empty line
Jul  4 08:38:56 moto upmpdcli[25319]: :2:src/mediaserver/cdplugins/plgwithslave.cxx:523::PlgWithSlave::browse: slave failure

Discussion

<< < 1 2 (Page 2 of 2)
  • medoc
    medoc
    2018-07-06

    • status: open --> closed
     
<< < 1 2 (Page 2 of 2)

Cancel   Add attachment