kbuffington / Georgia

Dynamic foobar2000 theme
286 stars 16 forks source link

cd.jpg (or discart picture) vs filtering #66

Closed voc0der closed 3 years ago

voc0der commented 3 years ago

Hey kbuffington,

First off, thanks for the theme, its been my daily driver for almost a year now.

I wanted to ask you if you had a good idea to help filter out files you may not want to show up in the place of the artwork.

So maybe the best way to explain this is in code? My workaround for Line 2591 of georgia-main.js is this:

const pattern = new RegExp('(cd|vinyl|' + settings.cdArtBasename + ')([0-9]*|[a-h]).(jpg|png)', 'i');

.png -> (.jpg|png)

Imagine I have discart.jpg because my metadata retrieval couldn't get a perfect png, or for whatever reason. It could be pending my lazy bum to go to remove.bg and make my own or something. But It would be nice to have a way to always exclude settings.cdArtBasename..etc.png and jpg, since in my setup, it is the same intent of a file, and both should always be filtered, as discart.jpg/png is still an image of the physical CD, and not album artwork.

Thanks!

kbuffington commented 3 years ago

So basically you've got discart.jpg in the folder, and you don't want it to show up in the artwork rotation, but you also don't want those discart.jpgs to be shown as the cdArt (because that'd look pretty terrible), right?

I don't have too much of a problem with this, but I'm wondering if some users might want to look at that scan of a cd sitting on a table and might be surprised when they stop showing up. In fact I do this so I can find cd art images I want to either delete or turn into appropriately edited cd.pngs. Let me think about this a little more.

kbuffington commented 3 years ago

Just FYI, after thinking about it, I'm adding this as an option in the config file.

voc0der commented 3 years ago

Sounds good!! --- Yep, you got it right.

kbuffington commented 3 years ago

Added. It is disabled by default because I don't want to change functionality some people might have been relying on in the past. It's actually in the preferences as filterCdJpgsFromAlbumArt or can be toggled from the (new!) cdArt menu in options.