diff options
-rw-r--r-- | youtube/playlist.py | 2 | ||||
-rw-r--r-- | youtube/subscriptions.py | 3 | ||||
-rw-r--r-- | youtube/util.py | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/youtube/playlist.py b/youtube/playlist.py index 0a415c1..a5ec0db 100644 --- a/youtube/playlist.py +++ b/youtube/playlist.py @@ -104,7 +104,7 @@ def get_playlist_page(): util.prefix_urls(item) util.add_extra_html_info(item) if 'id' in item: - item['thumbnail'] = f'{settings.img_prefix}https://i.ytimg.com/vi/' + item['id'] + '/default.jpg' + item['thumbnail'] = settings.img_prefix + 'https://i.ytimg.com/vi/' + item['id'] + '/default.jpg' item['url'] += '&list=' + playlist_id if item['index']: diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index a661f83..219a526 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -820,7 +820,8 @@ def get_subscriptions_page(): videos, number_of_videos_in_db = _get_videos(cursor, 60, (page - 1)*60, tag) for video in videos: video['thumbnail'] = util.URL_ORIGIN + '/data/subscription_thumbnails/' + video['id'] + '.jpg' - if not settings.proxy_images: video['thumbnail'] = video['thumbnail'][1:] + if not settings.proxy_images: + video['thumbnail'] = video['thumbnail'][1:] video['type'] = 'video' video['item_size'] = 'small' util.add_extra_html_info(video) diff --git a/youtube/util.py b/youtube/util.py index a75a7b5..579f512 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -342,7 +342,7 @@ def video_id(url): # default, sddefault, mqdefault, hqdefault, hq720 def get_thumbnail_url(video_id): - return f"{settings.img_prefix}https://i.ytimg.com/vi/" + video_id + "/mqdefault.jpg" + return settings.img_prefix + "https://i.ytimg.com/vi/" + video_id + "/mqdefault.jpg" def seconds_to_timestamp(seconds): seconds = int(seconds) |