Try my DLL to read/write the XBMC database !
#1
hello all!

i made a dll in c# .net to read/write the xbmc's video database (myvideos31.db).

i use it in a tool and it's seems to be stable but if you want to to help me with some suggestions, you're welcome!

this is the xbmcvideodb dll

and code comments

Wink

some example of use :

i will not explain how to load a dll, there are a lot of tutorials in the web...

how to load the database
Quote:_myvideos = new xbmcvideodb.myvideos("c:\myvideos31.db");

how to get all the files loaded by xbmc
Quote:_myvideos.loadfiles();

how to fill a listbox with the filenames
Quote:lstfiles.items.clear();
foreach (xbmcvideodb.files files in _myvideos.filescollection.list)
lstfiles.items.add(new listviewitem(new string[] {files.strfilename}));

how to load the third movie
Quote:int id = _myvideos.filescollection[3].idmovie
_myvideos.loadfromidmovie(id);

how to fill movie's information to fields
Quote:txttitle.text = _myvideos.movieinfocollection[0].strtitle;

foreach(xbmcvideodb.actors actor in _myvideos.actorscollection.list)
if (actor.idactor == _myvideos.movieinfocollection[0].iddirector)
txtdirector.text += actor.stractor + " ";

for (int i = 0; i < _myvideos.genrecollection.list.count; i++)
{
if (i > 0) txtgenre.text += ", ";
txtgenre.text += _myvideos.genrecollection[i].strgenre.trim();
}

txtyear.text = _myvideos.movieinfocollection[0].iyear.tostring();

/* the first actor is the director */
for (int i = 1; i < _myvideos.actorscollection.list.count; i++)
{
if (i > 1) txtacteurs.text += ", ";
txtacteurs.text += _myvideos.actorscollection[i].stractor.trim();
}

txtruntime.text = _myvideos.movieinfocollection[0].strruntime;
txtrating.text = _myvideos.movieinfocollection[0].frating;

how to modify some informations
Quote:_myvideos.movieinfocollection[0].iyear = 1998;

how to save the third movie
Quote:_myvideos.movieinfocollection.save(3);

enjoy !!!



Reply
#2
can you add a txt file reguarding setup and usage?
Image
Reply
#3
added some examples to use the dll...
Reply
#4
so this works "in" the xbox or in the windows pc to edit the xbox database and then you have to reupload the thing? see what i meant by a txt file is... i have 2 rar files full of stuff and no clue where you want it or what to edit to set the thing up. but i have been trying to manually edit the database using sqlite browser for weeks and having to make manual sql executions for crap.



Image
Reply
#5
is the way to use your dll with ant movie catalog
Reply
#6
(harshreality @ mar. 27 2006,21:10 Wrote:so this works "in" the xbox or in the windows pc to edit the xbox database and then you have to reupload the thing? see what i meant by a txt file is... i have 2 rar files full of stuff and no clue where you want it or what to edit to set the thing up. but i have been trying to manually edit the database using sqlite browser for weeks and having to make manual sql executions for crap.
it works on the file "myvideos31.db", so you can read it from your pc's hard drive or from the xbox's hard drive if you make a link to the xbox's hard drive in the window's explorer!
the dll read a file with the full path, so you choose where you want to work!
i prefer to download the file from xbmc to the pc and work locally, after it i upload the file to xbmc!

you want a text file? sorry but what do you want in the text file? and what is a "clue"?

cheers! Smile
Reply
#7
(smuto @ mar. 27 2006,21:58 Wrote:is the way to use your dll with ant movie catalog
i think it's possible, my dll can read/write the movie's information from xbmc, so if somebody make a plugin using my dll it's possible to make a pipe between ant movie catalog and xbmc!

i made the dll for xbmc, so anybody to make the ant movie catalog's plugin? :d



Reply
#8
anynoby tries?
Reply
#9
(sorcer1 @ mar. 31 2006,10:12 Wrote:anynoby tries?
tries would be a good term to use i think. but then i already explained above my circumstances. other users may vary.
Image
Reply
#10
if somebody needs help to use the dll, i'm ready to explain !

regards.
Reply
#11
i dont untherstand where i can use it for.

sollie.
Image
Reply
#12
you can use it to make a windows application/tool!
you don't need to develop the read/write access for the video database of xbmc!

cheers!
Reply
#13
(sorcer1 @ april 10 2006,03:47 Wrote:you can use it to make a windows application/tool!
you don't need to develop the read/write access for the video database of xbmc!

cheers!
this could be very useful for integrating other apps into the xbmc video database or syncing with another app.

but...

sorcer1,
you may need to write a small gui example to help some non-coders understand what it does.

i know it is made for the code-inclined but it seems that those ppl have not taken notice of your handy work yet.
I'm not an expert but I play one at work.
Reply
#14
would you be able to round out support for the other databases? access to the music database would be great
Reply
#15
of course, but i need some help to test my work, and i need more tests for this dll!
then after i can mak another for the music database!
cheers!
Reply

Logout Mark Read Team Forum Stats Members Help
Try my DLL to read/write the XBMC database !0