From 408f3852ec1a6987bb72df6efe6e77f8613c560a Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Wed, 15 Apr 2020 16:30:02 -0500 Subject: [PATCH] Hide playlist widget when user has no playlists --- src/invidious/views/watch.ecr | 45 +++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index e43282cb6..7743fd4a4 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -102,28 +102,31 @@

<% if user %> -
-
- - -
+ <% playlists = PG_DB.query_all("SELECT id,title FROM playlists WHERE author = $1", user.email, as: {String, String}) %> + <% if !playlists.empty? %> + +
+ + +
- -
- - + + + + + <% end %> <% end %> <% if CONFIG.dmca_content.includes?(video.id) || CONFIG.disabled?("downloads") %>