{"action":"created","issue":{"url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/1022","repository_url":"https://api.github.com/repos/lingochamp/FileDownloader","labels_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/1022/comments","events_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/1022/events","html_url":"https://github.com/lingochamp/FileDownloader/issues/1022","id":319834582,"number":1022,"title":"TaskID does not place in Integer","user":{"login":"mahdihs76","id":24273605,"avatar_url":"https://avatars0.githubusercontent.com/u/24273605?v=4","gravatar_id":"","url":"https://api.github.com/users/mahdihs76","html_url":"https://github.com/mahdihs76","followers_url":"https://api.github.com/users/mahdihs76/followers","following_url":"https://api.github.com/users/mahdihs76/following{/other_user}","gists_url":"https://api.github.com/users/mahdihs76/gists{/gist_id}","starred_url":"https://api.github.com/users/mahdihs76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahdihs76/subscriptions","organizations_url":"https://api.github.com/users/mahdihs76/orgs","repos_url":"https://api.github.com/users/mahdihs76/repos","events_url":"https://api.github.com/users/mahdihs76/events{/privacy}","received_events_url":"https://api.github.com/users/mahdihs76/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-03T08:48:29Z","updated_at":"2018-05-03T11:29:04Z","closed_at":"2018-05-03T11:29:04Z","author_association":"NONE","body":"Hello guys.\r\nWhen I started download task, library gives me negative task id. I guess id does not place in (int) primitive.\r\nThis problem occurs in big files.\r\nI guess it will be fixed by replacing this type to (long).\r\n`        BaseDownloadTask.IRunningTask runningTask = FileDownloadList.getImpl().get(fileRow.getDownloadTaskId());\r\n`\r\nin this part runningTask will be null.\r\n"},"comment":{"url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/comments/386264618","html_url":"https://github.com/lingochamp/FileDownloader/issues/1022#issuecomment-386264618","issue_url":"https://api.github.com/repos/lingochamp/FileDownloader/issues/1022","id":386264618,"user":{"login":"rantianhua","id":7328707,"avatar_url":"https://avatars2.githubusercontent.com/u/7328707?v=4","gravatar_id":"","url":"https://api.github.com/users/rantianhua","html_url":"https://github.com/rantianhua","followers_url":"https://api.github.com/users/rantianhua/followers","following_url":"https://api.github.com/users/rantianhua/following{/other_user}","gists_url":"https://api.github.com/users/rantianhua/gists{/gist_id}","starred_url":"https://api.github.com/users/rantianhua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantianhua/subscriptions","organizations_url":"https://api.github.com/users/rantianhua/orgs","repos_url":"https://api.github.com/users/rantianhua/repos","events_url":"https://api.github.com/users/rantianhua/events{/privacy}","received_events_url":"https://api.github.com/users/rantianhua/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T11:29:04Z","updated_at":"2018-05-03T11:29:04Z","author_association":"CONTRIBUTOR","body":"Below is the code for generating id:\r\n```\r\n    @Override\r\n    public int generateId(String url, String path, boolean pathAsDirectory) {\r\n        if (pathAsDirectory) {\r\n            return FileDownloadUtils.md5(formatString(\"%sp%s@dir\", url, path)).hashCode();\r\n        } else {\r\n            return FileDownloadUtils.md5(formatString(\"%sp%s\", url, path)).hashCode();\r\n        }\r\n    }\r\n```\r\n\r\nYou can see that the id is a hash code of the string, so it's reasonable that the id is negative sometime."}}
{"actor":{"display_login":"rantianhua"}}