{"action":"created","comment":{"url":"https://api.github.com/repos/musicbrainz/picard/pulls/comments/45453345","id":45453345,"diff_hunk":"@@ -30,72 +37,304 @@\n except ImportError:\n     OggOpus = None\n     with_opus = False\n-from picard import config, log\n-from picard.coverart.image import TagCoverArtImage, CoverArtImageError\n-from picard.file import File\n-from picard.formats.id3 import types_from_id3, image_type_as_id3_num\n-from picard.metadata import Metadata\n-from picard.util import encode_filename, sanitize_date\n+\n+import base64\n+from os import path\n+from time import strftime, gmtime, gmtime\n \n \n class VCommentFile(File):\n \n-    \"\"\"Generic VComment-based file.\"\"\"\n+    \"\"\"\n+    Generic VComment-based file.\n+    Specifications:\n+        Formal spec: http://www.xiph.org/vorbis/doc/v-comment.html\n+        In the wild: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20090716/e2db9203/attachment-0001.xls\n+        See also: http://age.hobba.nl/audio/mirroredpages/ogg-tagging.html\n+        See also: http://www.mediamonkey.com/wiki/index.php/WebHelp:About_Track_Properties/4.0\n+    \"\"\"\n     _File = None\n \n-    __translate = {\n-        \"musicbrainz_trackid\": \"musicbrainz_recordingid\",\n-        \"musicbrainz_releasetrackid\": \"musicbrainz_trackid\",\n+    __load_tags = {\n+        # The following are taken from official V-Comment spec. at:\n+        # http://www.xiph.org/vorbis/doc/v-comment.html\n+        \"title\": \"title\",\n+        #\"version\": \"~releasecomment\",\n+        \"album\": \"album\",\n+        \"tracknumber\": \"tracknumber\",\n+        \"artist\": \"artist\",\n+        \"performer\": \"performer\",\n+        \"copyright\": \"copyright\",\n+        \"license\": \"license\",\n+        \"organization\": \"label\",\n+        #\"description\": \"?\",\n+        \"genre\": \"genre\",\n+        \"date\": \"date\",\n+        \"location\": \"recordinglocation\",\n+        \"contact\": \"web_official_label\",\n+        \"isrc\": \"isrc\",\n+\n+        # The following are taken from field recommendations at:\n+        # http://age.hobba.nl/audio/mirroredpages/ogg-tagging.html\n+        \"artist\": \"artist\",\n+        \"publisher\": \"label\",\n+        \"label\": \"label\",\n+        \"discnumber\": \"discnumber\",\n+        \"disc\": \"discnumber\",\n+        \"barcode\": \"barcode\",\n+        \"ean/upn\": \"barcode\",\n+        \"productnumber\": \"barcode\",\n+        \"labelno\": \"catalognumber\",\n+        \"sourcemedia\": \"media\",\n+        #\"version\": \"?\",\n+        \"encoded-by\": \"encodedby\",\n+        \"vendor\": \"encodedby\",\n+        \"encoder\": \"encodersettings\",\n+        \"composer\": \"composer\",\n+        \"arranger\": \"arranger\",\n+        \"lyricist\": \"lyricist\",\n+        \"author\": \"?\",\n+        \"conductor\": \"conductor\",\n+        \"ensemble\": \"albumartist\",\n+        #\"part\": \"?\",\n+        #\"partnumber\": \"?\",\n+        \"comment\": \"comment\",\n+\n+        # The following have been derived from Jaikoz compatibility\n+        \"acoustid_fingerprint\": \"acoustid_fingerprint\",\n+        \"acoustid_id\": \"acoustid_id\",\n+        \"albumartist\": \"albumartist\",\n+        \"albumartists\": \"albumartists\",\n+        \"albumartistsort\": \"albumartistsort\",\n+        \"albumsort\": \"albumsort\",\n+        \"artistsort\": \"artistsort\",\n+        \"artists\": \"artists\",\n+        \"asin\": \"asin\",\n+        \"bpm\": \"bpm\",\n+        \"catalognumber\": \"catalognumber\", # jaikoz\n+        \"compilation\": \"compilation\",\n+        \"composersort\": \"composersort\",\n+        \"country\": \"country\",\n+        \"djmixer\": \"djmixer\",\n+        \"engineer\": \"engineer\",\n+        \"grouping\": \"grouping\",\n+        \"key\": \"key\",\n+        \"initialkey\": \"key\",\n+        \"language\": \"language\",\n+        \"lyrics\": \"lyrics\",\n+        \"url_lyrics_site\": \"web_lyrics\",\n+        \"media\": \"media\",\n+        \"mixer\": \"mixer\",\n+        \"mood\": \"mood\",\n+        \"occasion\": \"occasion\",\n+        \"url_official_artist_site\": \"web_official_artist\", # changed from website for compatibility with jaikoz\n+        \"url_official_release_site\": \"web_official_release\",\n+        \"original album\": \"originalalbum\",\n+        \"original artist\": \"originalartist\",\n+        \"original lyricist\": \"originallyricist\",\n+        \"producer\": \"producer\",\n+        \"quality\": \"quality\",\n+        \"rating\": \"~rating\",\n+        \"releasecountry\": \"releasecountry\",\n+        \"musicbrainz_albumstatus\": \"releasestatus\",\n+        \"musicbrainz_albumtype\": \"releasetype\",\n+        \"remixer\": \"remixer\",\n+        \"script\": \"script\",\n+        \"tempo\": \"tempo\",\n+        \"titlesort\": \"titlesort\",\n+        \"disctotal\": \"totaldiscs\",\n+        \"tracktotal\": \"totaltracks\",\n+        \"totaltracks\": \"totaltracks\",\n+        \"totaldiscs\": \"totaldiscs\",\n+        \"url_wikipedia_artist_site\": \"web_wikipedia_artist\",\n+        \"url_wikipedia_release_site\": \"web_wikipedia_release\",\n+\n+        # The following have been derived from mediamonkey/musicbee empirical usage\n+        \"contentgroup\": \"grouping\", # musicbee compatibility\n+        \"involved people\": \"performer\", # mediamonkey compatibility\n+        \"album artist\": \"albumartist\", # mediamonkey compatibility\n+        \"ensemble\": \"albumartist\", # mediamonkey compatibility\n+        \"involved people\": \"performer\", # mediamonkey compatibility","path":"picard/formats/vorbis.py","position":147,"original_position":147,"commit_id":"6c1a7280da2077bcddd35685b3a3f5f8a60a50de","original_commit_id":"6c1a7280da2077bcddd35685b3a3f5f8a60a50de","user":{"login":"mineo","id":78236,"avatar_url":"https://avatars.githubusercontent.com/u/78236?v=3","gravatar_id":"","url":"https://api.github.com/users/mineo","html_url":"https://github.com/mineo","followers_url":"https://api.github.com/users/mineo/followers","following_url":"https://api.github.com/users/mineo/following{/other_user}","gists_url":"https://api.github.com/users/mineo/gists{/gist_id}","starred_url":"https://api.github.com/users/mineo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mineo/subscriptions","organizations_url":"https://api.github.com/users/mineo/orgs","repos_url":"https://api.github.com/users/mineo/repos","events_url":"https://api.github.com/users/mineo/events{/privacy}","received_events_url":"https://api.github.com/users/mineo/received_events","type":"User","site_admin":false},"body":"Already there a few lines above.","created_at":"2015-11-20T10:13:42Z","updated_at":"2015-11-20T10:13:42Z","html_url":"https://github.com/musicbrainz/picard/pull/433#discussion_r45453345","pull_request_url":"https://api.github.com/repos/musicbrainz/picard/pulls/433","_links":{"self":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/comments/45453345"},"html":{"href":"https://github.com/musicbrainz/picard/pull/433#discussion_r45453345"},"pull_request":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/433"}}},"pull_request":{"url":"https://api.github.com/repos/musicbrainz/picard/pulls/433","id":47944902,"html_url":"https://github.com/musicbrainz/picard/pull/433","diff_url":"https://github.com/musicbrainz/picard/pull/433.diff","patch_url":"https://github.com/musicbrainz/picard/pull/433.patch","issue_url":"https://api.github.com/repos/musicbrainz/picard/issues/433","number":433,"state":"open","locked":false,"title":"Make Picard tags more comprehensive.","user":{"login":"Sophist-UK","id":3001893,"avatar_url":"https://avatars.githubusercontent.com/u/3001893?v=3","gravatar_id":"","url":"https://api.github.com/users/Sophist-UK","html_url":"https://github.com/Sophist-UK","followers_url":"https://api.github.com/users/Sophist-UK/followers","following_url":"https://api.github.com/users/Sophist-UK/following{/other_user}","gists_url":"https://api.github.com/users/Sophist-UK/gists{/gist_id}","starred_url":"https://api.github.com/users/Sophist-UK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sophist-UK/subscriptions","organizations_url":"https://api.github.com/users/Sophist-UK/orgs","repos_url":"https://api.github.com/users/Sophist-UK/repos","events_url":"https://api.github.com/users/Sophist-UK/events{/privacy}","received_events_url":"https://api.github.com/users/Sophist-UK/received_events","type":"User","site_admin":false},"body":"This PR will eventually provide a more comprehensive mapping of Picard tags onto tags supported by various file formats. My intention is to develop this in steps and share code at each step for review comments.\r\n\r\nStep 1: Improve compatibility with Jaikoz based on Philip Wolfer's spreadsheet (see first commit) and add support for as many ID3v2.4 tags that can be easily included. Data will be populated from the standard MB responses where data is included, otherwise they will be left to plugins to populate from e.g. AcousticBrainz, other MB calls for artist details etc.\r\n\r\n> **Step 1 is now complete**\r\n\r\nStep 2: Add test support for Step 1.\r\n\r\nStep 3: Bug fixing.","created_at":"2015-10-16T18:37:14Z","updated_at":"2015-11-20T10:13:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"288840a6d6c21b54d9d64ec9591fa6cd8c68668d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/musicbrainz/picard/pulls/433/commits","review_comments_url":"https://api.github.com/repos/musicbrainz/picard/pulls/433/comments","review_comment_url":"https://api.github.com/repos/musicbrainz/picard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/musicbrainz/picard/issues/433/comments","statuses_url":"https://api.github.com/repos/musicbrainz/picard/statuses/6c1a7280da2077bcddd35685b3a3f5f8a60a50de","head":{"label":"Sophist-UK:sophist_add_tags_Jaikoz_compatibility","ref":"sophist_add_tags_Jaikoz_compatibility","sha":"6c1a7280da2077bcddd35685b3a3f5f8a60a50de","user":{"login":"Sophist-UK","id":3001893,"avatar_url":"https://avatars.githubusercontent.com/u/3001893?v=3","gravatar_id":"","url":"https://api.github.com/users/Sophist-UK","html_url":"https://github.com/Sophist-UK","followers_url":"https://api.github.com/users/Sophist-UK/followers","following_url":"https://api.github.com/users/Sophist-UK/following{/other_user}","gists_url":"https://api.github.com/users/Sophist-UK/gists{/gist_id}","starred_url":"https://api.github.com/users/Sophist-UK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sophist-UK/subscriptions","organizations_url":"https://api.github.com/users/Sophist-UK/orgs","repos_url":"https://api.github.com/users/Sophist-UK/repos","events_url":"https://api.github.com/users/Sophist-UK/events{/privacy}","received_events_url":"https://api.github.com/users/Sophist-UK/received_events","type":"User","site_admin":false},"repo":{"id":10217817,"name":"Sophist_picard","full_name":"Sophist-UK/Sophist_picard","owner":{"login":"Sophist-UK","id":3001893,"avatar_url":"https://avatars.githubusercontent.com/u/3001893?v=3","gravatar_id":"","url":"https://api.github.com/users/Sophist-UK","html_url":"https://github.com/Sophist-UK","followers_url":"https://api.github.com/users/Sophist-UK/followers","following_url":"https://api.github.com/users/Sophist-UK/following{/other_user}","gists_url":"https://api.github.com/users/Sophist-UK/gists{/gist_id}","starred_url":"https://api.github.com/users/Sophist-UK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sophist-UK/subscriptions","organizations_url":"https://api.github.com/users/Sophist-UK/orgs","repos_url":"https://api.github.com/users/Sophist-UK/repos","events_url":"https://api.github.com/users/Sophist-UK/events{/privacy}","received_events_url":"https://api.github.com/users/Sophist-UK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sophist-UK/Sophist_picard","description":"MusicBrainz Picard","fork":true,"url":"https://api.github.com/repos/Sophist-UK/Sophist_picard","forks_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/forks","keys_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/teams","hooks_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/hooks","issue_events_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/issues/events{/number}","events_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/events","assignees_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/assignees{/user}","branches_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/branches{/branch}","tags_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/tags","blobs_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/statuses/{sha}","languages_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/languages","stargazers_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/stargazers","contributors_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/contributors","subscribers_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/subscribers","subscription_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/subscription","commits_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/contents/{+path}","compare_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/merges","archive_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/downloads","issues_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/issues{/number}","pulls_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/pulls{/number}","milestones_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/milestones{/number}","notifications_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/labels{/name}","releases_url":"https://api.github.com/repos/Sophist-UK/Sophist_picard/releases{/id}","created_at":"2013-05-22T10:57:29Z","updated_at":"2015-09-28T21:42:43Z","pushed_at":"2015-11-19T22:07:15Z","git_url":"git://github.com/Sophist-UK/Sophist_picard.git","ssh_url":"git@github.com:Sophist-UK/Sophist_picard.git","clone_url":"https://github.com/Sophist-UK/Sophist_picard.git","svn_url":"https://github.com/Sophist-UK/Sophist_picard","homepage":"http://musicbrainz.org/doc/MusicBrainz_Picard","size":21853,"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":"musicbrainz:master","ref":"master","sha":"34af84fbef27dd1abed71b437311a14e074452b4","user":{"login":"musicbrainz","id":412454,"avatar_url":"https://avatars.githubusercontent.com/u/412454?v=3","gravatar_id":"","url":"https://api.github.com/users/musicbrainz","html_url":"https://github.com/musicbrainz","followers_url":"https://api.github.com/users/musicbrainz/followers","following_url":"https://api.github.com/users/musicbrainz/following{/other_user}","gists_url":"https://api.github.com/users/musicbrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/musicbrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/musicbrainz/subscriptions","organizations_url":"https://api.github.com/users/musicbrainz/orgs","repos_url":"https://api.github.com/users/musicbrainz/repos","events_url":"https://api.github.com/users/musicbrainz/events{/privacy}","received_events_url":"https://api.github.com/users/musicbrainz/received_events","type":"User","site_admin":false},"repo":{"id":2218679,"name":"picard","full_name":"musicbrainz/picard","owner":{"login":"musicbrainz","id":412454,"avatar_url":"https://avatars.githubusercontent.com/u/412454?v=3","gravatar_id":"","url":"https://api.github.com/users/musicbrainz","html_url":"https://github.com/musicbrainz","followers_url":"https://api.github.com/users/musicbrainz/followers","following_url":"https://api.github.com/users/musicbrainz/following{/other_user}","gists_url":"https://api.github.com/users/musicbrainz/gists{/gist_id}","starred_url":"https://api.github.com/users/musicbrainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/musicbrainz/subscriptions","organizations_url":"https://api.github.com/users/musicbrainz/orgs","repos_url":"https://api.github.com/users/musicbrainz/repos","events_url":"https://api.github.com/users/musicbrainz/events{/privacy}","received_events_url":"https://api.github.com/users/musicbrainz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/musicbrainz/picard","description":"MusicBrainz Picard","fork":false,"url":"https://api.github.com/repos/musicbrainz/picard","forks_url":"https://api.github.com/repos/musicbrainz/picard/forks","keys_url":"https://api.github.com/repos/musicbrainz/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/musicbrainz/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/musicbrainz/picard/teams","hooks_url":"https://api.github.com/repos/musicbrainz/picard/hooks","issue_events_url":"https://api.github.com/repos/musicbrainz/picard/issues/events{/number}","events_url":"https://api.github.com/repos/musicbrainz/picard/events","assignees_url":"https://api.github.com/repos/musicbrainz/picard/assignees{/user}","branches_url":"https://api.github.com/repos/musicbrainz/picard/branches{/branch}","tags_url":"https://api.github.com/repos/musicbrainz/picard/tags","blobs_url":"https://api.github.com/repos/musicbrainz/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/musicbrainz/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/musicbrainz/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/musicbrainz/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/musicbrainz/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/musicbrainz/picard/languages","stargazers_url":"https://api.github.com/repos/musicbrainz/picard/stargazers","contributors_url":"https://api.github.com/repos/musicbrainz/picard/contributors","subscribers_url":"https://api.github.com/repos/musicbrainz/picard/subscribers","subscription_url":"https://api.github.com/repos/musicbrainz/picard/subscription","commits_url":"https://api.github.com/repos/musicbrainz/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/musicbrainz/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/musicbrainz/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/musicbrainz/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/musicbrainz/picard/contents/{+path}","compare_url":"https://api.github.com/repos/musicbrainz/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/musicbrainz/picard/merges","archive_url":"https://api.github.com/repos/musicbrainz/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/musicbrainz/picard/downloads","issues_url":"https://api.github.com/repos/musicbrainz/picard/issues{/number}","pulls_url":"https://api.github.com/repos/musicbrainz/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/musicbrainz/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/musicbrainz/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/musicbrainz/picard/labels{/name}","releases_url":"https://api.github.com/repos/musicbrainz/picard/releases{/id}","created_at":"2011-08-16T22:30:23Z","updated_at":"2015-11-18T14:46:34Z","pushed_at":"2015-11-19T22:07:15Z","git_url":"git://github.com/musicbrainz/picard.git","ssh_url":"git@github.com:musicbrainz/picard.git","clone_url":"https://github.com/musicbrainz/picard.git","svn_url":"https://github.com/musicbrainz/picard","homepage":"http://musicbrainz.org/doc/MusicBrainz_Picard","size":41548,"stargazers_count":604,"watchers_count":604,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":18,"forks":129,"open_issues":18,"watchers":604,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/433"},"html":{"href":"https://github.com/musicbrainz/picard/pull/433"},"issue":{"href":"https://api.github.com/repos/musicbrainz/picard/issues/433"},"comments":{"href":"https://api.github.com/repos/musicbrainz/picard/issues/433/comments"},"review_comments":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/433/comments"},"review_comment":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/musicbrainz/picard/pulls/433/commits"},"statuses":{"href":"https://api.github.com/repos/musicbrainz/picard/statuses/6c1a7280da2077bcddd35685b3a3f5f8a60a50de"}}}}