def main_categories(name, url, language, mode):
    cwd = ADDON.getAddonInfo('path')
    img_path = cwd + '/images/' 

    addDir('Hindi', '', 7, img_path + '/Hindi_Movies.png', 'hindi')
    addDir('Tamil', '', 7,img_path + '/Tamil_Movies.png', 'tamil')
    addDir('Telugu', '', 7, img_path + '/Telugu_Movies.png', 'telugu')
    addDir('Malayalam', '', 7, img_path + '/Malayalam_Movies.png', 'malayalam')
    addDir('Addon Settings', '', 12, '', '')

    JSONInterface.get_list()

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #2
0
def show_list(name, b_url, language, mode):
    if (mode == 9):
        postData = b_url + '&find=Year&year='
        values = [repr(x) for x in reversed(range(1940, date.today().year + 1))]
    elif (mode == 10):
        postData = b_url + '&organize=Cast'
        values = JSONInterface.get_actor_list(language)
    else:
        postData = b_url + '&organize=Director'
        values = JSONInterface.get_director_list(language)

    # postData = postData + '&filtered='

    for attr_value in values:
        if (attr_value != None):
            addDir(attr_value, BASE_URL+'/movie/results/?'+postData + str(attr_value), 1, '')

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #3
0
def show_list(name, b_url, language, mode):
    if (mode == 9):
        postData = b_url + '&find=Year&year='
        values = [repr(x) for x in reversed(range(1940, date.today().year + 1))]
    elif (mode == 10):
        postData = b_url + '&organize=Cast'
        values = JSONInterface.get_actor_list(language)
    else:
        postData = b_url + '&organize=Director'
        values = JSONInterface.get_director_list(language)

    # postData = postData + '&filtered='

    for attr_value in values:
        if (attr_value != None):
            addDir(attr_value, BASE_URL+'/movie/results/?'+postData + str(attr_value), 1, '')

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
def show_list(name, b_url, language, mode):
    if (mode == 9):
        postData = b_url + 'organize=Year'
        values = JSONInterface.get_year_list(language) or \
            [repr(x) for x in reversed(range(1950, date.today().year + 1))]
    elif (mode == 10):
        postData = b_url + 'organize=Cast'
        values = JSONInterface.get_actor_list(language)
    else:
        postData = b_url + 'organize=Director'
        values = JSONInterface.get_director_list(language)

    postData = postData + '&filtered='

    for attr_value in values:
        if (attr_value != None):
            addDir(attr_value, postData + attr_value, 15, '')

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #5
0
def show_list(name, b_url, language, mode):
    if (mode == 9):
        postData = b_url + 'organize=Year'
        values = JSONInterface.get_year_list(language) or \
            [repr(x) for x in reversed(range(1950, date.today().year + 1))]
    elif (mode == 10):
        postData = b_url + 'organize=Cast'
        values = JSONInterface.get_actor_list(language)
    else:
        postData = b_url + 'organize=Director'
        values = JSONInterface.get_director_list(language)

    postData = postData + '&filtered='

    for attr_value in values:
        if (attr_value != None):
            addDir(attr_value, postData + attr_value, 15, '')

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
def add_movies_to_list(movie_ids):
    ADDON_USERDATA_FOLDER = xbmc.translatePath(ADDON.getAddonInfo('profile'))
    DB_FILE = os.path.join(ADDON_USERDATA_FOLDER, 'cookies')

    print DB_FILE

    for m_id in movie_ids:
        _, name, image = DBInterface.get_cached_movie_details("", m_id)
        if (movie_info == None):
            _, name, image = JSONInterface.get_movie_detail(m_id)
            DBInterface.save_move_details_to_cache(..., m_id, name, image)
Exemple #7
0
def add_movies_to_list(movie_ids, bluray):
    ADDON_USERDATA_FOLDER = xbmc.translatePath(ADDON.getAddonInfo('profile'))
    DB_FILE = os.path.join(ADDON_USERDATA_FOLDER, 'movie_info_cache.db')

    COVER_BASE_URL = 'http://www.einthusan.com/images/covers/'
    if (bluray):
        BASE_URL = 'http://www.einthusan.com/movies/watch.php?bluray=true&id='
    else:
        BASE_URL = 'http://www.einthusan.com/movies/watch.php?id='
    for m_id in movie_ids:
        movie_info = DBInterface.get_cached_movie_details(DB_FILE, m_id)
        if (movie_info == None):
            _, name, image = JSONInterface.get_movie_detail(m_id)
            if (image == None):
                image = ''
            DBInterface.save_move_details_to_cache(DB_FILE, m_id, name, image)
        else:
            _, name, image = movie_info
        addDir(name, BASE_URL + str(m_id), 2, COVER_BASE_URL + image)
Exemple #8
0
def add_movies_to_list(movie_ids, bluray):
    ADDON_USERDATA_FOLDER = xbmc.translatePath(ADDON.getAddonInfo('profile'))
    DB_FILE = os.path.join(ADDON_USERDATA_FOLDER, 'movie_info_cache.db')

    COVER_BASE_URL = 'http://www.einthusan.com/images/covers/'
    if (bluray):
        BASE_URL = 'http://www.einthusan.com/movies/watch.php?bluray=true&id='
    else:
        BASE_URL = 'http://www.einthusan.com/movies/watch.php?id='
    for m_id in movie_ids:
        movie_info = DBInterface.get_cached_movie_details(DB_FILE, m_id)
        if (movie_info == None):
            _, name, image = JSONInterface.get_movie_detail(m_id)
            if (image == None):
                image = ''
            DBInterface.save_move_details_to_cache(DB_FILE, m_id, name, image)
        else:
            _, name, image = movie_info
        addDir(name, BASE_URL + str(m_id) ,2, COVER_BASE_URL + image)
Exemple #9
0
def show_list(name, b_url, language, mode):
    if (mode == 9):
        #postData = b_url + '&find=Year&year='
        values = [
            repr(x) for x in reversed(range(1980,
                                            date.today().year + 1))
        ]
        for attr_value in values:
            if (attr_value != None):
                addDir(
                    'Tamil ' + attr_value + ' Year Movies', BASE_URL +
                    'tamil-' + str(attr_value) + '-dubbed-movies.html', 1, '')
    elif (mode == 14):
        #postData = b_url + '&organize=Cast'
        genre_name = ['Horror', 'Action', 'Thriller', 'Crime', 'Mystery']
        for k in genre_name:
            addDir('Tamil ' + k + ' Dubbed Movies',
                   BASE_URL + 'tamil-' + k.lower() + '-dubbed-movies.html', 1,
                   '')
    elif (mode == 10):
        #postData = b_url + '&organize=Cast'
        addDir(name, b_url, 3, '')
        #values = JSONInterface.get_actor_list(language)
    elif (mode == 11):
        #postData = b_url + '&organize=Cast'
        addDir(name, b_url, 4, '')
    elif (mode == 12):
        #postData = b_url + '&organize=Cast'
        addDir(name, b_url, 5, '')
    elif (mode == 13):
        #postData = b_url + '&organize=Cast'
        addDir(name, b_url, 6, '')
    else:
        postData = b_url + '&organize=Director'
        values = JSONInterface.get_director_list(language)

    # postData = postData + '&filtered='

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #10
0
def list_movies_from_JSON_API(name, url, language, mode):
    # HACK: Used "url" to transport postData because we know the API url
    #       and dont need it here.
    postData = url
    response = JSONInterface.apply_filter(postData)

    if ('results' in response):
        movie_ids = response['results']

        bluray = False
        if (url.find('bluray') > -1):
            bluray = True
        add_movies_to_list(movie_ids, bluray)

        max_page = int(response['max_page']) 
        next_page = int(response['page']) + 1

        if (next_page <= max_page):
            cwd = ADDON.getAddonInfo('path')
            img_path = cwd + '/images/next.png' 
            addDir("[B]Next Page[/B] >>>", url + "&page=" + str(next_page), mode, img_path)

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #11
0
def list_movies_from_JSON_API(name, url, language, mode):
    # HACK: Used "url" to transport postData because we know the API url
    #       and dont need it here.
    postData = url
    response = JSONInterface.apply_filter(postData)

    if ('results' in response):
        movie_ids = response['results']

        bluray = False
        if (url.find('bluray') > -1):
            bluray = True
        add_movies_to_list(movie_ids, bluray)

        max_page = int(response['max_page']) 
        next_page = int(response['page']) + 1

        if (next_page <= max_page):
            cwd = ADDON.getAddonInfo('path')
            img_path = cwd + '/images/next.png' 
            addDir("[B]Next Page[/B] >>>", url + "&page=" + str(next_page), mode, img_path)

    xbmcplugin.endOfDirectory(int(sys.argv[1]))
Exemple #12
0
def list_movies_from_JSON_API(name, url, language, mode):
    # HACK: Used "url" to transport postData because we know the API url
    #       and dont need it here.
    postData = url
    response = JSONInterface.apply_filter(postData)

    if ('results' in response):
        movie_ids = response['results']

        bluray = False
        if (url.find('bluray') > -1):
            bluray = True
        add_movies_to_list(movie_ids, bluray)

        max_page = int(response['max_page'])
        next_page = int(response['page']) + 1

        if (next_page <= max_page):
            cwd = ADDON.getAddonInfo('path')
            img_path = 'https://lh3.googleusercontent.com/-WqPN3mWthzU/Vh8Rfcgi85I/AAAAAAAACkk/Sqn5U4b6FGc/s510-Ic42/next.png'
            addDir("[B]Next Page[/B] >>>", url + "&page=" + str(next_page),
                   mode, img_path)
    thumbView()
    xbmcplugin.endOfDirectory(int(sys.argv[1]))