handle optional config keys in sel_handler All
This commit is contained in:
parent
90bfbc57bb
commit
634c4d6631
15
interface.py
15
interface.py
|
@ -115,15 +115,16 @@ class Interface():
|
||||||
# clean exit on ctrl + c
|
# clean exit on ctrl + c
|
||||||
return 'Exit'
|
return 'Exit'
|
||||||
|
|
||||||
@staticmethod
|
def sel_handler(self, menu_item):
|
||||||
def sel_handler(menu_item):
|
|
||||||
""" lunch scripts from here based on selection """
|
""" lunch scripts from here based on selection """
|
||||||
if menu_item == 'All':
|
if menu_item == 'All':
|
||||||
moviesort.main()
|
moviesort.main()
|
||||||
tvsort.main()
|
tvsort.main()
|
||||||
trailers.main()
|
if 'ydl_opts' in self.CONFIG.keys():
|
||||||
id_fix.main()
|
trailers.main()
|
||||||
db_export.main()
|
if 'emby' in self.CONFIG.keys():
|
||||||
|
id_fix.main()
|
||||||
|
db_export.main()
|
||||||
elif menu_item == 'Movies':
|
elif menu_item == 'Movies':
|
||||||
moviesort.main()
|
moviesort.main()
|
||||||
elif menu_item == 'TV shows':
|
elif menu_item == 'TV shows':
|
||||||
|
@ -145,8 +146,8 @@ class Interface():
|
||||||
self.stdscr.clear()
|
self.stdscr.clear()
|
||||||
# menu strings
|
# menu strings
|
||||||
url = 'github.com/bbilly1/media_organizer'
|
url = 'github.com/bbilly1/media_organizer'
|
||||||
help_str = 'q: quit, r: refresh'
|
h_str = 'q: quit, r: refresh'
|
||||||
self.stdscr.addstr(max_h - 2, max_w // 2 - len(help_str) // 2, help_str)
|
self.stdscr.addstr(max_h - 2, max_w // 2 - len(h_str) // 2, h_str)
|
||||||
self.stdscr.addstr(max_h - 1, max_w // 2 - len(url) // 2, url)
|
self.stdscr.addstr(max_h - 1, max_w // 2 - len(url) // 2, url)
|
||||||
self.stdscr.addstr(first_menu - 2, x, 'Media Organizer')
|
self.stdscr.addstr(first_menu - 2, x, 'Media Organizer')
|
||||||
# loop through menu items
|
# loop through menu items
|
||||||
|
|
Loading…
Reference in New Issue