From ff228c434f98c5b2930b85a34107c695105734ab Mon Sep 17 00:00:00 2001 From: Jesper Flodin Date: Thu, 23 Aug 2018 01:37:24 +0200 Subject: [PATCH] moved itunes ringtone plist check earlier --- JFTHRingtoneImporter.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/JFTHRingtoneImporter.m b/JFTHRingtoneImporter.m index 9f38f1f..f6cc256 100644 --- a/JFTHRingtoneImporter.m +++ b/JFTHRingtoneImporter.m @@ -59,6 +59,12 @@ - (void)getRingtoneFilesFromApp:(NSString *)bundleID { if ([_ringtoneData getRingtoneWithName:[self createNameFromFile:file]]) { continue; } + // Does this name already exist in itunes plist? + NSString *baseName = [self createNameFromFile:appDirFile]; + if ([_ringtoneData getITunesRingtoneWithName:baseName]) { + ALog(@"Ringtone is already in itunes plist, name: %@", baseName); + continue; + } if ([_ringtoneData getRingtoneWithHash:[FileHash md5HashOfFileAtPath:[appDirectory stringByAppendingPathComponent:file]]]) { continue; }