summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-09-19 15:24:19 -0500
committerOmar Roth <omarroth@hotmail.com>2018-09-19 15:24:19 -0500
commitbb604c892572f7f95c5742d303f38e0edb653f13 (patch)
tree5daaa43a7220342c405d6598d15b29bdab6e6efb /src
parentc166f46b7c6dc162e6804a66999fd915d8bf60c6 (diff)
downloadinvidious-bb604c892572f7f95c5742d303f38e0edb653f13.tar.gz
invidious-bb604c892572f7f95c5742d303f38e0edb653f13.tar.bz2
invidious-bb604c892572f7f95c5742d303f38e0edb653f13.zip
Add movies to search results
Diffstat (limited to 'src')
-rw-r--r--src/invidious/helpers/helpers.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr
index aeb275d3..321e1833 100644
--- a/src/invidious/helpers/helpers.cr
+++ b/src/invidious/helpers/helpers.cr
@@ -210,8 +210,6 @@ def extract_videos(nodeset, ucid = nil)
end
case node.xpath_node(%q(.//div)).not_nil!["class"]
- when .includes? "yt-lockup-movie-vertical-poster"
- next
when .includes? "yt-lockup-playlist"
next
when .includes? "yt-lockup-channel"
@@ -243,6 +241,7 @@ def extract_videos(nodeset, ucid = nil)
published = decode_date(metadata[0].content.lchop("Streamed ").lchop("Starts "))
rescue ex
end
+
begin
published ||= Time.epoch(metadata[0].xpath_node(%q(.//span)).not_nil!["data-timestamp"].to_i64)
rescue ex
@@ -253,6 +252,7 @@ def extract_videos(nodeset, ucid = nil)
view_count = metadata[0].content.rchop(" watching").delete(",").try &.to_i64?
rescue ex
end
+
begin
view_count ||= metadata.try &.[1].content.delete("No views,").try &.to_i64?
rescue ex