IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> verify md5?
soulstace
post Sep 6 2007, 09:03
Post #1


Member


Group: Full Members
Posts: 5
Joined: 6-September 07
Member No.: 5566
Mp3tag Version: 239



I created md5 of my music collection with mp3tag. Can mp3tag verify md5?

Media players keep messin' with the file dates and tags/content, which makes my backup utility back up more files than needed. All I really care is that %_md5audio% matches, so I don't have to keep copying the entire music folder over and over again.

Thanks for your help.

This post has been edited by soulstace: Sep 6 2007, 09:05
Go to the top of the page
 
+Quote Post
Sebastian Mares
post Sep 7 2007, 21:18
Post #2


Moderator


Group: Full Members
Posts: 2275
Joined: 15-June 03
From: Bad Herrenalb
Member No.: 496
Mp3tag Version: 2.59a



If you have the MD5 data stored inside a tag, you can create an export configuration and look if the string %_md5audio% was found in your tag field using $strstr(). If yes, tell Mp3tag to write "OK", otherwise write "Error".

Something like...

CODE
$loop(%_path%)%_path% - $ifgreater($strstr(%_md5audio%,%field_containing_hash%),0,OK,Error)
$loopend()


--------------------
There are 10 types of people in this world: those who understand binary, and those who don't.
Go to the top of the page
 
+Quote Post
soulstace
post Sep 14 2007, 15:37
Post #3


Member


Group: Full Members
Posts: 5
Joined: 6-September 07
Member No.: 5566
Mp3tag Version: 239



Hi Sebastian, thanks for your help smile.gif

Nice idea! Here is what I have so far.

I open some mp3s.
Sort by Filename (Ascending).
Edit > Select all files.
Right-click on the first file in the list > Export the checksums to a text file md5.txt with the following script:

CODE
$loop(%_filename%)%_md5audio%
$loopend()


Then I import them back by Right-clicking the first file again (while they are all still selected)

Convert -> Text file - Tag

Using the format string %isrc%

As you see, the Convert -> Text file - Tag function will pull the checksums from md5.txt into the ISRC field.

This works, and I can verify it with your script above, by changing %field_containing_hash% to %isrc% and exporting to verify.txt.

Have I done it the best way? Or is there another way which doesn't involve exporting and importing the fields back in.

I tried creating a custom action but it didn't seem to work. It just wrote %_md5audio% in the field instead of the actual checksum.

Any other ideas?


Thanks a lot!

This post has been edited by soulstace: Sep 17 2007, 00:42
Go to the top of the page
 
+Quote Post
Sebastian Mares
post Sep 15 2007, 10:13
Post #4


Moderator


Group: Full Members
Posts: 2275
Joined: 15-June 03
From: Bad Herrenalb
Member No.: 496
Mp3tag Version: 2.59a



Your solution seems to be OK, as there is no way to tell Mp3tag to write the MD5 into the tags directly - it is only supported for exports as far as I know.

BTW, ISRC is not really the best field for storing MD5 data since ISRC usually contains the ISO 3901 code of the recording given by the IFPI.


--------------------
There are 10 types of people in this world: those who understand binary, and those who don't.
Go to the top of the page
 
+Quote Post
soulstace
post Sep 17 2007, 00:24
Post #5


Member


Group: Full Members
Posts: 5
Joined: 6-September 07
Member No.: 5566
Mp3tag Version: 239



Hi Sebastian,

I made a couple revises to my scripts. There was a bug in my method. When exporting the md5, and importing them back, the wrong md5 could get imported in some tracks!

Luckily, I figured it out after some time. In the md5 creation script, it is much better to loop by %_filename%, not %_path%

If you loop by %_path%, the exported checksums might be imported in the wrong order! Because, for some reason or other, mp3tag sorts the paths columns differently in the GUI than in the exported txt file. Therefore verification would fail.

The exported file resulting from my revised script will match up correctly when the GUI has been sorted by the Filename column. I will update my last post with the changes.


In the mean time, which field would you recommend storing the checksums in? I thought about using the comment field, but I already have interesting comments in many of my songs!



~ss

This post has been edited by soulstace: Sep 17 2007, 00:56
Go to the top of the page
 
+Quote Post
Sebastian Mares
post Sep 17 2007, 07:01
Post #6


Moderator


Group: Full Members
Posts: 2275
Joined: 15-June 03
From: Bad Herrenalb
Member No.: 496
Mp3tag Version: 2.59a



You can create your own "CHECKSUM" or "MD5" field. Both ID3v2 and APEv2 support that.


--------------------
There are 10 types of people in this world: those who understand binary, and those who don't.
Go to the top of the page
 
+Quote Post
soulstace
post Sep 17 2007, 16:11
Post #7


Member


Group: Full Members
Posts: 5
Joined: 6-September 07
Member No.: 5566
Mp3tag Version: 239



Got it! Thanks again for your help!



~ss

This post has been edited by soulstace: Sep 17 2007, 16:11
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd August 2014 - 05:31