Modified audioFileFilter to recognise .ogg files. (#129)
Previously any vorbis files (or any other format using the Ogg container) were missing from the folders view. This is because the Android mime type for .ogg is "application/ogg" rather than "audio/ogg". This pull request simply adds an additional check for this.
This commit is contained in:
parent
3d118805b7
commit
eeb67e2def
1 changed files with 4 additions and 2 deletions
|
|
@ -457,7 +457,9 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
FileFilter audioFileFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File file) {
|
||||
return !file.isHidden() && (file.isDirectory() || FileUtil.fileIsMimeType(file, "audio/*", MimeTypeMap.getSingleton()));
|
||||
return !file.isHidden() && (file.isDirectory() ||
|
||||
FileUtil.fileIsMimeType(file, "audio/*", MimeTypeMap.getSingleton()) ||
|
||||
FileUtil.fileIsMimeType(file, "application/ogg", MimeTypeMap.getSingleton()));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -750,4 +752,4 @@ public class FoldersFragment extends AbsMainActivityFragment implements MainActi
|
|||
.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue