Skip to content

Commit 42c3cc3

Browse files
committed
fix DVR menu error
1 parent 4a5084d commit 42c3cc3

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

default.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ def dvr_file_param_edit(dvr_uuid_sel, dvr_file_info_list, dvr_day_dir, dvr_chann
270270
if sel_enabled >= 0:
271271
dvr_windows_title = truefalse[sel_enabled]
272272
param_update = '"windows-compatible-filenames":' + dvr_windows_title
273-
param_url = 'http://' + tvh_url + ':' + tvh_port + '/api/idnode/save?node={' + param_update + ',"uuid":"' + dvr_uuid_sel + '"}'
274-
param_save = requests.get(param_url)
275-
dvr_file_param_load(dvr_uuid_sel)
273+
param_url = 'http://' + tvh_url + ':' + tvh_port + '/api/idnode/save?node={' + param_update + ',"uuid":"' + dvr_uuid_sel + '"}'
274+
param_save = requests.get(param_url)
275+
dvr_file_param_load(dvr_uuid_sel)
276276

277277
def mux_param_load_atsct(mux_uuid_sel):
278278
mux_url = 'http://' + tvh_url + ':' + tvh_port + '/api/idnode/load?uuid=' + mux_uuid_sel
@@ -1334,14 +1334,17 @@ def dvr():
13341334
dvr_config_name = []
13351335
dvr_config_uuid = []
13361336
for dvr_n in dvr_config['entries']:
1337-
dvr_config_name.append(dvr_n['name'])
1337+
if dvr_n['name'] == "":
1338+
dvr_n = "(Default profile)"
1339+
dvr_config_name.append(dvr_n)
13381340
for dvr_u in dvr_config['entries']:
13391341
dvr_config_uuid.append(dvr_u['uuid'])
1340-
if len(dvr_config_name) == 1:
1341-
dvr_uuid_sel = dvr_config['entries'][0]['uuid']
1342+
sel_dvr = dialog.select('Select a DVR configuration to edit', list=dvr_config_name)
1343+
if sel_dvr < 0:
1344+
return
1345+
if sel_dvr >= 0:
1346+
dvr_uuid_sel = dvr_config_uuid[sel_dvr]
13421347
dvr_param_load(dvr_uuid_sel)
1343-
else:
1344-
sel_dvr = dialog.select('Select a DVR configuration to edit', list=dvr_config_name)
13451348

13461349
@plugin.route('/epg')
13471350
def epg():

0 commit comments

Comments
 (0)