• 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 22
[RELEASE] Movie Quiz - how well do you know your movie collection?
Alright, I just got a debug log, and I guess it is the "name" issue

http://pastebin.com/NMxTFXn6

twinther, is there anyway you can retrieve the database name from a different source other than advancedsettings.xml?

Now that the database names are standardized (MyVideos+version number) and Eden does not allow for custom database names, maybe you can retrieve the xbmc version and guess the database name based on the version?
Reply
Thanks for testing this. I think the Movie Quiz should just hardcode the database name to MyVideos as XBMC does.
I don't have a mysql setup at the moment, do you have a chance to do a quick test?

Replace line 680 in quizlib/db.py
Code:
c.execute('SELECT schema_name FROM schemata WHERE schema_name LIKE "' + settings['name'] + '%"')
with:
Code:
c.execute('SELECT schema_name FROM schemata WHERE schema_name LIKE "MyVideos%"')

I think you should be able to run it then.
Reply
(2012-03-16, 22:14)twinther Wrote: Thanks for testing this. I think the Movie Quiz should just hardcode the database name to MyVideos as XBMC does.
I don't have a mysql setup at the moment, do you have a chance to do a quick test?

Replace line 680 in quizlib/db.py
Code:
c.execute('SELECT schema_name FROM schemata WHERE schema_name LIKE "' + settings['name'] + '%"')
with:
Code:
c.execute('SELECT schema_name FROM schemata WHERE schema_name LIKE "MyVideos%"')

I think you should be able to run it then.

Thanks a lot twinther,

That seems to have worked. Here's my log: http://pastebin.com/CiFWP2Yk

The only potential problem I can think of is that when you upgrade xbmc, sometimes it creates a new database with a different name (because of the version), but does not delete the old one. For instance when I was on beta 2, my database was "MyVideos58". When I upgraded to RC2, it created a "MyVideos60" and I currently have both databases in my mysql server. Looking through the log, Movie Quiz seems to have used the later one, "MyVideos60" but I know zero python so I have no idea how that one was chosen from the string "MyVideos%". If pyhton always chooses the higher value, I guess there would be no issue, but if it chooses randomly, then it might end up picking an older, out-of-date database.
Reply
Sounds great.
The code actually finds all the MyVideos databases and then uses the one with the highest number, so it shouldn't be a problem.
I'll include the change in the next version of the addon.
Br.
Tommy
Reply
(2012-03-17, 23:32)twinther Wrote: Sounds great.
The code actually finds all the MyVideos databases and then uses the one with the highest number, so it shouldn't be a problem.
I'll include the change in the next version of the addon.
Br.
Tommy

I just tested this change twice, and both times it resulted in the addon failing to run with an "addon.py" error.
Logging in to mysql, my db's are named:
"xbmc_music18" and "xbmc_video60"

I'm not very experienced with mysql, but, upgrading to eden the first time seemed to screw up, so I
dropped both databases, and let eden create new ones, and this is what I have now.

(I just paused to check my advanced settings) - I see that my advanced settings does specify the db name,
so I guess this due to my setup.

I'm not adverse to changing my db names if need be (assuming I can figure out how to do it without other side effects),
however maybe there's a more robust method of deciding what database to connect to?

Either way great plugin, thanks

Reply
Hey twinther

Just trying to get this working with Cinema Experience. There was a small bug that giftie fixed,
but after that there's behaviour that suggests a problem with MQ.

Here's a paste of the info, any info you can provide would be appreciated.
I'm in a mysql environment but I dunno if that affects this or not.

Quote:Here's a proper new log, that shows the behaviour when I made the change you suggested.
What happens is MovieQuiz is launched, but with 0 questions.
In manual mode (MQ acts as if we are finished, with 0 questions): http://pastebin.com/18it6T8x

In 'automatic' mode MQ launches with 10 questions, but the questions are all blank.: http://pastebin.com/b0YSq1Mz


thanks Smile
Reply
Hi there,
Your add-on is fantastic but there seems to be a bug about large TV series. I have about 20 TV series and one of them is Pokemon ( all 14 seasons) which has 700 episodes. Whenever a question about Pokemon is asked or Pokemon itself is in the options, then the video just keeps loading and never actually loads the clip.therefore i always have to reset the quiz and feel dreaded whenever a question on Pokemon comes. But once or twice it has loaded the clip properly. My files are in mkv and mp4 formats but i don't think that having two types of files is the cause because my Seinfeld questions load perfectly( rmvb and mkv).
Hope you can solve my problem.
Thanks
Reply
Hi SynthLover,
Please send me your xbmc.log after you experience the problems.

Thanks bluenote, I'll take a look at your log. I expect to start working on the movie quiz again soon (just finishing up on a new version of the TV Guide addon atm)
Reply
(2011-08-30, 20:41)twinther Wrote: Ah, do you have xbmc configured to a MySQL database instead of the default sqlite?
MySQL support is broken at the moment and I'm considering dropping it for a while until I can do it "the right way"..

br.
Tommy

Congratulations, you just saved me making a bug report, asking my own question here.
(I'm also a MySQL user, too tempting to share the library all around the house)
Reply
here's the log file- http://pastebin.com/SsFR0tGg
Reply
Is there actual plans to add MySQL support? Sorry to hassle.
Reply
There is actually already MySQL support. It parses the connection values from the advancedsettings.xml file.
With version 0.5.0 you will have to specify the <name> tag as well, with the prefix of the database name, usually <name>MyVideos</name>

Br.
Tommy
Reply
Oh sorry, is there a single post or documentation on what needs to be done exactly?
Reply
It's supposed to work out-of-the-box if XBMC is already using MySQL. The addon parses the MySQL connection information from the advancedsettings.xml. There's a guide for setting that up on the wiki: http://wiki.xbmc.org/index.php?title=Mysql
What is not on the wiki is the mention of the <name> tag, which you must provide for this addon to work - I will fix this in the next version though.

If you get any errors I would like to see your xbmc.log file

Br.
Tommy

Hi all,
I have updated the Movie Quiz website at http://moviequiz.xbmc.info/ with a new design, more information and an improved highscore browser. I'm planning on adding a "Country battle" and possible other competitive things in the future.

Right now I'll concentrate on the next version of the addon Smile
Reply
I think I've managed to capture the error (because it didn't work)



XBMC log below, Advanced settings file just here

" <videodatabase>
<type>mysql</type>
<host>192.168.0.16</host>
<port>3306</port>
<name>myvideos60</name>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase> "

New line I just added


Quote:22:56:13 T:152 DEBUG: ------ Window Init (MyPrograms.xml) ------
22:56:13 T:152 INFO: Loading skin file: MyPrograms.xml
22:56:13 T:152 DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/executable/)
22:56:13 T:152 DEBUG: ParentPath = [addons://sources/executable/]
22:56:13 T:8520 DEBUG: Thread Background Loader start, auto delete: 0
22:56:13 T:8520 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(addons) in addons://more/executable.tbn
22:56:13 T:8520 DEBUG: Thread Background Loader 8520 terminating
22:56:15 T:152 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
22:56:15 T:152 INFO: initializing python engine.
22:56:15 T:152 DEBUG: new python thread created. id=5
22:56:15 T:8304 DEBUG: Thread XBPyThread start, auto delete: 0
22:56:15 T:8304 DEBUG: Python thread: start processing
22:56:15 T:8304 NOTICE: -->Python Interpreter Initialized<--
22:56:15 T:8304 DEBUG: XBPyThread:Tonguerocess - The source file to load is C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\addon.py
22:56:15 T:8304 DEBUG: XBPyThread:Tonguerocess - Setting the Python path to C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.xbmcswift\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.simplejson\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.myconnpy\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Program Files (x86)\XBMC\addons\script.module.pil\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.common.plugin.cache\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.simple.downloader\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.parsedom\lib;C:\Users\scott\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Program Files (x86)\XBMC\addons\script.module.pysqlite\lib;C:\Program Files (x86)\XBMC\system\python\DLLs;C:\Program Files (x86)\XBMC\system\python\Lib;C:\Program Files (x86)\XBMC\python26.zip;C:\Program Files (x86)\XBMC\system\python\lib\plat-win;C:\Program Files (x86)\XBMC\system\python\lib\lib-tk;C:\Program Files (x86)\XBMC;C:\Program Files (x86)\XBMC\system\python;C:\Program Files (x86)\XBMC\system\python\lib\site-packages;
22:56:15 T:8304 DEBUG: XBPyThread:Tonguerocess - Entering source directory C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz
22:56:15 T:8304 DEBUG: Instantiating addon using automatically obtained id of "script.moviequiz" dependent on version 2.0 of the xbmc.python api
22:56:15 T:8304 NOTICE: Loaded DB settings: {'host': '192.168.0.16', 'type': 'mysql', 'user': 'xbmc', 'pass': 'xbmc'}
22:56:15 T:8304 NOTICE: Connecting to MySQL database...
22:56:15 T:8304 INFO: -->Python script returned the following error<--
22:56:15 T:8304 ERROR: Error Type: <type 'exceptions.KeyError'>
22:56:15 T:8304 ERROR: Error Contents: ('name',)
22:56:15 T:8304 ERROR: Traceback (most recent call last):
File "C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\addon.py", line 20, in <module>
w = MenuGui()
File "C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\quizlib\gui.py", line 83, in __init__
self.database = db.Database.connect()
File "C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\quizlib\db.py", line 79, in connect
return MySQLDatabase(allowedRatings, onlyWatched, settings)
File "C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\quizlib\db.py", line 657, in __init__
dbName = self._find_newest_database(settings)
File "C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz\quizlib\db.py", line 680, in _find_newest_database
c.execute('SELECT schema_name FROM schemata WHERE schema_name LIKE "' + settings['name'] + '%"')
KeyError: ('name',)
22:56:15 T:8304 INFO: -->End of Python script error report<--
22:56:15 T:8304 INFO: Python script stopped
22:56:15 T:8304 DEBUG: Thread XBPyThread 8304 terminating
22:56:15 T:152 DEBUG: waiting for python thread 5 to stop
22:56:15 T:152 DEBUG: python thread 5 destructed
22:56:15 T:152 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
22:56:15 T:152 ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block C:\Users\scott\AppData\Roaming\XBMC\addons\script.moviequiz
22:56:17 T:152 DEBUG: CApplication:TonguerocessMouse: trying mouse action leftclick
22:56:17 T:152 DEBUG: CApplication::ExecuteXBMCAction : Translating ActivateWindow(Home)
22:56:17 T:152 DEBUG: CApplication::ExecuteXBMCAction : To ActivateWindow(Home)
22:56:17 T:152 DEBUG: Activating window ID: 10000
22:56:18 T:152 DEBUG: ------ Window Deinit (MyPrograms.xml) ------
22:56:18 T:152 DEBUG: ------ Window Init (Home.xml) ------
Reply
  • 1
  • 13
  • 14
  • 15(current)
  • 16
  • 17
  • 22

Logout Mark Read Team Forum Stats Members Help
[RELEASE] Movie Quiz - how well do you know your movie collection?5