Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to any image in directory/playlist if none match our preferred names #1

Open
po5 opened this issue Aug 2, 2020 · 3 comments · May be fixed by #5
Open

Fallback to any image in directory/playlist if none match our preferred names #1

po5 opened this issue Aug 2, 2020 · 3 comments · May be fixed by #5
Labels
enhancement New feature or request

Comments

@po5
Copy link

po5 commented Aug 2, 2020

Feature request.
Quickly thrown together implementation of this idea here https://github.com/po5/mpv-coverart

@CogentRedTester
Copy link
Owner

CogentRedTester commented Aug 4, 2020

I believe this is already supported

see the config entry:

--list of names of valid cover art, must be separated by semicolons with no spaces
--the script is not case specific
--any file with valid names and valid image extensions are loaded
--if set to blank then image files with any name will be loaded
names = "cover;folder;album;front",

and the implementation in isValidCoverart():

if o.names == "" or names[filename] then
    msg.debug('filename valid')
    return true
end

@po5
Copy link
Author

po5 commented Aug 4, 2020

This would accept any image file, the suggestion is to still prefer valid filenames and only fall back to any image if no matching filename is found.

@CogentRedTester
Copy link
Owner

This feature would require some sort of second search of the directory after the first search fails, or alternatively saving all the image files on the first pass and loading them at the end like you did.

However, considering the extra complexity this adds I'm tempted to just say: enable all images and just name your coverart so it appears first. Do you have some use-cases that this feature would solve?

@CogentRedTester CogentRedTester added the enhancement New feature or request label Aug 5, 2020
po5 added a commit to po5/mpv-coverart that referenced this issue Aug 8, 2023
@po5 po5 linked a pull request Aug 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants