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.)
This commit is contained in:
arkon
2023-12-14 23:26:02 -05:00
parent d20a8fcf13
commit 58daedc89e
6 changed files with 150 additions and 203 deletions

View File

@ -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)
}
}