marcrobledo / retroarch-playlist-editor

This web app allows you to create and edit .lpl playlist files for RetroArch.
https://www.marcrobledo.com/retroarch-playlist-editor/
Other
117 stars 14 forks source link

Reordering elements #9

Closed jndson closed 5 years ago

jndson commented 5 years ago

Would it be possible to add the ability to reorder elements? There are some titles that should theoretically appear before another but do not.

For example:

Mega Man 2: The Power Fighters Mega Man: The Power Battle

In instances like this, it would be most preferable to easily be able to reorder the items so that Mega Man: The Power Battle would appear first.

marcrobledo commented 5 years ago

One of the reasons I started this was because I wanted to sort items in playlists. Unfortunately, when I did it, I realized RetroArch sorted playlists automatically before showing them, no matter the order in the file was. Has this changed since then?

jndson commented 5 years ago

I just tried editing my .lpl and you're right. It's unfortunate that RetroArch sorts playlists automatically. Thanks for the response.

jndson commented 5 years ago

@marcrobledo After doing a little research, there are methods available (e.g. collections, favorites) to custom sort your playlist.

https://github.com/libretro/RetroArch/pull/8315

It also appears that there will be a method in the future to make playlist sorting optional and consistent. If you could provide the ability to reorder items on the RetroArch Playlist Editor now it would be great for future proofing as well as for supporting the current methods done through Collections and Favorites.

marcrobledo commented 5 years ago

Nice! I'll implement it as soon as possible.

marcrobledo commented 5 years ago

In order to implement this, had to code a library from scratch and rewrite most of the Playlist Editor code, since I didn't find any library similar to what we wanted here. But it's coming along nicely! I only need to do some tests before releasing it.

marcrobledo commented 5 years ago

Support for reordering elements has been added at last in cf017c2bd4be8054f3aec2bc8798302a6ff8ee1e!

I've spent quite some time doing tests with the new library developed exclusively for this feature. It seems I've mitigated all errors I found, but I'm pretty sure a few could still pop up. I'll wait for feedback to come before releasing it as 1.0 ;-)

jndson commented 5 years ago

Awesome! I really appreciate the work you put in on doing this. Thank you!