Skip to content

Commit

Permalink
recognize WEBP as image format
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-bl committed Oct 15, 2020
1 parent d345303 commit b8e41ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ private static class BitmapDiskCache extends SQLiteOpenHelper {
* Priority-ordered list of possible cover names
*/
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)$") };
Pattern.compile("(?i).+/(COVER|ALBUM)\\.(JPE?G|PNG|WEBP)$"),
Pattern.compile("(?i).+/ALBUMART(_\\{[-0-9A-F]+\\}_LARGE)?\\.(JPE?G|PNG|WEBP)$"),
Pattern.compile("(?i).+/(CD|FRONT|ARTWORK|FOLDER)\\.(JPE?G|PNG|WEBP)$"),
Pattern.compile("(?i).+\\.(JPE?G|PNG|WEBP)$") };
/**
* Projection of all columns in the database
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class FileSystemAdapter
private static final Pattern SPACE_SPLIT = Pattern.compile("\\s+");
private static final Pattern FILE_SEPARATOR = Pattern.compile(File.separator);
private static final Pattern GUESS_MUSIC = Pattern.compile("^(.+\\.(mp3|ogg|mka|opus|flac|aac|m4a|wav))$", Pattern.CASE_INSENSITIVE);
private static final Pattern GUESS_IMAGE = Pattern.compile("^(.+\\.(gif|jpe?g|png|bmp|tiff?))$", Pattern.CASE_INSENSITIVE);
private static final Pattern GUESS_IMAGE = Pattern.compile("^(.+\\.(gif|jpe?g|png|bmp|tiff?|webp))$", Pattern.CASE_INSENSITIVE);
/**
* The root directory of the device
*/
Expand Down

0 comments on commit b8e41ab

Please sign in to comment.