mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -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)
|
confignew.set(section, option, value)
|
||||||
|
|
||||||
for section in configold.sections():
|
for section in configold.sections():
|
||||||
|
try:
|
||||||
|
for option, value in configold.items(section):
|
||||||
if section == "HeadPhones":
|
if section == "HeadPhones":
|
||||||
if option in ["username", "password" ]:
|
if option in ["username", "password" ]:
|
||||||
continue
|
continue
|
||||||
|
@ -63,7 +65,8 @@ def migrate():
|
||||||
if option in ["compressedExtensions", "mediaExtensions", "metaExtensions", "minSampleSize"]:
|
if option in ["compressedExtensions", "mediaExtensions", "metaExtensions", "minSampleSize"]:
|
||||||
section = "Extensions" # these were moved
|
section = "Extensions" # these were moved
|
||||||
if option == "useLink": # Sym links supported now as well.
|
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:
|
if num_value == 1:
|
||||||
value = "hard"
|
value = "hard"
|
||||||
else:
|
else:
|
||||||
|
@ -105,6 +108,8 @@ def migrate():
|
||||||
|
|
||||||
if section == "formatter_generic":
|
if section == "formatter_generic":
|
||||||
confignew.set(section, option, value)
|
confignew.set(section, option, value)
|
||||||
|
except config.InterpolationMissingOptionError:
|
||||||
|
pass
|
||||||
|
|
||||||
for section in categories:
|
for section in categories:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue