# Path: epymc/extapi/onlinevideo.py
# ACT_DEFAULT = 0
# ACT_NONE = 1
# ACT_FOLDER = 2
# ACT_MORE = 3
# ACT_PLAY = 4
# ACT_SEARCH = 5
# def state_get():
# def language_get():
# def item_add(next_state, label, url, info=None, icon=None, poster=None, action=ACT_DEFAULT):
# def play_url(url):
# def report_error(msg):
# def local_resource(_file_, res):
# def fetch_url(url, headers=None, parser=None):
# def ydl_executable():
# def call_ydl(url):
# def url_encode(params):
# def seconds_to_duration(seconds):
# def relative_date(date):
# def format_date(date):


from epymc.extapi.onlinevideo import api_version, state_get, \
    fetch_url, play_url, item_add, call_ydl, url_encode, language_get, \
    ACT_NONE, ACT_FOLDER, ACT_MORE, ACT_PLAY, ACT_SEARCH
        year = data['release_date'][:4]
    except:
        year = ''

    try:
        directors = [d['name'] for d in data['credits']['crew'] if d['job'] == 'Director']
    except:
        directors = [_('Unknown')]

    try:
        casts = [d['name'] for i, d in enumerate(data['credits']['cast']) if i < 5]
    except:
        casts = [_('Unknown')]

    info = '<title>{}</title> <small>({} {})</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}/10 ({} {})</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '{}'.format(title, country, year,
                       _('Director'), ', '.join(directors),
                       _('Cast'), ', '.join(casts),
                       _('Original title'), original,
                       _('Genres'), genres,
                       _('Rating'), data['vote_average'], data['vote_count'], _('votes'),
                       _('Released'), data['release_date'],
                       overview)
    item_add(ST_NONE, title, None, poster=poster,

# Path: epymc/extapi/onlinevideo.py
# ACT_DEFAULT = 0
# ACT_NONE = 1
# ACT_FOLDER = 2
# ACT_MORE = 3
# ACT_PLAY = 4
# ACT_SEARCH = 5
# def state_get():
# def language_get():
# def item_add(next_state, label, url, info=None, icon=None, poster=None, action=ACT_DEFAULT):
# def play_url(url):
# def report_error(msg):
# def local_resource(_file_, res):
# def fetch_url(url, headers=None, parser=None):
# def ydl_executable():
# def call_ydl(url):
# def url_encode(params):
# def seconds_to_duration(seconds):
# def relative_date(date):
# def format_date(date):


# Path: epymc/plugins/onlinevideo/themoviedb/themoviedb.py
from epymc.extapi.onlinevideo import api_version, state_get, \
    fetch_url, play_url, item_add, call_ydl, url_encode, language_get, \
    ACT_NONE, ACT_FOLDER, ACT_MORE, ACT_PLAY, ACT_SEARCH

        year = data['release_date'][:4]
    except:
        year = ''

    try:
        directors = [d['name'] for d in data['credits']['crew'] if d['job'] == 'Director']
    except:
        directors = [_('Unknown')]

    try:
        casts = [d['name'] for i, d in enumerate(data['credits']['cast']) if i < 5]
    except:
        casts = [_('Unknown')]

    info = '<title>{}</title> <small>({} {})</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '<small><name>{}:</name> {}/10 ({} {})</small><br>' \
           '<small><name>{}:</name> {}</small><br>' \
           '{}'.format(title, country, year,
                       _('Director'), ', '.join(directors),
                       _('Cast'), ', '.join(casts),
                       _('Original title'), original,
                       _('Genres'), genres,
                       _('Rating'), data['vote_average'], data['vote_count'], _('votes'),
                       _('Released'), data['release_date'],
                       overview)
    item_add(ST_NONE, title, None, poster=poster,

             info=info, icon='icon/info', action=ACT_NONE)