From 5fb6f2dfe27c903ec1c047452151705068838670 Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 12 Jul 2012 08:12:47 +0200 Subject: [PATCH] Subtitle language tag fix --- couchpotato/core/plugins/subtitle/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/subtitle/main.py b/couchpotato/core/plugins/subtitle/main.py index 0efb9110..9ff39f47 100644 --- a/couchpotato/core/plugins/subtitle/main.py +++ b/couchpotato/core/plugins/subtitle/main.py @@ -54,11 +54,12 @@ class Subtitle(Plugin): for lang in self.getLanguages(): if lang not in available_languages: download = subliminal.download_subtitles(files, multi = True, force = False, languages = [lang], services = self.services, cache_dir = Env.get('cache_dir')) - downloaded.extend(download) + for subtitle in download: + downloaded.extend(download[subtitle]) for d_sub in downloaded: group['files']['subtitle'].add(d_sub.path) - group['subtitle_language'][d_sub.path] = [d_sub.language] + group['subtitle_language'][d_sub.path] = [d_sub.language.alpha2] return True