Open Hooterman opened 5 months ago
@Hooterman I'm not sure if this will always work (would be nice if you'd test it), but you can change this line to rom = datchild.find('game')
in order to have it try and read the name from the game field rather than rom.
@Hooterman I'm not sure if this will always work (would be nice if you'd test it), but you can change this line to
rom = datchild.find('game')
in order to have it try and read the name from the game field rather than rom.
Gave that a shot, get this error when running:
2024-06-30 13:01:25 | Opening input DAT-file...
2024-06-30 13:01:25 | Processing No-Intro: FixDat_Sony - PlayStation 3 (PSN) (Content)...
Traceback (most recent call last):
File "D:\Rom Tools\dltool-main\dltool.py", line 137, in <module>
filename = rom.attrib['name']
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'attrib'
Can you post the dat you were using? I will test some stuff later
@Hooterman this seems to be working, I had originally misunderstood the XML format.
remove this line (if you want, it won't matter with the other change)
rom = datchild.find('rom')
and replace the line after to be this:
filename = datchild.attrib['name']
This will use the name
field from the top level XML element which you posted in your OP.
Here was my example result with the change:
@Hooterman this seems to be working, I had originally misunderstood the XML format.
remove this line (if you want, it won't matter with the other change)
rom = datchild.find('rom')
and replace the line after to be this:filename = datchild.attrib['name']
This will use the
name
field from the top level XML element which you posted in your OP.Here was my example result with the change:
That seems to be working great. Thank you!!
There's a handful of systems where the "game name" and the "rom name" values differ for each entry. Example from the Sony - PlayStation 3 (PSN) (Content) dat:
It seems dltool searches for the rom name value, while Myrient only has the game name value. So even though the above example is on Myrient, dltool is not able to find it and prompts you to "grab these manually".
Is there any way to have dltool search for the game name value instead?