mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 23:29:16 +01:00
Avoid replacing covers with null when updating library (sort of closes #3194)
This commit is contained in:
parent
a2ece82197
commit
e6bc181e7a
@ -336,9 +336,15 @@ class LibraryUpdateService(
|
|||||||
// Update manga details metadata in the background
|
// Update manga details metadata in the background
|
||||||
if (preferences.autoUpdateMetadata()) {
|
if (preferences.autoUpdateMetadata()) {
|
||||||
source.fetchMangaDetails(manga)
|
source.fetchMangaDetails(manga)
|
||||||
.map { networkManga ->
|
.map { updatedManga ->
|
||||||
manga.prepUpdateCover(coverCache, networkManga, false)
|
// Avoid "losing" covers
|
||||||
manga.copyFrom(networkManga)
|
if (updatedManga.thumbnail_url != null) {
|
||||||
|
manga.prepUpdateCover(coverCache, updatedManga, false)
|
||||||
|
} else {
|
||||||
|
updatedManga.thumbnail_url = manga.thumbnail_url
|
||||||
|
}
|
||||||
|
|
||||||
|
manga.copyFrom(updatedManga)
|
||||||
db.insertManga(manga).executeAsBlocking()
|
db.insertManga(manga).executeAsBlocking()
|
||||||
manga
|
manga
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user