diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt index c2f574600..ecaa0093e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt @@ -147,8 +147,16 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) { } if (track.status != COMPLETED) { - if (track.status != REPEATING && didReadChapter) { - track.status = READING + if (didReadChapter) { + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + track.finished_reading_date = System.currentTimeMillis() + } else if (track.status != REPEATING) { + track.status = READING + if (track.last_chapter_read == 1F) { + track.started_reading_date = System.currentTimeMillis() + } + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Bangumi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Bangumi.kt index 475f1d53c..7cdec90d3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Bangumi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/bangumi/Bangumi.kt @@ -38,7 +38,11 @@ class Bangumi(private val context: Context, id: Int) : TrackService(id) { override suspend fun update(track: Track, didReadChapter: Boolean): Track { if (track.status != COMPLETED) { if (didReadChapter) { - track.status = READING + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + } else { + track.status = READING + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt index 233681830..75a456786 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/Kitsu.kt @@ -80,7 +80,15 @@ class Kitsu(private val context: Context, id: Int) : TrackService(id) { override suspend fun update(track: Track, didReadChapter: Boolean): Track { if (track.status != COMPLETED) { if (didReadChapter) { - track.status = READING + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + track.finished_reading_date = System.currentTimeMillis() + } else { + track.status = READING + if (track.last_chapter_read == 1F) { + track.started_reading_date = System.currentTimeMillis() + } + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt index 9628a68f0..e55055c6d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/komga/Komga.kt @@ -59,7 +59,11 @@ class Komga(private val context: Context, id: Int) : TrackService(id), EnhancedT override suspend fun update(track: Track, didReadChapter: Boolean): Track { if (track.status != COMPLETED) { if (didReadChapter) { - track.status = READING + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + } else { + track.status = READING + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt index e5a82885d..ffed4c15d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeList.kt @@ -76,8 +76,16 @@ class MyAnimeList(private val context: Context, id: Int) : TrackService(id) { override suspend fun update(track: Track, didReadChapter: Boolean): Track { if (track.status != COMPLETED) { - if (track.status != REREADING && didReadChapter) { - track.status = READING + if (didReadChapter) { + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + track.finished_reading_date = System.currentTimeMillis() + } else if (track.status != REREADING) { + track.status = READING + if (track.last_chapter_read == 1F) { + track.started_reading_date = System.currentTimeMillis() + } + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt index 308bd3ded..e21ce491e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/shikimori/Shikimori.kt @@ -46,8 +46,12 @@ class Shikimori(private val context: Context, id: Int) : TrackService(id) { override suspend fun update(track: Track, didReadChapter: Boolean): Track { if (track.status != COMPLETED) { - if (track.status != REPEATING && didReadChapter) { - track.status = READING + if (didReadChapter) { + if (track.last_chapter_read.toInt() == track.total_chapters && track.total_chapters > 0) { + track.status = COMPLETED + } else if (track.status != REPEATING) { + track.status = READING + } } }