Kaynağa Gözat

Fix multi FTP download file

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Pierre SAGASPE 11 yıl önce
ebeveyn
işleme
dae89c60e2
1 değiştirilmiş dosya ile 7 ekleme ve 5 silme
  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);