Skip to content

Commit

Permalink
Fixed like don't work with video
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrave-dev committed Jun 26, 2024
1 parent e5365c3 commit 936c875
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ class SimpleMediaServiceHandler(
toggleLikeJob?.cancel()
toggleLikeJob =
coroutineScope.launch {
var id = (player.currentMediaItem?.mediaId ?: "" )
if (id.contains("Video")) {
id = id.removePrefix("Video")
}
mainRepository.updateLikeStatus(
player.currentMediaItem?.mediaId ?: "",
id,
if (!(_liked.value)) 1 else 0,
)
delay(500)
Expand Down

0 comments on commit 936c875

Please sign in to comment.