diff --git a/app/routes.py b/app/routes.py index 0fa025c..56358f7 100644 --- a/app/routes.py +++ b/app/routes.py @@ -242,7 +242,7 @@ def ytsearch(): 'thumbnail':'https:{}'.format(c['thumbnails'][0]), 'subCount':c['suscriberCountText'].split(" ")[0] }) - return render_template('ytsearch.html', form=form, btform=button_form, channels=channels, videos=videos) + return render_template('ytsearch.html', form=form, btform=button_form, channels=channels, videos=videos, restricted=config['restrictPublicUsage']) else: return render_template('ytsearch.html', form=form) @@ -301,7 +301,7 @@ def channel(id): data = feedparser.parse(data.content) channelData = YoutubeSearch.channelInfo(id) - return render_template('channel.html', form=form, btform=button_form, channel=channelData[0], videos=channelData[1]) + return render_template('channel.html', form=form, btform=button_form, channel=channelData[0], videos=channelData[1], restricted=config['restrictPublicUsage']) @app.route('/watch', methods=['GET']) @login_required diff --git a/app/templates/channel.html b/app/templates/channel.html index a4f3c5b..85f4bee 100644 --- a/app/templates/channel.html +++ b/app/templates/channel.html @@ -18,6 +18,7 @@ + {% if restricted or current_user.is_authenticated %}
@@ -35,6 +36,7 @@
{% endif %}@@ -37,6 +38,7 @@
{% endif %}