Commit fd155dce authored by Soomin Lee's avatar Soomin Lee

Use kVLCHTTPUploadDirectory constant

parent 941379b0
......@@ -67,7 +67,7 @@
self.discoveredFiles = [NSMutableArray array];
NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
discoverer.directoryPath = [[searchPaths firstObject] stringByAppendingPathComponent:@"Upload"];
discoverer.directoryPath = [[searchPaths firstObject] stringByAppendingPathComponent:kVLCHTTPUploadDirectory];
[discoverer addObserver:self];
[discoverer startDiscovering];
......
......@@ -75,6 +75,7 @@
#define kVLCRecentURLTitles @"recent-url-titles"
#define kVLCPrivateWebStreaming @"private-streaming"
#define kVLChttpScanSubtitle @"http-scan-subtitle"
#define kVLCHTTPUploadDirectory @"Upload"
#define kSupportedFileExtensions @"\\.(3g2|3gp|3gp2|3gpp|amv|asf|avi|bik|bin|crf|divx|drc|dv|evo|f4v|flv|gvi|gxf|iso|m1v|m2v|m2t|m2ts|m4v|mkv|mov|mp2|mp2v|mp4|mp4v|mpe|mpeg|mpeg1|mpeg2|mpeg4|mpg|mpv2|mts|mtv|mxf|mxg|nsv|nuv|ogg|ogm|ogv|ogx|ps|rec|rm|rmvb|rpl|thp|tod|ts|tts|txd|vlc|vob|vro|webm|wm|wmv|wtv|xesc)$"
#define kSupportedSubtitleFileExtensions @"\\.(cdg|idx|srt|sub|utf|ass|ssa|aqt|jss|psb|rt|smi|txt|smil|stl|usf|dks|pjs|mpl2|mks|vtt|ttml|dfxp)$"
......
......@@ -622,7 +622,7 @@
// create the path where to store the media temporarily
NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *uploadDirPath = [searchPaths[0] stringByAppendingPathComponent:@"Upload"];
NSString *uploadDirPath = [searchPaths[0] stringByAppendingPathComponent:kVLCHTTPUploadDirectory];
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDir = YES;
......
......@@ -150,7 +150,7 @@ willPerformHTTPRedirection:(NSHTTPURLResponse *)response
[fileManager removeItemAtURL:downloadTask.fileURL error:nil];
NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *basePath = [[searchPaths firstObject] stringByAppendingPathComponent:@"Upload"];
NSString *basePath = [[searchPaths firstObject] stringByAppendingPathComponent:kVLCHTTPUploadDirectory];
downloadTask.fileName = [[newUrl lastPathComponent] stringByRemovingPercentEncoding];
downloadTask.fileURL = [NSURL fileURLWithPath:[basePath stringByAppendingPathComponent:downloadTask.fileName]];
......
......@@ -305,7 +305,7 @@
NSString *fileName = [filepath lastPathComponent];
NSString *libraryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];
NSString *uploadPath = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)
firstObject] stringByAppendingPathComponent:@"Upload"];
firstObject] stringByAppendingPathComponent:kVLCHTTPUploadDirectory];
NSString *finalFilePath = [libraryPath
stringByAppendingString:[filepath
......@@ -359,7 +359,7 @@
return;
NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString* uploadDirPath = [searchPaths[0] stringByAppendingPathComponent:@"Upload"];
NSString* uploadDirPath = [searchPaths[0] stringByAppendingPathComponent:kVLCHTTPUploadDirectory];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:uploadDirPath])
[fileManager removeItemAtPath:uploadDirPath error:nil];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment