Ver código fonte

Fix multi FTP download file

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 11 anos atrás
pai
commit
dae89c60e2
1 arquivos alterados com 7 adições e 5 exclusões
  1. 7 5
      Sources/VLCDownloadViewController.m

+ 7 - 5
Sources/VLCDownloadViewController.m

@@ -166,11 +166,13 @@
                 downloadWasStarted = YES;
             }
         } else if ([downloadScheme isEqualToString:@"ftp"]) {
-            _currentDownloadType = kVLCDownloadViaFTP;
-            [self _downloadFTPFile:_currentDownloads[0]];
-            _humanReadableFilename = [_currentDownloads[0] lastPathComponent];
-            [_currentDownloads removeObjectAtIndex:0];
-            [_currentDownloadFilename removeObjectAtIndex:0];
+            if (!_FTPDownloadRequest) {
+                _currentDownloadType = kVLCDownloadViaFTP;
+                [self _downloadFTPFile:_currentDownloads[0]];
+                _humanReadableFilename = [_currentDownloads[0] lastPathComponent];
+                [_currentDownloads removeObjectAtIndex:0];
+                [_currentDownloadFilename removeObjectAtIndex:0];
+            }
             downloadWasStarted = YES;
         } else
             APLog(@"Unknown download scheme '%@'", downloadScheme);