{"action":"created","issue":{"url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/29","repository_url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager","labels_url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/29/comments","events_url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/29/events","html_url":"https://github.com/mzeeshanid/MZDownloadManager/issues/29","id":194933086,"number":29,"title":"Bunch of downloads tracking","user":{"login":"andrealufino","id":758939,"avatar_url":"https://avatars.githubusercontent.com/u/758939?v=3","gravatar_id":"","url":"https://api.github.com/users/andrealufino","html_url":"https://github.com/andrealufino","followers_url":"https://api.github.com/users/andrealufino/followers","following_url":"https://api.github.com/users/andrealufino/following{/other_user}","gists_url":"https://api.github.com/users/andrealufino/gists{/gist_id}","starred_url":"https://api.github.com/users/andrealufino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrealufino/subscriptions","organizations_url":"https://api.github.com/users/andrealufino/orgs","repos_url":"https://api.github.com/users/andrealufino/repos","events_url":"https://api.github.com/users/andrealufino/events{/privacy}","received_events_url":"https://api.github.com/users/andrealufino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-12T10:02:17Z","updated_at":"2016-12-12T18:04:26Z","closed_at":null,"body":"Hi guys, what if I need to download a bunch of files? I don't know how many files I have to download, it depends on the server, but I'd like to be able to track the download of every single file understanding when it finished. Is it possible? For example, adding a whole array of urls and not one by one maybe.. do you have some suggestion? "},"comment":{"url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/comments/266504393","html_url":"https://github.com/mzeeshanid/MZDownloadManager/issues/29#issuecomment-266504393","issue_url":"https://api.github.com/repos/mzeeshanid/MZDownloadManager/issues/29","id":266504393,"user":{"login":"mzeeshanid","id":2767152,"avatar_url":"https://avatars.githubusercontent.com/u/2767152?v=3","gravatar_id":"","url":"https://api.github.com/users/mzeeshanid","html_url":"https://github.com/mzeeshanid","followers_url":"https://api.github.com/users/mzeeshanid/followers","following_url":"https://api.github.com/users/mzeeshanid/following{/other_user}","gists_url":"https://api.github.com/users/mzeeshanid/gists{/gist_id}","starred_url":"https://api.github.com/users/mzeeshanid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzeeshanid/subscriptions","organizations_url":"https://api.github.com/users/mzeeshanid/orgs","repos_url":"https://api.github.com/users/mzeeshanid/repos","events_url":"https://api.github.com/users/mzeeshanid/events{/privacy}","received_events_url":"https://api.github.com/users/mzeeshanid/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T18:04:26Z","updated_at":"2016-12-12T18:04:26Z","body":"Yes you can limit concurrent downloads. For example see the code sample below:\r\n\r\n```\r\nlet ongoingTasks = mzDownloadingViewObj?.downloadManager.downloadingArray.filter({ (fileModel: MZDownloadModel) -> Bool in\r\n            return fileModel.status == TaskStatus.downloading.description()\r\n        })\r\n        if (ongoingTasks?.count)! <= 5 {\r\n            mzDownloadingViewObj?.downloadManager.addDownloadTask(fileName as String, fileURL: fileURL.addingPercentEscapes(using: String.Encoding.utf8.rawValue)!, destinationPath: myDownloadPath)\r\n        }\r\n\r\n```\r\n\r\nWhen some task is finished it will call the delegate and you can add new task there.\r\n\r\nMore over you can use the fileURL property. Every file on your server must have unique url."}}
{"actor":{"display_login":"mzeeshanid"}}