IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How to workaround with duplicates in filename?
vvikkass
post Feb 11 2017, 10:29
Post #1


Member


Group: Full Members
Posts: 40
Joined: 13-October 16
Member No.: 22612
Mp3tag Version: 2.78



Have mp3s (around 10000+ files) which have duplicates.

All the files I am talking about are in this format,

01 - Artist 1 - Title (Artist 2 Remix) (Artist 2 Remix).mp3

want duplicate texts to be removed from each mp3 file so that the final mp3 looks like this:
01 - Artist 1 - Title (Artist 2 Remix).mp3

One common condition in all the mp3 is that the DUPLICATE TEXT is always inside ( & ). I can do replace for most cases like (Original Mix) (Original Mix) > (Original Mix) and so on...but I want to know if there exists more professional solution to remove duplicates that are within ( ).

Thanks and best regards.
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 11 2017, 11:59
Post #2


Member


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



QUOTE (vvikkass @ Feb 11 2017, 10:29) *
... All the files I am talking about are in this format,
01 - Artist 1 - Title (Artist 2 Remix) (Artist 2 Remix).mp3
want duplicate texts to be removed from each mp3 file so that the final mp3 looks like this:
01 - Artist 1 - Title (Artist 2 Remix).mp3 ...

_FILENAME <== $regexp(%_filename%,'^(.+)(\s\(.+\)){2}$','$1$2')

The above regexp does not check for identical content within the round brackets.

The following regexp does respect identical content within the round brackets.

_FILENAME <== $regexp(%_filename%,'^(.+?)(\s\(.+?\))\g{-1}$','$1$2')

DD.20170211.1240.CET

This post has been edited by DetlevD: Feb 11 2017, 12:40


--------------------
* 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
vvikkass
post Feb 11 2017, 13:09
Post #3


Member


Group: Full Members
Posts: 40
Joined: 13-October 16
Member No.: 22612
Mp3tag Version: 2.78



QUOTE (DetlevD @ Feb 11 2017, 16:29) *
_FILENAME <== $regexp(%_filename%,'^(.+)(\s\(.+\)){2}$','$1$2')

The above regexp does not check for identical content within the round brackets.

The following regexp does respect identical content within the round brackets.

_FILENAME <== $regexp(%_filename%,'^(.+?)(\s\(.+?\))\g{-1}$','$1$2')

DD.20170211.1240.CET


Thanks smile.gif

But I really dont know how to apply that regex code. Please help.

P.S. Please excuse me, I tried the FORMAT VALUE, and it worked flawlessly. Just genius.

Thanks a lot sir. smile.gif

EDIT 2: One problem though.

If mp3 is in this format it dont work sir.
01 - Artist 1 - Title (Artist 2 Remix) (Feat. Artist 3) (Artist 2 Remix).mp3

Will it be possible to get this sir,
01 - Artist 1 - Title (Artist 2 Remix) (Feat. Artist 3).mp3

Means many mp3s have texts in between the two brackets such as featuring artists.

This post has been edited by vvikkass: Feb 11 2017, 13:16
Go to the top of the page
 
+Quote Post
DetlevD
post Feb 11 2017, 14:35
Post #4


Member


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



QUOTE (vvikkass @ Feb 11 2017, 13:09) *
01 - Artist 1 - Title (Artist 2 Remix) (Feat. Artist 3) (Artist 2 Remix).mp3
01 - Artist 1 - Title (Artist 2 Remix) (Feat. Artist 3).mp3

_FILENAME <== $regexp(%_filename%,'^(.+?)(\s\(.+?\))(\s\(.+?\))\g{-2}$','$1$2$3')

Hmm, ...
why don't you create the filenames fresh from the tag fields?

DD.20170211.1435.CET

This post has been edited by DetlevD: Feb 11 2017, 14:36


--------------------
* 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
vvikkass
post Feb 11 2017, 14:41
Post #5


Member


Group: Full Members
Posts: 40
Joined: 13-October 16
Member No.: 22612
Mp3tag Version: 2.78



QUOTE (DetlevD @ Feb 11 2017, 19:05) *
_FILENAME <== $regexp(%_filename%,'^(.+?)(\s\(.+?\))(\s\(.+?\))\g{-2}$','$1$2$3')

Hmm, ...
why don't you create the filenames fresh from the tag fields?

DD.20170211.1435.CET


it worked biggrin.gif

The problem is that the data is same in the tags or else I would have done TAGS>FILE NAME earlier sir.
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: 23rd July 2017 - 17:55