0

I want to use the script from http://snipplr.com/view/4025/mp3-checksum-in-id3-tag/ to equip my mp3 collection with md5 checksums. The script can add a custom ID3 tag that holds the checksum of the audio data and it has as well the option to remove that checksum. Unfortunately adding and removing checksum does not pass a round-trip test for several reasons. I want to change that. One reason is that a “Tagging time” field is created when the script is run but it is not removed when the checksum is removed, the time is even updated. IIUC the --no-tagging-time-frame option will prevent this for the eyed3 tool on the command line, but I cannot find a python equivalent. How can I prevent the tagging time to be altered or set in python?


Some more details:

I added and subsequently removed a checksum on a copy of the original file and compared both files. That's the differences of the binary data for the best case:

Original:

0003 3060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 3070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 3080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 3090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 30A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 30B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........

Copy with checksum:

0003 3060: 00 00 00 00 00 00 54 58  58 58 00 00 00 21 00 00  ......TX XX...!..
0003 3070: 00 54 61 67 67 69 6E 67  20 74 69 6D 65 00 32 30  .Tagging time.20
0003 3080: 31 36 2D 30 31 2D 31 32  54 32 32 3A 33 31 3A 30  16-01-12 T22:31:0
0003 3090: 38 55 46 49 44 00 00 00  24 00 00 6D 64 35 00 64  8UFID... $..md5.d
0003 30A0: 34 35 64 30 62 32 34 36  38 62 31 64 38 31 31 35  45d0b246 8b1d8115
0003 30B0: 31 39 30 32 30 62 37 62  30 30 33 35 37 33 34 00  19020b7b 0035734.

Copy with checksum removed:

0003 3060: 00 00 00 00 00 00 54 58  58 58 00 00 00 21 00 00  ......TX XX...!..
0003 3070: 00 54 61 67 67 69 6E 67  20 74 69 6D 65 00 32 30  .Tagging time.20
0003 3080: 31 36 2D 30 31 2D 31 34  54 30 38 3A 33 34 3A 35  16-01-14 T08:34:5
0003 3090: 39 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  9....... ........
0003 30A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
0003 30B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........

In other files more changes are introduced, I will come back to that problem when the first one is solved.

Chris
  • 103
  • 3
  • What I wanted to add but only as comment: I tried to post the question to the project's mailing list first (https://groups.google.com/forum/?fromgroups#!forum/eyed3-users). I even subscribed to the list by email (I have no google account) which worked, but my posts are still rejected. – Chris Jan 14 '16 at 09:03
  • What version of eyeD3 are you using? – strubbly Feb 27 '16 at 08:59
  • I looked in 0.7.9 (the current version, I think) and couldn't find the code for the tagging time change. Perhaps you could try that version? – strubbly Feb 29 '16 at 08:25
  • Actually looks like the API is different and 0.7 won't work with your driver code ... – strubbly Feb 29 '16 at 08:38

1 Answers1

0

The best solution, I think, would be to move to the newer 0.7 series (or even use some other library - I like mutagen). The 0.6.18 version is pretty old. But doing either of these will break your script - the API has changed.

If you want to just make the minimal changes to the existing script, I suggest you just add

tag.do_tdtg = False

before each of the tag.update calls in the script. I think that will turn off the time updating behaviour.

strubbly
  • 3,347
  • 3
  • 24
  • 36