mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-24 18:08:24 +01:00
Fix #764. Update Kissmanga genres
This commit is contained in:
parent
d4101c7bdf
commit
6394388714
@ -226,6 +226,7 @@ class Kissmanga : ParsedHttpSource() {
|
|||||||
Genre("Mystery"),
|
Genre("Mystery"),
|
||||||
Genre("One shot"),
|
Genre("One shot"),
|
||||||
Genre("Psychological"),
|
Genre("Psychological"),
|
||||||
|
Genre("Reincarnation"),
|
||||||
Genre("Romance"),
|
Genre("Romance"),
|
||||||
Genre("School Life"),
|
Genre("School Life"),
|
||||||
Genre("Sci-fi"),
|
Genre("Sci-fi"),
|
||||||
@ -239,7 +240,9 @@ class Kissmanga : ParsedHttpSource() {
|
|||||||
Genre("Smut"),
|
Genre("Smut"),
|
||||||
Genre("Sports"),
|
Genre("Sports"),
|
||||||
Genre("Supernatural"),
|
Genre("Supernatural"),
|
||||||
|
Genre("Time Travel"),
|
||||||
Genre("Tragedy"),
|
Genre("Tragedy"),
|
||||||
|
Genre("Transported"),
|
||||||
Genre("Webtoon"),
|
Genre("Webtoon"),
|
||||||
Genre("Yaoi"),
|
Genre("Yaoi"),
|
||||||
Genre("Yuri")
|
Genre("Yuri")
|
||||||
|
@ -5,7 +5,6 @@ import com.hippo.unifile.UniFile
|
|||||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||||
import eu.kanade.tachiyomi.data.database.models.MangaChapter
|
import eu.kanade.tachiyomi.data.database.models.MangaChapter
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadService
|
|
||||||
import eu.kanade.tachiyomi.data.download.model.Download
|
import eu.kanade.tachiyomi.data.download.model.Download
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.source.SourceManager
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
@ -58,7 +57,9 @@ class RecentChaptersPresenter(
|
|||||||
// Convert to a list of recent chapters.
|
// Convert to a list of recent chapters.
|
||||||
.map { mangaChapters ->
|
.map { mangaChapters ->
|
||||||
val map = TreeMap<Date, MutableList<MangaChapter>> { d1, d2 -> d2.compareTo(d1) }
|
val map = TreeMap<Date, MutableList<MangaChapter>> { d1, d2 -> d2.compareTo(d1) }
|
||||||
val byDay = mangaChapters.groupByTo(map, { getMapKey(it.chapter.date_fetch) })
|
val byDay = mangaChapters
|
||||||
|
.filter { sourceManager.get(it.manga.source) != null }
|
||||||
|
.groupByTo(map, { getMapKey(it.chapter.date_fetch) })
|
||||||
byDay.flatMap {
|
byDay.flatMap {
|
||||||
val dateItem = DateItem(it.key)
|
val dateItem = DateItem(it.key)
|
||||||
it.value.map { RecentChapterItem(it.chapter, it.manga, dateItem) }
|
it.value.map { RecentChapterItem(it.chapter, it.manga, dateItem) }
|
||||||
|
@ -5,6 +5,7 @@ import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
|||||||
import eu.kanade.tachiyomi.data.database.models.Chapter
|
import eu.kanade.tachiyomi.data.database.models.Chapter
|
||||||
import eu.kanade.tachiyomi.data.database.models.History
|
import eu.kanade.tachiyomi.data.database.models.History
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
|
import eu.kanade.tachiyomi.source.SourceManager
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
@ -23,6 +24,8 @@ class RecentlyReadPresenter : BasePresenter<RecentlyReadController>() {
|
|||||||
*/
|
*/
|
||||||
val db: DatabaseHelper by injectLazy()
|
val db: DatabaseHelper by injectLazy()
|
||||||
|
|
||||||
|
private val sourceManager: SourceManager by injectLazy()
|
||||||
|
|
||||||
override fun onCreate(savedState: Bundle?) {
|
override fun onCreate(savedState: Bundle?) {
|
||||||
super.onCreate(savedState)
|
super.onCreate(savedState)
|
||||||
|
|
||||||
@ -42,7 +45,10 @@ class RecentlyReadPresenter : BasePresenter<RecentlyReadController>() {
|
|||||||
cal.add(Calendar.MONTH, -1)
|
cal.add(Calendar.MONTH, -1)
|
||||||
|
|
||||||
return db.getRecentManga(cal.time).asRxObservable()
|
return db.getRecentManga(cal.time).asRxObservable()
|
||||||
.map { it.map(::RecentlyReadItem) }
|
.map { recents ->
|
||||||
|
recents.filter { sourceManager.get(it.manga.source) != null }
|
||||||
|
.map(::RecentlyReadItem)
|
||||||
|
}
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user