aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/local_playlist.py
diff options
context:
space:
mode:
authorzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 19:28:52 +0200
committerzrose584 <57181548+zrose584@users.noreply.github.com>2020-10-07 19:28:52 +0200
commitf8d9be2d5a947a2adde12d187a52b18b7218c541 (patch)
treee0c2943b1de9f400acdbd25db2492c3673d88733 /youtube/local_playlist.py
parent9123d9a6cfa2af511b17591541ab2e67aa83475f (diff)
downloadyt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.tar.lz
yt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.tar.xz
yt-local-f8d9be2d5a947a2adde12d187a52b18b7218c541.zip
settings.py: add 'proxy_images'
Diffstat (limited to 'youtube/local_playlist.py')
-rw-r--r--youtube/local_playlist.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/local_playlist.py b/youtube/local_playlist.py
index 3a058b3..857ed24 100644
--- a/youtube/local_playlist.py
+++ b/youtube/local_playlist.py
@@ -35,7 +35,7 @@ def add_to_playlist(name, video_info_list):
file.write(info + "\n")
missing_thumbnails.append(id)
gevent.spawn(util.download_thumbnails, os.path.join(thumbnails_directory, name), missing_thumbnails)
-
+
def get_local_playlist_videos(name, offset=0, amount=50):
try:
@@ -52,7 +52,7 @@ def get_local_playlist_videos(name, offset=0, amount=50):
try:
info = json.loads(video_json)
if info['id'] + ".jpg" in thumbnails:
- info['thumbnail'] = "/youtube.com/data/playlist_thumbnails/" + name + "/" + info['id'] + ".jpg"
+ info['thumbnail'] = settings.img_prefix + "https://youtube.com/data/playlist_thumbnails/" + name + "/" + info['id'] + ".jpg"
else:
info['thumbnail'] = util.get_thumbnail_url(info['id'])
missing_thumbnails.append(info['id'])