Invidious is an alternative front-end to YouTube
Support ProblematicTimelineItem in trending feed
syeopite7b2758545429
diff --git a/src/invidious/helpers/serialized_yt_data.cr b/src/invidious/helpers/serialized_yt_data.crindex 56b64dbf..a6501e41 100644--- a/src/invidious/helpers/serialized_yt_data.cr+++ b/src/invidious/helpers/serialized_yt_data.cr@@ -299,8 +299,11 @@ end# the rest of the (hopefully) successfully parsed item on a page.struct ProblematicTimelineItemproperty parse_exception : Exception+ property id : String- def initialize(@parse_exception); end+ def initialize(@parse_exception)+ @id = Random.new.hex(8)+ enddef to_json(locale : String?, json : JSON::Builder)json.object dodiff --git a/src/invidious/trending.cr b/src/invidious/trending.crindex 107d148d..d14cde5d 100644--- a/src/invidious/trending.cr+++ b/src/invidious/trending.cr@@ -31,12 +31,12 @@ def fetch_trending(trending_type, region, locale)# See: https://github.com/iv-org/invidious/issues/2989next if (itm.contents.size < 24 && deduplicate)- extracted.concat extract_category(itm)+ extracted.concat itm.contents.select(SearchItem)elseextracted << itmendend# Deduplicate items before returning results- return extracted.select(SearchVideo).uniq!(&.id), plid+ return extracted.select(SearchVideo | ProblematicTimelineItem).uniq!(&.id), plidend