mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-29 17:49:03 +03:00
allow empty chapter/episode list for local sources
This commit is contained in:
parent
82c9443614
commit
009e2962e0
2 changed files with 4 additions and 2 deletions
|
@ -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.Chapter
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||||
|
import eu.kanade.tachiyomi.source.LocalSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
|
@ -27,7 +28,7 @@ fun syncChaptersWithSource(
|
||||||
manga: Manga,
|
manga: Manga,
|
||||||
source: Source
|
source: Source
|
||||||
): Pair<List<Chapter>, List<Chapter>> {
|
): Pair<List<Chapter>, List<Chapter>> {
|
||||||
if (rawSourceChapters.isEmpty()) {
|
if (rawSourceChapters.isEmpty() && source !is LocalSource) {
|
||||||
throw NoChaptersException()
|
throw NoChaptersException()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.util.episode
|
package eu.kanade.tachiyomi.util.episode
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.animesource.AnimeSource
|
import eu.kanade.tachiyomi.animesource.AnimeSource
|
||||||
|
import eu.kanade.tachiyomi.animesource.LocalAnimeSource
|
||||||
import eu.kanade.tachiyomi.animesource.model.SEpisode
|
import eu.kanade.tachiyomi.animesource.model.SEpisode
|
||||||
import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
|
import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
|
||||||
import eu.kanade.tachiyomi.data.database.AnimeDatabaseHelper
|
import eu.kanade.tachiyomi.data.database.AnimeDatabaseHelper
|
||||||
|
@ -27,7 +28,7 @@ fun syncEpisodesWithSource(
|
||||||
anime: Anime,
|
anime: Anime,
|
||||||
source: AnimeSource
|
source: AnimeSource
|
||||||
): Pair<List<Episode>, List<Episode>> {
|
): Pair<List<Episode>, List<Episode>> {
|
||||||
if (rawSourceEpisodes.isEmpty()) {
|
if (rawSourceEpisodes.isEmpty() && source !is LocalAnimeSource) {
|
||||||
throw NoEpisodesException()
|
throw NoEpisodesException()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue