AsKaGeeK / romcollectionbrowser

Automatically exported from code.google.com/p/romcollectionbrowser
GNU General Public License v2.0
0 stars 0 forks source link

Multiple disk indicator not showing disk number #145

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open Rom collection browser, and click a game with several disks.
2. If the disks are properly detected, RCB will let you choose which disk you 
want to start.

What is the expected output? What do you see instead?
- I would expect RCB to tell me which disk I want to play, but instead I can 
see multiple times the word "_Disk", and it's impossible to know which disk is 
which. And usually, the first one is not the disk 1.

What version of the product are you using? On what operating system?
- I'm using the RCB which comes in XBMC for raspberry pi, in the xbian 
distribution.

Please provide any additional information below.
- Also, I find very confusing the use of regular expressions to detect the disk 
number in other filenames. I usually use filenames like "GameName CD1.iso" and 
I havn't been able to configure it.

Original issue reported on code.google.com by marcpal...@gmail.com on 23 Apr 2013 at 12:03

GoogleCodeExporter commented 8 years ago
I will see if I can add two options: regex and non-regex.

Atm you should try something like "CD*.iso" as regular expression.

Original comment by maloep on 12 Jul 2013 at 7:52

GoogleCodeExporter commented 8 years ago
The issue isn't that RCB isn't finding the discs, it just doesn't convey which 
disk it found. The window asking you to select the disk displays "_Disk" for 
all the disks it found. You should almost have a configurable prefix field and 
take the first 'group' match and append it as the suffix for the label.

so if I specified prefix of "CD " and a regex of .*\(d+)\.iso, the label would 
read "CD 1", "CD 2", etc.

Not sure how you would get this to work with non-regex solution though...

Original comment by blakekl10@gmail.com on 12 Jul 2013 at 3:41

GoogleCodeExporter commented 8 years ago
I do nott understand half of what you say, but thank you for revising the bug 
anyway.

Original comment by marcpal...@gmail.com on 12 Jul 2013 at 3:50

GoogleCodeExporter commented 8 years ago
I have come up with a fix for this in the code after I finally got fed up with 
it. I changed line 153 of resources/lib/launcher.py to force the script to 
display any numbers immediately following the disk prefix.

Old line:
match = re.search(romCollection.diskPrefix.lower(), str(gamename).lower())

New line:
match = re.search(romCollection.diskPrefix.lower() + "\d+", 
str(gamename).lower())

If your number immediately follows the disk prefix, it will be displayed after 
making this change. Examples:

prefix: '_disk' filename: 'FF7_disk1' disk select dialog: '_disk1'
prefix: ' disc ' filename: 'FF7 disc 1' disk select dialog: ' disc 1'

You can set the prefix to whatever you like. Just make sure that the number 
immediately follows the the prefix. I'd commit this fix myself if I knew how to 
do that/had permission to do that.

Original comment by blakekl10@gmail.com on 12 Jun 2014 at 5:55

GoogleCodeExporter commented 8 years ago
Thanks for the patch. I will try to test and include it in the next release.

Original comment by maloep on 13 Jun 2014 at 1:54

GoogleCodeExporter commented 8 years ago

Original comment by maloep on 13 Jun 2014 at 1:54

GoogleCodeExporter commented 8 years ago
It should work okay. The only real problem is that it isn't really robust. It's 
using a user entered string as a regular expression, which has some potential 
to fail. Consider a user who uses something like '(disk' as their disk prefix. 
Regex would fail because of the '(' character. As long as the filename and disk 
prefix only contains alpha-numeric, space, and underscore characters it works 
fine.

Original comment by blakekl10@gmail.com on 13 Jun 2014 at 4:06

GoogleCodeExporter commented 8 years ago
Ok, I just checked this again. There is no need for code changes. Everything 
should be possible with correct regular expressions.

In your above examples "FF7_disk1.iso" the correct regex would be "_disk.*", 
for "FF7 disc 1.iso" it would be "disc.*".

For me everything is working as expected with the above expressions. Am I 
missing something?

What I will change in code: right now the default disk prefix is just "_Disk" 
which does not work at all. So I will change this to "_Disk.*".

Original comment by maloep on 22 Jun 2014 at 6:26

GoogleCodeExporter commented 8 years ago
That would be fine. However, most users don't understand regular expressions. 
It might be better just to add a '\d+'  to whatever the specified prefix is. 
The instructions aren't clear that this a regular expression. Especially with 
the default expression not working. —
Blake Longmore

On Sun, Jun 22, 2014 at 12:27 AM, null
<romcollectionbrowser@googlecode.com> wrote:

Original comment by blakekl10@gmail.com on 23 Jun 2014 at 2:17

GoogleCodeExporter commented 8 years ago
Was this ever sorted out? The default still appears to be "_DISK" which was 
mentioned not to work at all.

I currently have my Playstation disk set to "\(Disc (\d+)\)" which is valid 
Regex for how my games are named... (Final Fantasy IX (Disc 1).bin, Final 
Fantasy IX (Disc 2).bin, Final Fantasy IX (Disc 3).bin, Final Fantasy IX (Disc 
4).bin, etc) but it doesn't seem to work, on an import it's still looking up 
each disc against the scrapers individually rather than just the game name.

Original comment by enve...@gmail.com on 30 Sep 2014 at 9:04

GoogleCodeExporter commented 8 years ago
Try removing the capture group. That is probably throwing it off. 

\(Disc \d+\)

Original comment by blakekl10@gmail.com on 30 Sep 2014 at 1:35