MaxFour / Music-Player

Lightweight and Material designed Music Player
GNU General Public License v3.0
281 stars 71 forks source link

Support albumart.jpg and albumart.png cover art files #50

Closed s-zeid closed 5 years ago

s-zeid commented 5 years ago

Actual behaviour

I have albums in folders with albumart.jpg files but no embedded cover art. The generic cover art is shown instead of albumart.jpg when "Ignore Media Store covers" is enabled.

Expected behaviour

I expect to see the cover art from the albumart.jpg file. (This file name is consistent with the AOSP MediaScanner's getCompressedAlbumArt() method (which is case-insensitive despite the comment there). Note that albumart.png will also be picked up by that algorithm, and in fact I do have covers with that name.

Steps to reproduce

  1. Enable "Ignore Media Store covers".
  2. Make a folder containing a music file with no embedded cover art and no cover art files.
  3. Add an albumart.jpg or albumart.png file to that folder.
  4. Trigger a rescan if necessary.
  5. Observe that the generic album art is shown in place of the file from step 3.

Notes

MediaScanner does use a more complex algorithm where names containing "albumart" and names starting with "albumart" and ending in "large" are also accepted, but this issue is meant for the more common cases of "albumart.jpg" and "albumart.png", which can easily be added to the FALLBACKS constant in AudioFileCoverFetcher.java.

Environment data

Android version: 8.1

Device model: Moto E 2015 LTE

Stock or customized system: unofficial Oreo image

Music-Player app version: 1.2.1

MaxFour commented 5 years ago

Hi! I merged your PR.

Kowalski7 commented 5 years ago

For me it works if I name them as cover.jpg