aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus E <heckyel@riseup.net>2023-05-28 21:45:20 -0400
committerJesus E <heckyel@riseup.net>2023-05-28 21:45:20 -0400
commit74907a81835435f881424b41729cc71cb9d50056 (patch)
tree62ab4054d0820bb3bcf430a8dd55b604ab1122a3
parentec8f652bc8414950c8ab4b4b02186e86b95ee620 (diff)
downloadyt-local-74907a81835435f881424b41729cc71cb9d50056.tar.lz
yt-local-74907a81835435f881424b41729cc71cb9d50056.tar.xz
yt-local-74907a81835435f881424b41729cc71cb9d50056.zip
Music list extraction: read from SONG field
This one is used when there is no corresponding YouTube video for the track
-rw-r--r--youtube/yt_data_extract/watch_extraction.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube/yt_data_extract/watch_extraction.py b/youtube/yt_data_extract/watch_extraction.py
index 2158fec..cfda4fa 100644
--- a/youtube/yt_data_extract/watch_extraction.py
+++ b/youtube/yt_data_extract/watch_extraction.py
@@ -250,7 +250,9 @@ def _extract_from_music_renderer(renderer_content):
row = row.get('infoRowRenderer', {})
title = extract_str(row.get('title'))
data = extract_str(row.get('defaultMetadata'))
- if title == 'ARTIST':
+ if title == 'SONG':
+ song['title'] = data
+ elif title == 'ARTIST':
song['artist'] = data
elif title == 'ALBUM':
song['album'] = data