mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-17 14:37:29 +01:00
Allow excluding categories from auto-download
Closes #1412 Supersedes #4121
This commit is contained in:
@@ -68,5 +68,8 @@ fun Manga.shouldDownloadNewChapters(db: DatabaseHelper, prefs: PreferencesHelper
|
||||
.mapNotNull { it.id }
|
||||
.takeUnless { it.isEmpty() } ?: listOf(0)
|
||||
|
||||
val categoriesToExclude = prefs.downloadNewCategoriesExclude().get().map(String::toInt)
|
||||
if (categoriesForManga.intersect(categoriesToExclude).isNotEmpty()) return false
|
||||
|
||||
return categoriesForManga.intersect(categoriesToDownload).isNotEmpty()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user