update Anilist tracking title during refresh (#5760)

Co-authored-by: Andreas <andreas.everos@gmail.com>

Co-authored-by: Andreas <andreas.everos@gmail.com>
This commit is contained in:
nicki 2021-08-21 20:21:20 +05:30 committed by GitHub
parent f8a7efbce7
commit 50b282f58b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -182,6 +182,7 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) {
override suspend fun refresh(track: Track): Track { override suspend fun refresh(track: Track): Track {
val remoteTrack = api.getLibManga(track, getUsername().toInt()) val remoteTrack = api.getLibManga(track, getUsername().toInt())
track.copyPersonalFrom(remoteTrack) track.copyPersonalFrom(remoteTrack)
track.title = remoteTrack.title
track.total_chapters = remoteTrack.total_chapters track.total_chapters = remoteTrack.total_chapters
return track return track
} }

View file

@ -51,6 +51,7 @@ data class ALUserManga(
fun toTrack() = Track.create(TrackManager.ANILIST).apply { fun toTrack() = Track.create(TrackManager.ANILIST).apply {
media_id = manga.media_id media_id = manga.media_id
title = manga.title_user_pref
status = toTrackStatus() status = toTrackStatus()
score = score_raw.toFloat() score = score_raw.toFloat()
started_reading_date = start_date_fuzzy started_reading_date = start_date_fuzzy