gmusicapi icon indicating copy to clipboard operation
gmusicapi copied to clipboard

Some queries seem to be missing the first letter in their nid

Open scj643 opened this issue 8 years ago • 5 comments

So far I have noticed this with search results. A track result the nid will be missing the leading T Same goes for artists

scj643 avatar May 26 '17 12:05 scj643

Huh. Are they still store tracks? Or are you seeing some new kind of track? Can you post a few example ids?

simon-weber avatar May 26 '17 14:05 simon-weber

It looks like this comment may have noticed the same thing: https://github.com/simon-weber/gmusicapi/issues/358#issuecomment-304250251.

simon-weber avatar May 26 '17 14:05 simon-weber

s = SearchResults(query='Audioslave')
p=s.results['playlist_hits']
g=p[0]
p=api.get_shared_playlist_contents(share_token=g['playlist']['shareToken'])
c=p[0]
k=c['track']
s=Song(k)
s._dict['nid']
'q2pi5znqumpbakzyia4d6wabsq'
g=api.get_track _info(store_track_id=t._dict['storeId'])
t._dict['albumId'].startswith('B')
False
g['albumId']
'Brx6cfl4cnd47vi5fuwu7nozzwu'
t._dict
``

    {'album': 'Audioslave',
     'albumArtRef': [{'aspectRatio': '1',
       'autogen': False,
       'kind': 'sj#imageRef',
       'url': 'http://lh3.googleusercontent.com/smWyGl1oLQE6vSh4UASDLmpYDt7aqTgc0jxbcZGoUIf018KHLeAZyoSp6C-7lQYpBYrrRDzYKy4'}],
     'albumArtist': 'Audioslave',
     'albumAvailableForPurchase': True,
     'albumId': 'rx6cfl4cnd47vi5fuwu7nozzwu',
     'artist': 'Audioslave',
     'artistId': ['4ii74rlqtoou3xego7kq2qlrwy'],
     'composer': '',
     'discNumber': 1,
     'durationMillis': '277000',
     'estimatedSize': '11116696',
     'explicitType': '2',
     'genre': 'Alt Metal',
     'kind': 'sj#track',
     'nid': 'abda5tzj2oc2swipsw2znml3sq',
     'primaryVideo': {'id': 'vVXIK1xCRpY',
      'kind': 'sj#video',
      'thumbnails': [{'height': 180,
        'url': 'https://i.ytimg.com/vi/vVXIK1xCRpY/mqdefault.jpg',
        'width': 320}]},
     'storeId': 'Tabda5tzj2oc2swipsw2znml3sq',
     'title': 'Show Me How to Live',
     'trackAvailableForPurchase': True,
     'trackAvailableForSubscription': True,
     'trackNumber': 2,
     'trackType': '7',
     'year': 2002}

scj643 avatar May 28 '17 17:05 scj643

Also sounds like #530, where some tracks are missing the leading T. Using 'storeId' instead of 'nid' has been working fine for me.

JVMed avatar May 29 '17 12:05 JVMed

Well wouldn't we want to make as little amount of API calls as we can

scj643 avatar Jun 01 '17 14:06 scj643