{"action":"created","comment":{"url":"https://api.github.com/repos/metabrainz/picard/pulls/comments/76086141","id":76086141,"diff_hunk":"@@ -406,29 +401,20 @@ def parse_tracks_from_xml(self, tracks_xml):\n                     release_to_metadata(rel_node, track)\n                     rg_node = rel_node.release_group[0]\n                     release_group_to_metadata(rg_node, track)\n-                    if \"release_event_list\" in rel_node.children:\n-                        # Extract contries list from `release_event_list` element\n-                        # Don't use `country` element as it contains information of a single release\n-                        # event and is basically for backward compatibility.\n-                        country = []\n-                        for re in rel_node.release_event_list[0].release_event:\n-                            try:\n-                                country.append(\n-                                        re.area[0].iso_3166_1_code_list[0].iso_3166_1_code[0].text)\n-                            except AttributeError:\n-                                pass\n-                        track[\"country\"] = \", \".join(country)\n+                    countries = country_list_from_node(rel_node)\n+                    if countries:\n+                        track[\"country\"] = \", \".join(countries)\n                     self.search_results.append((track, node))\n             else:\n                 # This handles the case when no release is associated with a track\n-                # i.e. the track is a NAT\n+                # i.e. the track is an NAT","path":"picard/ui/searchdialog.py","position":287,"original_position":287,"commit_id":"66a15245cfbec9db57a58ac78ffbff2eca662821","original_commit_id":"851b581ebebfa79dde98ef0e3e0b5d84bc1be713","user":{"login":"mwiencek","id":1056556,"avatar_url":"https://avatars.githubusercontent.com/u/1056556?v=3","gravatar_id":"","url":"https://api.github.com/users/mwiencek","html_url":"https://github.com/mwiencek","followers_url":"https://api.github.com/users/mwiencek/followers","following_url":"https://api.github.com/users/mwiencek/following{/other_user}","gists_url":"https://api.github.com/users/mwiencek/gists{/gist_id}","starred_url":"https://api.github.com/users/mwiencek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwiencek/subscriptions","organizations_url":"https://api.github.com/users/mwiencek/orgs","repos_url":"https://api.github.com/users/mwiencek/repos","events_url":"https://api.github.com/users/mwiencek/events{/privacy}","received_events_url":"https://api.github.com/users/mwiencek/received_events","type":"User","site_admin":false},"body":"Haha, good point, there isn't a right or wrong way. I say gnat (if it was N.A.T. I'd pronounce it as an initialism). But since it's your writing you can keep it how you like.","created_at":"2016-08-24T16:01:14Z","updated_at":"2016-08-24T16:01:14Z","html_url":"https://github.com/metabrainz/picard/pull/486#discussion_r76086141","pull_request_url":"https://api.github.com/repos/metabrainz/picard/pulls/486","_links":{"self":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/comments/76086141"},"html":{"href":"https://github.com/metabrainz/picard/pull/486#discussion_r76086141"},"pull_request":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/486"}}},"pull_request":{"url":"https://api.github.com/repos/metabrainz/picard/pulls/486","id":81302013,"html_url":"https://github.com/metabrainz/picard/pull/486","diff_url":"https://github.com/metabrainz/picard/pull/486.diff","patch_url":"https://github.com/metabrainz/picard/pull/486.patch","issue_url":"https://api.github.com/repos/metabrainz/picard/issues/486","number":486,"state":"open","locked":false,"title":"Search releases from within a Picard dialog","user":{"login":"rahul-raturi","id":7776696,"avatar_url":"https://avatars.githubusercontent.com/u/7776696?v=3","gravatar_id":"","url":"https://api.github.com/users/rahul-raturi","html_url":"https://github.com/rahul-raturi","followers_url":"https://api.github.com/users/rahul-raturi/followers","following_url":"https://api.github.com/users/rahul-raturi/following{/other_user}","gists_url":"https://api.github.com/users/rahul-raturi/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul-raturi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul-raturi/subscriptions","organizations_url":"https://api.github.com/users/rahul-raturi/orgs","repos_url":"https://api.github.com/users/rahul-raturi/repos","events_url":"https://api.github.com/users/rahul-raturi/events{/privacy}","received_events_url":"https://api.github.com/users/rahul-raturi/received_events","type":"User","site_admin":false},"body":"This PR is a continuation of #475.\r\n\r\n### How to trigger the dialog?\r\n\r\nTwo ways:\r\n\r\n1. Directly type in the query in the search box at top right corner, selecting **Album** from drop down menu (assuming builtin search is enabled, from options -> user interface).\r\n2. Select a cluster, display additional options by right clicking on it, and choose `Search for similar albums...` from them.\r\n\r\n### Screenshot\r\n![screenshot from 2016-08-15 17-08-09](https://cloud.githubusercontent.com/assets/7776696/17663566/0fbcb212-630b-11e6-9f30-fc44e085dc3b.png)","created_at":"2016-08-15T11:49:11Z","updated_at":"2016-08-24T16:01:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9712b3e278620f7658a4669419628a24d2861658","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/metabrainz/picard/pulls/486/commits","review_comments_url":"https://api.github.com/repos/metabrainz/picard/pulls/486/comments","review_comment_url":"https://api.github.com/repos/metabrainz/picard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabrainz/picard/issues/486/comments","statuses_url":"https://api.github.com/repos/metabrainz/picard/statuses/66a15245cfbec9db57a58ac78ffbff2eca662821","head":{"label":"rahul-raturi:embed_search_release","ref":"embed_search_release","sha":"66a15245cfbec9db57a58ac78ffbff2eca662821","user":{"login":"rahul-raturi","id":7776696,"avatar_url":"https://avatars.githubusercontent.com/u/7776696?v=3","gravatar_id":"","url":"https://api.github.com/users/rahul-raturi","html_url":"https://github.com/rahul-raturi","followers_url":"https://api.github.com/users/rahul-raturi/followers","following_url":"https://api.github.com/users/rahul-raturi/following{/other_user}","gists_url":"https://api.github.com/users/rahul-raturi/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul-raturi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul-raturi/subscriptions","organizations_url":"https://api.github.com/users/rahul-raturi/orgs","repos_url":"https://api.github.com/users/rahul-raturi/repos","events_url":"https://api.github.com/users/rahul-raturi/events{/privacy}","received_events_url":"https://api.github.com/users/rahul-raturi/received_events","type":"User","site_admin":false},"repo":{"id":48329625,"name":"picard","full_name":"rahul-raturi/picard","owner":{"login":"rahul-raturi","id":7776696,"avatar_url":"https://avatars.githubusercontent.com/u/7776696?v=3","gravatar_id":"","url":"https://api.github.com/users/rahul-raturi","html_url":"https://github.com/rahul-raturi","followers_url":"https://api.github.com/users/rahul-raturi/followers","following_url":"https://api.github.com/users/rahul-raturi/following{/other_user}","gists_url":"https://api.github.com/users/rahul-raturi/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul-raturi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul-raturi/subscriptions","organizations_url":"https://api.github.com/users/rahul-raturi/orgs","repos_url":"https://api.github.com/users/rahul-raturi/repos","events_url":"https://api.github.com/users/rahul-raturi/events{/privacy}","received_events_url":"https://api.github.com/users/rahul-raturi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rahul-raturi/picard","description":"MusicBrainz Picard","fork":true,"url":"https://api.github.com/repos/rahul-raturi/picard","forks_url":"https://api.github.com/repos/rahul-raturi/picard/forks","keys_url":"https://api.github.com/repos/rahul-raturi/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rahul-raturi/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rahul-raturi/picard/teams","hooks_url":"https://api.github.com/repos/rahul-raturi/picard/hooks","issue_events_url":"https://api.github.com/repos/rahul-raturi/picard/issues/events{/number}","events_url":"https://api.github.com/repos/rahul-raturi/picard/events","assignees_url":"https://api.github.com/repos/rahul-raturi/picard/assignees{/user}","branches_url":"https://api.github.com/repos/rahul-raturi/picard/branches{/branch}","tags_url":"https://api.github.com/repos/rahul-raturi/picard/tags","blobs_url":"https://api.github.com/repos/rahul-raturi/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rahul-raturi/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rahul-raturi/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/rahul-raturi/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rahul-raturi/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/rahul-raturi/picard/languages","stargazers_url":"https://api.github.com/repos/rahul-raturi/picard/stargazers","contributors_url":"https://api.github.com/repos/rahul-raturi/picard/contributors","subscribers_url":"https://api.github.com/repos/rahul-raturi/picard/subscribers","subscription_url":"https://api.github.com/repos/rahul-raturi/picard/subscription","commits_url":"https://api.github.com/repos/rahul-raturi/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/rahul-raturi/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/rahul-raturi/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/rahul-raturi/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/rahul-raturi/picard/contents/{+path}","compare_url":"https://api.github.com/repos/rahul-raturi/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rahul-raturi/picard/merges","archive_url":"https://api.github.com/repos/rahul-raturi/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rahul-raturi/picard/downloads","issues_url":"https://api.github.com/repos/rahul-raturi/picard/issues{/number}","pulls_url":"https://api.github.com/repos/rahul-raturi/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/rahul-raturi/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/rahul-raturi/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rahul-raturi/picard/labels{/name}","releases_url":"https://api.github.com/repos/rahul-raturi/picard/releases{/id}","deployments_url":"https://api.github.com/repos/rahul-raturi/picard/deployments","created_at":"2015-12-20T16:57:20Z","updated_at":"2016-01-14T17:18:40Z","pushed_at":"2016-08-24T09:26:43Z","git_url":"git://github.com/rahul-raturi/picard.git","ssh_url":"git@github.com:rahul-raturi/picard.git","clone_url":"https://github.com/rahul-raturi/picard.git","svn_url":"https://github.com/rahul-raturi/picard","homepage":"http://musicbrainz.org/doc/MusicBrainz_Picard","size":22109,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"metabrainz:master","ref":"master","sha":"b0a70febf9f003a54b4ed77d0b5f7bc02cac4432","user":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"repo":{"id":2218679,"name":"picard","full_name":"metabrainz/picard","owner":{"login":"metabrainz","id":293421,"avatar_url":"https://avatars.githubusercontent.com/u/293421?v=3","gravatar_id":"","url":"https://api.github.com/users/metabrainz","html_url":"https://github.com/metabrainz","followers_url":"https://api.github.com/users/metabrainz/followers","following_url":"https://api.github.com/users/metabrainz/following{/other_user}","gists_url":"https://api.github.com/users/metabrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/metabrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabrainz/subscriptions","organizations_url":"https://api.github.com/users/metabrainz/orgs","repos_url":"https://api.github.com/users/metabrainz/repos","events_url":"https://api.github.com/users/metabrainz/events{/privacy}","received_events_url":"https://api.github.com/users/metabrainz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabrainz/picard","description":"MusicBrainz Picard","fork":false,"url":"https://api.github.com/repos/metabrainz/picard","forks_url":"https://api.github.com/repos/metabrainz/picard/forks","keys_url":"https://api.github.com/repos/metabrainz/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabrainz/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabrainz/picard/teams","hooks_url":"https://api.github.com/repos/metabrainz/picard/hooks","issue_events_url":"https://api.github.com/repos/metabrainz/picard/issues/events{/number}","events_url":"https://api.github.com/repos/metabrainz/picard/events","assignees_url":"https://api.github.com/repos/metabrainz/picard/assignees{/user}","branches_url":"https://api.github.com/repos/metabrainz/picard/branches{/branch}","tags_url":"https://api.github.com/repos/metabrainz/picard/tags","blobs_url":"https://api.github.com/repos/metabrainz/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabrainz/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabrainz/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabrainz/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabrainz/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/metabrainz/picard/languages","stargazers_url":"https://api.github.com/repos/metabrainz/picard/stargazers","contributors_url":"https://api.github.com/repos/metabrainz/picard/contributors","subscribers_url":"https://api.github.com/repos/metabrainz/picard/subscribers","subscription_url":"https://api.github.com/repos/metabrainz/picard/subscription","commits_url":"https://api.github.com/repos/metabrainz/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabrainz/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabrainz/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabrainz/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabrainz/picard/contents/{+path}","compare_url":"https://api.github.com/repos/metabrainz/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabrainz/picard/merges","archive_url":"https://api.github.com/repos/metabrainz/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabrainz/picard/downloads","issues_url":"https://api.github.com/repos/metabrainz/picard/issues{/number}","pulls_url":"https://api.github.com/repos/metabrainz/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/metabrainz/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/metabrainz/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabrainz/picard/labels{/name}","releases_url":"https://api.github.com/repos/metabrainz/picard/releases{/id}","deployments_url":"https://api.github.com/repos/metabrainz/picard/deployments","created_at":"2011-08-16T22:30:23Z","updated_at":"2016-08-24T08:20:49Z","pushed_at":"2016-08-24T09:26:43Z","git_url":"git://github.com/metabrainz/picard.git","ssh_url":"git@github.com:metabrainz/picard.git","clone_url":"https://github.com/metabrainz/picard.git","svn_url":"https://github.com/metabrainz/picard","homepage":"http://musicbrainz.org/doc/MusicBrainz_Picard","size":42752,"stargazers_count":783,"watchers_count":783,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":23,"forks":160,"open_issues":23,"watchers":783,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/486"},"html":{"href":"https://github.com/metabrainz/picard/pull/486"},"issue":{"href":"https://api.github.com/repos/metabrainz/picard/issues/486"},"comments":{"href":"https://api.github.com/repos/metabrainz/picard/issues/486/comments"},"review_comments":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/486/comments"},"review_comment":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabrainz/picard/pulls/486/commits"},"statuses":{"href":"https://api.github.com/repos/metabrainz/picard/statuses/66a15245cfbec9db57a58ac78ffbff2eca662821"}}}}
{"actor":{"display_login":"mwiencek"}}