Lyrics and Album from File


Hello all.

I was wondering, is there any possibility to automatically add for instance, an image (album art) to a certain field I define (since I still have to investigate iTunes' tag for album art and lyrics) in a bunch of mp3s?

My music collection is homogeneously organized, which means I can deterministically figure out the album name and so on from files and folders... and I could have let's say, a "folder.jpg" inside each album folder, which would be the image pasted into the metadata. Or maybe that folder.jpg could also have a filename schema after the album's name. Either way is fine.

Also I'd like to do the same for lyrics (which I still have to find out a program that can automatically download lyrics in batch mode!!), in which case I'd have a separate .lrc or .txt file for each mp3.

Can this be done somehow in mp3tag, by means of actions or making my own scripts or something? :slight_smile:

Thanks for your time!!! :music:


If you have the lyrics and covers as local files, you can use the actions
Import cover from file and Import text file
to import them to all files in one go.


Man, I feel so stupid. Long time forum'er and making such dumb questions with the answer right straight on the actions list.. missed that couple.

But thanks a lot man, loving mp3tag a lot more now!!!!!! :smiley:

The cover import is a bit tricky because it seems as it wouldn't recognize name schemes (e.g mine is $replace(%artist%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-) - %year% - $replace(%album%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-).jpg) but it totally does!!!!!!!!!!!!!!
PD: You could also use an absolute path to the covers like
H:\TEST\covers$replace(%artist%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-) - %year% - $replace(%album%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-).jpg

Man, the scripting implementation in mp3tag is absolutely rocking fantastic!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Same thing goes for importing lyrics (in this case, since i need it for iTunes, which uses UNSYNCEDLYRICS field, I added two actions, one searching for .lrc and the other for .txt; provided I don't care the error message that it couldn't find the file, as it will either find the .lrc and not .txt, .txt and not .lrc or none at all for instrumental songs... it's all good!)

In case anyone cares in the future, I added as an attachment the action I created for this purpose, you can even edit it in notepad to suit your taste.


Import_from_files.mta (645 Bytes)


Here is a small enhancement to avoid possible error message and to avoid lost of lyrics data.

Begin Actionsgroup Test 2010#20101022.Import_from_files

Action #1
Actiontype 12: Import cover image from file
Formatstring for image filename: H:\TEST\covers$replace(%artist%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-).jpg

[X] Delete existing cover image

Action #2
Actiontype 14: Import text file
Filename: H:\TEST\lyrics$replace(%artist%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-)÷-÷$num(%track%,2)÷-÷$replace(%title%,/,-,:,-,*,-,?,-,,-,<,-,>,-,|,-).txt

Action #3
Actiontype 14: Import text file
Filename: H:\TEST\lyrics$replace(%artist%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-)÷-÷%year%÷-÷$replace(%album%,/,-,:,-,,-,?,-,,-,<,-,>,-,|,-)÷-÷$num(%track%,2)÷-÷$replace(%title%,/,-,:,-,*,-,?,-,,-,<,-,>,-,|,-).lrc

Action #4
Actiontype 5: Format tag field
Formatstring: $trim(%USLT_TXT%$char(13)$char(10)$char(13)$char(10)%USLT_LRC%,$char(13)$char(10))

Action #5
Actiontype 9: Remove fields
Fields to remove (semicolon separated): USLT_TXT;USLT_LRC

Note: Replace each special ÷ character with one space character.
End Actionsgroup Test 2010#20101022.Import_from_files (5 Actions)

Test_2010_20101022.Import_from_files.mta (784 Bytes)


Test_2010_20101022.Import_from_files.mta (784 Bytes)


Thanks a lot once again DetlevD.

Would you care to explain more on what your improved actions do?

I understand, it created two extra tags that get eliminated later on (but don't understand why would it NOT show an error message if .txt or .lrc are not found).
Also I quite did not get the char(*) part of the last action, is it meant to remove enters and other special characters?


At first you spoke about "error message".

I did not see any error message in Mp3tag when trying to load a textfile which does not exist.
Maybe my Mp3tag is set to suppress such error messages, so I wrote about "possible error message".
So if you really got an "error message" from Mp3tag on loading a text file which cannot be find, and it hinders you to work on, then take a look into the settings dialog to find an option which is able to suppress this error information. But I do not know for sure if there is one option. You wrote about an upcoming error message. Some error messages or info dialogs can be suppressed as far as I know.

My small enhancement proposal is designed for the possible existence of both filetypes ".lrc" and ".txt". In the possibly erroneous case when two files exist of both filetypes, then both content will be added into the UNSYNCEDLYRICS tag-field, separated by two linefeeds.
In the case when only one file exist, having one type of both filetypes, then only this one file content will be written into the UNSYNCEDLYRICS tag-field.
Because of the design of the concatenation script in Action#4, it is needed to eliminate superfluous linefeed and surrounding space characters, which is done by the $trim function, when only one or none file is found.



Ok!! Gotcha 100%.

Thanks a lot DetlevD. Will look into the options then, to check if it's possible to suppress this error message.