From 45fa14838059d72e8a6eb2820a7bb6390a64055d Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 27 Aug 2018 18:53:34 -0500 Subject: [PATCH] Don't add playlist id for channel videos --- src/invidious.cr | 1 + src/invidious/views/components/video.ecr | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 @@
- <% if video.responds_to?(:playlists) %> + <% if video.responds_to?(:playlists) && !video.playlists.empty? %> <% params = "&list=#{video.playlists[0]}" %> <% else %> <% params = nil %>