mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Don't rename folder if it's only a case change
This commit is contained in:
parent
f438933fc3
commit
df7aaf633a
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,7 @@ import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceManager
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to provide the directories where the downloads should be saved.
|
* This class is used to provide the directories where the downloads should be saved.
|
||||||
|
@ -129,6 +130,7 @@ class DownloadProvider(private val context: Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun renameMangaFolder(from: String, to: String, sourceId: Long) {
|
fun renameMangaFolder(from: String, to: String, sourceId: Long) {
|
||||||
|
if (from.toLowerCase(Locale.getDefault()) == to.toLowerCase(Locale.getDefault())) return
|
||||||
val sourceManager by injectLazy<SourceManager>()
|
val sourceManager by injectLazy<SourceManager>()
|
||||||
val source = sourceManager.get(sourceId) ?: return
|
val source = sourceManager.get(sourceId) ?: return
|
||||||
val sourceDir = findSourceDir(source)
|
val sourceDir = findSourceDir(source)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue