Solves #81
This commit is contained in:
parent
33e4c5404b
commit
1c02914b90
@ -297,6 +297,20 @@ def channel(id):
|
||||
data = feedparser.parse(data.content)
|
||||
|
||||
channelData = YoutubeSearch.channelInfo(id)
|
||||
|
||||
for video in channelData[1]:
|
||||
print(video)
|
||||
if config['nginxVideoStream']:
|
||||
hostName = urllib.parse.urlparse(video['videoThumb']).netloc
|
||||
video['videoThumb'] = video['videoThumb'].replace("https://{}".format(hostName), "").replace("hqdefault", "mqdefault")+"?host="+hostName
|
||||
else:
|
||||
video['videoThumb'] = video['videoThumb'].replace('/', '~')
|
||||
if config['nginxVideoStream']:
|
||||
hostName = urllib.parse.urlparse(channelData[0]['avatar']).netloc
|
||||
channelData[0]['avatar'] = channelData[0]['avatar'].replace("https://{}".format(hostName), "")+"?host="+hostName
|
||||
else:
|
||||
channelData[0]['avatar'] = channelData[0]['avatar'].replace('/', '~')
|
||||
|
||||
return render_template('channel.html', form=form, btform=button_form, channel=channelData[0], videos=channelData[1], restricted=config['restrictPublicUsage'], config=config)
|
||||
|
||||
@app.route('/watch', methods=['GET'])
|
||||
|
@ -4,7 +4,11 @@
|
||||
<div class="blue ui centered card">
|
||||
<div class="content">
|
||||
<div class="center aligned author">
|
||||
<img alt="Avatar" class="ui avatar image" src="/img/{{channel.avatar.replace('/', '~')}}">
|
||||
{%if config.nginxVideoStream%}
|
||||
<img alt="Thumbnail" src="{{channel.avatar}}">
|
||||
{%else%}
|
||||
<img alt="Thumbnail" src="/img/{{channel.avatar.replace('/', '~')}}">
|
||||
{%endif%}
|
||||
</div>
|
||||
<div class="center aligned header"><a href="">{{channel.name}}</a></div>
|
||||
<div class="center aligned description">
|
||||
|
Reference in New Issue
Block a user