diff --git a/app/routes.py b/app/routes.py index e962b59..f57e42d 100644 --- a/app/routes.py +++ b/app/routes.py @@ -775,7 +775,11 @@ def getYoutubePosts(ids): video.channelUrl = vid.author_detail.href video.id = vid.yt_videoid video.videoTitle = vid.title - video.videoThumb = vid.media_thumbnail[0]['url'].replace('/', '~') + if config['nginxVideoStream']: + hostName = urllib.parse.urlparse(vid.media_thumbnail[0]['url']).netloc + video.videoThumb = vid.media_thumbnail[0]['url'].replace(hostName, config['serverName'])+"?hostname="+hostName + else: + video.videoThumb = vid.media_thumbnail[0]['url'].replace('/', '~') video.views = vid.media_statistics['views'] video.description = vid.summary_detail.value video.description = re.sub(r'^https?:\/\/.*[\r\n]*', '', video.description[0:120]+"...", flags=re.MULTILINE) diff --git a/app/static/img/logo.png b/app/static/img/logo.png index 8b5954c..3268685 100644 Binary files a/app/static/img/logo.png and b/app/static/img/logo.png differ diff --git a/app/templates/_video_item.html b/app/templates/_video_item.html index baa2a77..b5be709 100644 --- a/app/templates/_video_item.html +++ b/app/templates/_video_item.html @@ -1,6 +1,10 @@
+ {%if config.nginxVideoStream%} + Thumbnail + {%else%} Thumbnail + {%endif%}
{% if video.views == "Livestream" %}