{"action":"created","comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/58292646","id":58292646,"diff_hunk":"@@ -33,19 +33,21 @@\n \n #include \"torrentcontentmodelitem.h\"\n \n-class TorrentContentModelFile : public TorrentContentModelItem\n+class TorrentContentModelFile: public TorrentContentModelItem\n {\n public:\n-  TorrentContentModelFile(const QString &fileName, qulonglong fileSize,\n-                          TorrentContentModelFolder* parent, int file_index);\n+    TorrentContentModelFile(const QString &fileName, qulonglong fileSize,\n+                            TorrentContentModelFolder* parent, int file_index);","path":"src/gui/torrentcontentmodelfile.h","position":11,"original_position":11,"commit_id":"e60d62acaaff0d4240e9c7a95b52d871aa8dea83","original_commit_id":"e60d62acaaff0d4240e9c7a95b52d871aa8dea83","user":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"body":"The cod is not mine.","created_at":"2016-04-02T12:27:47Z","updated_at":"2016-04-02T12:27:47Z","html_url":"https://github.com/qbittorrent/qBittorrent/pull/4994#discussion_r58292646","pull_request_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994","_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/58292646"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/4994#discussion_r58292646"},"pull_request":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994"}}},"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994","id":63781134,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/4994","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/4994.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/4994.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4994","number":4994,"state":"open","locked":false,"title":"Add availability column to torrent contents","user":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"body":"Following the path of PR #2885 and #4936 this PR proposes a new column for the \"Contents\" tab of the torrent properties. This column show current availability of the files in the pool.\r\n\r\nOne of the probable use cases for this feature is  way to make a quick estimation whether a given file of folder can be downloaded using given torrent, or it is better to look for another collection.\r\n\r\nThis is WIP code, but I want to share it early, because there are a couple of design decision which need to be done, but I feel a lack of a good criterion. Here they are.\r\n\r\n1. Availability for files is computed in a different way comparing to the progress bar: if a piece is available from many different peers, it is counted only once. This seems to be logical, since we most likely need this information to decide whether the file can be downloaded complete under current conditions. \r\n2. As well as progress and size columns here we show availability values for folders. Shall we count files which are not downloaded? Libtorrent does not provide this information for files which are seeding. So the question is: what rules to use for computing the average availability value for a folder? \r\n\r\n","created_at":"2016-03-22T19:45:21Z","updated_at":"2016-04-02T12:27:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1bf12c775843f9cf04ff262eefa78e8c3b869dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4994/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/e60d62acaaff0d4240e9c7a95b52d871aa8dea83","head":{"label":"evsh:availability-column","ref":"availability-column","sha":"e60d62acaaff0d4240e9c7a95b52d871aa8dea83","user":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"repo":{"id":31520234,"name":"qBittorrent","full_name":"evsh/qBittorrent","owner":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evsh/qBittorrent","description":"qBittorrent BitTorrent client","fork":true,"url":"https://api.github.com/repos/evsh/qBittorrent","forks_url":"https://api.github.com/repos/evsh/qBittorrent/forks","keys_url":"https://api.github.com/repos/evsh/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evsh/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evsh/qBittorrent/teams","hooks_url":"https://api.github.com/repos/evsh/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/evsh/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/evsh/qBittorrent/events","assignees_url":"https://api.github.com/repos/evsh/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/evsh/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/evsh/qBittorrent/tags","blobs_url":"https://api.github.com/repos/evsh/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evsh/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evsh/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/evsh/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evsh/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/evsh/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/evsh/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/evsh/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/evsh/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/evsh/qBittorrent/subscription","commits_url":"https://api.github.com/repos/evsh/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/evsh/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/evsh/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/evsh/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/evsh/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/evsh/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evsh/qBittorrent/merges","archive_url":"https://api.github.com/repos/evsh/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evsh/qBittorrent/downloads","issues_url":"https://api.github.com/repos/evsh/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/evsh/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/evsh/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/evsh/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evsh/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/evsh/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/evsh/qBittorrent/deployments","created_at":"2015-03-02T02:38:49Z","updated_at":"2016-02-27T17:20:24Z","pushed_at":"2016-03-31T20:13:24Z","git_url":"git://github.com/evsh/qBittorrent.git","ssh_url":"git@github.com:evsh/qBittorrent.git","clone_url":"https://github.com/evsh/qBittorrent.git","svn_url":"https://github.com/evsh/qBittorrent","homepage":"http://www.qbittorrent.org","size":121714,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qbittorrent:master","ref":"master","sha":"93d8cadaaf521e1b8d138e6eea0fe66dca52cc2f","user":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"repo":{"id":3351871,"name":"qBittorrent","full_name":"qbittorrent/qBittorrent","owner":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars.githubusercontent.com/u/2131270?v=3","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qbittorrent/qBittorrent","description":"qBittorrent BitTorrent client","fork":false,"url":"https://api.github.com/repos/qbittorrent/qBittorrent","forks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/forks","keys_url":"https://api.github.com/repos/qbittorrent/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qbittorrent/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qbittorrent/qBittorrent/teams","hooks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/events","assignees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/qbittorrent/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/tags","blobs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/qbittorrent/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscription","commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/qbittorrent/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qbittorrent/qBittorrent/merges","archive_url":"https://api.github.com/repos/qbittorrent/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qbittorrent/qBittorrent/downloads","issues_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/qbittorrent/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/qbittorrent/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/qbittorrent/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/deployments","created_at":"2012-02-04T09:37:46Z","updated_at":"2016-04-02T09:46:41Z","pushed_at":"2016-04-02T08:38:36Z","git_url":"git://github.com/qbittorrent/qBittorrent.git","ssh_url":"git@github.com:qbittorrent/qBittorrent.git","clone_url":"https://github.com/qbittorrent/qBittorrent.git","svn_url":"https://github.com/qbittorrent/qBittorrent","homepage":"http://www.qbittorrent.org","size":130405,"stargazers_count":1643,"watchers_count":1643,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":459,"mirror_url":null,"open_issues_count":1445,"forks":459,"open_issues":1445,"watchers":1643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/4994"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4994"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/4994/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/4994/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/e60d62acaaff0d4240e9c7a95b52d871aa8dea83"}}}}