# Path: resources/lib/modules/workers.py
# class Thread(threading.Thread):
# class Workers:
#     def __init__(self, target, *args):
#     def run(self):
#     def get_result(self):
#     def globaltrace(self, frame, event, arg):
#     def localtrace(self, frame, event, arg):
#     def kill(self):
#     def __init__(self, concurrent=30, queue_size=None, target=None, expect_result=True):
#         def _queue_worker():
#     def put(self, item):
#     def join(self):
#     def terminate(self):
# 
# Path: resources/lib/modules/util.py
# class struct(object):
#     def __init__(self, kdict=None):
#     def __repr__(self):
#     def __getattr__(self, name):
#     def __len__(self):
#     def get(self, key):
# def getMPAAFromCI(ci):
# def getBestBitrateUrl(plugin, streams):
# def merge_dicts(x, *argv):
# def slugify(string):
# def unescape(text):
#     def fixup(m):
# def time_format(time_str=None, input_format=None):
# def get_signed_hashes(a):
# def J(a):
# def K(a):
# def L():
# def M(a):
# def N():
# def O(a):
# def P(a):
# def get_utc_delta():
# def strptime(date_string, format):
# def strptime_workaround(date_string, format='%Y-%m-%dT%H:%M:%S'):
# def get_total_seconds(timedelta):
# def get_total_seconds_float(timedelta):
# def get_total_hours(timedelta):
# def add_url_parameters(url, params):
# def is_number(s):
# G = 3600
# H = "=0xAC10FD"
# 
# Path: resources/lib/modules/cache.py
# def get(function, timeout_hour, *args, **kargs):
# def clear_item(function, *args, **kargs):
# def __get_from_cache(dbcur, table, f, a, timeout_hour):
# def __execute_origin(dbcur, dbcon, function, table, f, a, response, *args, **kargs):
# def delete_file():
# def clear(table=None):


import requests
import datetime
import player
from resources.lib.modules import workers
from resources.lib.modules import util
from resources.lib.modules import cache

PLAYER_HANDLER = player.__name__


def get_live_channels():
    url = 'https://apim.oi.net.br/app/oiplay/ummex/v1/lists/651acd5c-236d-47d1-9e57-584a233ab76a?limit=200&orderby=titleAsc&page=1&useragent=androidtv'
    response = requests.get(url).json()

    channels = []


# Path: resources/lib/modules/workers.py
# class Thread(threading.Thread):
# class Workers:
#     def __init__(self, target, *args):
#     def run(self):
#     def get_result(self):
#     def globaltrace(self, frame, event, arg):
#     def localtrace(self, frame, event, arg):
#     def kill(self):
#     def __init__(self, concurrent=30, queue_size=None, target=None, expect_result=True):
#         def _queue_worker():
#     def put(self, item):
#     def join(self):
#     def terminate(self):
# 
# Path: resources/lib/modules/util.py
# class struct(object):
#     def __init__(self, kdict=None):
#     def __repr__(self):
#     def __getattr__(self, name):
#     def __len__(self):
#     def get(self, key):
# def getMPAAFromCI(ci):
# def getBestBitrateUrl(plugin, streams):
# def merge_dicts(x, *argv):
# def slugify(string):
# def unescape(text):
#     def fixup(m):
# def time_format(time_str=None, input_format=None):
# def get_signed_hashes(a):
# def J(a):
# def K(a):
# def L():
# def M(a):
# def N():
# def O(a):
# def P(a):
# def get_utc_delta():
# def strptime(date_string, format):
# def strptime_workaround(date_string, format='%Y-%m-%dT%H:%M:%S'):
# def get_total_seconds(timedelta):
# def get_total_seconds_float(timedelta):
# def get_total_hours(timedelta):
# def add_url_parameters(url, params):
# def is_number(s):
# G = 3600
# H = "=0xAC10FD"
# 
# Path: resources/lib/modules/cache.py
# def get(function, timeout_hour, *args, **kargs):
# def clear_item(function, *args, **kargs):
# def __get_from_cache(dbcur, table, f, a, timeout_hour):
# def __execute_origin(dbcur, dbcon, function, table, f, a, response, *args, **kargs):
# def delete_file():
# def clear(table=None):


# Path: resources/lib/modules/oiplay/scraper_live.py
import requests
import datetime
import player
from resources.lib.modules import workers
from resources.lib.modules import util
from resources.lib.modules import cache


PLAYER_HANDLER = player.__name__


def get_live_channels():
    url = 'https://apim.oi.net.br/app/oiplay/ummex/v1/lists/651acd5c-236d-47d1-9e57-584a233ab76a?limit=200&orderby=titleAsc&page=1&useragent=androidtv'
    response = requests.get(url).json()

    channels = []


    threads = [workers.Thread(__merge_channel_data, channel['prgSvcId'], channels) for channel in response['items']]