aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-09 18:25:17 +0200
committerzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-09 18:25:17 +0200
commit4f46e14ad0154a9e8749c9e0e39a4a799d549dd4 (patch)
tree8366476b77a0f9b5910466e10a2b671c5a0609d1 /youtube
parentf8d9be2d5a947a2adde12d187a52b18b7218c541 (diff)
downloadyt-local-4f46e14ad0154a9e8749c9e0e39a4a799d549dd4.tar.lz
yt-local-4f46e14ad0154a9e8749c9e0e39a4a799d549dd4.tar.xz
yt-local-4f46e14ad0154a9e8749c9e0e39a4a799d549dd4.zip
fix style
Diffstat (limited to 'youtube')
-rw-r--r--youtube/playlist.py2
-rw-r--r--youtube/subscriptions.py3
-rw-r--r--youtube/util.py2
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)