Commit [d754de] Maximize Restore History

[script.moviequiz] -v0.3.2

- Improved support for XBMC Eden nightly builds
- Added support for Cinema Experience integration
- Use fanart instead of movie clips where relevant
- Improved data selection for some questions
- Added icons for replaying movie clip and exiting the game
- Removed 'When was episode first aired?' question as it's too difficult
- Removed French translation as it was outdated

amet amet 2011-04-19

added script.moviequiz/resources/skins/Default/media/quiz-button-exit.png
added script.moviequiz/resources/skins/Default/media/quiz-button-icons.xcf
added script.moviequiz/resources/skins/Default/media/quiz-button-replay.png
added script.moviequiz/resources/skins/Default/media/quiz-white-square.png
removed script.moviequiz/resources/language/French
changed script.moviequiz/quizlib/db.py
changed script.moviequiz/quizlib/gui.py
changed script.moviequiz/quizlib/imdb.py
changed script.moviequiz/quizlib/player.py
changed script.moviequiz/quizlib/question.py
changed script.moviequiz/quizlib/thumb.py
changed script.moviequiz/resources/language/Danish/strings.xml
changed script.moviequiz/resources/language/English/strings.xml
changed script.moviequiz/resources/language/German/strings.xml
changed script.moviequiz/resources/skins/Default/720p/script-moviequiz-main.xml
changed script.moviequiz/resources/skins/Default/media/quiz-background-tvshows.png
changed script.moviequiz/resources/skins/Default/media/quiz-background.png
changed script.moviequiz/addon.xml
changed script.moviequiz/changelog.txt
changed script.moviequiz/todo.txt
copied script.moviequiz/resources/language/French/strings.xml -> script.moviequiz/quizlib/mq_ce_play.py
script.moviequiz/resources/skins/Default/media/quiz-button-exit.png Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/media/quiz-button-icons.xcf Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/media/quiz-button-replay.png Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/media/quiz-white-square.png Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/db.py Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/gui.py Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/imdb.py Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/player.py Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/question.py Diff Switch to side-by-side view
Loading...
script.moviequiz/quizlib/thumb.py Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/language/Danish/strings.xml Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/language/English/strings.xml Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/language/German/strings.xml Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/720p/script-moviequiz-main.xml Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/media/quiz-background-tvshows.png Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/skins/Default/media/quiz-background.png Diff Switch to side-by-side view
Loading...
script.moviequiz/addon.xml Diff Switch to side-by-side view
Loading...
script.moviequiz/changelog.txt Diff Switch to side-by-side view
Loading...
script.moviequiz/todo.txt Diff Switch to side-by-side view
Loading...
script.moviequiz/resources/language/French/strings.xml to script.moviequiz/quizlib/mq_ce_play.py
--- a/script.moviequiz/resources/language/French/strings.xml
+++ b/script.moviequiz/quizlib/mq_ce_play.py
@@ -1,25 +1,27 @@
-<?xml version="1.0" encoding="utf-8"?>
-<strings>
-    <!-- -->
-    <string id="30000">Question %d sur %d</string>
-    <string id="30001">Correcte:</string>
-    <string id="30002">Erreur:</string>
+import xbmc
+import xbmcaddon
 
-    <!-- Questions -->
-    <string id="30400">Quel est ce film ?</string>
-    <string id="30401">Dans quel film ne trouve t'on pas [B]%s[/B]?</string><!-- %s is actor name -->
-    <string id="30402">En quelle année le film [B]%s[/B] est t'il sorti ?</string><!-- %s is movie title -->
-    <string id="30403">Quel est l'accroche du film [B]%s[/B]?</string><!-- %s is movie title -->
-    <string id="30404">Quel est le metteur en scène de [B]%s[/B]?</string><!-- %s is movie title -->
-    <string id="30405">Quel studio a réalisé [B]%s[/B]?</string><!-- %s is movie title -->
-    <string id="30406">Quel est cet acteur?</string>
+from quizlib.gui import QuizGui
 
-    <!-- Settings strings -->
-    <string id="30500">Général</string>
-    <string id="30510">Limiter le nombre de question</string>
-    <string id="30511">Limite de question</string>
-    <string id="30512">Limiter la sélection des films selon le classement MPAA</string>
-	<string id="30513">Classement MPAA max.</string>
+ADDON_ID = 'script.moviequiz'
 
-</strings>
+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))
+    addon = xbmcaddon.Addon(id = ADDON_ID)
+    path = addon.getAddonInfo('path')
+    w = QuizGui('script-moviequiz-main.xml', path, addon=addon, interactive=not automatic, type=type, questionLimit=questionLimit, maxRating=maxRating)
+    w.doModal()
+    del w
+    
+    return True