breaking: improve artists key consistency (affects get_album, get_library_upload_*songs,album,artist)
This commit is contained in:
parent
ba57e1a8a0
commit
86790c07e2
3 changed files with 11 additions and 8 deletions
|
|
@ -455,7 +455,7 @@ class BrowsingMixin:
|
|||
},
|
||||
"description": "Seven is ...",
|
||||
"thumbnails": [...],
|
||||
"artist": [
|
||||
"artists": [
|
||||
{
|
||||
"name": "Martin Garrix",
|
||||
"id": "UCqJnSdHjKtfsrHi9aI-9d3g"
|
||||
|
|
@ -492,10 +492,10 @@ class BrowsingMixin:
|
|||
album['description'] = find_object_by_key(data, 'musicAlbumReleaseDetail', 'payload',
|
||||
True)['description']
|
||||
album['thumbnails'] = album_data['thumbnailDetails']['thumbnails']
|
||||
album['artist'] = []
|
||||
album['artists'] = []
|
||||
artists_data = find_objects_by_key(data, 'musicArtist', 'payload')
|
||||
for artist in artists_data:
|
||||
album['artist'].append({
|
||||
album['artists'].append({
|
||||
'name': artist['musicArtist']['name'],
|
||||
'id': artist['musicArtist']['externalChannelId']
|
||||
})
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ class UploadsMixin:
|
|||
{
|
||||
"entityId": "t_po_CICr2crg7OWpchDpjPjrBA",
|
||||
"videoId": "Uise6RPKoek",
|
||||
"artist": "Coldplay",
|
||||
"artists": [{
|
||||
'name': 'Coldplay',
|
||||
'id': 'FEmusic_library_privately_owned_artist_detaila_po_CICr2crg7OWpchIIY29sZHBsYXk',
|
||||
}],
|
||||
"title": "A Sky Full Of Stars",
|
||||
"album": "Ghost Stories",
|
||||
"likeStatus": "LIKE",
|
||||
|
|
@ -110,7 +113,7 @@ class UploadsMixin:
|
|||
"entityId": "t_po_CICr2crg7OWpchDKwoakAQ",
|
||||
"videoId": "Dtffhy8WJgw",
|
||||
"title": "Hold Me (Original Mix)",
|
||||
"artist": [
|
||||
"artists": [
|
||||
{
|
||||
"name": "Jakko",
|
||||
"id": "FEmusic_library_privately_owned_artist_detaila_po_CICr2crg7OWpchIFamFra28"
|
||||
|
|
@ -164,7 +167,7 @@ class UploadsMixin:
|
|||
"videoId": "FVo-UZoPygI",
|
||||
"title": "Feel So Close",
|
||||
"duration": "4:15",
|
||||
"artist": None,
|
||||
"artists": None,
|
||||
"album": {
|
||||
"name": "18 Months",
|
||||
"id": "FEmusic_library_privately_owned_release_detailb_po_55chars"
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ def parse_uploaded_items(results):
|
|||
'videoId': videoId,
|
||||
'title': title,
|
||||
'duration': duration,
|
||||
'artist': None,
|
||||
'artists': None,
|
||||
'album': None,
|
||||
'likeStatus': like,
|
||||
'thumbnails': thumbnails
|
||||
}
|
||||
song['artist'] = parse_song_artists(data, 1)
|
||||
song['artists'] = parse_song_artists(data, 1)
|
||||
song['album'] = parse_song_album(data, 2)
|
||||
|
||||
songs.append(song)
|
||||
|
|
|
|||
Loading…
Reference in a new issue