def runCinemaExperience(type, automatic, maxRating, genre, questionLimit): """ Used by Cinema Experience integration. This method will block until the Movie Quiz is exited. Keyword arguments: type -- the type of quiz to run, either Movie or TV Quiz. Either use constants in question.py or 1 for Movie and 2 for TV Quiz. automatic -- pass True if the quiz should run non-interactively, ie. progressing automatically. maxRating -- the maximum allow MPAA rating to use. genre -- Unused at the moment. questionLimit -- the number of questions to go through before the quiz ends. """ xbmc.log( "Starting Movie Quiz in Cinema Experience mode with params: type=%s, automatic=%s, maxRating=%s, genre=%s, questionLimit=%d" % (type, automatic, maxRating, genre, questionLimit)) game = QuestionLimitedGame(type, -1, not automatic, questionLimit) w = QuizGui(game) w.doModal() del w return True
# You should have received a copy of the GNU General Public License # along with this Program; see the file LICENSE.txt. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # http://www.gnu.org/copyleft/gpl.html # import os import xbmc import xbmcaddon import buggalo from quizlib.gui import QuizGui #import sys #sys.path.append('/opt/pycharm/pycharm-debug.egg') #import pydevd #pydevd.settrace('localhost', port=5005, stdoutToServer=True, stderrToServer=True, suspend=False) if True: buggalo.SUBMIT_URL = 'http://tommy.winther.nu/exception/submit.php' try: # Make sure data dir exists ADDON = xbmcaddon.Addon() if not os.path.exists(xbmc.translatePath( ADDON.getAddonInfo('profile'))): os.makedirs(xbmc.translatePath(ADDON.getAddonInfo('profile'))) w = QuizGui() w.doModal() del w except Exception: buggalo.onExceptionRaised()