AHK Playlist Buddy - Playlist and thumbnail generation for RetroArch

To the authors of these tools: This may be one of those times when you really wish there was a WebApp or a Mobile app that leverages the ton of workload needed to have this solved… Just saying :wink:

please support <machine="gamename "> </machine> format like the one used in official mame dats, its not naming properly unless changed machine to game

thanks and a very helpful tool

[QUOTE=wertz;53439]please support <machine="gamename "> </machine> format like the one used in official mame dats, its not naming properly unless changed machine to game

thanks and a very helpful tool[/QUOTE]

I’d be glad to take a look. Could you give me 1) a link to a DAT that uses that format 2) the name of a game listed in the DAT that I should make sure is added to the playlist correctly?

official DAT from http://www.progettosnaps.net/dats/ - http://www.progettosnaps.net/dats/MAME/MAME_Dats_180.rar

playlist will be only zip name

modified DAT ( change each rom entry from <machine game="something> … </machine> to <game name="something> … </game> (same format to fbalpha dats-0 guess this this what you based your tool?(same as the other AHK based playlist maker)

Ah hah. I based the tool on older MAME XML dats which admittedly are what I use personally. At some mamedev changed from “game” to “machine” in the XML format.

I have made some updates to the RegEx pattern, which based on my very simple tests looks like it is working right with recent DATs that use the “machine” tag.

If you would be willing to test it against your DAT and ROM collection, here is a direct link to the AHK source code of this ‘prototype’ build of the playlist generator: https://raw.githubusercontent.com/markwkidd/retroarch-arcade-playlist-helpers/master/one-step-arcade-processing-proto.ahk

another small issue is that we need an updated DAT to match the names from libretro thumbnails, like the change from / to _ in filenames.

That is now coded directly into RetroArch as of the mid-December nightly builds, so the matching doesn’t happen in the playlist generation process anymore.

In other words, the playlist can still display /, and RetoArch will automatically change that to an underscore when it looks for the thumbnail from the libretro repo. As far as I know! :slight_smile:

I’ve worked on the filename sanitizing code and the MAME thumbnail repo, so if you spot any issues with the thumbnail repo or the conversion from / to )_ on builds from the last couple of weeks, feel free to post about that too.

[QUOTE=markwkidd;53478]That is now coded directly into RetroArch as of the mid-December nightly builds, so the matching doesn’t happen in the playlist generation process anymore.

In other words, the playlist can still display /, and RetoArch will automatically change that to an underscore when it looks for the thumbnail from the libretro repo. As far as I know! :slight_smile:

I’ve worked on the filename sanitizing code and the MAME thumbnail repo, so if you spot any issues with the thumbnail repo or the conversion from / to )_ on builds from the last couple of weeks, feel free to post about that too.[/QUOTE]

hmm,ok.letmee check again with the latest build u made. will post feedback soon. thanks

@markwkidd; UPDATE: -names are fixed. rom properly named now. -not working is online thumbnail download, i had to manually rename from DAT file to the actual file in thumbnail repository e.g.: Mushihime-Sama (2004/10/12.MASTER VER.) into Mushihime-Sama (2004_10_12.MASTER VER.) for thumbnail download to work. not sure if its a local thumbnail source(which i wont do since its a whooping GB size to download), the “character_sanitize” probably is not working

I double checked when that code was merged into RetroArch. November 18, 2016 – time flies. Any build after that date should have the code.

found out why thumbnails is not working:

“DownloadFile(“http://thumbnails.libretro.com/MAME/Named_Titles/” . fancyname . “.png”, local_image_path)”

fancyname is suppose to be sanitized_name.

[QUOTE=wertz;53494]found out why thumbnails is not working:

“DownloadFile(“http://thumbnails.libretro.com/MAME/Named_Titles/” . fancyname . “.png”, local_image_path)”

fancyname is suppose to be sanitized_name.[/QUOTE]

great catch!

I have updated the prototype source at: https://raw.githubusercontent.com/markwkidd/retroarch-arcade-playlist-helpers/master/one-step-arcade-processing-proto.ahk

It also has a few new features that I need to test, but once I get those tested I will update the main version of the script and the compiled download with these two fixes you have pointed out.

How is the downloader working, by the way?

[QUOTE=markwkidd;53495]great catch!

I have updated the prototype source at: https://raw.githubusercontent.com/markwkidd/retroarch-arcade-playlist-helpers/master/one-step-arcade-processing-proto.ahk

It also has a few new features that I need to test, but once I get those tested I will update the main version of the script and the compiled download with these two fixes you have pointed out.

How is the downloader working, by the way?[/QUOTE]

i was primarily testing online thumbnails download(hence my need of the tool rather than individual download or a repack) and it does seem to work after editing fancyname to sanitized_name.

UPDATE:

-i do not understand the function of the added “Arcade mode” feature. seems that the created playlist name will be zippedname (no ext) and not create the actual names to playlist, checked or unchecked.

[QUOTE=wertz;53497]i was primarily testing online thumbnails download(hence my need of the tool rather than individual download or a repack) and it does seem to work after editing fancyname to sanitized_name.

UPDATE: i do not understand the function of the added “Arcade mode” feature. seems that the created playlist name will be zippedname (no ext) and not create the actual names to playlist, checked or unchecked.[/QUOTE]

I’m should be more careful sharing my personal working copy / development version of the code. Sorry about that.

Once I have time later today I will make sure all changes are working I’ll update the main version.

New features include support for .7z MAME and FB Alpha archives and support for non-arcade ROMs with any file extension. It’s close to working…

-local_image_path and source_image_path do not match, e.g. one is pointing to Named_Snaps and source is Named_Tiles

-add no_prompt in between playlist if making with multiple folders(example processing FBA with roms in different folder sorted by system(like cps1, cps2 etc)

thumbnails downloading seems to work(only tested with mame cv1000 roms) but local copy of thumbnails for FBA(full set) is working, aside from missing thumbnails(i need better tool to batch rename fba snaps and tiles) — or is your tool capable of directly using MAME or fba-style snaps and tiles(like dmnfrnt.png then automatically converts it to actual name.png)

Fixed. Thanks!

add no_prompt in between playlist if making with multiple folders(example processing FBA with roms in different folder sorted by system(like cps1, cps2 etc)

I added a variable to the script called skip_subfolder_notifications. It is set by default to False, but if you’re running the script source yourself it can be changed to True directly in the source in order to bypass those message boxes.

Overall: I haven’t found any issues with all of these updates, but there was quite a bit of code refactoring involved in today’s changes so I’m not going to make this the main version of the tool just yet. Tomorrow! :slight_smile:

If you would like to fool around with my working copy, with the fixes, it is in the same place: https://github.com/markwkidd/retroarch-arcade-playlist-helpers/blob/master/one-step-arcade-processing-proto.ahk

thumbnails downloading seems to work(only tested with mame cv1000 roms) but local copy of thumbnails for FBA(full set) is working, aside from missing thumbnails(i need better tool to batch rename fba snaps and tiles) — or is your tool capable of directly using MAME or fba-style snaps and tiles(like dmnfrnt.png then automatically converts it to actual name.png)

I have another script in the same github repo that renames standard MAME thumbnail sets according to RetroArch standard, but it will also need to be updated in order to accommodate the change from “game” to “machine” in the MAME XML DATs. I can probably just make the same regex change as with this script but I’ll need to take a look at that code to be sure. I haven’t worked with it in a little while.

You’re welcome to check it out in the meantime: https://github.com/markwkidd/retroarch-arcade-playlist-helpers/blob/master/mame-fullset-thumbnail-renamer.ahk

(double post)…

-autorenamer seems to be working as it should - need more confimation and test from others though since i do not full mame sets

-playlist make - i only use mainly “Arcade Mode” since i want playlist to have correct names *** thumbnails downloading seems to work(aside from FB Alpha issue below) *** thumbnails from local storage works *** playlist names seems to be correct *** “FB Alpha” should be “FB Alpha - Arcade Games” to match retroarch name scheme and repository *** if !FileExist(local_boxart_image_path), should also probably a good idea to implement for local storage sources *** MsgBox should probably have on/off settings(i know these are WIP and probably for troubleshooting atm)

-in non-arcade mode, DownloadFile(“http://thumbnails.libretro.com/%individual_playlist%/Named_Boxarts/” . sanitized_name . “.png”, local_boxart_image_path) '** isnt %individual_playlist%or this entire “download function” should be the same as with arcade mode?

*additional or probable enhancement suggestion -probably a function that can use to download thumbnails from already existing playlist file(assuming here correctly named titles), this avoids using Retroarch’s own method of downloading massive thumbnails if you only have limited titles.

thanks for the tool.

I have just pushed some major new updates to the script, including the compiled version. Links are updated in the OP.

Note: This little app has a lot more code paths than it used to! I have tried to check all the combinations of functions, but I would as always be grateful for bug reports. The feedback I have gotten from the first few users, in fact, has really guided and inspired this update. Thanks to everyone that has been posting!

New features - If your version is labeled 2016-12-30, then you’re using this updated version: [ul] [li]Can process ROMs with any file extension, not just .zip[/li] [li]Arcade Mode toggles the requirement of a MAME or FB Alpha XML DAT. Turn off Arcade Mode to set playlist titles based only on filenames[/li] [li]Arcade Mode can now process the latest MAME XML DATs which use a slightly different format than the older ones[/li] [li]Arcade Mode is faster than before [/li][li]The experimental Individual Thumbnail download function still needs some major work, but will now also try to download non-Arcade thumbnails[/li][/ul]

@wertz: I have added two features that you might be interested in if you’re still working on your MAME playlists.

  1. support for locally downloaded ‘standard’ MAME image packs (separated into flyers, snap, and titles as usual for MAME)
  2. experimental scraping support to download missing thumbnails from the arcadeitalia MAME database

edit: much testing later, this is now part of the ‘official’ version downloadable in the OP.

Since there is a new forum dedicated Tools and Scripts, I’m cleaning up this information and moving to a new thread: AHK Playlist Buddy - Playlist and thumbnail generation for RetroArch