mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix playlists with Various Artists
author
This commit is contained in:
parent
55ce1ce3ec
commit
2bf445e165
1 changed files with 2 additions and 2 deletions
|
@ -231,7 +231,7 @@ def extract_item(item : JSON::Any, author_fallback : String? = nil, author_id_fa
|
||||||
video_id = i["videoId"].as_s
|
video_id = i["videoId"].as_s
|
||||||
title = i["title"].try { |t| t["simpleText"]?.try &.as_s || t["runs"]?.try &.as_a.map(&.["text"].as_s).join("") } || ""
|
title = i["title"].try { |t| t["simpleText"]?.try &.as_s || t["runs"]?.try &.as_a.map(&.["text"].as_s).join("") } || ""
|
||||||
|
|
||||||
author_info = i["ownerText"]?.try &.["runs"].as_a[0]?
|
author_info = i["ownerText"]?.try &.["runs"]?.try &.as_a?.try &.[0]?
|
||||||
author = author_info.try &.["text"].as_s || author_fallback || ""
|
author = author_info.try &.["text"].as_s || author_fallback || ""
|
||||||
author_id = author_info.try &.["navigationEndpoint"]?.try &.["browseEndpoint"]["browseId"].as_s || author_id_fallback || ""
|
author_id = author_info.try &.["navigationEndpoint"]?.try &.["browseEndpoint"]["browseId"].as_s || author_id_fallback || ""
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ def extract_item(item : JSON::Any, author_fallback : String? = nil, author_id_fa
|
||||||
video_count = i["videoCount"]?.try &.as_s.to_i || 0
|
video_count = i["videoCount"]?.try &.as_s.to_i || 0
|
||||||
playlist_thumbnail = i["thumbnails"].as_a[0]?.try &.["thumbnails"]?.try &.as_a[0]?.try &.["url"].as_s || ""
|
playlist_thumbnail = i["thumbnails"].as_a[0]?.try &.["thumbnails"]?.try &.as_a[0]?.try &.["url"].as_s || ""
|
||||||
|
|
||||||
author_info = i["shortBylineText"]?.try &.["runs"].as_a[0]?
|
author_info = i["shortBylineText"]?.try &.["runs"]?.try &.as_a?.try &.[0]?
|
||||||
author = author_info.try &.["text"].as_s || author_fallback || ""
|
author = author_info.try &.["text"].as_s || author_fallback || ""
|
||||||
author_id = author_info.try &.["navigationEndpoint"]?.try &.["browseEndpoint"]["browseId"].as_s || author_id_fallback || ""
|
author_id = author_info.try &.["navigationEndpoint"]?.try &.["browseEndpoint"]["browseId"].as_s || author_id_fallback || ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue