소스 검색

VLCHTTPFileDownloader: Post NewFileAdded notification

Soomin Lee 7 년 전
부모
커밋
a83d2edca3
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      Sources/VLCHTTPFileDownloader.m
  2. 1 1
      Sources/VLCHTTPUploaderController.m

+ 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