|
@@ -631,7 +631,7 @@
|
|
|
NSInteger reportInterval = [content ks_integerValueForKey:@"interval"];
|
|
|
// 下载midi文件
|
|
|
BOOL hasSaveSong = [self checkSongHasSaveWithSongUrl:midiUrl];
|
|
|
- NSString *fileName = [[midiUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [midiUrl getUrlFileName];
|
|
|
NSString *filePath = [self getFilePathWithName:fileName];
|
|
|
if (hasSaveSong) {
|
|
|
[self configPlayerEngineWithSong:filePath reportTime:reportInterval];
|
|
@@ -814,7 +814,7 @@
|
|
|
NSDictionary *content = [parm ks_dictionaryValueForKey:@"content"];
|
|
|
NSString *accompanyUrl = [content ks_stringValueForKey:@"accompanyUrl"];
|
|
|
if (![NSString isEmptyString:accompanyUrl]) {
|
|
|
- NSString *fileName = [[accompanyUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [accompanyUrl getUrlFileName];
|
|
|
NSString *filePath = [self getAccompanyFilePathWithName:fileName];
|
|
|
NSURL *fileUrl = [[NSURL alloc] initFileURLWithPath:filePath];
|
|
|
self.accompanyUrl = accompanyUrl;
|
|
@@ -1047,7 +1047,7 @@
|
|
|
}else{
|
|
|
NSLog(@"已创建文件夹");
|
|
|
}
|
|
|
- NSString *fileName = [[midiUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [midiUrl getUrlFileName];
|
|
|
NSString *tempPath = [filePath stringByAppendingPathComponent:fileName];
|
|
|
BOOL success = [sourceData writeToFile:tempPath atomically:NO];
|
|
|
return success;
|
|
@@ -1061,7 +1061,7 @@
|
|
|
|
|
|
- (BOOL)checkSongHasSaveWithSongUrl:(NSString *)songUrl {
|
|
|
BOOL hasSaveFile = NO;
|
|
|
- NSString *fileName = [[songUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [songUrl getUrlFileName];
|
|
|
NSString *filePath = [self getFilePathWithName:fileName];
|
|
|
|
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
@@ -1574,7 +1574,7 @@
|
|
|
}else{
|
|
|
NSLog(@"已创建文件夹");
|
|
|
}
|
|
|
- NSString *fileName = [[accompanyUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [accompanyUrl getUrlFileName];
|
|
|
NSString *tempPath = [filePath stringByAppendingPathComponent:fileName];
|
|
|
BOOL success = [sourceData writeToFile:tempPath atomically:NO];
|
|
|
return success;
|
|
@@ -1587,7 +1587,7 @@
|
|
|
|
|
|
- (BOOL)checkSongHasSaveAccompanyWithSongUrl:(NSString *)songUrl {
|
|
|
BOOL hasSaveFile = NO;
|
|
|
- NSString *fileName = [[songUrl componentsSeparatedByString:@"/"] lastObject];
|
|
|
+ NSString *fileName = [songUrl getUrlFileName];
|
|
|
NSString *filePath = [self getAccompanyFilePathWithName:fileName];
|
|
|
|
|
|
NSFileManager *fileManager = [NSFileManager defaultManager];
|