Clean up manga restoring logic

Some behavior changes:
- It prioritizes new entries, then anything more recently updated
- It copies the more recently updated entry's metadata (description, thumbnail, etc.)

(cherry picked from commit 58daedc89ee18d04e7af5bab12629680dba4096c)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt
#	app/src/main/java/eu/kanade/tachiyomi/source/model/SMangaExtensions.kt
This commit is contained in:
arkon
2023-12-14 23:26:02 -05:00
committed by Jobobby04
parent 6f82c9c867
commit 9eb99fb10f
6 changed files with 165 additions and 262 deletions
@@ -6,7 +6,7 @@ import tachiyomi.domain.manga.repository.MangaRepository
class GetMangaByUrlAndSourceId(
private val mangaRepository: MangaRepository,
) {
suspend fun awaitManga(url: String, sourceId: Long): Manga? {
suspend fun await(url: String, sourceId: Long): Manga? {
return mangaRepository.getMangaByUrlAndSourceId(url, sourceId)
}
}