mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 20:53:14 +02:00
Set now as last updated for manga if the source does not provide a date for new chapters
This commit is contained in:
parent
750c515db8
commit
fee697f148
@ -136,7 +136,11 @@ fun syncChaptersWithSource(db: DatabaseHelper,
|
|||||||
// Set this manga as updated since chapters were changed
|
// Set this manga as updated since chapters were changed
|
||||||
val newestChatper = db.getChapters(manga).executeAsBlocking().maxBy { it.date_upload }
|
val newestChatper = db.getChapters(manga).executeAsBlocking().maxBy { it.date_upload }
|
||||||
val dateFetch = newestChatper?.date_upload ?: manga.last_update
|
val dateFetch = newestChatper?.date_upload ?: manga.last_update
|
||||||
manga.last_update = dateFetch
|
if (dateFetch == 0L) {
|
||||||
|
if (toAdd.isNotEmpty())
|
||||||
|
manga.last_update = Date().time
|
||||||
|
}
|
||||||
|
else manga.last_update = dateFetch
|
||||||
db.updateLastUpdated(manga).executeAsBlocking()
|
db.updateLastUpdated(manga).executeAsBlocking()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user