MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.2k stars 350 forks source link

add user configurable coverart name #301

Open snake3ca opened 6 years ago

snake3ca commented 6 years ago

Please add the ability to configure the artwork file name so you dont have to have the artwork named cover.jpg. Or you could just have it look for cover.jpg or folder.jpg since many other media players / taggers use folder.jpg for artwork. Im referring to MPDs future ability to send cover art in binary form to clients.

ondras commented 5 years ago

+1 for this. My music database uses Cover.* (capitalized), which is obviously not working with the current implementation.

adelias commented 5 years ago

I agree, it would be nice if this were configurable so I wouldn't have to edit FileCommands.cxx every time.

muesli4 commented 3 years ago

In mpd-touch-screen-gui, I am using the following for cover detection:

    cover:
    {
        # Add this line for cover support from the filesystem.
        directory = "/home/alarm/Music/"

        # All combinations are tried in the given order to find covers. If none
        # of these matches, the cover replacement is displayed.
        extensions = ["png", "jpeg", "jpg"]
        names = ["front", "cover", "back"]
    }

Would you mind it being implemented in a similar way? I like the idea to have some priority so you can have several files in the directory and it will pick the right one according to the user's specification.

snake3ca commented 3 years ago

That would work perfect for me.

nguillaumin commented 2 years ago

Related suggestions:

  1. Support some sort of template system for users who name their cover file after the album name, for example /music/Metallica - Master of Puppet/Master of Puppets.jpg . I'd imagine it would be configured with something like art_filename = %album or similar.
  2. Implement a fallback where the first image found in the folder is used, rather than expecting a specific filename. This would probably work in most cases and would cater for all "special" cases.

In fact maybe 2. would be good enough for most cases and quick & easy to implement...

muesli4 commented 2 years ago

@nguillaumin apart from being redundant this scheme is very prone to errors (e.g., due to bad tags or filenames) and your solution is not as flexible as the solution that I proposed. I don't have anything against allowing templates in it but it makes it slightly more complicated. For example, what if the relevant tags are missing? What if the tags contain invalid characters for the file system? Obviously, one would have to do the same check for presets.

arbv commented 2 years ago

Please make the cover art file names configurable (please notice the plural). For example, my DeadBeef configuration looks for :

You see, it is nearly impossible to make a hard coded configuration which would suit everyones' needs.

That is, making the list of artwork filenames to try configurable via a configuration option would make it possible to make MPD serve anybody's needs according to their music library sate. It is what, e.g. DeadBeef or FooBar2000 do exactly for that reason.

arbv commented 2 years ago

To be more precise, I am on @muesli4 side here, although I would drop a separate configuration option for extensions, just making the list of filenames to try should be enough.

muesli4 commented 2 years ago

@arbv well, the cartesian product is multiplicative in size. For 3 each you have to specify only 6 this way vs. 9. For anything more it gets a hassle quickly. And since it is really not hard to implement, I really don't see why one should not go the more flexible way.

Then of course there are people that think too much configurability is harmful or too many configuration options are confusing. But I find this hostility against configurable software and always going the way most people use it a scourge of our time (i.e. mainstreaming). If I cannot use software the way I want, depending on severity it will make me quit using it.

arbv commented 2 years ago

@muesli4 I agree with you at the highest level. To be fair, I would be glad if ability to specify multiple artwork file names would have been implemented in any way.

I have proposed a variant where only one option is needed just in case asking for multiple options is too much.

dgcampea commented 1 year ago

@arbv well, the cartesian product is multiplicative in size.

The solution to this is to specify the desired covers as a regex expression (https://github.com/MusicPlayerDaemon/MPD/issues/1493).

muesli4 commented 1 year ago

@arbv well, the cartesian product is multiplicative in size.

The solution to this is to specify the desired covers as a regex expression (#1493).

Fair enough. But you have to make sure that the match on the file names is order-dependent, in case there are several files that match.