# Path: resources/lib/kodiutils.py
# def params(url):
#     parsed = urlparse(url)
#     qs = parse_qs(parsed.query)
#     for p in qs.keys():
#         try:
#             qs[p] = qs[p][0].decode('hex') if PY2 else bytes.fromhex(qs[p][0]).decode('utf-8')
#         except:
#             pass
# 
#     return qs


import sys
from resources.lib.kodiutils import params as decode
from __future__ import print_function, unicode_literals



class Params:
    handle = int(sys.argv[1]) if len(sys.argv) > 1 else -1
    orig_args = sys.argv[2] if len(sys.argv) > 2 else ''
    args = decode(sys.argv[2]) if len(sys.argv) > 2 else {}

# Path: resources/lib/kodiutils.py
# def params(url):
#     parsed = urlparse(url)
#     qs = parse_qs(parsed.query)
#     for p in qs.keys():
#         try:
#             qs[p] = qs[p][0].decode('hex') if PY2 else bytes.fromhex(qs[p][0]).decode('utf-8')
#         except:
#             pass
# 
#     return qs


# Path: resources/lib/params.py
import sys
from resources.lib.kodiutils import params as decode

from __future__ import print_function, unicode_literals



class Params:
    handle = int(sys.argv[1]) if len(sys.argv) > 1 else -1
    orig_args = sys.argv[2] if len(sys.argv) > 2 else ''
    args = decode(sys.argv[2]) if len(sys.argv) > 2 else {}

    resume = sys.argv[3][7:] != 'false' if len(sys.argv) > 3 else False