Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Setting multiple directories for games
#16
basicly the things to look at are:
guiwindowprograms.cpp - this is were the scanning code is located.

programsdatabase.cpp - contains all database operations called from the scanning code

guiwindowbuddies.cpp (kai window) the code to extract the title id from a xbe is in getgamepathfromtitleid() (but i think you already knew that one Wink )

hope this helps to get started :pirate:

greets

bobbin007



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
#17
pondering this a bit...

the kai integration uses the dirs and the game saves (i believe)..

i think it uses your gamesaves to list the games which are available to play...so that probably stays the same...

so its, again, just when the user selects the game we'd look it up in a database....so when/where does the database get created?? or does the code to add games to the database need to be written?? if so does it happen everytime??

just some initial thoughts...i'll probably need a mentor on this...any takers? bobbin007??
#18
(scampa123 @ feb. 10 2005,13:37 Wrote:the kai integration uses the dirs and the game saves (i believe)..
right Smile

(scampa123 @ feb. 10 2005,13:37 Wrote:i think it uses your gamesaves to list the games which are available to play...so that probably stays the same...
imo this should stay the same, as it works flawless.

(scampa123 @ feb. 10 2005,13:37 Wrote:so its, again, just when the user selects the game we'd look it up in a database....so when/where does the database get created?? or does the code to add games to the database need to be written?? if so does it happen everytime??
the code to add the games to the database is already there (programsdatabase.cpp) but it needs to be extended to also save the title id of a game and a new function has to be added to the database to get the path of the xbe from a title id. the last thing to do would be to query the database for the path when you want to play a game using kai.

(scampa123 @ feb. 10 2005,13:37 Wrote:i'll probably need a mentor on this...any takers? bobbin007??
sure you know how to contact me 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
#19
so the end result would be that there is no need for adding a games dir in the kai integration gui....we'll be able to automagically locate it based on this database....

i like this!

the only problem i see i...how will the database get updated with existing stuff? i.e. i already have gamesaves and such...i assume my database is built...

is the database built each time xbmc launches?

would the users just need to blow away the db?

..maybe i should just focus on writing the code to make it happen as you describe and all else will fall into place ;-)
#20
"how will the database get updated with existing stuff?"

not that i know the code, but it seems to me that a logical place would be when using the games bookmark which scans the directories for xbe's extracting their game names and icons from the xbe itself. the titleid is in there.
i do knot know how this is read, if it's easy through the xdk. if not, then caustik has a filespec for xbe's which i have used myself for my xberenamer pc application
#21
ok gang,

i just submitted the code. bobbin007 will probably be checking it out... (patch #1121950)

here's how it works:

1. first checks the ";"-seperated list of dirs found in the settings for kai....
2. if not found it will then look into the myprograms5.db to find the game.

the db lookup will make kai be able to launch games in numerous places since the db is created from the games bookmark...so now if you have a large depth setting, or multiple dirs you can rely on the db lookup to find/launch the game...

enjoy!!!!
#22
Information 
scampa, awesome! you rock!

i cannot build a version myself to test, but i was thinking

1. there is not need for the kai folder setting, unless you do not have a games bookmark ofcourse.
2. is it not faster to look in the db before scanning the kai dirs?


can't wait to check out your new feature. tnx again!
#23
ultrabrutal,

i questioned this stuff myself, however bobbin007 felt it better to still leave the option....

as for db vs string lookup.....not sure...typiucally i'd say avoid the db lookup..but i have no idea how this stuff runs on c++....i can say that an index was added to the new column in the db to enhance the lookup...

you know what....thinking about this as i type....if we leave the setting in the gui, then that should take precedence over the db lookup.....you can avoid the settings lookup alltogether by leaving it blank...if it is blank it will not be checked any further...

-s
#24
that's good to hear. i will clear the folder string then and rely on the games bookmark.
can't wait to get a build to test.

tnx again
#25
no problem...

lets us know how you make out when you do....

also...i may have another updated late tonight/tomorrow...apparently homebrew apps may not have a title id so i need to adjust my query for that...i'm going to look into this tonight...if you're not worried about that, then the current stuff should work...
#26
patch checked into cvs.

great work scampa123!

this is a great improvement, hope you'll all like it. :kickass:

greets

bobbin007
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
#27
i just heard from bobbin007 and the changes have been checked in....

as for the potential db lookup issue i mentioned, bobbin007 mentioned to me the fact that kai will not work with homebrew apps and thus no problem.....

so now we just have to see what you guys say when after you start using it...

:fixed:
#28
scampa123, no no you got me wrong, its only for homebrew apps with a title id of zero, there are some arenas for homebrew apps in kai and they will work, its just for games with a title id of zero. not that we spread wrong information. Wink

greets

bobbin007
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
#29
oh ok cool....now i understand :-)

Logout Mark Read Team Forum Stats Members Help
Setting multiple directories for games0