allow empty chapter/episode list for local sources

This commit is contained in:
jmir1 2022-03-20 19:09:54 +01:00
parent 82c9443614
commit 009e2962e0
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@ import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.source.LocalSource
import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.online.HttpSource
@ -27,7 +28,7 @@ fun syncChaptersWithSource(
manga: Manga,
source: Source
): Pair<List<Chapter>, List<Chapter>> {
if (rawSourceChapters.isEmpty()) {
if (rawSourceChapters.isEmpty() && source !is LocalSource) {
throw NoChaptersException()
}

View file

@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.util.episode
import eu.kanade.tachiyomi.animesource.AnimeSource
import eu.kanade.tachiyomi.animesource.LocalAnimeSource
import eu.kanade.tachiyomi.animesource.model.SEpisode
import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
import eu.kanade.tachiyomi.data.database.AnimeDatabaseHelper
@ -27,7 +28,7 @@ fun syncEpisodesWithSource(
anime: Anime,
source: AnimeSource
): Pair<List<Episode>, List<Episode>> {
if (rawSourceEpisodes.isEmpty()) {
if (rawSourceEpisodes.isEmpty() && source !is LocalAnimeSource) {
throw NoEpisodesException()
}