Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Favorites for EmulationStation



  • Hi Guys! And gals of course ! (Do we have any gals?? We should get some!)
    Anyways, because the game filter improvements have landed last week, I had a good look in the mirror, and got back to work playing around in ES.
    Because of this excellent foundation, is was a breeze to add another type of filter, i.e. favorites!

    So I went the same route as previously in the kids-kiosk-UI modes branch, and created a new metadata value for games and folders: Favorites (boolean).
    So how does this work? Have a look:
    alt text
    The GameList

    alt text
    The workflow.
    As you can see, after filtering for only the games with favorites == true, the list is reduced to these, and a folder, why the folder? Because @pjft did a great job, that's why! You see, the folder also contains two favorites!

    In any case, as always I'd really appreciate it if some people could give this a spin, see how they like it, and find creative ways to break it.
    You can find the branch here on Github.
    Or download the windows build here.

    Todo:

    • I dont really like the menu current interface, it's really great that it supports basically all string type filters out of the box, but for favorites, a simple checkbox would do. I need some inspiration on how to make that happen without butchering the code-clarity that @pjft has put in place too much.
    • I know that the tiny star in front of the game name is F!@#ing ugly, but this could be fixed by either A: going the same route as before (i.e. adding a themable element that is toggled once a fav game is selected) or by B: changing the theme-font to contain a nice glyph, which is shown for all the favorited games in the list.
    • All this is really just the first step to bringing all the other UI_mode stuff into the master branch, so the next items on my list are kiosk mode (enforcing filtering out hidden items, completely hiding systems / retropie menu, if they do not contain anything to show in a certain mode)


  • @Zigurana Gonna give this a try tomorrow :D



  • @Zigurana well done!

    Fully agreed on the interface - it should be only a checkbox. If we can't do it with the current components, let's see if we need to create a new one.

    However, your use case is slightly different (i.e. you're not selecting a string, but rather either selecting all, or just the ones with "true"). Could we not use the component that has On/Off, use some logic to convert that to the right filter strings, and call it "Show favorites only"?

    Happy to take a look, but well done!

    Are you also going to implement a system wide option for it? Let me know if you need any guidance across the code - either here, via GitHub or via email. Happy to help and discuss changes that may be needed to support things.

    Best!

    Edit: only now saw your images (I'm on the phone) and yes, at first glance the square brackets are useful around the folders. Does that solve your alphabetical sorting issues as well, out of curiosity?



  • Hey @Zigurana ,

    Apologies for being ignorant and off-topic, but you said "because the game filter improvements have landed last week" and I was wondering what you were referring to. I tried looking around for info on this, but came up short.

    Is this in reference to an update to the ES version preinstalled with the RetroPie build, or are you referring to a branch of yours that had game filters? To clarify I'm not asking about the topic of your post, I see that is a branch, just asking about the "improvements​" you refer to at the beginning of your post.

    Thanks for reading, and love all of your hard work!



  • @cafarellidigital
    There's filtering options in RetroPie's main branch for genre and a bunch of other things, it's just you have to build the update through source instead of just downloaded they prebuilt version. Think of it as programs that have nightly versions of them, the nightly is the bleeding edge, has all the new features but it may not be as stable as the ordinary release.

    At least this is my understanding​ of the matter, if any one knows more please feel free to correct me.

    Also nice updates that you're working on @Zigurana looking forward to trying it out, also I think @pjft mentioned it already but a system wide favorites filter would be nice (recalbox) but just being able to have favorites and filter them per System is a big step up as is, looking​ forward to more updates.


  • administrators

    This is completely unrelated to recent stuff and definitely putting a cart before a horse but hypothetically speaking if the backend was changed to SQLite would the filtering code be more or less deprecated?



  • @Zigurana This is awesome!

    I've had a little bit of a play and it seems to be working without a problem.

    I'm glad you built this before I started sorting my games into folders (fav, genre, player number, etc), as that would have been a lot of work. I think I'll still make a "Kids" folder though, unless you plan on adding another custom metadata item just for that, the same way you've done it for "favourites". I know you already have the full Kid-Friendly mod, but I think a simple metadata tag has it's place too, for those users that don't want/need the full setup.

    I like the "*" to denote the favourites. That way you can see which items in the list are favourited without having to scroll to each individually and look for a special icon/image. If you don't like the star, maybe just another simple symbol like "-" or "~"?

    I also like the brackets around the folders.

    Speaking of Folders, there is an issue with them that I've noticed recently, and this build does it too.

    If you have a System with a Folder, the first item in the folder won't display any metadata (image, description, genre, etc) until you scroll up or down, then if you go back to it, the metadata shows up.

    It happens if the first item is either a Game, or another Folder (a Sub-Folder). If the first item is a Sub-Folder, then the same thing happens for the first item within that Folder as well.

    Any thoughts on what may cause this?



  • @herb_fargus that was something that was taken into account during the implementation, as we tried to keep it fairly close to MVC as possible.

    Part of it will, certainly - the Model will be replaced by a simple query, rather than the current logic to go through the metadata and parse things - but the rest should be able to be reused.

    That being said, the Model but was also kind of a big part of the effort for that particular change, so yes, a lot of the code will be replaced by something simpler, but at least we get to use it already for the near future :)

    Edit: @mattrixk there is certainly a long standing bug around that with folders. I thought it had been fixed recently by @jdrassa , but if that still happens in the current main branch we should take a look.

    @Zigurana Did you check the approach from recalbox I sent you a while ago, with the star glyph? I suspect it is a standard character across several fonts, but may need to check. Maybe this testing stage is a good opportunity to validate that as several people can run it with several themes and check that before it gets actually merged to master.

    @Syhles Zigurana's kids mode fork has these options as system-wife filters, so that's why I was bringing it up in case he does want to go down that route as well. The architecture for filters that I put together was system specific (and does not save across sessions) but it should be reasonably easy to add favorites and kids/kiosk mode as an option as well by using it as a setting, and setting that particular filter for all Systems when loading the settings and creating the Systems data. I don't want his vision to be restricted by what's there, feature-wise!



  • @Zigurana Is it possible to have the folders stay at the top of the list, like a normal file explorer?



  • @pjft said in Favorites for EmulationStation:

    @Zigurana well done!
    Could we not use the component that has On/Off, use some logic to convert that to the right filter strings, and call it "Show favorites only"?

    That would be the best way, so maybe I'll go ahead and try to implement something like that.

    Are you also going to implement a system wide option for it? Let me know if you need any guidance across the code - either here, via GitHub or via email. Happy to help and discuss changes that may be needed to support things.

    I think a global "show favorites only" option makes sense, but let's discuss a possible strategy on GitHub.

    at first glance the square brackets are useful around the folders. Does that solve your alphabetical sorting issues as well, out of curiosity?

    Nah, this is cosmetic only, the sorting issue is still open.



  • @mattrixk said in Favorites for EmulationStation:

    @Zigurana I think I'll still make a "Kids" folder though, unless you plan on adding another custom metadata item just for that, the same way you've done it for "favourites". I know you already have the full Kid-Friendly mod, but I think a simple metadata tag has it's place too, for those users that don't want/need the full setup.

    The plan is exactly that, to introduce new metadata types for hidden and child-friendly, and reinstate the "forced filtering" when a specific UI mode is set. The end goal is to get feature-parity with the old kid-mode branch, so I can get rid of that one altogether.

    If you have a System with a Folder, the first item in the folder won't display any metadata (image, description, genre, etc) until you scroll up or down, then if you go back to it, the metadata shows up.
    Any thoughts on what may cause this?

    Not sure, is there an issue raised for this on the Retropie repo?



  • @pjft said in Favorites for EmulationStation:

    @Zigurana Did you check the approach from recalbox I sent you a while ago, with the star glyph? I suspect it is a standard character across several fonts, but may need to check. Maybe this testing stage is a good opportunity to validate that as several people can run it with several themes and check that before it gets actually merged to master.

    I tried it with the carbon and pixel themes, but got only '?' characters. I wrote it down to Recalbox having more/better unicode support also for their translation efforts. It is an trivial change so I could reinstate it if need be.
    On the other hand, I've seen folks here on the forum modifying fonts in order to get the glyphs they want. That route is still possible, but maybe the std asterisk is not the right character to pick, it may be occurs in game-names as well?

    @Syhles Zigurana's kids mode fork has these options as system-wife filters,

    Yes a specific filter for 90-s platformers, what can I say, she just loves commander keen! :-p



  • @mattrixk said in Favorites for EmulationStation:

    @Zigurana Is it possible to have the folders stay at the top of the list, like a normal file explorer?

    I had a small code change for exactly that prepared, but the question is if this is expected behavior for all users. For instance in case of multi-disk games grouped in a folder, would you want to see it on top of the list, or at its alphabetical location?
    At least with the brackets, it's a bit more clear than just the color - change for folders.
    (btw would more colors for game-types be useful?)



  • @Zigurana said in Favorites for EmulationStation:

    what can I say, she just loves commander keen!

    That's a euphemism if ever I've heard one.

    multi-disk games grouped in a folder

    I didn't think of this. I don't really use folders that way, so it didn't occur to me. Maybe an option to say whether the folders should be at the top or alphabetical? Either as an option in the select menu, or as something that could be added to the gamelist.xml?

    Is there a way to display what filters are active? We could maybe have a <text> field in the Theme just lists out the active filters.



  • @mattrixk said in Favorites for EmulationStation:

    Maybe an option to say whether the folders should be at the top or alphabetical? Either as an option in the select menu, or as something that could be added to the gamelist.xml?

    That could be a solution, if a bit unwieldy, I will do a PR on this so people can test it.

    Is there a way to display what filters are active? We could maybe have a <text> field in the Theme just lists out the active filters.

    That's a really good idea for theming improvements!



  • @Zigurana, I don't really think forcing brackets on folders or reordering them to the top of the list without an option to turn that off would be a good idea for everyone's build.

    The way I'm using folders for multidisk games is getting all the disks inside a scraped folder names after the game, which sits properly in alphabetical order until I want to play that game, and then selecting the active disk from a list inside the folder. Not having brackets in the list keeps it aesthetically pleasing and coherent as it is. If i want a folder to go to the top of the list or identify itself as a folder, I can do it with a special character as explained in the "Folder Icon" section in the NES mini theme (https://retropie.org.uk/forum/topic/8391/cardboard-mini-nes-nes-mini-and-famicom-mini-themes):

    Folder Icon

    If you use subfolders for your roms the themes have the ability to show a folder icon. To do so you need to name the folder with a preceding '#' symbol. Eg. name the folder '# Japan' and the '#' will be displayed as the folder icon followed by the word 'Japan'. It will look something like this:

    0_1489358825939_arcade-preview-2.png

    This way i can keep my "ninja" multidisk folders, and still have an indication for proper folders an get them to show on the top of the list.

    Other than that, I totally appreciate the effort in merging the kids-kiosk modes in the main branch and hope everything goes great. Keep up the good work!



  • @Serj-Targarien
    Thanks for that input.
    I believe that the NES-mini theme also uses a custom font where the '#' glyph is replaced by the folder icon, correct?
    That would (for me) be an acceptable way of working, the best of both worlds actually.



  • @Zigurana and if experience taught me anything use that you don't want to mess with someone who has a folder specifically for Ninja games :)

    Great to hear - let me know if I can help in any way!



  • @Zigurana Exactly, the folder icon is embedded in the custom font of the theme, replacing the # symbol. That makes it possible to manually flag a folder as a folder and the # at the beginning automatically brings it to the top of the list.



  • @Serj-Targarien that's an interesting way to do things, but making custom fonts is a bit of a pain in the butt.



Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.