mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Fixed bug in migrate
This commit is contained in:
parent
758c718d57
commit
6ddec2be3b
1 changed files with 56 additions and 51 deletions
|
@ -40,6 +40,8 @@ def migrate():
|
|||
confignew.set(section, option, value)
|
||||
|
||||
for section in configold.sections():
|
||||
try:
|
||||
for option, value in configold.items(section):
|
||||
if section == "HeadPhones":
|
||||
if option in ["username", "password" ]:
|
||||
continue
|
||||
|
@ -63,7 +65,8 @@ def migrate():
|
|||
if option in ["compressedExtensions", "mediaExtensions", "metaExtensions", "minSampleSize"]:
|
||||
section = "Extensions" # these were moved
|
||||
if option == "useLink": # Sym links supported now as well.
|
||||
num_value = int(value or 0)
|
||||
if isinstance(value, int):
|
||||
num_value = int(value)
|
||||
if num_value == 1:
|
||||
value = "hard"
|
||||
else:
|
||||
|
@ -105,6 +108,8 @@ def migrate():
|
|||
|
||||
if section == "formatter_generic":
|
||||
confignew.set(section, option, value)
|
||||
except config.InterpolationMissingOptionError:
|
||||
pass
|
||||
|
||||
for section in categories:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue