mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-05-18 08:16:36 +03:00
Separated cache entries for large images
This commit is contained in:
parent
fa6566e903
commit
78cb4d09cf
@ -129,9 +129,10 @@ public class FileUtil
|
||||
/**
|
||||
* Get the cache key for a given album entry
|
||||
* @param entry The album entry
|
||||
* @param large Whether to get the key for the large or the default image
|
||||
* @return String The hash key
|
||||
*/
|
||||
public static String getAlbumArtKey(MusicDirectory.Entry entry)
|
||||
public static String getAlbumArtKey(MusicDirectory.Entry entry, boolean large)
|
||||
{
|
||||
File albumDir = getAlbumDirectory(entry);
|
||||
File albumArtDir = getAlbumArtDirectory();
|
||||
@ -140,7 +141,7 @@ public class FileUtil
|
||||
return null;
|
||||
}
|
||||
|
||||
return String.format(Locale.ROOT, "%s.jpeg", Util.md5Hex(albumDir.getPath()));
|
||||
return String.format(Locale.ROOT, "%s%b.jpeg", Util.md5Hex(albumDir.getPath()), large);
|
||||
}
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ class ImageLoader(
|
||||
val requestedSize = resolveSize(size, large)
|
||||
|
||||
if (id != null && id.isNotEmpty() && view is ImageView) {
|
||||
val key = FileUtil.getAlbumArtKey(entry)
|
||||
val key = FileUtil.getAlbumArtKey(entry, large)
|
||||
val request = ImageRequest.CoverArt(
|
||||
id, key, view, requestedSize,
|
||||
placeHolderDrawableRes = defaultResourceId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user