From deb0043244c9e083b2b1721195c25679b11955a1 Mon Sep 17 00:00:00 2001 From: pluja Date: Sun, 23 Aug 2020 11:03:49 +0200 Subject: [PATCH] Channel view: Channel info + videos --- app/routes.py | 4 ++-- app/templates/_video_item.html | 4 ---- app/templates/channel.html | 17 +++++++---------- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/app/routes.py b/app/routes.py index 6082a35..9f62e17 100644 --- a/app/routes.py +++ b/app/routes.py @@ -291,9 +291,9 @@ def channel(id): data = requests.get('https://www.youtube.com/feeds/videos.xml?channel_id={id}'.format(id=id)) data = feedparser.parse(data.content) - channel = YoutubeSearch.channelInfo(id) + channelData = YoutubeSearch.channelInfo(id) - return render_template('channel.html', channel=channel) + return render_template('channel.html', channel=channelData[0], videos=channelData[1]) @app.route('/watch', methods=['GET']) @login_required diff --git a/app/templates/_video_item.html b/app/templates/_video_item.html index 35cf435..7eec1d5 100644 --- a/app/templates/_video_item.html +++ b/app/templates/_video_item.html @@ -21,10 +21,6 @@ {{video.timeStamp}}‎‎‎‎ ‎‎‎ - - - Open - \ No newline at end of file diff --git a/app/templates/channel.html b/app/templates/channel.html index 1ca1271..dc5b119 100644 --- a/app/templates/channel.html +++ b/app/templates/channel.html @@ -19,18 +19,15 @@ -
- -
+ {% endif %} {% endblock %} \ No newline at end of file