Skip to content

Commit

Permalink
fix bug: "PlayerService#onRetrieveMusicItemUri(MusicItem, SoundQualit…
Browse files Browse the repository at this point in the history
…y, AsyncResult<Uri>)"
  • Loading branch information
jrfeng committed Mar 7, 2021
1 parent 1b1f8ff commit b1b8865
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions player/src/main/java/snow/player/PlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -1150,12 +1150,17 @@ protected Uri onRetrieveMusicItemUri(@NonNull MusicItem musicItem, @NonNull Soun
* @param musicItem 要播放的音乐
* @param soundQuality 要播放的音乐的音质
* @param result 用于接收异步任务的结果值
* @throws Exception 获取音乐播放链接的过程中发生的任何异常
*/
protected void onRetrieveMusicItemUri(@NonNull MusicItem musicItem,
@NonNull SoundQuality soundQuality,
@NonNull AsyncResult<Uri> result) throws Exception {
result.onSuccess(onRetrieveMusicItemUri(musicItem, soundQuality));
@NonNull AsyncResult<Uri> result) {
try {
result.onSuccess(onRetrieveMusicItemUri(musicItem, soundQuality));
} catch (Exception e) {
if (!result.isCancelled()) {
result.onError(e);
}
}
}

/**
Expand Down

0 comments on commit b1b8865

Please sign in to comment.