Commit 2e0a3780 authored by echel0n's avatar echel0n
Browse files

Fixed issue with saving subtitle language settings

parent 8a79fa69
# Changelog # Changelog
- * ceb8b21 - 2018-10-13: Release v9.3.84 - * b0ea768 - 2018-10-13: Fixed issue with saving subtitle language settings
- * 57a541f - 2018-10-13: Release v9.3.84
- * aa89c95 - 2018-10-13: Added notifier Join - * aa89c95 - 2018-10-13: Added notifier Join
- * 7891d45 - 2018-10-13: Release v9.3.83 - * 7891d45 - 2018-10-13: Release v9.3.83
- * 83e5033 - 2018-10-13: Fixed issue with adding shows from Trakt and IMDB not showing - * 83e5033 - 2018-10-13: Fixed issue with adding shows from Trakt and IMDB not showing
......
...@@ -407,9 +407,9 @@ class Config(object): ...@@ -407,9 +407,9 @@ class Config(object):
self.poster_sortdir = "" self.poster_sortdir = ""
self.filter_row = True self.filter_row = True
self.use_subtitles = False self.use_subtitles = False
self.subtitles_languages = "" self.subtitles_languages = []
self.subtitles_services_list = []
self.subtitles_dir = "" self.subtitles_dir = ""
self.subtitles_services_list = ""
self.subtitles_services_enabled = "" self.subtitles_services_enabled = ""
self.subtitles_history = False self.subtitles_history = False
self.embedded_subtitles_all = False self.embedded_subtitles_all = False
...@@ -923,12 +923,12 @@ class Config(object): ...@@ -923,12 +923,12 @@ class Config(object):
'Subtitles': { 'Subtitles': {
'itasa_password': '', 'itasa_password': '',
'opensubtitles_username': '', 'opensubtitles_username': '',
'subtitles_services_list': '', 'subtitles_services_list': [],
'subtitles_history': False, 'subtitles_history': False,
'legendastv_password': '', 'legendastv_password': '',
'subtitles_hearing_impaired': False, 'subtitles_hearing_impaired': False,
'addic7ed_password': '', 'addic7ed_password': '',
'subtitles_languages': '', 'subtitles_languages': [],
'embedded_subtitles_all': False, 'embedded_subtitles_all': False,
'subtitles_finder_frequency': 1, 'subtitles_finder_frequency': 1,
'subtitles_default': False, 'subtitles_default': False,
...@@ -1813,9 +1813,9 @@ class Config(object): ...@@ -1813,9 +1813,9 @@ class Config(object):
# SUBTITLE SETTINGS # SUBTITLE SETTINGS
self.use_subtitles = self.check_setting_bool('Subtitles', 'use_subtitles') self.use_subtitles = self.check_setting_bool('Subtitles', 'use_subtitles')
self.subtitles_languages = self.check_setting_str('Subtitles', 'subtitles_languages').split(',') self.subtitles_languages = self.check_setting_list('Subtitles', 'subtitles_languages')
self.subtitles_services_list = self.check_setting_list('Subtitles', 'subtitles_services_list')
self.subtitles_dir = self.check_setting_str('Subtitles', 'subtitles_dir') self.subtitles_dir = self.check_setting_str('Subtitles', 'subtitles_dir')
self.subtitles_services_list = self.check_setting_str('Subtitles', 'subtitles_services_list').split(',')
self.subtitles_default = self.check_setting_bool('Subtitles', 'subtitles_default') self.subtitles_default = self.check_setting_bool('Subtitles', 'subtitles_default')
self.subtitles_history = self.check_setting_bool('Subtitles', 'subtitles_history') self.subtitles_history = self.check_setting_bool('Subtitles', 'subtitles_history')
self.subtitles_hearing_impaired = self.check_setting_bool('Subtitles', 'subtitles_hearing_impaired') self.subtitles_hearing_impaired = self.check_setting_bool('Subtitles', 'subtitles_hearing_impaired')
...@@ -2317,8 +2317,8 @@ class Config(object): ...@@ -2317,8 +2317,8 @@ class Config(object):
}, },
'Subtitles': { 'Subtitles': {
'use_subtitles': int(self.use_subtitles), 'use_subtitles': int(self.use_subtitles),
'subtitles_languages': ','.join(self.subtitles_languages), 'subtitles_languages': self.subtitles_languages,
'subtitles_services_list': ','.join(self.subtitles_services_list), 'subtitles_services_list': self.subtitles_services_list,
'subtitles_services_enabled': '|'.join([str(x) for x in self.subtitles_services_enabled]), 'subtitles_services_enabled': '|'.join([str(x) for x in self.subtitles_services_enabled]),
'subtitles_dir': self.subtitles_dir, 'subtitles_dir': self.subtitles_dir,
'subtitles_default': int(self.subtitles_default), 'subtitles_default': int(self.subtitles_default),
......
...@@ -4767,7 +4767,6 @@ class ConfigSubtitles(Config): ...@@ -4767,7 +4767,6 @@ class ConfigSubtitles(Config):
sickrage.app.config.change_subtitle_searcher_freq(subtitles_finder_frequency) sickrage.app.config.change_subtitle_searcher_freq(subtitles_finder_frequency)
sickrage.app.config.use_subtitles = checkbox_to_value(use_subtitles) sickrage.app.config.use_subtitles = checkbox_to_value(use_subtitles)
sickrage.app.config.subtitles_languages = kwargs['subtitles_languages[]']
sickrage.app.config.subtitles_dir = subtitles_dir sickrage.app.config.subtitles_dir = subtitles_dir
sickrage.app.config.subtitles_history = checkbox_to_value(subtitles_history) sickrage.app.config.subtitles_history = checkbox_to_value(subtitles_history)
sickrage.app.config.embedded_subtitles_all = checkbox_to_value(embedded_subtitles_all) sickrage.app.config.embedded_subtitles_all = checkbox_to_value(embedded_subtitles_all)
...@@ -4776,6 +4775,11 @@ class ConfigSubtitles(Config): ...@@ -4776,6 +4775,11 @@ class ConfigSubtitles(Config):
sickrage.app.config.subtitles_extra_scripts = [x.strip() for x in subtitles_extra_scripts.split('|') if sickrage.app.config.subtitles_extra_scripts = [x.strip() for x in subtitles_extra_scripts.split('|') if
x.strip()] x.strip()]
# Subtitle languages
sickrage.app.config.subtitles_languages = kwargs['subtitles_languages[]']
if not isinstance(sickrage.app.config.subtitles_languages, list):
sickrage.app.config.subtitles_languages = [sickrage.app.config.subtitles_languages]
# Subtitles services # Subtitles services
services_str_list = service_order.split() services_str_list = service_order.split()
subtitles_services_list = [] subtitles_services_list = []
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment