Fix playlists with one video

pull/1310/head
Omar Roth 2020-07-25 12:57:15 -04:00
rodzic 7caa2ae9bc
commit 1e4022680a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B8254FB7EC3D37F2
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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 "))