Fix #764. Update Kissmanga genres

This commit is contained in:
inorichi 2017-11-22 21:41:57 +01:00
parent d4101c7bdf
commit 6394388714
3 changed files with 13 additions and 3 deletions

View File

@ -226,6 +226,7 @@ class Kissmanga : ParsedHttpSource() {
Genre("Mystery"),
Genre("One shot"),
Genre("Psychological"),
Genre("Reincarnation"),
Genre("Romance"),
Genre("School Life"),
Genre("Sci-fi"),
@ -239,7 +240,9 @@ class Kissmanga : ParsedHttpSource() {
Genre("Smut"),
Genre("Sports"),
Genre("Supernatural"),
Genre("Time Travel"),
Genre("Tragedy"),
Genre("Transported"),
Genre("Webtoon"),
Genre("Yaoi"),
Genre("Yuri")

View File

@ -5,7 +5,6 @@ import com.hippo.unifile.UniFile
import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.database.models.MangaChapter
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.preference.PreferencesHelper
import eu.kanade.tachiyomi.source.SourceManager
@ -58,7 +57,9 @@ class RecentChaptersPresenter(
// Convert to a list of recent chapters.
.map { mangaChapters ->
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 {
val dateItem = DateItem(it.key)
it.value.map { RecentChapterItem(it.chapter, it.manga, dateItem) }

View File

@ -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.History
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
import rx.Observable
import rx.android.schedulers.AndroidSchedulers
@ -23,6 +24,8 @@ class RecentlyReadPresenter : BasePresenter<RecentlyReadController>() {
*/
val db: DatabaseHelper by injectLazy()
private val sourceManager: SourceManager by injectLazy()
override fun onCreate(savedState: Bundle?) {
super.onCreate(savedState)
@ -42,7 +45,10 @@ class RecentlyReadPresenter : BasePresenter<RecentlyReadController>() {
cal.add(Calendar.MONTH, -1)
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())
}