fix: Local Source directory (GH-3)

This commit is contained in:
ziro 2024-01-17 06:47:18 +07:00
parent 2da5ef5eb7
commit 6991915d3a
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 13 additions and 4 deletions

View file

@ -83,10 +83,17 @@ class LocalSource(private val context: Context) : CatalogueSource, UnmeteredSour
}
private fun getBaseDirectories(context: Context): List<File> {
val c = context.getString(R.string.app_name) + File.separator + "local"
val oldLibrary = "Tachiyomi" + File.separator + "local"
val library = context.getString(R.string.app_name_prod) + File.separator + "local"
val normalized = context.getString(R.string.app_name_normalized) + File.separator + "local"
val j2k = "TachiyomiJ2K" + File.separator + "local"
val tachi = "Tachiyomi" + File.separator + "local"
return DiskUtil.getExternalStorages(context).map {
listOf(File(it.absolutePath, c), File(it.absolutePath, oldLibrary))
listOf(
File(it.absolutePath, library),
File(it.absolutePath, normalized),
File(it.absolutePath, j2k),
File(it.absolutePath, tachi),
)
}.flatten()
}
}

View file

@ -2,6 +2,8 @@
<resources>
<string name="app_name" translatable="false">Yōkai</string>
<string name="app_short_name" translatable="false">Yōkai</string>
<string name="app_name_prod" translatable="false">Yōkai</string>
<string name="app_name_normalized" translatable="false">Yokai</string>
<string name="all_files_permission_required">File permissions required</string>
<string name="external_storage_permission_notice">TachiyomiJ2K requires access to all files in Android 11 to download chapters, create automatic backups, and read local series. \n\nOn the next screen, enable \"Allow access to manage all files.\"</string>