city41 / AMMiSTer

Arcade game manager for the MiSTer
MIT License
33 stars 2 forks source link

Can file metadata be used to detect updates? #72

Open city41 opened 1 year ago

city41 commented 1 year ago

So far AMMiSTer does not use file metadata in any way. This causes it to copy files needlessly just to be safe (especially MRAs, roms, and non-dated cores).

Can the file's creation/modify time be used? Is this data reliable across all the hops these files go on?

matijaerceg commented 1 year ago

Instead of using the remote files on the MiSTer to determine what's already been copied (as that's a potentially volatile source of info), you could just earmark local files with a timestamp of when the last time they were copied over were. Any updated files could have the earmark reset.

And as a fall-back for if people run into issues, you could have a checkbox on export to ignore the earmarks and just copy all files, regardless of whether they are existing/missing/outdated.

city41 commented 1 year ago

That's not a bad idea but it only works if you use a single mister. That might be fixable if there is a unique id each mister has that can be used.

matijaerceg commented 1 year ago

Can you tie it to the plan file?

If you tie it to a plan file, and assume different MiSTers use different plan files, that should take care of it.

It would not work for people who are trying to update multiple MiSTers from a single plan, unless they used the aforementioned fallback 'copy all' checkbox.