Question

After a downloading process (thanks to jdownloader) I've thousands files like so:

Queen - Love of My Life (256kbit).m4a
Queen - Love of My Life (BQ).jpg

Queen - Bicycle (128kbit).m4a
Queen - Bicycle (HQ).jpg

Gary Jules - Mad World (256kbit).m4a
Gary Jules - Mad World (BQ).jpg

...

How can we embed the images to their audio files as album arts? Files are not exactly same but alike.

Was it helpful?

Solution

Using the Mp3tag application (http://www.mp3tag.de) you can apply the Mp3tag action ... "Import cover from file". This imports the cover art specified by the absolute or relative filename into the tag of the file. You can use placeholders like %artist% or %album%. You can use wildcards like ? or *.

So it should be feasable to do ... having ...
music file: Queen - Bicycle (128kbit).m4a
image file: Queen - Bicycle (HQ).jpg
... apply action ...
"Import cover from file".
Format string for image filename: $regexp(%_filename%,'\(.*$','*')
Import cover as: Front Cover

For image filename which is not exactly the same as the music filename, you may use a format string like ...

$regexp(%_filename%,'\W','?')'.jpg' ==> "Queen???Bicycle??128kbit?.jpg"
... this replaces all characters, which are not letters or numbers or underline character, with the ? wildcard.

$regexp(%_filename%,'\W+','*')'.jpg' ==> "Queen*Bicycle*128kbit*.jpg"
... this replaces all sequences of characters, which are not letters or numbers or underline character, with the * wildcard.

$regexp($regexp(%_filename%,'\(.*\)$','*'),'\W+','*')'.jpg' ==> "Queen*Bicycle*.jpg"
... this replaces all sequences of characters, which are not letters or numbers or underline character, with the * wildcard, and removes the trailing parenthetical expression.

DD.20140503.1620.CEST

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top