Flutterando / yuno

Minimal Open-source Retrogame Frontend
Other
115 stars 29 forks source link

[Feature Request] Mass import artwork from directory #5

Closed GlazedBelmont closed 10 months ago

GlazedBelmont commented 10 months ago

As the title says, being able to not scrape and instead grab art from a directory would be an amazing feature, I already have scraped art matching the roms filenames.

GlazedBelmont commented 10 months ago

image

GlazedBelmont commented 10 months ago

This is mostly because my files don't often scrape properly from IGDB + SteamGridDB is simply higher quality image image image image image

jacobaraujo7 commented 10 months ago

Thanks for the sugestion. This makes a lot of sense to me but I'm unsure which way to go. I believe that an option in "Settings" would be efficient, but I haven't yet found a way to deal with image extensions to correctly assign them to each game. I think I would have to develop something to normalize the extensions.

Do you have any idea about this?

GlazedBelmont commented 10 months ago

You could iterate through images in a given directory (.jpg/.png) and if they match the filename, assign them as the artwork. I can't really do tests on my end because I don't know Dart whatsoever

GlazedBelmont commented 10 months ago

on top of that, I'm assuming images are stored the app's data folder, you'd probably want to copy these images to that folder

jacobaraujo7 commented 10 months ago

Right. I will read the images and compare them by title and I will ignore the images that do not match the game names.

jacobaraujo7 commented 10 months ago

I added an alternative import form to IGDB. You will need to select a folder that contains all of your covers. When synchronizing, it will first look at this folder, if it doesn't match, then it will look in IGDB. There is also the option to disable IGDB, since in this specific case it would be useless.

To test, I'm afraid I'll have to recreate the platforms, I haven't put resynchronization on all the games yet, just one by one. The synchronization we have is only for non-synchronized games. So you need to remove the platform and put it back for now.

This will already be available in build-17. I'll wait for your tests as you have a much larger volume of images.

image
GlazedBelmont commented 10 months ago

Alright that's perfect, as soon as build-17 is available, I'll test and report back

jacobaraujo7 commented 10 months ago

Alright that's perfect, as soon as build-17 is available, I'll test and report back

build-17 is out!

GlazedBelmont commented 10 months ago

This worked for 3DS image

but it had some issues with Switch, either not grabbing covers or grabbing the wrong (Bayonetta grabbed Bayonetta 2's cover) image

Overall it works great but for people that have their covers in their rom directory, it may end up a bit cumbersome if the cover path is shared across all systems

Games |- switch Bayonetta.xci |- media |- steamgriddb |- Bayonetta.png

jacobaraujo7 commented 10 months ago

Maybe it makes more sense to look for the game's side-by-side cover. So perhaps it doesn't make much sense to have the covers option in the settings. I'm going to do a rollback and start implementing it this way. I believe this is easy and ends up requiring zero configuration on the user's part.

jacobaraujo7 commented 10 months ago

I'm still unsure whether I should keep both implementations. What do you think?

GlazedBelmont commented 10 months ago

Unsure too, I personally think the best way is letting the user choose a path per system, that way no matter how the user has their media setup, they can go and select it.

jacobaraujo7 commented 10 months ago

Maybe this is the best way. I am implementing. I'm going to leave the game folder as the default covers folder. Then the user can make the change on a platform-by-platform basis.

jacobaraujo7 commented 10 months ago

Build-18 is out!

image
GlazedBelmont commented 10 months ago

Trying it as we speak, I think you may be matching the cleaned up (beautified) name because only "Pokemon Star.3ds" imported its cover successfully. "Animal Crossing - New Leaf (USA).3ds" did not work, same for other

Also .jpg files don't seem to be checked

jacobaraujo7 commented 10 months ago

Yes, I'm just checking with the name cleared. In theory Animal Crossing - New Leaf (USA).3ds == Animal Crossing - New Leaf.png What would be correct?

GlazedBelmont commented 10 months ago

Animal Crossing - New Leaf (USA).3ds == Animal Crossing - New Leaf (USA).png

exact matches for other frontends like Daijisho and Pegasus

jacobaraujo7 commented 10 months ago

Now I get it! I did it this way and it seems to be more coherent. I also fixed the problem with jpg

build-19 is out.

GlazedBelmont commented 10 months ago

All works perfectly now, thanks!

jacobaraujo7 commented 10 months ago

Thanks for your patience @GlaZedBelmont