mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 05:49:16 +01:00
formatting changes in ChapterSourceSync
This commit is contained in:
parent
02fa9841e7
commit
c438236bf7
@ -67,7 +67,9 @@ fun syncChaptersWithSource(
|
|||||||
ChapterRecognition.parseChapterNumber(sourceChapter, manga)
|
ChapterRecognition.parseChapterNumber(sourceChapter, manga)
|
||||||
|
|
||||||
if (shouldUpdateDbChapter(dbChapter, sourceChapter)) {
|
if (shouldUpdateDbChapter(dbChapter, sourceChapter)) {
|
||||||
if (dbChapter.name != sourceChapter.name && downloadManager.isChapterDownloaded(dbChapter, manga)) {
|
if (dbChapter.name != sourceChapter.name &&
|
||||||
|
downloadManager.isChapterDownloaded(dbChapter, manga)
|
||||||
|
) {
|
||||||
downloadManager.renameChapter(source, manga, dbChapter, sourceChapter)
|
downloadManager.renameChapter(source, manga, dbChapter, sourceChapter)
|
||||||
}
|
}
|
||||||
dbChapter.scanlator = sourceChapter.scanlator
|
dbChapter.scanlator = sourceChapter.scanlator
|
||||||
@ -150,7 +152,8 @@ fun syncChaptersWithSource(
|
|||||||
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking()
|
||||||
|
|
||||||
// Set this manga as updated since chapters were changed
|
// Set this manga as updated since chapters were changed
|
||||||
val newestChapterDate = db.getChapters(manga).executeAsBlocking().maxOfOrNull { it.date_upload } ?: 0L
|
val newestChapterDate = db.getChapters(manga).executeAsBlocking()
|
||||||
|
.maxOfOrNull { it.date_upload } ?: 0L
|
||||||
if (newestChapterDate == 0L) {
|
if (newestChapterDate == 0L) {
|
||||||
if (toAdd.isNotEmpty()) {
|
if (toAdd.isNotEmpty()) {
|
||||||
manga.last_update = Date().time
|
manga.last_update = Date().time
|
||||||
|
Loading…
Reference in New Issue
Block a user