fix bangumi track will override record to 0 after every track search(bind) (#2486)
* fix bangumi track : the update status api must be called before update chapter api
* fix bangumi track will override record to 0 after every track search(bind)
(cherry picked from commit 427d2fed8c
)
This commit is contained in:
parent
d8e3fe542d
commit
005ac9e732
@ -41,7 +41,7 @@ class Bangumi(private val context: Context, id: Int) : TrackService(id) {
|
|||||||
track.library_id = remoteTrack.library_id
|
track.library_id = remoteTrack.library_id
|
||||||
track.status = remoteTrack.status
|
track.status = remoteTrack.status
|
||||||
track.last_chapter_read = remoteTrack.last_chapter_read
|
track.last_chapter_read = remoteTrack.last_chapter_read
|
||||||
update(track)
|
refresh(track)
|
||||||
} else {
|
} else {
|
||||||
// Set default fields if it's not found in the list
|
// Set default fields if it's not found in the list
|
||||||
track.score = DEFAULT_SCORE.toFloat()
|
track.score = DEFAULT_SCORE.toFloat()
|
||||||
|
@ -59,12 +59,12 @@ class BangumiApi(private val client: OkHttpClient, interceptor: BangumiIntercept
|
|||||||
.url("$apiUrl/collection/${track.media_id}/update")
|
.url("$apiUrl/collection/${track.media_id}/update")
|
||||||
.post(sbody)
|
.post(sbody)
|
||||||
.build()
|
.build()
|
||||||
return authClient.newCall(request)
|
return authClient.newCall(srequest)
|
||||||
.asObservableSuccess()
|
.asObservableSuccess()
|
||||||
.map {
|
.map {
|
||||||
track
|
track
|
||||||
}.flatMap {
|
}.flatMap {
|
||||||
authClient.newCall(srequest)
|
authClient.newCall(request)
|
||||||
.asObservableSuccess()
|
.asObservableSuccess()
|
||||||
.map {
|
.map {
|
||||||
track
|
track
|
||||||
|
Loading…
Reference in New Issue
Block a user