Skip to content

Commit

Permalink
Handle playlists cataloged as Podcast
Browse files Browse the repository at this point in the history
Videos of a playlist cataloged as podcast are called episodes therefore
Invidious was not able to find `video` in the `text` value inside the
stats array.
  • Loading branch information
Fijxu committed May 13, 2024
1 parent eda7444 commit 90fcf80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/invidious/playlists.cr
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ def fetch_playlist(plid : String)

if text.includes? "video"
video_count = text.gsub(/\D/, "").to_i? || 0
elsif text.includes? "episode"
video_count = text.gsub(/\D/, "").to_i? || 0
elsif text.includes? "view"
views = text.gsub(/\D/, "").to_i64? || 0_i64
else
Expand Down

0 comments on commit 90fcf80

Please sign in to comment.