Video Database
#1
I wrote a program a while back to add my own entries into the video database. I did this as I wanted my TV series type shows to show up with proper titles so I could see the season and episode name and such.

Anyway, the database format has changed recently so I made changes to my program yesterday. I can now enter my shows into the database and they show up correctly. I can also play them fine.

However, if I select a show and try to get the movie information, the keyboard pops up and asks me to change the movie name. It then trys to search IMDB for the movie.

I do not understand why this is happening, from all I can see, my manual entries are exactly the same as the automated entries that are a result of a scan of my movie collection. I did update the genrelinkmovie tables but I did not bother with the director or actor links. However I did fill in the plot, tag line, rating and all other fields similar to the auto scan entries.

Does anyone have an idea why mine manual entries will not show up?

Also, the Movie table has a URL to the thumbnails on IMDB site but there is a thumbnail directory that has file names that have a hex number and an extension that I can not remember. What is the linkage between the video database and these pictures in the thumbnail directory?

Thanks for any help you can suggest.
Shawn
Reply
#2
If you examine the queries that are done when looking up movie information, you should be able to track down what you are leaving out.

The URL to the thumb is there for grabbing the external thumb if it's needed (eg if no thumb already exists for the item). As with all thumbs, it's cached based on the path of the item (CRC32 of lower case path) to avoid us constantly hitting the web.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
I Guess I'll have to download the source code then.

I have not compiled XBMC yet. Quick question, can you souce code debug the application or can you only run it on the xbox and analyze the log files?
Reply
#4
You can run XBMC_PC on any win32 machine with directx8 hardware, so can obviously do all the usual debugging there.

In addition, you can also debug XBMC over the network, assuming you set up a debug environment (debug bios etc.) on your xbox. There are tutorials for converting your retail xbox into a debug one - with things such as Phoenix Bios Loader, you can effectively have both.

And the file you want is VideoDatabase.cpp primarily. Basically we just do:

Quote:if (database.HasMovieInfo(path))
{
database.GetMovieInfo(path);
<show info>
}

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Thanks for all our help. This will get me started
Reply
#6
Before going the dificult way of debuging the XBMC code, let me share an idea that is passing my head this last days.

I, like you, would like to have a confortable way to edit my movies info in a PC and then have that read somehow by the XBOX.

Even better that that will be to have a standard PC movies database program of my choice and then integrate it with XBMC.
But until know I didn't like my choices as I had to interact directly with the sql database in the XBOX.

But right now, these nice people of XBMC have created the scraper part for scraping data from other places diferent than the usual IMDB.

So I think, what if you use a common program for movies database for PC that has the option to export your data into HTML and then grab that from XBMC with a convenient Scraper?

I surely will go this way...
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#7
That is probably the better way to go. Except, those scraper xml files are so hard to figure out, especialy with the lack of documentation I have found. I hate regular expression. They make my brain hurt.

I know C++ and SQL very well so writing a program to manipulate the the database it easy for me. But it breaks everytime XBMC changes.

So I guess your sugestion makes the most sense. Damn. I guess I will have to learn how the scrapers work.

Thanks for the suggestions

Shawn
Reply
#8
The Import from XML feature of the video database seems the most likely candidate to me. If you can produce the XML of the appropriate format (just export to see it) then importing simply:

1. Removes content for the movie if it's already in the dB.

2. Adds content for the movie.

So this seems the "easiest" and most transparent way of editting the dB to me. It'll also work regardless of changes to the video db. If it's missing anything, then please feel free to indicate what it is, and I'm sure it'll be fixed.

Since you're good at C++, you could even go and do a couple of mods so it reads in a <filename>.xml file directly (See where it reads the .nfo files in GUIWindowVideo*.cpp, and mod accordingly) or so that you can initiate an Import to the video db via a builtin function (ie over the webserver, or via a script etc.)

Just some ideas Wink

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
jmarshall Wrote:Since you're good at C++, you could even go and do a couple of mods so it reads in a <filename>.xml file directly (See where it reads the .nfo files in GUIWindowVideo*.cpp, and mod accordingly) or so that you can initiate an Import to the video db via a builtin function (ie over the webserver, or via a script etc.)

Thats the way i would like to see it in XBMC because all my videos are hosted on my server.
As a little extra you have the possibility to edit the entries of the xml files in your national language.

I can implement this (waiting since a few months that the new videodb is ready Smile), but i have free time not till april or may.
Reply
#10
I have not looked at the export format. I will try that tonight.

What about this though, since the scrapers already read .nfo files, what about making the scraper engine check the format of the .nfo file. If it is a HTTP link then it just gets the url as it does now.

However, if the .nfo file contains and xml document in the format of the scraper results like this

<details>
<title></title>
<year></year>
<director></director>
<top250></top250>
<mpaa></mpaa>
<tagline></tagline>
<runtime></runtime>
<thumb></thumb>
<credits></credits>
<rating></rating>
<votes></votes>
<genre></genre>
<actor>
<name></name>
<role></role>
</actor>
<outline></outline>
<plot></plot>
</details>

It just uses that data directly.
Reply
#11
Check out latest SVN then Wink
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#12
Cool. Works great.

I initial had problems, the XML file always seems to be corrupt when read. Turns out the member function

const char* TiXmlDocument:Tonguearse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding )

Does not work properly if you do not have a return character after the last tag in your xml file. The statement

p = SkipWhiteSpace( p, encoding );

in the last while loop will end up makeing p an invalid pointer if the new line charachter is not present. Not sure if this is a bug or by design.

Shawn
Reply
#13
Glad it works. Dunno if that is a bug in tinyxml or by design either - haven't noticed it before.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
obviously a change on XBMC will be necesary to do that.

Right now, as you say, the scraper can only get an URL from the NFOUrl (as the fuction name suggests)
Always read the XBMC Online Manual,Frequently Asked Questions and search the forum before posting.
For troubleshooting and bug reporting use -> Log file.

Reply
#15
Read between the lines, mate. The ability for the nfo reader to parse the XML has been added to SVN already.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Video Database0