aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-03 13:10:00 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-03 13:10:00 +0100
commitc8805576667f316b34f0a9a81d32da7d24dc754c (patch)
treeb5d10aab5ae40f9c029c0d578cc1ae60c797f421 /youtube_dl/utils.py
parent85689a531f1ba418570ce2bcde6fe16a482a5685 (diff)
parent91d7d0b333d2fe09121c7328cf519c1b5331adef (diff)
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index da5143c8e..fc10fba63 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1119,3 +1119,8 @@ def parse_duration(s):
if m.group('hours'):
res += int(m.group('hours')) * 60 * 60
return res
+
+
+def prepend_extension(filename, ext):
+ name, real_ext = os.path.splitext(filename)
+ return u'{0}.{1}{2}'.format(name, ext, real_ext)