|
@@ -70,16 +70,27 @@
|
|
|
[super viewDidAppear:animated];
|
|
|
|
|
|
if(_outSideDataModel && _isfirstEnterType){
|
|
|
+
|
|
|
[[DFPlayer sharedPlayer] df_pause];
|
|
|
[[DFPlayer sharedPlayer] df_reloadData];//需在传入数据源后调用
|
|
|
|
|
|
[self setTitleFunByIndex];
|
|
|
|
|
|
- //if(_isfirstEnterType){
|
|
|
- KWeakSelf
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
- [weakSelf playAudioFun];
|
|
|
- });
|
|
|
+ //begin 20240729 修复音频播放时,进入播放列表点击当前播放歌曲后,会重头播放
|
|
|
+ if([DFPlayer sharedPlayer].currentAudioModel){
|
|
|
+ NSString *filePath = _outSideDataModel.path;
|
|
|
+
|
|
|
+ if([[DFPlayer sharedPlayer].currentAudioModel.filePath isEqualToString:filePath]){
|
|
|
+ [[DFPlayer sharedPlayer] df_play];
|
|
|
+ return;//不重新播放
|
|
|
+ }
|
|
|
+ }//end 20240729 修复音频播放时,进入播放列表点击当前播放歌曲后,会重头播放
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [weakSelf playAudioFun];
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
else{//点击playingview 进来的
|
|
|
|
|
@@ -650,7 +661,6 @@
|
|
|
|
|
|
KWeakSelf
|
|
|
vc.didNeedToRegetAudioPlayListFun = ^{
|
|
|
- [weakSelf.audioPlayListV reGetDataFun];
|
|
|
[weakSelf AddNewAudioToListFun];
|
|
|
};
|
|
|
}
|
|
@@ -659,6 +669,11 @@
|
|
|
- (void)AddNewAudioToListFun
|
|
|
{
|
|
|
[[DFPlayer sharedPlayer] df_reloadData];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [weakSelf.audioPlayListV reGetDataFun];
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
#pragma mark 处理一些UI问题
|
|
@@ -689,6 +704,7 @@
|
|
|
lastFileModel *yourModel = localList[i];
|
|
|
DFPlayerModel *model = [[DFPlayerModel alloc] init];
|
|
|
model.audioId = i;//****重要。AudioId从0开始,仅标识当前音频在数组中的位置。
|
|
|
+ model.filePath = yourModel.path;
|
|
|
|
|
|
NSString *filePath = yourModel.path;
|
|
|
NSString *urlStr = ksharedAppDelegate.NASFileByBoxService;
|
|
@@ -702,6 +718,13 @@
|
|
|
HLog(@"%@",curURL.absoluteString);
|
|
|
[_dataArray addObject:model];
|
|
|
[_allAudioDataArray addObject:yourModel];
|
|
|
+
|
|
|
+ //20240729 修复添加音乐时显示名称不对
|
|
|
+ if([DFPlayer sharedPlayer].currentAudioModel){
|
|
|
+ if([[DFPlayer sharedPlayer].currentAudioModel.audioUrl.absoluteString isEqualToString:curURL.absoluteString]){
|
|
|
+ _index = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -724,6 +747,7 @@
|
|
|
model.audioId = 0;//****重要。AudioId从0开始,仅标识当前音频在数组中的位置。
|
|
|
|
|
|
NSString *filePath = lastFileMod.path;
|
|
|
+ model.filePath = filePath;
|
|
|
|
|
|
BOOL isInLocalListType = NO;
|
|
|
|