mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Fix playlists with one video
This commit is contained in:
parent
7caa2ae9bc
commit
1e4022680a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
text = stat["runs"]?.try &.as_a.map(&.["text"].as_s).join("") || stat["simpleText"]?.try &.as_s
|
||||||
next if !text
|
next if !text
|
||||||
|
|
||||||
if text.includes? "videos"
|
if text.includes? "video"
|
||||||
video_count = text.gsub(/\D/, "").to_i? || 0
|
video_count = text.gsub(/\D/, "").to_i? || 0
|
||||||
elsif text.includes? "views"
|
elsif text.includes? "view"
|
||||||
views = text.gsub(/\D/, "").to_i64? || 0_i64
|
views = text.gsub(/\D/, "").to_i64? || 0_i64
|
||||||
else
|
else
|
||||||
updated = decode_date(text.lchop("Last updated on ").lchop("Updated "))
|
updated = decode_date(text.lchop("Last updated on ").lchop("Updated "))
|
||||||
|
|
Loading…
Reference in a new issue