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

Commit f13d4501 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Send "compilation" tag when inserting into the database.

It's not actually inserted into the database, but the media provider uses it
for disambiguating albums.
b/3311831

Change-Id: Idb630866e960338ce2795dcc128cafaf6c9c27f2
parent ba77a3f9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -402,6 +402,7 @@ public class MediaScanner
        private long mLastModified;
        private long mFileSize;
        private String mWriter;
        private int mCompilation;

        public FileCacheEntry beginFile(String path, String mimeType, long lastModified, long fileSize) {

@@ -486,6 +487,7 @@ public class MediaScanner
            mPath = path;
            mLastModified = lastModified;
            mWriter = null;
            mCompilation = 0;

            return entry;
        }
@@ -596,6 +598,8 @@ public class MediaScanner
                mDuration = parseSubstring(value, 0, 0);
            } else if (name.equalsIgnoreCase("writer") || name.startsWith("writer;")) {
                mWriter = value.trim();
            } else if (name.equalsIgnoreCase("compilation")) {
                mCompilation = parseSubstring(value, 0, 0);
            }
        }

@@ -646,6 +650,7 @@ public class MediaScanner
                }
                map.put(Audio.Media.TRACK, mTrack);
                map.put(Audio.Media.DURATION, mDuration);
                map.put(Audio.Media.COMPILATION, mCompilation);
            }
            return map;
        }