mirror of
https://github.com/iv-org/invidious.git
synced 2026-07-07 06:06:48 -05:00
fix playlists parsing for playlists without metadataParts
On some channels like MrBeast, metadataParts is absent, missing the author information, this is intended behaviour by Youtube since there is no author information attached to them. Example URL: https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA/playlists
This commit is contained in:
parent
ae1be83b43
commit
8934050961
@ -755,8 +755,8 @@ private module Parsers
|
||||
# "metadataParts": [ ... ] <-- metadataParts with the information we are searching for.
|
||||
# }
|
||||
# ]
|
||||
metadata_parts = metadata.dig("metadata", "contentMetadataViewModel", "metadataRows")
|
||||
.as_a.find { |row| row["metadataParts"]? }
|
||||
metadata_parts = metadata.dig?("metadata", "contentMetadataViewModel", "metadataRows").try &.as_a
|
||||
.find { |row| row["metadataParts"]? }
|
||||
.try &.dig("metadataParts", 0)
|
||||
|
||||
if author_info = metadata_parts.try &.["text"]?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user