am 2888208b: am f13d4501: 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
* commit '2888208b0bb38ac93bb6b500992869c8a6bf244c': 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
This commit is contained in:
@@ -414,6 +414,7 @@ public class MediaScanner
|
|||||||
private long mLastModified;
|
private long mLastModified;
|
||||||
private long mFileSize;
|
private long mFileSize;
|
||||||
private String mWriter;
|
private String mWriter;
|
||||||
|
private int mCompilation;
|
||||||
|
|
||||||
public FileCacheEntry beginFile(String path, String mimeType, long lastModified,
|
public FileCacheEntry beginFile(String path, String mimeType, long lastModified,
|
||||||
long fileSize, boolean isDirectory) {
|
long fileSize, boolean isDirectory) {
|
||||||
@@ -523,6 +524,7 @@ public class MediaScanner
|
|||||||
mPath = path;
|
mPath = path;
|
||||||
mLastModified = lastModified;
|
mLastModified = lastModified;
|
||||||
mWriter = null;
|
mWriter = null;
|
||||||
|
mCompilation = 0;
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
@@ -634,6 +636,8 @@ public class MediaScanner
|
|||||||
mDuration = parseSubstring(value, 0, 0);
|
mDuration = parseSubstring(value, 0, 0);
|
||||||
} else if (name.equalsIgnoreCase("writer") || name.startsWith("writer;")) {
|
} else if (name.equalsIgnoreCase("writer") || name.startsWith("writer;")) {
|
||||||
mWriter = value.trim();
|
mWriter = value.trim();
|
||||||
|
} else if (name.equalsIgnoreCase("compilation")) {
|
||||||
|
mCompilation = parseSubstring(value, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -684,6 +688,7 @@ public class MediaScanner
|
|||||||
}
|
}
|
||||||
map.put(Audio.Media.TRACK, mTrack);
|
map.put(Audio.Media.TRACK, mTrack);
|
||||||
map.put(Audio.Media.DURATION, mDuration);
|
map.put(Audio.Media.DURATION, mDuration);
|
||||||
|
map.put(Audio.Media.COMPILATION, mCompilation);
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user