Ejemplo n.º 1
0
def get_item_playable(idItem):
    urlToLoad = VVVVID_BASE_URL + idItem + '/info'
    response = getJsonDataFromUrl(urlToLoad)
    data = json.loads(response.read().decode(
        response.info().getparam('charset') or 'utf-8'))
    info = data['data']
    itemPlayable = ItemPlayableChannel()
    itemPlayable.title = info['title']
    itemPlayable.thumb = info['thumbnail']
    itemPlayable.id = info['id']
    itemPlayable.show_id = info['show_id']
    itemPlayable.ondemand_type = info['ondemand_type']
    itemPlayable.show_type = info['show_type']
    itemPlayable = get_seasons_for_item(itemPlayable)
    return itemPlayable
Ejemplo n.º 2
0
def get_item_playable(idItem):
    urlToLoad = urllib.basejoin(VVVVID_BASE_URL, idItem + '/info')
    data = getJsonDataFromUrl(urlToLoad)
    info = data['data']
    itemPlayable = ItemPlayableChannel()
    itemPlayable.title = info['title']
    itemPlayable.thumb = urllib.basejoin(VVVVID_STATIC_URL, info['thumbnail']) + '|' + HEADERS_ENCODED
    itemPlayable.id = info['id']
    itemPlayable.show_id = info['show_id']
    itemPlayable.ondemand_type = info['ondemand_type']
    itemPlayable.show_type = info['show_type']
    itemPlayable = get_seasons_for_item(itemPlayable)
    return itemPlayable
Ejemplo n.º 3
0
def get_item_playable(idItem):
    urlToLoad = VVVVID_BASE_URL+idItem + '/info'
    response = getJsonDataFromUrl(urlToLoad)
    data = json.loads(response.read().decode(response.info().getparam('charset') or 'utf-8'))
    info = data['data']
    itemPlayable = ItemPlayableChannel()
    itemPlayable.title = info['title']
    itemPlayable.thumb = info['thumbnail']
    itemPlayable.id = info['id']
    itemPlayable.show_id = info['show_id']
    itemPlayable.ondemand_type = info['ondemand_type']
    itemPlayable.show_type = info['show_type']
    itemPlayable = get_seasons_for_item(itemPlayable)
    return itemPlayable