diff --git a/app/routes.py b/app/routes.py index 4eff283..565e647 100644 --- a/app/routes.py +++ b/app/routes.py @@ -378,21 +378,18 @@ def watch(): id = request.args.get('v', None) info = ytvids.get_video_info(id) hostName = urllib.parse.urlparse(info['video']['url']).netloc - audioHostName = urllib.parse.urlparse(info['video']['audio']['url']).netloc - # Use nginx try: url = info['video']['url'].replace("https://{}".format(hostName), "")+"&host="+hostName except: url = "#" - + try: + audioHostName = urllib.parse.urlparse(info['video']['audio']['url']) audioUrl = info['video']['audio']['url'].replace("https://{}".format(audioHostName), "")+"&host="+audioHostName - print(audioUrl) except: audioUrl = False - print(info['video']['thumbnail']) video={ 'title':info['video']['title'], 'description':Markup(markupString(info['video']['description'])), @@ -408,7 +405,8 @@ def watch(): 'isLive': info['video']['isLive'], 'isUpcoming': info['video']['isUpcoming'], 'thumbnail': info['video']['thumbnail'], - 'nginxAudioUrl': audioUrl + 'nginxAudioUrl': audioUrl, + 'premieres': info['video']['premieres'] } return render_template("video.html", video=video, title='{}'.format(video['title']), config=config) diff --git a/app/templates/video.html b/app/templates/video.html index 4c295a6..65258d8 100644 --- a/app/templates/video.html +++ b/app/templates/video.html @@ -10,8 +10,9 @@ {% elif video.isUpcoming %}