aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-11 08:54:48 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-11 08:54:48 +0100
commit357ddadbf53b48721d43061edc67d37c73d1ac95 (patch)
tree5e2186031bc2de77acb6ab0c661fc5c419c69109 /youtube_dl/YoutubeDL.py
parent08d03235f9a5a7d28d7992a3caf27a8b88b69e12 (diff)
Fix thumbnail filename determination (Fixes #1945)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index cabe30980..c77777ba0 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -827,7 +827,7 @@ class YoutubeDL(object):
if self.params.get('writethumbnail', False):
if info_dict.get('thumbnail') is not None:
thumb_format = determine_ext(info_dict['thumbnail'], u'jpg')
- thumb_filename = filename.rpartition('.')[0] + u'.' + thumb_format
+ thumb_filename = os.path.splitext(filename)[0] + u'.' + thumb_format
self.to_screen(u'[%s] %s: Downloading thumbnail ...' %
(info_dict['extractor'], info_dict['id']))
try: