{"action":"created","comment":{"url":"https://api.github.com/repos/Flexget/Flexget/pulls/comments/83058619","pull_request_review_id":3922661,"id":83058619,"diff_hunk":"@@ -0,0 +1,328 @@\n+#!/usr/bin/env python","path":"flexget/tests/test_nfo_lookup.py","position":1,"original_position":1,"commit_id":"1669f4cd8cddcbd734bea47a9f9c5eca04970bd0","original_commit_id":"1669f4cd8cddcbd734bea47a9f9c5eca04970bd0","user":{"login":"cvium","id":675118,"avatar_url":"https://avatars.githubusercontent.com/u/675118?v=3","gravatar_id":"","url":"https://api.github.com/users/cvium","html_url":"https://github.com/cvium","followers_url":"https://api.github.com/users/cvium/followers","following_url":"https://api.github.com/users/cvium/following{/other_user}","gists_url":"https://api.github.com/users/cvium/gists{/gist_id}","starred_url":"https://api.github.com/users/cvium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cvium/subscriptions","organizations_url":"https://api.github.com/users/cvium/orgs","repos_url":"https://api.github.com/users/cvium/repos","events_url":"https://api.github.com/users/cvium/events{/privacy}","received_events_url":"https://api.github.com/users/cvium/received_events","type":"User","site_admin":false},"body":"Why is this here?","created_at":"2016-10-12T17:38:56Z","updated_at":"2016-10-12T17:38:56Z","html_url":"https://github.com/Flexget/Flexget/pull/1437#discussion_r83058619","pull_request_url":"https://api.github.com/repos/Flexget/Flexget/pulls/1437","_links":{"self":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/comments/83058619"},"html":{"href":"https://github.com/Flexget/Flexget/pull/1437#discussion_r83058619"},"pull_request":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/1437"}}},"pull_request":{"url":"https://api.github.com/repos/Flexget/Flexget/pulls/1437","id":88614269,"html_url":"https://github.com/Flexget/Flexget/pull/1437","diff_url":"https://github.com/Flexget/Flexget/pull/1437.diff","patch_url":"https://github.com/Flexget/Flexget/pull/1437.patch","issue_url":"https://api.github.com/repos/Flexget/Flexget/issues/1437","number":1437,"state":"open","locked":false,"title":"nfo_lookup plugin: Get metadata from nfo file to aid IMDB search","user":{"login":"darcamo","id":4071594,"avatar_url":"https://avatars.githubusercontent.com/u/4071594?v=3","gravatar_id":"","url":"https://api.github.com/users/darcamo","html_url":"https://github.com/darcamo","followers_url":"https://api.github.com/users/darcamo/followers","following_url":"https://api.github.com/users/darcamo/following{/other_user}","gists_url":"https://api.github.com/users/darcamo/gists{/gist_id}","starred_url":"https://api.github.com/users/darcamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcamo/subscriptions","organizations_url":"https://api.github.com/users/darcamo/orgs","repos_url":"https://api.github.com/users/darcamo/repos","events_url":"https://api.github.com/users/darcamo/events{/privacy}","received_events_url":"https://api.github.com/users/darcamo/received_events","type":"User","site_admin":false},"body":"### Motivation for changes:\r\n\r\nNew Plugin: nfo_lookup\r\n\r\nWhen searching for metadata with the imdb_lookup plugin and the entries coming\r\nfrom the filesystem I had many wrong values, as well as many movies with no\r\nmatch. The problem is that my files are named in portuguese and, although IMDB\r\nlookup still works, it is less reliable since all it has is the\r\nfilename. Furthermore, sometimes there are different movies with the same name.\r\n\r\nThese movies are in my **Kodi library** and I already have\r\nan ['nfo' file](http://kodi.wiki/view/NFO_files) for each of them containing,\r\namong other things, the IMDB id of the correct movie. Since I couldn't find a\r\nway to use this with flexget I decided to get my hands dirty.\r\n\r\n### Detailed changes:\r\n\r\n- Add a new 'nfo_lookup' plugin (in the metadata folder).\r\n- Add a test file for it (`test_nfo_lookup.py`) including a folder with test\r\n  data.\r\n  \r\n  \r\nThe idea is that this plugin can be used to add metadata from the nfo file to\r\nthe entry when the entries come from the filesystem input. It will also set the\r\n'imdb_id' field of the entry such that if the imdb_lookup plugin is also used\r\nit will be able to find the correct movie no matter how the movie file is\r\nnamed. Currently it only works for movies (the nfo file must have a `<movie>`\r\ntag) but it should be easy to extended to series.\r\n\r\nThe plugin will do the following:\r\n\r\n- Get the name of the file associated with the entry\r\n- Change the file extension to '.nfo', read the content of the nfo file \r\n- Add the metadata in the nfo file as 'nfo_something' fields in the entry\r\n- Set the 'imdb_id' field of the entry\r\n\r\n**Note**: This is working for me and I have implemented unittests for it, but\r\nit should be tested by someone else with nfo files generated by a different\r\nprogram than the one I'm using (MediaElch).\r\n\r\n### Addressed issues:\r\n\r\nNone in particular besides my own needs. \r\n\r\n### Config usage if relevant (new plugin or updated schema):\r\n\r\n```\r\nnfo_lookup: yes\r\n```\r\n\r\nNote that the input must be the filesystem plugin. That is, the entry needs to\r\nhave a 'filename' and a 'location' fields.\r\n\r\nEx. of a full configuration\r\n\r\n```\r\ntasks:\r\n  test_task:\r\n    filesystem:\r\n      path: some_path/\r\n      mask: '*.mkv'\r\n    nfo_lookup: yes\r\n    imdb_lookup: yes\r\n    <some_output_plugin>\r\n```\r\n\r\n### Log and/or tests output (preferably both):\r\n\r\n```\r\npaste output here\r\n```\r\n\r\n\r\n","created_at":"2016-10-10T06:27:04Z","updated_at":"2016-10-12T17:42:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6088898712a2f79f4aeef92ba681842f5bb9790d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Flexget/Flexget/pulls/1437/commits","review_comments_url":"https://api.github.com/repos/Flexget/Flexget/pulls/1437/comments","review_comment_url":"https://api.github.com/repos/Flexget/Flexget/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Flexget/Flexget/issues/1437/comments","statuses_url":"https://api.github.com/repos/Flexget/Flexget/statuses/1669f4cd8cddcbd734bea47a9f9c5eca04970bd0","head":{"label":"darcamo:develop","ref":"develop","sha":"1669f4cd8cddcbd734bea47a9f9c5eca04970bd0","user":{"login":"darcamo","id":4071594,"avatar_url":"https://avatars.githubusercontent.com/u/4071594?v=3","gravatar_id":"","url":"https://api.github.com/users/darcamo","html_url":"https://github.com/darcamo","followers_url":"https://api.github.com/users/darcamo/followers","following_url":"https://api.github.com/users/darcamo/following{/other_user}","gists_url":"https://api.github.com/users/darcamo/gists{/gist_id}","starred_url":"https://api.github.com/users/darcamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcamo/subscriptions","organizations_url":"https://api.github.com/users/darcamo/orgs","repos_url":"https://api.github.com/users/darcamo/repos","events_url":"https://api.github.com/users/darcamo/events{/privacy}","received_events_url":"https://api.github.com/users/darcamo/received_events","type":"User","site_admin":false},"repo":{"id":70456028,"name":"Flexget","full_name":"darcamo/Flexget","owner":{"login":"darcamo","id":4071594,"avatar_url":"https://avatars.githubusercontent.com/u/4071594?v=3","gravatar_id":"","url":"https://api.github.com/users/darcamo","html_url":"https://github.com/darcamo","followers_url":"https://api.github.com/users/darcamo/followers","following_url":"https://api.github.com/users/darcamo/following{/other_user}","gists_url":"https://api.github.com/users/darcamo/gists{/gist_id}","starred_url":"https://api.github.com/users/darcamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcamo/subscriptions","organizations_url":"https://api.github.com/users/darcamo/orgs","repos_url":"https://api.github.com/users/darcamo/repos","events_url":"https://api.github.com/users/darcamo/events{/privacy}","received_events_url":"https://api.github.com/users/darcamo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/darcamo/Flexget","description":"The official FlexGet repository","fork":true,"url":"https://api.github.com/repos/darcamo/Flexget","forks_url":"https://api.github.com/repos/darcamo/Flexget/forks","keys_url":"https://api.github.com/repos/darcamo/Flexget/keys{/key_id}","collaborators_url":"https://api.github.com/repos/darcamo/Flexget/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/darcamo/Flexget/teams","hooks_url":"https://api.github.com/repos/darcamo/Flexget/hooks","issue_events_url":"https://api.github.com/repos/darcamo/Flexget/issues/events{/number}","events_url":"https://api.github.com/repos/darcamo/Flexget/events","assignees_url":"https://api.github.com/repos/darcamo/Flexget/assignees{/user}","branches_url":"https://api.github.com/repos/darcamo/Flexget/branches{/branch}","tags_url":"https://api.github.com/repos/darcamo/Flexget/tags","blobs_url":"https://api.github.com/repos/darcamo/Flexget/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/darcamo/Flexget/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/darcamo/Flexget/git/refs{/sha}","trees_url":"https://api.github.com/repos/darcamo/Flexget/git/trees{/sha}","statuses_url":"https://api.github.com/repos/darcamo/Flexget/statuses/{sha}","languages_url":"https://api.github.com/repos/darcamo/Flexget/languages","stargazers_url":"https://api.github.com/repos/darcamo/Flexget/stargazers","contributors_url":"https://api.github.com/repos/darcamo/Flexget/contributors","subscribers_url":"https://api.github.com/repos/darcamo/Flexget/subscribers","subscription_url":"https://api.github.com/repos/darcamo/Flexget/subscription","commits_url":"https://api.github.com/repos/darcamo/Flexget/commits{/sha}","git_commits_url":"https://api.github.com/repos/darcamo/Flexget/git/commits{/sha}","comments_url":"https://api.github.com/repos/darcamo/Flexget/comments{/number}","issue_comment_url":"https://api.github.com/repos/darcamo/Flexget/issues/comments{/number}","contents_url":"https://api.github.com/repos/darcamo/Flexget/contents/{+path}","compare_url":"https://api.github.com/repos/darcamo/Flexget/compare/{base}...{head}","merges_url":"https://api.github.com/repos/darcamo/Flexget/merges","archive_url":"https://api.github.com/repos/darcamo/Flexget/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/darcamo/Flexget/downloads","issues_url":"https://api.github.com/repos/darcamo/Flexget/issues{/number}","pulls_url":"https://api.github.com/repos/darcamo/Flexget/pulls{/number}","milestones_url":"https://api.github.com/repos/darcamo/Flexget/milestones{/number}","notifications_url":"https://api.github.com/repos/darcamo/Flexget/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/darcamo/Flexget/labels{/name}","releases_url":"https://api.github.com/repos/darcamo/Flexget/releases{/id}","deployments_url":"https://api.github.com/repos/darcamo/Flexget/deployments","created_at":"2016-10-10T05:51:23Z","updated_at":"2016-10-10T05:51:36Z","pushed_at":"2016-10-12T15:38:57Z","git_url":"git://github.com/darcamo/Flexget.git","ssh_url":"git@github.com:darcamo/Flexget.git","clone_url":"https://github.com/darcamo/Flexget.git","svn_url":"https://github.com/darcamo/Flexget","homepage":"http://www.flexget.com","size":46891,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"develop"}},"base":{"label":"Flexget:develop","ref":"develop","sha":"b2ea290493e7c2f10228180f45e16a5336b091ce","user":{"login":"Flexget","id":682553,"avatar_url":"https://avatars.githubusercontent.com/u/682553?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexget","html_url":"https://github.com/Flexget","followers_url":"https://api.github.com/users/Flexget/followers","following_url":"https://api.github.com/users/Flexget/following{/other_user}","gists_url":"https://api.github.com/users/Flexget/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexget/subscriptions","organizations_url":"https://api.github.com/users/Flexget/orgs","repos_url":"https://api.github.com/users/Flexget/repos","events_url":"https://api.github.com/users/Flexget/events{/privacy}","received_events_url":"https://api.github.com/users/Flexget/received_events","type":"Organization","site_admin":false},"repo":{"id":1512901,"name":"Flexget","full_name":"Flexget/Flexget","owner":{"login":"Flexget","id":682553,"avatar_url":"https://avatars.githubusercontent.com/u/682553?v=3","gravatar_id":"","url":"https://api.github.com/users/Flexget","html_url":"https://github.com/Flexget","followers_url":"https://api.github.com/users/Flexget/followers","following_url":"https://api.github.com/users/Flexget/following{/other_user}","gists_url":"https://api.github.com/users/Flexget/gists{/gist_id}","starred_url":"https://api.github.com/users/Flexget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flexget/subscriptions","organizations_url":"https://api.github.com/users/Flexget/orgs","repos_url":"https://api.github.com/users/Flexget/repos","events_url":"https://api.github.com/users/Flexget/events{/privacy}","received_events_url":"https://api.github.com/users/Flexget/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Flexget/Flexget","description":"The official FlexGet repository","fork":false,"url":"https://api.github.com/repos/Flexget/Flexget","forks_url":"https://api.github.com/repos/Flexget/Flexget/forks","keys_url":"https://api.github.com/repos/Flexget/Flexget/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Flexget/Flexget/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Flexget/Flexget/teams","hooks_url":"https://api.github.com/repos/Flexget/Flexget/hooks","issue_events_url":"https://api.github.com/repos/Flexget/Flexget/issues/events{/number}","events_url":"https://api.github.com/repos/Flexget/Flexget/events","assignees_url":"https://api.github.com/repos/Flexget/Flexget/assignees{/user}","branches_url":"https://api.github.com/repos/Flexget/Flexget/branches{/branch}","tags_url":"https://api.github.com/repos/Flexget/Flexget/tags","blobs_url":"https://api.github.com/repos/Flexget/Flexget/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Flexget/Flexget/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Flexget/Flexget/git/refs{/sha}","trees_url":"https://api.github.com/repos/Flexget/Flexget/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Flexget/Flexget/statuses/{sha}","languages_url":"https://api.github.com/repos/Flexget/Flexget/languages","stargazers_url":"https://api.github.com/repos/Flexget/Flexget/stargazers","contributors_url":"https://api.github.com/repos/Flexget/Flexget/contributors","subscribers_url":"https://api.github.com/repos/Flexget/Flexget/subscribers","subscription_url":"https://api.github.com/repos/Flexget/Flexget/subscription","commits_url":"https://api.github.com/repos/Flexget/Flexget/commits{/sha}","git_commits_url":"https://api.github.com/repos/Flexget/Flexget/git/commits{/sha}","comments_url":"https://api.github.com/repos/Flexget/Flexget/comments{/number}","issue_comment_url":"https://api.github.com/repos/Flexget/Flexget/issues/comments{/number}","contents_url":"https://api.github.com/repos/Flexget/Flexget/contents/{+path}","compare_url":"https://api.github.com/repos/Flexget/Flexget/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Flexget/Flexget/merges","archive_url":"https://api.github.com/repos/Flexget/Flexget/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Flexget/Flexget/downloads","issues_url":"https://api.github.com/repos/Flexget/Flexget/issues{/number}","pulls_url":"https://api.github.com/repos/Flexget/Flexget/pulls{/number}","milestones_url":"https://api.github.com/repos/Flexget/Flexget/milestones{/number}","notifications_url":"https://api.github.com/repos/Flexget/Flexget/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Flexget/Flexget/labels{/name}","releases_url":"https://api.github.com/repos/Flexget/Flexget/releases{/id}","deployments_url":"https://api.github.com/repos/Flexget/Flexget/deployments","created_at":"2011-03-22T19:33:44Z","updated_at":"2016-10-11T14:15:08Z","pushed_at":"2016-10-12T16:47:12Z","git_url":"git://github.com/Flexget/Flexget.git","ssh_url":"git@github.com:Flexget/Flexget.git","clone_url":"https://github.com/Flexget/Flexget.git","svn_url":"https://github.com/Flexget/Flexget","homepage":"http://www.flexget.com","size":54617,"stargazers_count":557,"watchers_count":557,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":319,"mirror_url":null,"open_issues_count":92,"forks":319,"open_issues":92,"watchers":557,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/1437"},"html":{"href":"https://github.com/Flexget/Flexget/pull/1437"},"issue":{"href":"https://api.github.com/repos/Flexget/Flexget/issues/1437"},"comments":{"href":"https://api.github.com/repos/Flexget/Flexget/issues/1437/comments"},"review_comments":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/1437/comments"},"review_comment":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Flexget/Flexget/pulls/1437/commits"},"statuses":{"href":"https://api.github.com/repos/Flexget/Flexget/statuses/1669f4cd8cddcbd734bea47a9f9c5eca04970bd0"}}}}
{"actor":{"display_login":"cvium"}}