Fix update_renumber_options
This commit is contained in:
@@ -235,14 +235,14 @@ def update_renumber_options(item, head_nfo, path):
|
|||||||
if filetools.isfile(tvshow_path) and item.channel_prefs:
|
if filetools.isfile(tvshow_path) and item.channel_prefs:
|
||||||
for channel in item.channel_prefs:
|
for channel in item.channel_prefs:
|
||||||
filename = filetools.join(config.get_data_path(), "settings_channels", channel + '_data.json')
|
filename = filetools.join(config.get_data_path(), "settings_channels", channel + '_data.json')
|
||||||
|
if filetools.isfile(filename):
|
||||||
json_file = jsontools.load(filetools.read(filename))
|
json_file = jsontools.load(filetools.read(filename))
|
||||||
if RENUMBER in json_file:
|
if RENUMBER in json_file:
|
||||||
json = json_file[RENUMBER]
|
json = json_file[RENUMBER]
|
||||||
if item.fulltitle in json:
|
if item.fulltitle in json:
|
||||||
item.channel_prefs[channel][RENUMBER] = json[item.fulltitle]
|
item.channel_prefs[channel][RENUMBER] = json[item.fulltitle]
|
||||||
logger.debug('UPDATED=\n' + str(item.channel_prefs))
|
logger.debug('UPDATED=\n' + str(item.channel_prefs))
|
||||||
filetools.write(tvshow_path, head_nfo + item.tojson())
|
filetools.write(tvshow_path, head_nfo + item.tojson())
|
||||||
|
|
||||||
def add_renumber_options(item, head_nfo, path):
|
def add_renumber_options(item, head_nfo, path):
|
||||||
from core import jsontools
|
from core import jsontools
|
||||||
|
|||||||
Reference in New Issue
Block a user