mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-14 16:24:34 -05:00
Delete outdated thumbnails when inserting mangas into database (#739)
In case the database got deleted without deleting cached/downloaded thumbnails, the next time a manga gets inserted, it's possible that a thumbnail was already downloaded for its id. This then causes mangas to be displayed with incorrect thumbnails due to using the outdated cached/downloaded thumbnails
This commit is contained in:
@@ -329,7 +329,7 @@ object Manga {
|
||||
return fetchMangaThumbnail(mangaId)
|
||||
}
|
||||
|
||||
private fun clearThumbnail(mangaId: Int) {
|
||||
fun clearThumbnail(mangaId: Int) {
|
||||
val fileName = mangaId.toString()
|
||||
|
||||
clearCachedImage(applicationDirs.tempThumbnailCacheRoot, fileName)
|
||||
|
||||
Reference in New Issue
Block a user