{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/40436484","id":40436484,"diff_hunk":"@@ -83,6 +83,9 @@ namespace VIDEO\n #define VIDEODB_DETAILS_MOVIE_DATEADDED         VIDEODB_MAX_COLUMNS + 10\n #define VIDEODB_DETAILS_MOVIE_RESUME_TIME       VIDEODB_MAX_COLUMNS + 11\n #define VIDEODB_DETAILS_MOVIE_TOTAL_TIME        VIDEODB_MAX_COLUMNS + 12\n+#define VIDEODB_DETAILS_MOVIE_RATING            VIDEODB_MAX_COLUMNS + 13\n+#define VIDEODB_DETAILS_MOVIE_VOTES             VIDEODB_MAX_COLUMNS + 14\n+#define VIDEODB_DETAILS_MOVIE_DEFAULT_RATING    VIDEODB_MAX_COLUMNS + 15","path":"xbmc/video/VideoDatabase.h","position":6,"original_position":6,"commit_id":"1ed1eb6508d80b642a76983995e38c82a4bbe714","original_commit_id":"1ed1eb6508d80b642a76983995e38c82a4bbe714","user":{"login":"phate89","id":1254959,"avatar_url":"https://avatars.githubusercontent.com/u/1254959?v=3","gravatar_id":"","url":"https://api.github.com/users/phate89","html_url":"https://github.com/phate89","followers_url":"https://api.github.com/users/phate89/followers","following_url":"https://api.github.com/users/phate89/following{/other_user}","gists_url":"https://api.github.com/users/phate89/gists{/gist_id}","starred_url":"https://api.github.com/users/phate89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phate89/subscriptions","organizations_url":"https://api.github.com/users/phate89/orgs","repos_url":"https://api.github.com/users/phate89/repos","events_url":"https://api.github.com/users/phate89/events{/privacy}","received_events_url":"https://api.github.com/users/phate89/received_events","type":"User","site_admin":false},"body":"I changed because in the view it changes the meaning. It's not the rating type anymore but it's the default rating type preferred for the media. I'll change it to VIDEODB_DETAILS_MOVIE_DEFAULT_RATING_TYPE","created_at":"2015-09-25T14:40:18Z","updated_at":"2015-09-25T14:40:18Z","html_url":"https://github.com/xbmc/xbmc/pull/8080#discussion_r40436484","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/8080","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/40436484"},"html":{"href":"https://github.com/xbmc/xbmc/pull/8080#discussion_r40436484"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/8080"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/8080","id":45458812,"html_url":"https://github.com/xbmc/xbmc/pull/8080","diff_url":"https://github.com/xbmc/xbmc/pull/8080.diff","patch_url":"https://github.com/xbmc/xbmc/pull/8080.patch","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/8080","number":8080,"state":"open","locked":false,"title":"[WIP] add support for multiple ratings","user":{"login":"phate89","id":1254959,"avatar_url":"https://avatars.githubusercontent.com/u/1254959?v=3","gravatar_id":"","url":"https://api.github.com/users/phate89","html_url":"https://github.com/phate89","followers_url":"https://api.github.com/users/phate89/followers","following_url":"https://api.github.com/users/phate89/following{/other_user}","gists_url":"https://api.github.com/users/phate89/gists{/gist_id}","starred_url":"https://api.github.com/users/phate89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phate89/subscriptions","organizations_url":"https://api.github.com/users/phate89/orgs","repos_url":"https://api.github.com/users/phate89/repos","events_url":"https://api.github.com/users/phate89/events{/privacy}","received_events_url":"https://api.github.com/users/phate89/received_events","type":"User","site_admin":false},"body":"Since https://github.com/xbmc/xbmc/pull/8062 is strictly related to this change I kept working on this so I can have an opinion about my solution.\r\nI moved rating and votes to a separate table (so we can have more than one for every movie) and I added the rating_id of the default vote to the movie table (using the old rating column). In CVideoInfoTag class all the ratings are stored in a map and they're handled by functions..\r\n\r\nThe problems of actual version are:\r\nthere's an error with json-rpc ratings format. You get an error if you ask \"ratings\" properties\r\nI tried to edit CVideoInfoTag::Archive but I didn't understand What's its purpose so it's 99% wrong\r\nI changed some parts of kodi code I don't know (like GUIInfoLabels)  I might have done some huge mistake","created_at":"2015-09-18T22:19:13Z","updated_at":"2015-09-25T14:40:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de63bdfeaa971d50bd9cde7767558f4c5dc27918","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/xbmc/pulls/8080/commits","review_comments_url":"https://api.github.com/repos/xbmc/xbmc/pulls/8080/comments","review_comment_url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/8080/comments","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/1ed1eb6508d80b642a76983995e38c82a4bbe714","head":{"label":"phate89:multiple_ratings","ref":"multiple_ratings","sha":"1ed1eb6508d80b642a76983995e38c82a4bbe714","user":{"login":"phate89","id":1254959,"avatar_url":"https://avatars.githubusercontent.com/u/1254959?v=3","gravatar_id":"","url":"https://api.github.com/users/phate89","html_url":"https://github.com/phate89","followers_url":"https://api.github.com/users/phate89/followers","following_url":"https://api.github.com/users/phate89/following{/other_user}","gists_url":"https://api.github.com/users/phate89/gists{/gist_id}","starred_url":"https://api.github.com/users/phate89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phate89/subscriptions","organizations_url":"https://api.github.com/users/phate89/orgs","repos_url":"https://api.github.com/users/phate89/repos","events_url":"https://api.github.com/users/phate89/events{/privacy}","received_events_url":"https://api.github.com/users/phate89/received_events","type":"User","site_admin":false},"repo":{"id":25815543,"name":"xbmc","full_name":"phate89/xbmc","owner":{"login":"phate89","id":1254959,"avatar_url":"https://avatars.githubusercontent.com/u/1254959?v=3","gravatar_id":"","url":"https://api.github.com/users/phate89","html_url":"https://github.com/phate89","followers_url":"https://api.github.com/users/phate89/followers","following_url":"https://api.github.com/users/phate89/following{/other_user}","gists_url":"https://api.github.com/users/phate89/gists{/gist_id}","starred_url":"https://api.github.com/users/phate89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phate89/subscriptions","organizations_url":"https://api.github.com/users/phate89/orgs","repos_url":"https://api.github.com/users/phate89/repos","events_url":"https://api.github.com/users/phate89/events{/privacy}","received_events_url":"https://api.github.com/users/phate89/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phate89/xbmc","description":"XBMC Main Repository","fork":true,"url":"https://api.github.com/repos/phate89/xbmc","forks_url":"https://api.github.com/repos/phate89/xbmc/forks","keys_url":"https://api.github.com/repos/phate89/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phate89/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phate89/xbmc/teams","hooks_url":"https://api.github.com/repos/phate89/xbmc/hooks","issue_events_url":"https://api.github.com/repos/phate89/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/phate89/xbmc/events","assignees_url":"https://api.github.com/repos/phate89/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/phate89/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/phate89/xbmc/tags","blobs_url":"https://api.github.com/repos/phate89/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phate89/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phate89/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/phate89/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phate89/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/phate89/xbmc/languages","stargazers_url":"https://api.github.com/repos/phate89/xbmc/stargazers","contributors_url":"https://api.github.com/repos/phate89/xbmc/contributors","subscribers_url":"https://api.github.com/repos/phate89/xbmc/subscribers","subscription_url":"https://api.github.com/repos/phate89/xbmc/subscription","commits_url":"https://api.github.com/repos/phate89/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/phate89/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/phate89/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/phate89/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/phate89/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/phate89/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phate89/xbmc/merges","archive_url":"https://api.github.com/repos/phate89/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phate89/xbmc/downloads","issues_url":"https://api.github.com/repos/phate89/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/phate89/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/phate89/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/phate89/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phate89/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/phate89/xbmc/releases{/id}","created_at":"2014-10-27T11:20:57Z","updated_at":"2015-05-06T12:58:03Z","pushed_at":"2015-09-25T12:43:41Z","git_url":"git://github.com/phate89/xbmc.git","ssh_url":"git@github.com:phate89/xbmc.git","clone_url":"https://github.com/phate89/xbmc.git","svn_url":"https://github.com/phate89/xbmc","homepage":"http://xbmc.org","size":543304,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"xbmc:master","ref":"master","sha":"6171e82f9783c120478ec6da736c853584a2445e","user":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"repo":{"id":1217614,"name":"xbmc","full_name":"xbmc/xbmc","owner":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xbmc/xbmc","description":"Kodi Main Repository - By using this code you agree with our policy and will follow the GPLv2 license as included","fork":false,"url":"https://api.github.com/repos/xbmc/xbmc","forks_url":"https://api.github.com/repos/xbmc/xbmc/forks","keys_url":"https://api.github.com/repos/xbmc/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xbmc/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xbmc/xbmc/teams","hooks_url":"https://api.github.com/repos/xbmc/xbmc/hooks","issue_events_url":"https://api.github.com/repos/xbmc/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/xbmc/xbmc/events","assignees_url":"https://api.github.com/repos/xbmc/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/xbmc/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/xbmc/xbmc/tags","blobs_url":"https://api.github.com/repos/xbmc/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xbmc/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xbmc/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xbmc/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/xbmc/xbmc/languages","stargazers_url":"https://api.github.com/repos/xbmc/xbmc/stargazers","contributors_url":"https://api.github.com/repos/xbmc/xbmc/contributors","subscribers_url":"https://api.github.com/repos/xbmc/xbmc/subscribers","subscription_url":"https://api.github.com/repos/xbmc/xbmc/subscription","commits_url":"https://api.github.com/repos/xbmc/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xbmc/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xbmc/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xbmc/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xbmc/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/xbmc/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xbmc/xbmc/merges","archive_url":"https://api.github.com/repos/xbmc/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xbmc/xbmc/downloads","issues_url":"https://api.github.com/repos/xbmc/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/xbmc/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/xbmc/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/xbmc/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xbmc/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/xbmc/xbmc/releases{/id}","created_at":"2011-01-03T21:18:51Z","updated_at":"2015-09-25T12:15:54Z","pushed_at":"2015-09-25T14:00:01Z","git_url":"git://github.com/xbmc/xbmc.git","ssh_url":"git@github.com:xbmc/xbmc.git","clone_url":"https://github.com/xbmc/xbmc.git","svn_url":"https://github.com/xbmc/xbmc","homepage":"http://kodi.wiki/view/Official:Trademark_Policy","size":1896154,"stargazers_count":4118,"watchers_count":4118,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3032,"mirror_url":null,"open_issues_count":215,"forks":3032,"open_issues":215,"watchers":4118,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/8080"},"html":{"href":"https://github.com/xbmc/xbmc/pull/8080"},"issue":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/8080"},"comments":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/8080/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/8080/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/8080/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/xbmc/statuses/1ed1eb6508d80b642a76983995e38c82a4bbe714"}}}}