summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2020-07-25 12:57:15 -0400
committerOmar Roth <omarroth@protonmail.com>2020-07-26 10:59:31 -0400
commit1e4022680a341ceb8c032d79b60aacb161e7fc86 (patch)
treeff4c748e701c87b3ee64ce158f8d3e1300468e3b
parent7caa2ae9bccd84bfc2460462f48c5d02ba060a8b (diff)
downloadinvidious-1e4022680a341ceb8c032d79b60aacb161e7fc86.tar.gz
invidious-1e4022680a341ceb8c032d79b60aacb161e7fc86.tar.bz2
invidious-1e4022680a341ceb8c032d79b60aacb161e7fc86.zip
Fix playlists with one video
-rw-r--r--src/invidious/playlists.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr
index a1b7715d..d3064665 100644
--- a/src/invidious/playlists.cr
+++ b/src/invidious/playlists.cr
@@ -375,9 +375,9 @@ def fetch_playlist(plid, locale)
text = stat["runs"]?.try &.as_a.map(&.["text"].as_s).join("") || stat["simpleText"]?.try &.as_s
next if !text
- if text.includes? "videos"
+ if text.includes? "video"
video_count = text.gsub(/\D/, "").to_i? || 0
- elsif text.includes? "views"
+ elsif text.includes? "view"
views = text.gsub(/\D/, "").to_i64? || 0_i64
else
updated = decode_date(text.lchop("Last updated on ").lchop("Updated "))