From e95c9011e79954f6c7e135a060af0d7684aaea1a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 24 Oct 2014 10:32:16 +0100 Subject: [PATCH] fix multilanguage resolution --- pandora/archive/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 4dedd064..17d5a912 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -469,7 +469,7 @@ class File(models.Model): while language in languages: language = '%s%d' % (lang, n) n += 1 - profile = '%s.%s' % (resolution, config['formats'][0]) + profile = '%sp.%s' % (resolution, config['formats'][0]) target = os.path.join(tmp, language + '_' + profile) ok, error = extract.stream(media, target, profile, info, ffmpeg, audio_track=i+1) @@ -477,7 +477,7 @@ class File(models.Model): tinfo = ox.avinfo(target) del tinfo['path'] f = File(oshash=tinfo['oshash'], item=self.item) - f.path = self.path + f.path = self.path.rsplit('.', 1)[0] + config['formats'][0] f.info = tinfo f.info['language'] = language f.info['extension'] = config['formats'][0]