|
@@ -6,6 +6,7 @@ import android.content.Intent
|
|
|
import android.os.Build
|
|
|
import android.os.IBinder
|
|
|
import android.os.PowerManager
|
|
|
+import eu.kanade.tachiyomi.R
|
|
|
import eu.kanade.tachiyomi.data.cache.CoverCache
|
|
|
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
|
|
import eu.kanade.tachiyomi.data.database.models.Category
|
|
@@ -21,6 +22,7 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
|
|
import eu.kanade.tachiyomi.data.track.TrackManager
|
|
|
import eu.kanade.tachiyomi.source.SourceManager
|
|
|
import eu.kanade.tachiyomi.source.model.SManga
|
|
|
+import eu.kanade.tachiyomi.util.chapter.NoChaptersException
|
|
|
import eu.kanade.tachiyomi.util.chapter.syncChaptersWithSource
|
|
|
import eu.kanade.tachiyomi.util.prepUpdateCover
|
|
|
import eu.kanade.tachiyomi.util.shouldDownloadNewChapters
|
|
@@ -268,7 +270,12 @@ class LibraryUpdateService(
|
|
|
updateManga(manga)
|
|
|
// If there's any error, return empty update and continue.
|
|
|
.onErrorReturn {
|
|
|
- failedUpdates.add(Pair(manga, it.message))
|
|
|
+ val errorMessage = if (it is NoChaptersException) {
|
|
|
+ getString(R.string.no_chapters_error)
|
|
|
+ } else {
|
|
|
+ it.message
|
|
|
+ }
|
|
|
+ failedUpdates.add(Pair(manga, errorMessage))
|
|
|
Pair(emptyList(), emptyList())
|
|
|
}
|
|
|
// Filter out mangas without new chapters (or failed).
|