Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08f70fa5 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Speed up playlist processing

When matching entries in playlists, only consider audio files.

b/6346786

Change-Id: Ia744d002c2821a81840303b9409593da48a08b73
parent 1579a67e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1770,8 +1770,10 @@ public class MediaScanner
        Iterator<FileEntry> iterator = mPlayLists.iterator();
        Cursor fileList = null;
        try {
            // use the files uri and projection because we need the format column,
            // but restrict the query to just audio files
            fileList = mMediaProvider.query(mFilesUri, FILES_PRESCAN_PROJECTION,
                    null, null, null, null);
                    "media_type=2", null, null, null);
            while (iterator.hasNext()) {
                FileEntry entry = iterator.next();
                // only process playlist files if they are new or have been modified since the last scan