{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/33654331","id":33654331,"diff_hunk":"@@ -472,6 +472,47 @@ JSONRPC_STATUS CVideoLibrary::GetGenres(const std::string &method, ITransportLay\n   return OK;\n }\n \n+JSONRPC_STATUS CVideoLibrary::GetTags(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result)\n+{\n+  std::string media = parameterObject[\"type\"].asString();\n+  StringUtils::ToLower(media);\n+  int idContent = -1;\n+\n+  std::string strPath = \"videodb://\";\n+  /* select which video content to get tags from*/\n+  if (media == MediaTypeMovie)\n+  {\n+    idContent = VIDEODB_CONTENT_MOVIES;\n+    strPath += \"movies\";\n+  }\n+  else if (media == MediaTypeTvShow)\n+  {\n+    idContent = VIDEODB_CONTENT_TVSHOWS;\n+    strPath += \"tvshows\";\n+  }\n+  else if (media == MediaTypeMusicVideo)\n+  {\n+    idContent = VIDEODB_CONTENT_MUSICVIDEOS;\n+    strPath += \"musicvideos\";\n+  }\n+  strPath += \"/tags/\";\n+\n+  CVideoDatabase videodatabase;\n+  if (!videodatabase.Open())\n+    return InternalError;\n+\n+  CFileItemList items;\n+  if (!videodatabase.GetTagsNav(strPath, items, idContent))\n+    return InternalError;\n+\n+  /* need to set strTitle in each item*/\n+  for (unsigned int i = 0; i < static_cast<unsigned int>(items.Size()); i++)","path":"xbmc/interfaces/json-rpc/VideoLibrary.cpp","position":38,"original_position":38,"commit_id":"a1dbcd1bcb712169dd19964c9a8b38ac92b1e5ea","original_commit_id":"a1dbcd1bcb712169dd19964c9a8b38ac92b1e5ea","user":{"login":"fritsch","id":1089309,"avatar_url":"https://avatars.githubusercontent.com/u/1089309?v=3","gravatar_id":"","url":"https://api.github.com/users/fritsch","html_url":"https://github.com/fritsch","followers_url":"https://api.github.com/users/fritsch/followers","following_url":"https://api.github.com/users/fritsch/following{/other_user}","gists_url":"https://api.github.com/users/fritsch/gists{/gist_id}","starred_url":"https://api.github.com/users/fritsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritsch/subscriptions","organizations_url":"https://api.github.com/users/fritsch/orgs","repos_url":"https://api.github.com/users/fritsch/repos","events_url":"https://api.github.com/users/fritsch/events{/privacy}","received_events_url":"https://api.github.com/users/fritsch/received_events","type":"User","site_admin":false},"body":"Or just use size_t instead of unsigned int","created_at":"2015-07-01T07:26:59Z","updated_at":"2015-07-01T07:26:59Z","html_url":"https://github.com/xbmc/xbmc/pull/7369#discussion_r33654331","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7369","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/33654331"},"html":{"href":"https://github.com/xbmc/xbmc/pull/7369#discussion_r33654331"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7369"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/7369","id":38887726,"html_url":"https://github.com/xbmc/xbmc/pull/7369","diff_url":"https://github.com/xbmc/xbmc/pull/7369.diff","patch_url":"https://github.com/xbmc/xbmc/pull/7369.patch","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/7369","number":7369,"state":"open","locked":false,"title":"Add a method to retrieve video tags","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":"Right now you can retrieve all tags from a media type using a \"trick\" (Files.GetDirectory to videodb://movies/tags/ for example) but imho a specific method is better. \r\nExactly like \"GetGenres\" is more obvious to try to use a \"GetTags\" instead of using files.getdirectory","created_at":"2015-06-30T15:02:06Z","updated_at":"2015-07-01T07:26:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c900f031bcb3ee86d6d4c05ff484fc193f6f646","assignee":{"login":"Montellese","id":75864,"avatar_url":"https://avatars.githubusercontent.com/u/75864?v=3","gravatar_id":"","url":"https://api.github.com/users/Montellese","html_url":"https://github.com/Montellese","followers_url":"https://api.github.com/users/Montellese/followers","following_url":"https://api.github.com/users/Montellese/following{/other_user}","gists_url":"https://api.github.com/users/Montellese/gists{/gist_id}","starred_url":"https://api.github.com/users/Montellese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Montellese/subscriptions","organizations_url":"https://api.github.com/users/Montellese/orgs","repos_url":"https://api.github.com/users/Montellese/repos","events_url":"https://api.github.com/users/Montellese/events{/privacy}","received_events_url":"https://api.github.com/users/Montellese/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7369/commits","review_comments_url":"https://api.github.com/repos/xbmc/xbmc/pulls/7369/comments","review_comment_url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/7369/comments","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/a1dbcd1bcb712169dd19964c9a8b38ac92b1e5ea","head":{"label":"phate89:expose_tag_json","ref":"expose_tag_json","sha":"a1dbcd1bcb712169dd19964c9a8b38ac92b1e5ea","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-06-30T18:55:18Z","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":516495,"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":"ac9c20ee3cef6b7b86a3c634ca8bfdc0a64eb0c6","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-06-30T13:56:34Z","pushed_at":"2015-07-01T06:54:08Z","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":1855878,"stargazers_count":3980,"watchers_count":3980,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2898,"mirror_url":null,"open_issues_count":254,"forks":2898,"open_issues":254,"watchers":3980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7369"},"html":{"href":"https://github.com/xbmc/xbmc/pull/7369"},"issue":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/7369"},"comments":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/7369/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7369/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/7369/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/xbmc/statuses/a1dbcd1bcb712169dd19964c9a8b38ac92b1e5ea"}}}}