Sfoglia il codice sorgente

Fix multi FTP download file

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 11 anni fa
parent
commit
dae89c60e2
1 ha cambiato i file con 7 aggiunte e 5 eliminazioni
  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);