MGI importer extension problem

If you encounter bugs, errors or crashes, please report them in this section so we can try to fix it!
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

MGI importer extension problem

Unread post by Kirkor » 14 May 2014, 02:35

Phoenix wrote:MGI Settings GUI teaser! :thumb:
I found one problem with this. If you want to keep you current game names thanks to new options in MGI, program makes it all fine but adds extension to the file name. So for example if you have "Final Fantasy IX (Europe)" then you are going to have name changed to "Final Fantasy (Europe).bin". Extension should be omitted, otherwise game name is being renamed :)

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9059
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Ideas, suggestions, improvements and problems

Unread post by Phoenix » 14 May 2014, 07:05

Kirkor wrote:
Phoenix wrote:MGI Settings GUI teaser! :thumb:
I found one problem with this. If you want to keep you current game names thanks to new options in MGI, program makes it all fine but adds extension to the file name. So for example if you have "Final Fantasy IX (Europe)" then you are going to have name changed to "Final Fantasy (Europe).bin". Extension should be omitted, otherwise game name is being renamed :)
Hi Kikor,

I've looked in the source, i could not trace the problem that easy, could you narrow it down...by doing some tests?, Is this happening in:

1) ROM manual mode
2) ROM auto mode
3) PLATFORM auto mode
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Ideas, suggestions, improvements and problems

Unread post by Kirkor » 14 May 2014, 20:08

It is about how MGI handles renaming of the file.

Here is what to do so that you can see for yourself what's happening:

-click on platform and choose platform content - import ROM information from MobyGames.com (full auto)
-unpick "NAME - use fixed"

Now frontend is going to insert rom filename just as it says when this option is disabled. It is all fine as it was a major function of this addition so that it wont change names of your games, but the problem here is that it adds extension to the filename. Just like in the example I gave "if you have "Final Fantasy IX (Europe)" then you are going to have name changed to "Final Fantasy (Europe).bin" - and thats wrong because you are going to have all your games named with extension at the end of file name. In attachment you can see how games are named after this. As you can see there are now "bin" at the end of all games.

What has to be done - extension should be ommited when inserting ROM filename.

Another good idea is to allow to leave blank field in "edit media info" for "title" field. I am not sure why it is required to input name in "title" field - program would input data like publisher, year, developer, etc., and "title" field could be left blank. This way there would be no problem like described above.

So these are two ways how to handle it.
Attachments
1.jpg

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Ideas, suggestions, improvements and problems

Unread post by Kirkor » 21 May 2014, 10:52

I also tested it same with Commodore Amiga. Game has extension ".adf" and in this case ".adf" extension is not added after the filename. It would mean it works properly for some file types and for other like ".bin" it doesnt.

It should be easier now to find what problem is :)

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9059
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Ideas, suggestions, improvements and problems

Unread post by Phoenix » 21 May 2014, 16:59

I have not researched it yet...but can you check how it works on packed (zipped and 7zipped) files?, maybe the problem could be there?
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Ideas, suggestions, improvements and problems

Unread post by Kirkor » 21 May 2014, 18:52

Phoenix wrote:I have not researched it yet...but can you chekc how it works on packed (zipped and 7zipped) files?, maybe the problem could be there?
All my games are parsed from zip or 7zip files so it is tested already.

It looks for me that certain extensions are managed properly and some like .bin are not. How can it be explained that with .adf files it works fine and not with .bin files?

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9059
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: Ideas, suggestions, improvements and problems

Unread post by Phoenix » 21 May 2014, 18:58

Kirkor wrote:How can it be explained that with .adf files it works fine and not with .bin files?
Good question!
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Ideas, suggestions, improvements and problems

Unread post by Kirkor » 21 May 2014, 19:44

I think that I found where problem is. It seems that it only happens with 7z packed games and when I test exactly the same game in zip (repacked form 7zip to zip), then it is fine.

I will have to test it more later but I am nearly 100% sure that it is a problem.

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Ideas, suggestions, improvements and problems

Unread post by Kirkor » 22 May 2014, 00:48

I tested it. The problem has nothing to do with extension of game like adf or bin. Now I am sure what the problem is exactly so it should be very easy now for you to fix it :) When game is in zip then it works fine. When it is in 7zip, then the problem is like I described. It worked with my adf game because it was packed in zip, and it didnt because another game in bin file was packed in 7zip.

There is no better way than to test it like this:

First photo shows two games - Crash Bash packed in 7zip and Team Buddies packed in zip. As you can see game packed in 7zip caused this problem to appear.

And now in second screen I repacked both games - Crash Bash is in zip this time and Team Buddies in 7zip. The result is obvious.
Attachments
1.jpg
1.jpg (22.28 KiB) Viewed 2448 times
2.jpg
2.jpg (21.53 KiB) Viewed 2448 times

User avatar
Phoenix
ECC Developer 2006-2016
Posts: 9059
Joined: 27 Aug 2006, 01:17
Location: Deventer, The Netherlands
Contact:

Re: MGI importer extension problem

Unread post by Phoenix » 25 May 2014, 18:16

Ok, after some hours...i've traced the problem, it wasn't in the MGI importer (but i did fix some other bugs there!), the problem was how ECC imported ROMs in 7z/rar archives.

ECC did import 7z/rar files with the fileextension behind it, thus the list for MGI also resulted in having the extensions behind the "title", so i fixed all if this in update 00608, now ECC handles the "title" the same way as normal and zipped files, so all is the same way parsed now.

To take effect using the MGI importer you may need to reparse your roms again, or delete your roms from the database (this does not delete meta and userdata) and import them again.
Sebastiaan Ebeltjes | ECC Developer 2006-2016 | ECC Forum Admin | Phoenix Interactive WebMaster
[- ECC programs -]
eccUpdate, eccScriptSystem, GtkThemeSelect, DatFileUpdater (DFU), ImagePackCenter (IPC), eccDiagnostics, 3dGallery, iccImageInject
eccKameleonCode, eccCreateStartmenuShotcut, eccThirdPartyConfig (TPC), EmuMoviesDownloader (EMD), eccVideoPlayer
MobyGamesImporter (MGI), ECC Amiga GetGemusConfig.

Kirkor
Posts: 114
Joined: 09 Mar 2014, 11:07
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: MGI importer extension problem

Unread post by Kirkor » 25 May 2014, 19:36

It is good to hear that this bug is fixed. Good work as always :)

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest