beets icon indicating copy to clipboard operation
beets copied to clipboard

fetchart: Choose / convert image formats

Open translit opened this issue 7 years ago • 2 comments

At present, the fetchart plugin is oblivious to the format of the images it downloads. While JPG is most common, one may come across cover art in other formats too. For example, MusicBrainz carries GIF, JPG, JPEG, PNG, HTM, HTML, JPE, JFIF and PDF.

Some players, notably in-car entertainment systems, may be picky about the format they display. For example, BMW supports JPG but not PNG. Hence the need to convert the downloaded cover art.

It would be useful if the fetchart configuration had two extra options:

  • format: Download images of this format only (gif, jpg, jpeg, png, htm, html, jpe, jfif, pdf)
  • convert_to: Convert downloaded image to this format (gif, jpg, jpeg, png, htm, html, jpe, jfif, pdf)

translit avatar Oct 07 '17 06:10 translit

Thanks! FWIW, the plugin is not entirely unaware of formats. It actually has a hard-coded list of legal file formats: currently, just PNG and JPEG. Others will not be downloaded: https://github.com/beetbox/beets/blob/ce40d85151701b34f4fb5757ce6a53a9eb8e6353/beetsplug/fetchart.py#L44-L47

But making this configurable, and supporting conversion, would be a good idea.

sampsyo avatar Oct 07 '17 07:10 sampsyo

i would be interested in this feature or a workaround, too.

fabsmusicjunkie avatar Nov 26 '21 11:11 fabsmusicjunkie