GitHub PullRequestEvent at 2014-06-12 20:14:01
Repository: MediaBrowser
Actor: LukePulverenti
Payload: {"action":"closed","number":811,"pull_request":{"url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811","id":15621222,"html_url":"https://github.com/MediaBrowser/MediaBrowser/pull/811","diff_url":"https://github.com/MediaBrowser/MediaBrowser/pull/811.diff","patch_url":"https://github.com/MediaBrowser/MediaBrowser/pull/811.patch","issue_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/811","number":811,"state":"closed","title":"Item identity providers","user":{"login":"thogil","id":534054,"avatar_url":"https://avatars.githubusercontent.com/u/534054?","gravatar_id":"c6885cbcb82e62b16bacfb007d6b17a0","url":"https://api.github.com/users/thogil","html_url":"https://github.com/thogil","followers_url":"https://api.github.com/users/thogil/followers","following_url":"https://api.github.com/users/thogil/following{/other_user}","gists_url":"https://api.github.com/users/thogil/gists{/gist_id}","starred_url":"https://api.github.com/users/thogil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thogil/subscriptions","organizations_url":"https://api.github.com/users/thogil/orgs","repos_url":"https://api.github.com/users/thogil/repos","events_url":"https://api.github.com/users/thogil/events{/privacy}","received_events_url":"https://api.github.com/users/thogil/received_events","type":"User","site_admin":false},"body":"I was not at all happy with my previous solution to supporting anime series orders. It was messy and not obvious how it was working.\r\n\r\nThe core problem that needed to be solved was that there are multiple different ways of organising media. The user has likely picked one, but our metadata providers may expect another. We need some way of detecting and converting between systems.\r\n\r\nI have split the remote metadata providers into two phases: identification and data collection.\r\n\r\nDuring identification, the system asks implementations of the IItemIdentityProvider<InfoType, IdentityType> to identify the media. These return items of the IdentityType (which is specific to each item type).\r\n\r\nThe system then looks for IItemIdentityConverter<IdentityType> implementations which can convert from any known identities to any unknown identities.\r\n\r\nThe identities are stored in the item info instance, and can be used in the metadata providers to identify the item.\r\n\r\nThis additional identification pass is optional, and existing providers continue to work as-is without being modified.\r\n\r\nOne compromise I had to make, was that I had to copy the identities (via their base interface) into BaseItem (non-seralised) after running the remote metadata providers, to allow image providers to access the identities without making massive changes to those interfaces and the code which interacts with them.","created_at":"2014-05-07T21:29:23Z","updated_at":"2014-06-12T20:14:01Z","closed_at":"2014-06-12T20:14:01Z","merged_at":"2014-06-12T20:14:01Z","merge_commit_sha":"738e04a62bf4cb84f2e124dff5fc5c5cb4f1e4ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811/commits","review_comments_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811/comments","review_comment_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/comments/{number}","comments_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/811/comments","statuses_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/statuses/50cc165e95233a19b2636ca36f6254f4789742dd","head":{"label":"thogil:item_identity_providers_2","ref":"item_identity_providers_2","sha":"50cc165e95233a19b2636ca36f6254f4789742dd","user":{"login":"thogil","id":534054,"avatar_url":"https://avatars.githubusercontent.com/u/534054?","gravatar_id":"c6885cbcb82e62b16bacfb007d6b17a0","url":"https://api.github.com/users/thogil","html_url":"https://github.com/thogil","followers_url":"https://api.github.com/users/thogil/followers","following_url":"https://api.github.com/users/thogil/following{/other_user}","gists_url":"https://api.github.com/users/thogil/gists{/gist_id}","starred_url":"https://api.github.com/users/thogil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thogil/subscriptions","organizations_url":"https://api.github.com/users/thogil/orgs","repos_url":"https://api.github.com/users/thogil/repos","events_url":"https://api.github.com/users/thogil/events{/privacy}","received_events_url":"https://api.github.com/users/thogil/received_events","type":"User","site_admin":false},"repo":{"id":15024738,"name":"MediaBrowser","full_name":"thogil/MediaBrowser","owner":{"login":"thogil","id":534054,"avatar_url":"https://avatars.githubusercontent.com/u/534054?","gravatar_id":"c6885cbcb82e62b16bacfb007d6b17a0","url":"https://api.github.com/users/thogil","html_url":"https://github.com/thogil","followers_url":"https://api.github.com/users/thogil/followers","following_url":"https://api.github.com/users/thogil/following{/other_user}","gists_url":"https://api.github.com/users/thogil/gists{/gist_id}","starred_url":"https://api.github.com/users/thogil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thogil/subscriptions","organizations_url":"https://api.github.com/users/thogil/orgs","repos_url":"https://api.github.com/users/thogil/repos","events_url":"https://api.github.com/users/thogil/events{/privacy}","received_events_url":"https://api.github.com/users/thogil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thogil/MediaBrowser","description":"Media Browser Server is a home media server built using other popular open source technologies.","fork":true,"url":"https://api.github.com/repos/thogil/MediaBrowser","forks_url":"https://api.github.com/repos/thogil/MediaBrowser/forks","keys_url":"https://api.github.com/repos/thogil/MediaBrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thogil/MediaBrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thogil/MediaBrowser/teams","hooks_url":"https://api.github.com/repos/thogil/MediaBrowser/hooks","issue_events_url":"https://api.github.com/repos/thogil/MediaBrowser/issues/events{/number}","events_url":"https://api.github.com/repos/thogil/MediaBrowser/events","assignees_url":"https://api.github.com/repos/thogil/MediaBrowser/assignees{/user}","branches_url":"https://api.github.com/repos/thogil/MediaBrowser/branches{/branch}","tags_url":"https://api.github.com/repos/thogil/MediaBrowser/tags","blobs_url":"https://api.github.com/repos/thogil/MediaBrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thogil/MediaBrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thogil/MediaBrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/thogil/MediaBrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thogil/MediaBrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/thogil/MediaBrowser/languages","stargazers_url":"https://api.github.com/repos/thogil/MediaBrowser/stargazers","contributors_url":"https://api.github.com/repos/thogil/MediaBrowser/contributors","subscribers_url":"https://api.github.com/repos/thogil/MediaBrowser/subscribers","subscription_url":"https://api.github.com/repos/thogil/MediaBrowser/subscription","commits_url":"https://api.github.com/repos/thogil/MediaBrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/thogil/MediaBrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/thogil/MediaBrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/thogil/MediaBrowser/issues/comments/{number}","contents_url":"https://api.github.com/repos/thogil/MediaBrowser/contents/{+path}","compare_url":"https://api.github.com/repos/thogil/MediaBrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thogil/MediaBrowser/merges","archive_url":"https://api.github.com/repos/thogil/MediaBrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thogil/MediaBrowser/downloads","issues_url":"https://api.github.com/repos/thogil/MediaBrowser/issues{/number}","pulls_url":"https://api.github.com/repos/thogil/MediaBrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/thogil/MediaBrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/thogil/MediaBrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thogil/MediaBrowser/labels{/name}","releases_url":"https://api.github.com/repos/thogil/MediaBrowser/releases{/id}","created_at":"2013-12-08T14:14:05Z","updated_at":"2014-06-12T20:14:01Z","pushed_at":"2014-05-16T09:58:12Z","git_url":"git://github.com/thogil/MediaBrowser.git","ssh_url":"git@github.com:thogil/MediaBrowser.git","clone_url":"https://github.com/thogil/MediaBrowser.git","svn_url":"https://github.com/thogil/MediaBrowser","homepage":"http://www.mediabrowser3.com/","size":591073,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MediaBrowser:master","ref":"master","sha":"a90138f2ea001997359215ae1dcd0e5bca2c0d3b","user":{"login":"MediaBrowser","id":3607473,"avatar_url":"https://avatars.githubusercontent.com/u/3607473?","gravatar_id":"29be284481017fd47e5ab20e419cccb4","url":"https://api.github.com/users/MediaBrowser","html_url":"https://github.com/MediaBrowser","followers_url":"https://api.github.com/users/MediaBrowser/followers","following_url":"https://api.github.com/users/MediaBrowser/following{/other_user}","gists_url":"https://api.github.com/users/MediaBrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/MediaBrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MediaBrowser/subscriptions","organizations_url":"https://api.github.com/users/MediaBrowser/orgs","repos_url":"https://api.github.com/users/MediaBrowser/repos","events_url":"https://api.github.com/users/MediaBrowser/events{/privacy}","received_events_url":"https://api.github.com/users/MediaBrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":8231466,"name":"MediaBrowser","full_name":"MediaBrowser/MediaBrowser","owner":{"login":"MediaBrowser","id":3607473,"avatar_url":"https://avatars.githubusercontent.com/u/3607473?","gravatar_id":"29be284481017fd47e5ab20e419cccb4","url":"https://api.github.com/users/MediaBrowser","html_url":"https://github.com/MediaBrowser","followers_url":"https://api.github.com/users/MediaBrowser/followers","following_url":"https://api.github.com/users/MediaBrowser/following{/other_user}","gists_url":"https://api.github.com/users/MediaBrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/MediaBrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MediaBrowser/subscriptions","organizations_url":"https://api.github.com/users/MediaBrowser/orgs","repos_url":"https://api.github.com/users/MediaBrowser/repos","events_url":"https://api.github.com/users/MediaBrowser/events{/privacy}","received_events_url":"https://api.github.com/users/MediaBrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MediaBrowser/MediaBrowser","description":"Media Browser Server is a home media server built using other popular open source technologies.","fork":false,"url":"https://api.github.com/repos/MediaBrowser/MediaBrowser","forks_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/forks","keys_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/teams","hooks_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/hooks","issue_events_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/events{/number}","events_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/events","assignees_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/assignees{/user}","branches_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/branches{/branch}","tags_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/tags","blobs_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/languages","stargazers_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/stargazers","contributors_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/contributors","subscribers_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/subscribers","subscription_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/subscription","commits_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/comments/{number}","contents_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/contents/{+path}","compare_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/merges","archive_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/downloads","issues_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues{/number}","pulls_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/labels{/name}","releases_url":"https://api.github.com/repos/MediaBrowser/MediaBrowser/releases{/id}","created_at":"2013-02-16T04:40:34Z","updated_at":"2014-06-12T20:14:01Z","pushed_at":"2014-06-12T20:14:01Z","git_url":"git://github.com/MediaBrowser/MediaBrowser.git","ssh_url":"git@github.com:MediaBrowser/MediaBrowser.git","clone_url":"https://github.com/MediaBrowser/MediaBrowser.git","svn_url":"https://github.com/MediaBrowser/MediaBrowser","homepage":"http://mediabrowser.tv/","size":609592,"stargazers_count":229,"watchers_count":229,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":137,"mirror_url":null,"open_issues_count":32,"forks":137,"open_issues":32,"watchers":229,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811"},"html":{"href":"https://github.com/MediaBrowser/MediaBrowser/pull/811"},"issue":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/811"},"comments":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/issues/811/comments"},"review_comments":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811/comments"},"review_comment":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/pulls/811/commits"},"statuses":{"href":"https://api.github.com/repos/MediaBrowser/MediaBrowser/statuses/50cc165e95233a19b2636ca36f6254f4789742dd"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"LukePulverenti","id":3607463,"avatar_url":"https://avatars.githubusercontent.com/u/3607463?","gravatar_id":"421d0be69d8ba9b591a7c9fca893e166","url":"https://api.github.com/users/LukePulverenti","html_url":"https://github.com/LukePulverenti","followers_url":"https://api.github.com/users/LukePulverenti/followers","following_url":"https://api.github.com/users/LukePulverenti/following{/other_user}","gists_url":"https://api.github.com/users/LukePulverenti/gists{/gist_id}","starred_url":"https://api.github.com/users/LukePulverenti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukePulverenti/subscriptions","organizations_url":"https://api.github.com/users/LukePulverenti/orgs","repos_url":"https://api.github.com/users/LukePulverenti/repos","events_url":"https://api.github.com/users/LukePulverenti/events{/privacy}","received_events_url":"https://api.github.com/users/LukePulverenti/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":3,"additions":382,"deletions":56,"changed_files":16}}