From 30f8b93629d07bb056ec37913c4aaf725bc8cf8b Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Tue, 27 Aug 2019 15:04:30 -0500 Subject: [PATCH] update get_params, remove urlparse dep --- default.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/default.py b/default.py index 42f07ae..aa50409 100644 --- a/default.py +++ b/default.py @@ -1,19 +1,21 @@ import sys -from future.moves.urllib.request import urlparse from kodi_six import xbmc, xbmcgui import resources.lib.utils as utils from resources.lib.backup import XbmcBackup def get_params(): param = {} - - if(len(sys.argv) > 1): + try: for i in sys.argv: args = i - if(args.startswith('?')): - args = args[1:] - param.update(dict(urlparse.parse_qsl(args))) - + if('=' in args): + if(args.startswith('?')): + args = args[1:] #legacy in case of url params + splitString = args.split('=') + param[splitString[0]] = splitString[1] + except: + pass + return param #the program mode