Last Played Collection - Possible to limit?
-
@pjft Do you know which file does EmulationStation uses to create the Last played collection? Because I can't find a
gamelist.xml
in/opt/retropie/configs/all/emulationstation/collections/
.
I've seen that there's agamelist.xml
in/opt/retropie/configs/all/emulationstation/gamelists/
but there's also the one in/home/pi/RetroPie/roms/<SYSTEM>/
so I don't know which one to use :P -
I'm no coder, but in all the digital arts, the best practice is to always to work as non-destructively as possible. Wouldn't it make more sense to implement something like this directly into ES, to where the user could set a numbered limit to the list and everything beyond that would be ignored, rather than having the MD itself deleted, or reset? Again, I don't know if that would even be possible, it's just a thought. I have to admit, the more I think about it, that never-ending and always growing 'Last Played' list does seem like a strange and unwieldy concept.
-
@hiulit said in Last Played Collection - Possible to limit?:
@pjft Do you know which file does EmulationStation uses to create the Last played collection? Because I can't find a
gamelist.xml
in/opt/retropie/configs/all/emulationstation/collections/
.
I've seen that there's agamelist.xml
in/opt/retropie/configs/all/emulationstation/gamelists/
but there's also the one in/home/pi/RetroPie/roms/<SYSTEM>/
so I don't know which one to use :PThink it depends. In a vanilla install of RetroPie they are stored in .../emulationstation/gamelists but if you installed Steven Selph's scraper it has an option to store them in the roms folders. Not sure where exactly that setting is that Steven Selph's scraper is modifying though.
-
@mediamogul I'm with you. It would be better that this feature would be implemented directly into EmulationStation. But in the meantime, I'm having fun coding this little script. Also, I'm not capable of code for EmulationStation, so we'll have to pressure the developers if we want this feature added :P
-
@alturis Hmmm.. I think you are right. As I always scrape the system with Steven Selph's scraper and always set the option to create the
gamelist.xml
per system that's what I'm using. I should have this into consideration. -
Here: https://retropie.org.uk/forum/topic/15892/where-are-favorites-last-played-collections-stored/2
@mitu said exactly what we were talking about.
The automatic collections don't have a dedicated folder or configuration file, they're created based on the existing game information/metadata, stored in the
gamelist.xml
file for each system. -
Yeah honestly the OCD part of me would rather just wait until its an option built into EmulationStation rather then wipe out the play counts or last played dates on the data itself.
-
@alturis If it's any relief, my script will create a backup of the
gamelist.xml
:P -
@mediamogul I agree. I personally don't want to add another option to the menu to determine what's the right cutoff point, so I could pick one on my own (100, perhaps) and leave it at that.
That being said, I'm not sure I have the time to make that happen in the near future - my limited time in the coming weeks will be devoted to improving lr-fuse controls - and I genuinely doubt it's a quick change but I'll take a look if I have the time during March.
-
Is there a github for EmulationStation?
-
@alturis https://github.com/RetroPie/EmulationStation
The change would be here:
https://github.com/RetroPie/EmulationStation/blob/master/es-app/src/CollectionSystemManager.cpp#L698
You'd also need to devise a way to remove one from the end when you add a new one to the top.
The main challenge is likely to include the top X most recently played across all systems, I imagine you'd rely on the "All Games" collection.
-
FYI, just setting
<playcount>
to0
is enough to make a game dissapear from the Last played collection. No need to remove the<lastplayed>
tag. -
Well I found where the code change would need to go.
CollectionSystemManager.cpp
void CollectionSystemManager::populateAutoCollection(CollectionSystemData* sysData)
Just needs something like this at the end - need to read some code to figure out the right FileData collection class syntax
if ( sysDecl.type == AUTO_LAST_PLAYED ) { rootFolder->remove( max( rootFolder->count - 50, 0 ) ); }
Edit: changed min to max
-
@alturis The idea is good, in concept, but that can only be applied if - and after - it has been sorted by last played time.
Edit: after I looked at the code I see that that particular location would already be sorted.
I'd also need to make sure to update the "update" function to keep that number straight.
I'll look through that, and I'll fix it at 100.
Edit 2: for reference, it'd be here:
https://github.com/RetroPie/EmulationStation/blob/master/es-app/src/CollectionSystemManager.cpp#L280
-
@pjft Nice! Does this mean that it will be added to EmulationStarion at some point? Also, could the number be edited by the user?
Anyway, it's been fun playing with my script :P I'll release it anyway when I finish it, at least for learning purposes. -
@hiulit "At some point", yes.
Edited by user, no. As I said, I don't want to perpetuate a growing trend of adding yet another option to ES.
If anyone strongly objects to 100 and/or feels as a wide community that there is a consensual number that makes more sense, I can consider making that the default. But if everyone has different opinions, I'll quote Jim Barksdale:
"If we have data, let’s look at data. If all we have are opinions, let’s go with mine."
-
@pjft I wasn't trying to put any pressure, at all, btw ;)
And about the number, I think it might be a little too high. Maybe 25? But that's just a personal choice, of course. I'm fine with whatever number you decide :) -
@pjft said in Last Played Collection - Possible to limit?:
If anyone strongly objects to 100 and/or feels as a wide community that there is a consensual number that makes more sense
Personally, I think 100 has a nice, rounded feel to it. At first blush, 50 seems like more than enough, but if there is to be no setting, and I fully understand the aversion to adding one, 100 covers more ground and should please the most people.
-
Out of curiosity, is it bad practice to have a back-end only setting. Like say having the cutoff be 100 by default, but adjustable from
es_settings.cfg
? -
@mediamogul said in Last Played Collection - Possible to limit?:
Out of curiosity, is it bad practice to have a back-end only setting. Like say having the cutoff be 100 by default, but adjustable from es_settings.cfg?
That was my thought as well. Make it 100 unless someone cares enough to edit it in the cfg
I already feel bad for bringing it up and adding work to @pjft's plate. ;)
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.