{"action":"created","issue":{"url":"https://api.github.com/repos/JoeLametta/whipper/issues/274","repository_url":"https://api.github.com/repos/JoeLametta/whipper","labels_url":"https://api.github.com/repos/JoeLametta/whipper/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/JoeLametta/whipper/issues/274/comments","events_url":"https://api.github.com/repos/JoeLametta/whipper/issues/274/events","html_url":"https://github.com/JoeLametta/whipper/pull/274","id":321783398,"number":274,"title":"RFC: accuraterip-checksum: convert to python C extension","user":{"login":"mtdcr","id":925299,"avatar_url":"https://avatars3.githubusercontent.com/u/925299?v=4","gravatar_id":"","url":"https://api.github.com/users/mtdcr","html_url":"https://github.com/mtdcr","followers_url":"https://api.github.com/users/mtdcr/followers","following_url":"https://api.github.com/users/mtdcr/following{/other_user}","gists_url":"https://api.github.com/users/mtdcr/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdcr/subscriptions","organizations_url":"https://api.github.com/users/mtdcr/orgs","repos_url":"https://api.github.com/users/mtdcr/repos","events_url":"https://api.github.com/users/mtdcr/events{/privacy}","received_events_url":"https://api.github.com/users/mtdcr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-10T02:00:04Z","updated_at":"2018-05-12T12:55:36Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JoeLametta/whipper/pulls/274","html_url":"https://github.com/JoeLametta/whipper/pull/274","diff_url":"https://github.com/JoeLametta/whipper/pull/274.diff","patch_url":"https://github.com/JoeLametta/whipper/pull/274.patch"},"body":"* calculate v1 and v2 checksums at once\r\n* let libsndfile handle both WAV and FLAC\r\n---\r\nI tested this using the following script:\r\n```\r\n#!/usr/bin/env python\r\n\r\nimport accuraterip\r\n\r\nv1, v2 = accuraterip.compute('Nirvana - Nevermind (Remastered)/01. Nirvana - Smells Like Teen Spirit.flac', 1, 12)\r\nassert(v1 == 0xA0D81775)\r\nassert(v2 == 0x280694C8)\r\n\r\nv1, v2 = accuraterip.compute('Nirvana - Nevermind (Remastered)/02. Nirvana - In Bloom.flac', 2, 12)\r\nassert(v1 == 0x92EC1D7D)\r\nassert(v2 == 0x1AE5FD7A)\r\n\r\nv1, v2 = accuraterip.compute('Nirvana - Nevermind (Remastered)/12. Nirvana - Something in the Way - Endless, Nameless.flac', 12, 12)\r\nassert(v1 == 0x3EAA3B67)\r\nassert(v2 == 0x14C921A5)\r\n\r\nprint(\"OK\")\r\n```\r\nThis may need some more testing. When called with invalid input files, `compute()` returns `None, None`. Note that 0 may be a valid checksum, so the statement `if not v1_sum` in accurip.py may have produced false negatives in the past."},"comment":{"url":"https://api.github.com/repos/JoeLametta/whipper/issues/comments/388553433","html_url":"https://github.com/JoeLametta/whipper/pull/274#issuecomment-388553433","issue_url":"https://api.github.com/repos/JoeLametta/whipper/issues/274","id":388553433,"user":{"login":"mtdcr","id":925299,"avatar_url":"https://avatars3.githubusercontent.com/u/925299?v=4","gravatar_id":"","url":"https://api.github.com/users/mtdcr","html_url":"https://github.com/mtdcr","followers_url":"https://api.github.com/users/mtdcr/followers","following_url":"https://api.github.com/users/mtdcr/following{/other_user}","gists_url":"https://api.github.com/users/mtdcr/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdcr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdcr/subscriptions","organizations_url":"https://api.github.com/users/mtdcr/orgs","repos_url":"https://api.github.com/users/mtdcr/repos","events_url":"https://api.github.com/users/mtdcr/events{/privacy}","received_events_url":"https://api.github.com/users/mtdcr/received_events","type":"User","site_admin":false},"created_at":"2018-05-12T12:55:36Z","updated_at":"2018-05-12T12:55:36Z","author_association":"CONTRIBUTOR","body":"I updated my branch to fix the encoding of the filename passed to accuraterip.compute()."}}
{"actor":{"display_login":"mtdcr"}}