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
> How to Use "Actions", Composer|Artist
r2sd
post Jan 25 2011, 15:07
Post #1


Member


Group: Members
Posts: 4
Joined: 7-September 10
Member No.: 12892
Mp3tag Version: 2.46a



Haaaa,I Need Some Real Help
For Example,I Have 2 Files with Tags:
File 1:
Composer -Joe
Artist -Roe
File 2:
Composer-Does Not Exist
Artist - Jack

Now I want to bring the tags to COMMENT(Tag Field) such that COMPOSER*|*ARTIST
I Did that.The Result:
File 1:
Composer -Joe
Artist -Roe
Comment -Joe*|*Roe
File 2:
Composer-Does Not Exist
Artist - Jack
Comment -*|*Jack

The First File Is Fine,My Problem is in the second file,since there is no composer field in it,it simple came as Comment -*|*Jack, Since it doesn't have the composer field There Is An Unnecessary "*|*" In The Tag Field.How Do I Stop This,That Is,Create "*|*" Only In Files That Have The Composer Field,The Files That Don't have the composer field Should be simple have the artist tag alone.

This post has been edited by r2sd: Jan 25 2011, 15:08
Go to the top of the page
 
+Quote Post
ohrenkino
post Jan 25 2011, 15:41
Post #2


Member


Group: Full Members
Posts: 4109
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.59a



ZITAT(r2sd @ Jan 25 2011, 15:07) *
... The Files That Don't have the composer field Should be simple have the artist tag alone.

You could filter you files first before you apply your action
NOT %composer% IS "" AND NOT %artist% IS ""

Or you could add a "Replace with regular expression" action that removes the superfluous characters at the beginning of the comment field
tag: comment
search: ^\*\|\*
replace:
(leave replace empty)

Just one more note: using these special characters asterisk and bar makes it rather difficult to process the comment field afterwards as they have special meanings in mp3tag's command language
Also, if you ever intend to incorporate the comment tag in your filename, the special characters will be ommitted as they are not allowed as characters for filenames. It might be a good idea to think of other separators between the two pieces of data.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
DetlevD
post Jan 25 2011, 16:57
Post #3


Member


Group: Full Members
Posts: 4612
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.58



QUOTE (r2sd @ Jan 25 2011, 15:07) *
... I want to bring the tags to COMMENT(Tag Field) such that COMPOSER*|*ARTIST
I Did that.The Result:
File 1:
Composer -Joe
Artist -Roe
Comment -Joe*|*Roe
File 2:
Composer-Does Not Exist
Artist - Jack
Comment -*|*Jack

The First File Is Fine,My Problem is in the second file,since there is no composer field in it,it simple came as Comment -*|*Jack, Since it doesn't have the composer field There Is An Unnecessary "*|*" In The Tag Field.How Do I Stop This,That Is,Create "*|*" Only In Files That Have The Composer Field,The Files That Don't have the composer field Should be simple have the artist tag alone.


You should take into account what ohrenkino said :
"It might be a good idea to think of other separators between the two pieces of data."

Action: Format value
Field : COMMENT
Formatstring:
$if($and(%ARTIST%,%COMPOSER%),%ARTIST%'+#+'%COMPOSER%,$if2(%COMPOSER%,%ARTIST%))


DD.20110125.1658.CET


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
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: 25th April 2014 - 03:27