Add specific support for dummy extensions so that read chapter history is able to be freely restored without connecting to the source
This commit is contained in:
parent
e4d40c7693
commit
88963758b1
@ -303,7 +303,16 @@ class BackupManager(val context: Context, version: Int = CURRENT_VERSION) {
|
||||
} else {
|
||||
source.fetchChapterList(manga)
|
||||
}
|
||||
).map { syncChaptersWithSource(databaseHelper, it, manga, source) }
|
||||
).map {
|
||||
if (it.last().chapter_number == -99F) {
|
||||
chapters.forEach { chapter ->
|
||||
chapter.name = "Chapter ${chapter.chapter_number} restored by dummy source"
|
||||
}
|
||||
syncChaptersWithSource(databaseHelper, chapters, manga, source)
|
||||
} else {
|
||||
syncChaptersWithSource(databaseHelper, it, manga, source)
|
||||
}
|
||||
}
|
||||
.doOnNext { pair ->
|
||||
if (pair.first.isNotEmpty()) {
|
||||
chapters.forEach { it.manga_id = manga.id }
|
||||
|
Loading…
x
Reference in New Issue
Block a user