Przeglądaj źródła

VLCHTTPFileDownloader: Post NewFileAdded notification

Soomin Lee 7 lat temu
rodzic
commit
a83d2edca3

+ 3 - 0
Sources/VLCHTTPFileDownloader.m

@@ -204,6 +204,9 @@
     if ([fileManager fileExistsAtPath:_filePath]) {
         [fileManager moveItemAtPath:_filePath toPath:finalFilePath error:nil];
         [[VLCMediaFileDiscoverer sharedInstance] performSelectorOnMainThread:@selector(updateMediaList) withObject:nil waitUntilDone:NO];
+        // FIXME: Replace notifications by cleaner observers
+        [[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.VLCNewFileAddedNotification
+                                                            object:self];
     }
 
     [self.delegate downloadEnded];

+ 1 - 1
Sources/VLCHTTPUploaderController.m

@@ -25,7 +25,7 @@
 #import <arpa/inet.h>
 
 #if TARGET_OS_IOS
-#import "VLC_iOS-Swift.h"
+#import "VLC-Swift.h"
 #import "VLCMediaFileDiscoverer.h"
 #endif