# 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/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):


from auth import PLATFORM
from auth import get_request_data
from resources.lib.modules import cache
from resources.lib.modules import workers
import requests
import resources.lib.modules.control as control
import scraper_live
import player
import os
import urllib
            'plot': content.get('description'),
            'plotoutline': content.get('description'),
            'genre': content.get('genres', []),
            'year': content.get('releaseYear'),
            'country': content.get('country'),
            'director': content.get('directors', []),
            'cast': content.get('actors', []),
            'episode': content.get('episodeNumber'),
            'season': content.get('seasonNumber'),
            'mpaa': content.get('ageRating'),
            'mediatype': 'season',
            'content': 'seasons',
            'art': {
                'poster': poster,
                'tvshow.poster': poster,
                'fanart': content.get('images', {}).get('banner', FANART)
            }
        }


def get_episodes(id, season_number=None):
    control.log('get_episodes = %s | %s' % (id, season_number))

    content = next(iter(_get_content(id).get('response', [])), {})

    # program = _hydrate_content(content)

    episodes = next((season.get('episodes', []) for season in content.get('seasons', []) if str(season.get('seasonNumber', 0)) == str(season_number) or season_number is None), [])

    threads = [{

# 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/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/netnow/scraper_vod.py
from auth import PLATFORM
from auth import get_request_data
from resources.lib.modules import cache
from resources.lib.modules import workers
import requests
import resources.lib.modules.control as control
import scraper_live
import player
import os
import urllib

            'plot': content.get('description'),
            'plotoutline': content.get('description'),
            'genre': content.get('genres', []),
            'year': content.get('releaseYear'),
            'country': content.get('country'),
            'director': content.get('directors', []),
            'cast': content.get('actors', []),
            'episode': content.get('episodeNumber'),
            'season': content.get('seasonNumber'),
            'mpaa': content.get('ageRating'),
            'mediatype': 'season',
            'content': 'seasons',
            'art': {
                'poster': poster,
                'tvshow.poster': poster,
                'fanart': content.get('images', {}).get('banner', FANART)
            }
        }


def get_episodes(id, season_number=None):
    control.log('get_episodes = %s | %s' % (id, season_number))

    content = next(iter(_get_content(id).get('response', [])), {})

    # program = _hydrate_content(content)

    episodes = next((season.get('episodes', []) for season in content.get('seasons', []) if str(season.get('seasonNumber', 0)) == str(season_number) or season_number is None), [])

    threads = [{

        'thread': workers.Thread(_get_content, content.get('id', -1)),