{"action":"created","issue":{"url":"https://api.github.com/repos/Codeusa/Strike/issues/4","labels_url":"https://api.github.com/repos/Codeusa/Strike/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Codeusa/Strike/issues/4/comments","events_url":"https://api.github.com/repos/Codeusa/Strike/issues/4/events","html_url":"https://github.com/Codeusa/Strike/issues/4","id":65054825,"number":4,"title":"Search endpoint size field returns both integers and floating point numbers.","user":{"login":"bemasher","id":79724,"avatar_url":"https://avatars.githubusercontent.com/u/79724?v=3","gravatar_id":"","url":"https://api.github.com/users/bemasher","html_url":"https://github.com/bemasher","followers_url":"https://api.github.com/users/bemasher/followers","following_url":"https://api.github.com/users/bemasher/following{/other_user}","gists_url":"https://api.github.com/users/bemasher/gists{/gist_id}","starred_url":"https://api.github.com/users/bemasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemasher/subscriptions","organizations_url":"https://api.github.com/users/bemasher/orgs","repos_url":"https://api.github.com/users/bemasher/repos","events_url":"https://api.github.com/users/bemasher/events{/privacy}","received_events_url":"https://api.github.com/users/bemasher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-29T12:10:36Z","updated_at":"2015-04-06T03:07:10Z","closed_at":null,"body":"The size field in the torrent list returned by the search endpoint returns both integers and floating point numbers. Since this field is in bytes, it doesn't make sense for it to return a floating point number.\r\n\r\nhttps://getstrike.net/api/v2/torrents/search/?phrase=Linux\r\n```json\r\n{\r\n\t\"results\": 100,\r\n\t\"statuscode\": 200,\r\n\t\"responsetime\": 0.0026,\r\n\t\"torrents\": [\r\n\t\t{\r\n\t\t\t\"torrent_hash\": \"C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30\",\r\n\t\t\t\"torrent_title\": \"kali linux 1.1.0 i386\",\r\n\t\t\t\"torrent_category\": \"Applications\",\r\n\t\t\t\"sub_category\": \"\",\r\n\t\t\t\"seeds\": 1081,\r\n\t\t\t\"leeches\": 224,\r\n\t\t\t\"file_count\": 2,\r\n\t\t\t\"size\": 3156800962.56,\r\n\t\t\t\"download_count\": 4,\r\n\t\t\t\"upload_date\": \"Feb  9, 2015\",\r\n\t\t\t\"uploader_username\": \"WuffAndre\",\r\n\t\t\t\"page\": \"https://getstrike.net/torrents/C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30\",\r\n\t\t\t\"rss_feed\": \"https://getstrike.net/torrents/C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30?rss=1\",\r\n\t\t\t\"magnet_uri\": \"magnet:?xt=urn:btih:C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30&dn=kali+linux+1.1.0+i386&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"torrent_hash\": \"B425907E5755031BDA4A8D1B6DCCACA97DA14C04\",\r\n\t\t\t\"torrent_title\": \"Arch Linux 2015.01.01 (x86/x64)\",\r\n\t\t\t\"torrent_category\": \"Applications\",\r\n\t\t\t\"sub_category\": \"\",\r\n\t\t\t\"seeds\": 645,\r\n\t\t\t\"leeches\": 13,\r\n\t\t\t\"file_count\": 1,\r\n\t\t\t\"size\": 615514112,\r\n\t\t\t\"download_count\": 14,\r\n\t\t\t\"upload_date\": \"Jan  6, 2015\",\r\n\t\t\t\"uploader_username\": \"The_Doctor-\",\r\n\t\t\t\"page\": \"https://getstrike.net/torrents/B425907E5755031BDA4A8D1B6DCCACA97DA14C04\",\r\n\t\t\t\"rss_feed\": \"https://getstrike.net/torrents/B425907E5755031BDA4A8D1B6DCCACA97DA14C04?rss=1\",\r\n\t\t\t\"magnet_uri\": \"magnet:?xt=urn:btih:B425907E5755031BDA4A8D1B6DCCACA97DA14C04&dn=Arch+Linux+2015.01.01+%28x86%2Fx64%29&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969\"\r\n\t\t}\r\n\t]\r\n}\r\n```\r\n\r\nThe size field returned from the info endpoint also doesn't match the size field returned by the search endpoint when it is a floating point number.\r\n\r\nhttps://getstrike.net/api/v2/torrents/info/?hashes=C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30,B425907E5755031BDA4A8D1B6DCCACA97DA14C04\r\n\r\n```json\r\n{\r\n\t\"results\": 2,\r\n\t\"statuscode\": 200,\r\n\t\"responsetime\": 0.0041,\r\n\t\"torrents\": [\r\n\t\t{\r\n\t\t\t\"torrent_hash\": \"C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30\",\r\n\t\t\t\"torrent_title\": \"kali linux 1.1.0 i386\",\r\n\t\t\t\"torrent_category\": \"Applications\",\r\n\t\t\t\"sub_category\": \"\",\r\n\t\t\t\"seeds\": 1081,\r\n\t\t\t\"leeches\": 224,\r\n\t\t\t\"file_count\": 2,\r\n\t\t\t\"size\": 3159539781,\r\n\t\t\t\"upload_date\": \"Feb  9, 2015\",\r\n\t\t\t\"uploader_username\": \"WuffAndre\",\r\n\t\t\t\"file_info\": {\r\n\t\t\t\t\"file_names\": [\r\n\t\t\t\t\t\"kali-linux-1.1.0-i386\\\\kali-linux-1.1.0-i386.iso\",\r\n\t\t\t\t\t\" kali-linux-1.1.0-i386\\\\kali-linux-1.1.0-i386.txt.sha1sum\"\r\n\t\t\t\t],\r\n\t\t\t\t\"file_lengths\": [\r\n\t\t\t\t\t3159539712,\r\n\t\t\t\t\t69\r\n\t\t\t\t]\r\n\t\t\t},\r\n\t\t\t\"magnet_uri\": \"magnet:?xt=urn:btih:C83D42BADAD00026C6CB8D839DC2A78CE7AD6A30&dn=kali+linux+1.1.0+i386&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969\"\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"torrent_hash\": \"B425907E5755031BDA4A8D1B6DCCACA97DA14C04\",\r\n\t\t\t\"torrent_title\": \"Arch Linux 2015.01.01 (x86/x64)\",\r\n\t\t\t\"torrent_category\": \"Applications\",\r\n\t\t\t\"sub_category\": \"\",\r\n\t\t\t\"seeds\": 645,\r\n\t\t\t\"leeches\": 13,\r\n\t\t\t\"file_count\": 1,\r\n\t\t\t\"size\": 615514112,\r\n\t\t\t\"upload_date\": \"Jan  6, 2015\",\r\n\t\t\t\"uploader_username\": \"The_Doctor-\",\r\n\t\t\t\"file_info\": {\r\n\t\t\t\t\"file_names\": [\r\n\t\t\t\t\t\"archlinux-2015.01.01-dual.iso\"\r\n\t\t\t\t],\r\n\t\t\t\t\"file_lengths\": [\r\n\t\t\t\t\t615514112\r\n\t\t\t\t]\r\n\t\t\t},\r\n\t\t\t\"magnet_uri\": \"magnet:?xt=urn:btih:B425907E5755031BDA4A8D1B6DCCACA97DA14C04&dn=Arch+Linux+2015.01.01+%28x86%2Fx64%29&tr=udp://open.demonii.com:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://exodus.desync.com:6969\"\r\n\t\t}\r\n\t]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Codeusa/Strike/issues/comments/89899248","html_url":"https://github.com/Codeusa/Strike/issues/4#issuecomment-89899248","issue_url":"https://api.github.com/repos/Codeusa/Strike/issues/4","id":89899248,"user":{"login":"bemasher","id":79724,"avatar_url":"https://avatars.githubusercontent.com/u/79724?v=3","gravatar_id":"","url":"https://api.github.com/users/bemasher","html_url":"https://github.com/bemasher","followers_url":"https://api.github.com/users/bemasher/followers","following_url":"https://api.github.com/users/bemasher/following{/other_user}","gists_url":"https://api.github.com/users/bemasher/gists{/gist_id}","starred_url":"https://api.github.com/users/bemasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemasher/subscriptions","organizations_url":"https://api.github.com/users/bemasher/orgs","repos_url":"https://api.github.com/users/bemasher/repos","events_url":"https://api.github.com/users/bemasher/events{/privacy}","received_events_url":"https://api.github.com/users/bemasher/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T03:07:10Z","updated_at":"2015-04-06T03:07:10Z","body":"The size field now appears to match between the two endpoints but the size reported doesn't match the sum of the file_lengths array given in the info endpoint.\r\n\r\nC83D42BADAD00026C6CB8D839DC2A78CE7AD6A30:\r\n3156800963 != 3159539712 + 69\r\n\r\n57D992F7166F6A4AEDE7C61B27F0949298529F29:\r\n25165824 != 25165824 + 74\r\n\r\n7C7DCA2AC0D7D5C3526FB21FD52B260E6967719E:\r\n4541927916 != 4540556517 + 2665 + 1171 + 1016764 + 34"}}