Commit 89e49316 authored by echel0n's avatar echel0n

Fixed issues with saving metadata provider settings.

parent cec8a876
......@@ -2367,7 +2367,7 @@ class Config(object):
bool) else getattr(providerObj, x))
for x in provider_keys if hasattr(providerObj, x)]) for providerID, providerObj in
sickrage.app.search_providers.all().items()}),
'MetadataProviders': {metadataProviderID: metadataProviderObj.get_config() for
'MetadataProviders': {metadataProviderID: metadataProviderObj.config for
metadataProviderID, metadataProviderObj in sickrage.app.metadata_providers.items()}
})
......
......@@ -1560,7 +1560,7 @@
</div>
</div>
<input type="hidden" name="${cur_id}_data" id="${cur_id}_data"
value="${cur_generator.get_config()}"/>
value="${cur_generator.config}"/>
% endfor
</div>
</div>
......
......@@ -87,21 +87,6 @@ class GenericMetadata(object):
self.season_all_poster = season_all_poster
self.season_all_banner = season_all_banner
def get_config(self):
config_list = [self.show_metadata,
self.episode_metadata,
self.fanart,
self.poster,
self.banner,
self.episode_thumbnails,
self.season_posters,
self.season_banners,
self.season_all_poster,
self.season_all_banner,
self.enabled]
return '|'.join([str(int(x)) for x in config_list])
@property
def id(self):
return str(re.sub(r"[^\w\d_]", "_", str(re.sub(r"[+]", "plus", self.name))).lower())
......@@ -117,7 +102,7 @@ class GenericMetadata(object):
value = '0|0|0|0|0|0|0|0|0|0|0'
self.show_metadata, self.episode_metadata, self.fanart, self.poster, self.banner, self.episode_thumbnails, self.season_posters, \
self.season_banners, self.season_all_poster, self.season_all_banner, self.enabled = tuple(map(bool, value.split('|')))
self.season_banners, self.season_all_poster, self.season_all_banner, self.enabled = tuple(map(bool, map(int, value.split('|'))))
@staticmethod
def _check_exists(location):
......
Markdown is supported
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