summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-27 18:53:34 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-27 18:53:34 -0500
commit45fa14838059d72e8a6eb2820a7bb6390a64055d (patch)
treeffd95c159cb602d5a6fb1164fd6a953314d2132e
parent2ba0063dc0833efe25a25dea7b3f8d95b599f0d6 (diff)
downloadinvidious-0.3.0.tar.gz
invidious-0.3.0.tar.bz2
invidious-0.3.0.zip
Don't add playlist id for channel videos0.3.0
-rw-r--r--src/invidious.cr1
-rw-r--r--src/invidious/views/components/video.ecr2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 65846303..c43e2c78 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -1597,6 +1597,7 @@ get "/channel/:ucid" do |env|
begin
videos = extract_playlist(ucid, page)
+ videos.each { |a| a.playlists.clear }
rescue ex
error_message = ex.message
next templated "error"
diff --git a/src/invidious/views/components/video.ecr b/src/invidious/views/components/video.ecr
index 7bf9a8a8..cbd3e106 100644
--- a/src/invidious/views/components/video.ecr
+++ b/src/invidious/views/components/video.ecr
@@ -1,6 +1,6 @@
<div class="pure-u-1 pure-u-md-1-4">
<div class="h-box">
- <% if video.responds_to?(:playlists) %>
+ <% if video.responds_to?(:playlists) && !video.playlists.empty? %>
<% params = "&list=#{video.playlists[0]}" %>
<% else %>
<% params = nil %>