import os, sys

# Add our resources/lib to the python path
try:
    current_dir = os.path.dirname(os.path.abspath(__file__))
except:
    current_dir = os.getcwd()

sys.path.append(os.path.join(current_dir, 'resources', 'lib'))
import config, utils, index, categories, section, entries, play

# Print our platform/version debugging information
utils.log_xbmc_platform_version()

if __name__ == "__main__" :
    params_str = sys.argv[2]
    params = utils.get_url(params_str)
    utils.log("Loading add-on with params: %s" % params)

    if (len(params) == 0):
        index.make_index_list()
    elif params.has_key('play'):
        play.play(params_str)
    elif params.has_key('entries_url'):
        entries.make_entries_list(params_str)
    elif params.has_key('section'):
        section.make_section_list(params_str)
    elif params.has_key('category'):
        categories.make_category_list(params_str)
Beispiel #2
0
sys.path.insert(0, os.path.join(addon_dir, 'resources', 'lib'))

import categories  # noqa: E402
import entries  # noqa: E402
import index  # noqa: E402
import play  # noqa: E402
import section  # noqa: E402

# Print our platform/version debugging information
utils.log_kodi_platform_version()

if __name__ == "__main__":
    params_str = sys.argv[2]
    params = utils.get_url(params_str)

    if len(params) == 0:
        index.make_index_list()
    elif 'play' in params:
        play.play(params_str)
    elif 'entries_url' in params:
        entries.make_entries_list(params_str)
    elif 'section' in params:
        section.make_section_list(params_str)
    elif 'category' in params:
        categories.make_category_list(params_str)
    elif 'action' in params:
        if params['action'] == 'sendreport':
            utils.user_report()
        elif params['action'] == 'settings':
            xbmcaddon.Addon().openSettings()
sys.path.insert(0, os.path.join(addon_dir, 'resources', 'lib'))

import categories  # noqa: E402
import play  # noqa: E402
import programs  # noqa: E402
import series  # noqa: E402

# Print our platform/version debugging information
utils.log_kodi_platform_version()

if __name__ == '__main__':
    params_str = sys.argv[2]
    params = utils.get_url(params_str)

    if (len(params) == 0):
        categories.make_category_list()
    elif 'series' in params:
        xbmcgui.Dialog().ok(
            'Outdated Favourites Link',
            'The Kodi Favourite item being accessed was created with an '
            'earlier version of the iView add-on and is no longer '
            'compatible. Please remove this link and update with a new '
            'one')
    elif 'play' in params:
        play.play(params_str)
    elif 'series_url' in params:
        programs.make_programs_list(params_str)
    elif 'category' in params:
        if params['category'] == 'settings':
            xbmcaddon.Addon().openSettings()
        else:
#  You should have received a copy of the GNU General Public License
#  along with this plugin. If not, see <http://www.gnu.org/licenses/>.
#

import os, sys

# Add our resources/lib to the python path
try:
   current_dir = os.path.dirname(os.path.abspath(__file__))
except:
   current_dir = os.getcwd()

sys.path.append(os.path.join(current_dir, 'resources', 'lib'))
import utils, categories, series, programs, play

# Print our platform/version debugging information
utils.log_xbmc_platform_version()

if __name__ == "__main__" :
   params_str = sys.argv[2]
   params = utils.get_url(params_str)

   if (len(params) == 0):
      categories.make_category_list()
   elif params.has_key("play"):
      play.play(params_str)
   elif params.has_key("series"):
      programs.make_programs_list(params_str)
   elif params.has_key("category"):
      series.make_series_list(params_str)