예제 #1
0
    def onAction(self, action):
        xbmc.log(str(action.getId()))
        if action == 11:  # Info
            from resources.lib import movie

            movie.movie_id = self.current_movie["id"]
            movie.startup()
        if action == 117 or action == 101:  # Context
            cm = dialogContext("context_menu.xml", addon_path, "Default")
            cm.movie = self.current_movie
            cm.mode = self.source
            cm.xbmc_movies = self.xbmc_movies
            cm.session_id = addon.getSetting("session_id")
            cm.doModal()
            xbmc.sleep(1000)
            thread.start_new(self.updateIcons, (self.current_movie, self.current_item, 3))
        if action == 10 and action != 101:
            d = xbmcgui.Dialog()
            ans = d.yesno("tmdb Browser", "Exit themoviedb.org Browser?")
            if ans:
                xbmc.executebuiltin("Dialog.Close(all,true)")
        elif action == 92:
            self.close()
        elif action == 159:
            xbmc.executebuiltin("Dialog.Close(all,true)")
            from resources.lib import opening

            opening.startup()
예제 #2
0
 def onAction(self, action):
     if action == 10:
         d = xbmcgui.Dialog()
         ans=d.yesno('tmdb Browser','Exit themoviedb.org Browser?')
         if ans:
             xbmc.executebuiltin('Dialog.Close(all,true)')
     elif action == 92:
         self.close()
     elif action==159:
         xbmc.executebuiltin('Dialog.Close(all,true)')
         from resources.lib import opening
         opening.startup()
예제 #3
0
# Random trailer player
#
# Author - kzeleny
# Version - 1.1.8
# Compatibility - Frodo/Gothum
#
import xbmc
import xbmcgui
import xbmcaddon
from resources.lib import tmdb
from resources.lib import movies
from resources.lib import people
from resources.lib import tvshows
from resources.lib import opening

addon = xbmcaddon.Addon()
addon_path = addon.getAddonInfo('path')
start_mode=addon.getSetting('start_mode')

if addon.getSetting('session_id')=='' and addon.getSetting('username')!='' and addon.getSetting('password')!='':
    addon.setSetting('session_id',tmdb.validate_new_user(addon.getSetting('username'),addon.getSetting('password')))

if start_mode=='0':
    opening.startup()
elif start_mode=='1':
    people.startup()
elif start_mode=='2':
    tvshows.startup()
else:
    movies.startup()