Update manga.last_update when any ChapterSourceSync.syncChaptersWithSource() occurs rather than only during LibraryUpdateService.updateChapterList() (#1535)
Viewing a manga's info page for the first time forces a chapter sync. Prior behavior would cause new chapters to be retrieved for that manga, but with manga.last_update remaining at 0 (until a library update occurred in which chapters were changed). The new behavior updates last_update any time the chapters are changed via syncChaptersWithSource().
Cette révision appartient à :
Parent
762c378bd6
révision
16dc4d298d
2 fichiers modifiés avec 4 ajouts et 3 suppressions
|
@ -304,9 +304,6 @@ class LibraryUpdateService(
|
|||
}
|
||||
// Add manga with new chapters to the list.
|
||||
.doOnNext { manga ->
|
||||
// Set last updated time
|
||||
manga.last_update = Date().time
|
||||
db.updateLastUpdated(manga).executeAsBlocking()
|
||||
// Add to the list
|
||||
newUpdates.add(manga)
|
||||
}
|
||||
|
|
|
@ -122,6 +122,10 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
|||
|
||||
// Fix order in source.
|
||||
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
||||
|
||||
// Set this manga as updated since chapters were changed
|
||||
manga.last_update = Date().time
|
||||
db.updateLastUpdated(manga).executeAsBlocking()
|
||||
}
|
||||
return Pair(toAdd.subtract(readded).toList(), toDelete.subtract(readded).toList())
|
||||
|
||||
|
|
Référencer dans un nouveau ticket