Kodi Community Forum
[RELEASE] Rom Collection Browser - Browse and launch emulator game ROMs - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Game Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=291)
+---- Thread: [RELEASE] Rom Collection Browser - Browse and launch emulator game ROMs (/showthread.php?tid=70115)



- jimyx17 - 2010-11-22

Hi again,

After make some changes to 0.7.7 version, I got it working again. The main problem was the encoding shouldn't be in ascii because there aren't any character in ascii code that match to that symbol, so I put all in utf-8 and added an adapter to the database to handle utf-8 strings.

This is the files I have changed:

dbupdate.py
gamedatabase.py
gui.py

Now, I need to fix my last problem when I try to launch the emu I get the NoneType error.

Thanks a lot Malte!


Update:
Update2:

Again more bugfix over encondig problem:

helper.py
gameinfodialog.py

The real problem now is that every time the script convert the unicode string returned by database, the script fails, because the database is already returning an unicode string, so we need to change this str(gameRow[util.ROW_NAME]) to this: gameRow[util.ROW_NAME]. Other way, the unicode string is converted to a plain ascii string.

I hope this solve all encoding problems, now I need some sleep


- Tomkun - 2010-11-22

Can someone clear up how to get a match with titles like
"Alien Breed I", "Alien Breed II" etc?
I don't really get it.


- malte - 2010-11-22

@jimyx: Thanks a lot for the fixes. I will check them in detail and add it to the trunk. I am on a trip for some days now and don't know about my time and connectivity, so it may happen that it will last some days to get them in.

I also have to test all this stuff because I had a lot of trouble with different encoding scenarios: filenames, dirnames, local desc files, online desc files, database, ... Just to make sure that your fixes don't mess up one of the other scenarios.

But you seem to dig deep into the code. Any interest in joining the "team"?


@Tomkun: First you must update to 0.7.7 if you haven't done already (I added extra sequel handling code in this release). Second you have to make sure that the game name that you search for ends with the sequel number. So if your rom name is "Alien Breed I (US)", you have to remove the " (US)" (note the empty space at the beginning). If you don't want to rename the rom, you can use the replace function in the config.xml. Or you wait for 0.7.8, I hope to add an option to replace all (*) and [*] stuff automatically before searching.


- Tomkun - 2010-11-23

malte Wrote:@Tomkun: First you must update to 0.7.7 if you haven't done already (I added extra sequel handling code in this release). Second you have to make sure that the game name that you search for ends with the sequel number. So if your rom name is "Alien Breed I (US)", you have to remove the " (US)" (note the empty space at the beginning). If you don't want to rename the rom, you can use the replace function in the config.xml. Or you wait for 0.7.8, I hope to add an option to replace all (*) and [*] stuff automatically before searching.

Yeah, I tried all that but still couldn't get it working. In the end, I deleted all my previous config and started again with the wizard but it still didn't work :confused2:.
Secondly, some games have a 'sub-title' after the main title, e.g; "Alien Breed III - Tower Assault".

How should I deal with them?

Finally, I am noticing that some files don't get imported even if I deselect the two options in settings 'don't import games without descriptions/artwork'.


- malte - 2010-11-23

@Tomkun: I tested lots of sequel games and all worked fine. can you post a log when you try to import these games?

About sub titles: atm no chance. There is too much difference in the names. I guess if I start searching for substrings there will be too much mismatches (think of all the zelda variations f.e.)


- Tomkun - 2010-11-24

malte Wrote:@Tomkun: I tested lots of sequel games and all worked fine. can you post a log when you try to import these games?

About sub titles: atm no chance. There is too much difference in the names. I guess if I start searching for substrings there will be too much mismatches (think of all the zelda variations f.e.)

I will keep experimenting, but I think my issues may have something to do with the synopsis file by SpyVsSpy, which uses a different naming system to me.

I already have artwork for all my games, so if I set the scraper to MobyGames for example, will it overwrite what I already have?


- mcborzu - 2010-11-24

Anything new I should be aware of as I'd like to knock this script out for my new skin or most of the skinning stuff the same...


- malte - 2010-11-24

@Tomkun: It will not overwrite any files. It will rename the downloaded files to "romfile.ext" and checks if there is already a file with this name before downloading.

@mcborzu: Would be great if you could do this. There is only one change: The button "Import Settings" can be removed completely. All other changes (config wizard etc.) already work with Night.


- Tomkun - 2010-11-25

Last night, as an experiment I decided to set up a test environment. I made a new folder with only six roms, 3 known good ones and 3 that caused me issues. As expected, those three still didn't get scanned, but more surprisingly, the whole process took upwards of 20 minutes (I don't know how long exactly, I went for dinner).

I checked the log and saw pages of warnings saying "whatever game was found in parsed results, but not in your rom collection."

Does this mean that it is searching the synopsis file before checking which roms I actually have? Could this be why it takes so long, even for just six roms? Could this be why certain games won't scrape? Or... Is is all my fault and I have missed something?

Very confused now...Confused


- malte - 2010-11-25

These large text synopsis files are not like xml documents where you can easily select one certain node. I have to parse the complete file to get the information I need. It is parsed game by game and then checks if this game is in your rom collection.

I could add a check if all games are found and then stop searching. I guess the current version will continue to the end of the synopsis file.

In earlier versions I first parsed the complete file and then checked against the roms. This was much faster and stopped when all games have been found. But it caused out of memory errors on xbox to hold the complete doc in memory. So I had to change this to game by game parsing.


- Tomkun - 2010-11-25

malte Wrote:These large text synopsis files are not like xml documents where you can easily select one certain node. I have to parse the complete file to get the information I need. It is parsed game by game and then checks if this game is in your rom collection.

I could add a check if all games are found and then stop searching. I guess the current version will continue to the end of the synopsis file.

In earlier versions I first parsed the complete file and then checked against the roms. This was much faster and stopped when all games have been found. But it caused out of memory errors on xbox to hold the complete doc in memory. So I had to change this to game by game parsing.

I see, thanks for clearing that up - it makes perfect sense. I guess I'll just start using the online scrapers instead.Wink


- quakes - 2010-11-25

I have added a feature to your mod. I did this for my own enjoyment, but I trust others can make use of this feature as well.

The feature that I have added is basically what this poster talked about a few months ago. It allows usage of 7z files containing many ROMs (letting you choose which one to play when you launch the game).

It makes use of some external libraries, which I have only compiled for Windows so far, so it won't work on other platforms in its current form. It makes use of pylzma for the .7z file handling, which in turn requires hashlib, so I included a backported version for python 2.4 as well.

The only source changes I've made are to helper.py, in the buildCmd() method. It now pops up a dialog if the file is a .7z file, letting you choose which of the ROMs inside to play (or, if there is only 1 ROM inside, it launches that one).

To install, first install RCB 0.7.7. After that, download this archive and extract it in your %APPDATA%\XBMC\addons folder. When it asks you if you want to overwrite existing files/folders, answer yes. Again, this will only work on Windows.


- hikaricore - 2010-11-25

quakes Wrote:I have added a feature to your mod. I did this for my own enjoyment, but I trust others can make use of this feature as well.

The feature that I have added is basically what this poster talked about a few months ago. It allows usage of 7z files containing many ROMs (letting you choose which one to play when you launch the game).

It makes use of some external libraries, which I have only compiled for Windows so far, so it won't work on other platforms in its current form. It makes use of pylzma for the .7z file handling, which in turn requires hashlib, so I included a backported version for python 2.4 as well.

The only source changes I've made are to helper.py, in the launchEmu() method. It now pops up a dialog if the file is a .7z file, letting you choose which of the ROMs inside to play (or, if there is only 1 ROM inside, it launches that one).

To install, first install RCB 0.7.7. After that, download this archive and extract it in your %APPDATA%\XBMC\addons folder. When it asks you if you want to overwrite existing files/folders, answer yes. Again, this will only work on Windows.

Seems to me that it would be more useful if it were cross-platform since 7z is an open compression format I seriously doubt that the Windows limitation is anything that couldn't be resolved easily.


- quakes - 2010-11-25

hikaricore Wrote:Seems to me that it would be more useful if it were cross-platform since 7z is an open compression format I seriously doubt that the Windows limitation is anything that couldn't be resolved easily.

Indeed, all that is really needed is for the libraries (pylzma, hashlib backport) to be compiled for other platforms. I expect that no source changes would be needed.

EDIT: By the way, I have a feature request.

Here's a sample of some of my SNES ROM names:
7th Saga, The.7z
Legend of Zelda, The - A Link to the Past.7z
Lost Vikings, The.7z

This causes some problems with the scraper, as you can imagine. If you can do something akin to
Code:
title = 'Legend of Zelda, The - A Link to the Past.7z'
if (title.find(', The') != -1):
    title = 'The ' + title.replace(', The', '')
# Title will now be 'The Legend of Zelda - A Link to the Past.7z'
when scraping sites for information, that would be awesome. I looked around some in the source, but I am not sure what would be a suitable place to implement this.


- wimpy - 2010-11-26

mcborzu Wrote:Anything new I should be aware of as I'd like to knock this script out for my new skin or most of the skinning stuff the same...

Been trying out that new skin of yours and I must say I really enjoy your work Big Grin I'd very much like to see a update making it RCB-friendly using the "same layout" as the movie/tvshow views if you find the time for it! Smile

Yet again, great work!