|
@@ -322,16 +322,19 @@
|
|
|
}
|
|
|
|
|
|
- (void)refreshPlayView {
|
|
|
- if (xsbr_buddhisMusicPlayer().xsbr_musicListArray.count == 0) {
|
|
|
- return;
|
|
|
- }
|
|
|
- [self refreshPlayViewIsPlay:xsbr_buddhisMusicPlayer().xsbr_isPlaying];
|
|
|
- XSBRMusicItemModel *model = xsbr_buddhisMusicPlayer().xsbr_musicListArray[xsbr_buddhisMusicPlayer().xsbr_currentIndex];
|
|
|
- [_lyricViewController reloadData:model];
|
|
|
- @weakify(self)
|
|
|
- [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:model.xsbr_imgPath] options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
|
|
- [weak_self handleBackgroundImage:image musicId:model.xsbr_musicId];
|
|
|
- }];
|
|
|
+ dispatch_main_async_safe(^{
|
|
|
+ if (xsbr_buddhisMusicPlayer().xsbr_musicListArray.count == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ [self refreshPlayViewIsPlay:xsbr_buddhisMusicPlayer().xsbr_isPlaying];
|
|
|
+ XSBRMusicItemModel *model = xsbr_buddhisMusicPlayer().xsbr_musicListArray[xsbr_buddhisMusicPlayer().xsbr_currentIndex];
|
|
|
+ [self->_lyricViewController reloadData:model];
|
|
|
+ @weakify(self)
|
|
|
+ [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:model.xsbr_imgPath] options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
|
|
+ [weak_self handleBackgroundImage:image musicId:model.xsbr_musicId];
|
|
|
+ }];
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|