Private GIT

Skip to content
Snippets Groups Projects
Commit 07ee34ff authored by Patrick Vos's avatar Patrick Vos
Browse files

fix TypeError: season_folders_format = ""

parent 8843793e
Branches
Tags 4.3c
No related merge requests found
...@@ -306,13 +306,18 @@ class ConfigMigrator(): ...@@ -306,13 +306,18 @@ class ConfigMigrator():
old_season_format = check_setting_str(self.config_obj, 'General', 'season_folders_format', 'Season %02d') old_season_format = check_setting_str(self.config_obj, 'General', 'season_folders_format', 'Season %02d')
if old_season_format:
try:
new_season_format = old_season_format % 9 new_season_format = old_season_format % 9
new_season_format = new_season_format.replace('09', '%0S') new_season_format = new_season_format.replace('09', '%0S')
new_season_format = new_season_format.replace('9', '%S') new_season_format = new_season_format.replace('9', '%S')
logger.log(u"Changed season folder format from "+old_season_format+" to "+new_season_format+", prepending it to your naming config")
logger.log(u"Changed season folder format from " + old_season_format + " to " + new_season_format + ", prepending it to your naming config")
sickbeard.NAMING_PATTERN = new_season_format + os.sep + sickbeard.NAMING_PATTERN sickbeard.NAMING_PATTERN = new_season_format + os.sep + sickbeard.NAMING_PATTERN
except (TypeError, ValueError):
logger.log(u"Can't change " + old_season_format + " to new season format", logger.ERROR)
# if no shows had it on then don't flatten any shows and don't put season folders in the config # if no shows had it on then don't flatten any shows and don't put season folders in the config
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment