From f631fb873df1d6453944e0ba66b718401c243ff2 Mon Sep 17 00:00:00 2001 From: steelman Date: Sun, 12 Nov 2017 08:15:31 +0000 Subject: [PATCH] Explicitly accept album art as saved by Windows Media Player (#692) Windows Media Player saves album covers in AlbumArt* files. Since 2011 Android has considered them as non-media files[1] and hasn't shown in the Gallery application. [1] https://android.googlesource.com/platform/frameworks/base/+/ade06df0fe3499d66ee5cc29071d41445d1091fa --- src/ch/blinkenlights/android/vanilla/CoverCache.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ch/blinkenlights/android/vanilla/CoverCache.java b/src/ch/blinkenlights/android/vanilla/CoverCache.java index 7d0c026a..84aa9d37 100644 --- a/src/ch/blinkenlights/android/vanilla/CoverCache.java +++ b/src/ch/blinkenlights/android/vanilla/CoverCache.java @@ -199,7 +199,11 @@ public class CoverCache { /** * Priority-ordered list of possible cover names */ - private final static Pattern[] COVER_MATCHES = { Pattern.compile("(?i).+/(COVER|ALBUM)\\.(JPE?G|PNG)$"), Pattern.compile("(?i).+/(CD|FRONT|ARTWORK)\\.(JPE?G|PNG)$"), Pattern.compile("(?i).+\\.(JPE?G|PNG)$") }; + private final static Pattern[] COVER_MATCHES = { + Pattern.compile("(?i).+/(COVER|ALBUM)\\.(JPE?G|PNG)$"), + Pattern.compile("(?i).+/ALBUMART(_\\{[-0-9A-F]+\\}_LARGE)?\\.(JPE?G|PNG)$"), + Pattern.compile("(?i).+/(CD|FRONT|ARTWORK|FOLDER)\\.(JPE?G|PNG)$"), + Pattern.compile("(?i).+\\.(JPE?G|PNG)$") }; /** * Projection of all columns in the database */