Fallback covers' external directory

This commit is contained in:
inorichi 2017-11-08 22:34:56 +01:00
parent cb357b0a16
commit e3259f39f1

View File

@ -20,7 +20,8 @@ class CoverCache(private val context: Context) {
/**
* Cache directory used for cache management.
*/
private val cacheDir = context.getExternalFilesDir("covers")
private val cacheDir = context.getExternalFilesDir("covers") ?:
File(context.filesDir, "covers").also { it.mkdirs() }
/**
* Returns the cover from cache.