Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: "Undoing" AutoCapitilise ? (Read 13185 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

"Undoing" AutoCapitilise ?

hi

After a few too many glasses of wine (  ) I stupidly Capitilised my entire 160GB music collection - thereby correcting some annoying problems with letters, but creating annoying problems

e.g all "DJ"s became Dj, MCs to Mc, vol II to vol Ii, CD1 to Cd1 etc.

Is there anyway I can correct this relatively painlessly ?


PS. FB2K is far to powerful a tool to be toyed with on alcohol ...

"Undoing" AutoCapitilise ?

Reply #1
You can use Mp3tag and create actions that replaces specific words.

I've several for e.g.
dj = DJ
Ft. = feat.
Vs = vs.

It's very powerful, and free.

Give it a try.
Windows 10 Pro x64 // foobar2000 1.3.10

"Undoing" AutoCapitilise ?

Reply #2
You can use Mp3tag and create actions that replaces specific words.

I've several for e.g.
dj = DJ
Ft. = feat.
Vs = vs.

It's very powerful, and free.

Give it a try.



thanks

just installed it & will give it a go !

PS Is this program better suited than FB2K to do this ?

"Undoing" AutoCapitilise ?

Reply #3
Awfully late, however:
Properties for all items > Right-click on "Track title" whatever you mangled > Format from Other Fields... > "$replace(%title%,Dj,DJ,Mc,MC,Ii,II,Cd,CD)" etc. > Review, apply.
Full-quoting makes you scroll past the same junk over and over.

"Undoing" AutoCapitilise ?

Reply #4
PS Is this program better suited than FB2K to do this ?


IMO, not at all. There have been a few people recommending third-party software for tasks that foobar2000 can perform lately. This is silly and should stop.

"Undoing" AutoCapitilise ?

Reply #5
Here's a better fix, since i became "victim" of the same problem a while ago:

Code: [Select]
[$trim($replace($meta(title)' ',' ep ',' EP ',' Ep ',' EP ',' cd ',' CD ',' Cd ',' CD ',' dj ',' DJ ',' Dj ',' DJ ',' Ii ',' II ',' Iii ',' III ',' Iv ',' IV ',' Vi ',' VI ',' Vii ',' VII ',' Viii ',' VIII ',' Ix ',' IX '))]


Replace $meta(title) with any field of your choice.


Explanation:
This avoids three issues. First, by making the whole string [conditional], the return will never be "?" and therefore the field will not be created if it doesn't exist. Second, by using $meta() it avoids fieldremappings. Third, by first adding a space to the end of the value and then trimming it away again, you avoid accidentally doing false matches. For example, ' ep' would also match ' episode', thus turning it into ' EPisode'. Since there is no way to define "end of value", i simply cheat by first adding a space to the end of the value, so that we can just match ' ep '. Then after the replacement i $trim the space away again.
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #6
You don't actually need any of those apostrophes:

Code: [Select]
[$trim($replace($meta(title) , ep , EP , Ep , EP , cd , CD , Cd , CD , dj , DJ , Dj , DJ , Ii , II , Iii , III , Iv , IV , Vi , VI , Vii , VII , Viii , VIII , Ix , IX ))]

"Undoing" AutoCapitilise ?

Reply #7
Same reply as yesterday. If whitespace is important, i prefer to explicitely quote it, regardless of it not being "required".

If you can give me a hint how i can set a monospace font for all formattingstring inputareas in fb2k, i may drop that habbit :)
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #8
P.S.:

Doing such replacement operations for MC can result in false matches, because there IS an abbreviation which is capitalized as "Mc". You dont want "Mc Donalds" turned into "MC Donalds", right? For that case, better do a manual DB search and then apply a fix to handselected set of tracks.
I am arrogant and I can afford it because I deliver.


"Undoing" AutoCapitilise ?

Reply #10

Second, by using $meta() it avoids fieldremappings.

Sorry, what do you mean?

Example: %title% will use the filename if the title-field is missing. In masstagging-scripts however, you typically do not want a file which as no title to get the filename applied as title. Especially not in a script which is supposed to only correct wrong capitalization.
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #11
Example: %title% will use the filename if the title-field is missing. In masstagging-scripts however, you typically do not want a file which as no title to get the filename applied as title. Especially not in a script which is supposed to only correct wrong capitalization.

really? i never seen that behavior before, and i use masstager, a lot (not that it means that i know it ).

so you mean that if i have a script like:

Format Value: Destination Field: TITLE: Formating Pattern: $ansi(%title%)

but there is no TITLE field, i would get $ansi($filename)?

"Undoing" AutoCapitilise ?

Reply #12
Just tested - the answer is "yes".
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #13
Wow - so many further helpful replies ! Thanks.

However, I have again consumed several glasses of red wine so will refrain from implementing suggestions until tomorrow ... 

"Undoing" AutoCapitilise ?

Reply #14
Wow - so many further helpful replies ! Thanks.

However, I have again consumed several glasses of red wine so will refrain from implementing suggestions until tomorrow ... 


Actually that's a lie.

Here is a first attempt using "title" - the new value for Roman numerals is unchanged !? Am I doing something wrong ?



"Undoing" AutoCapitilise ?

Reply #15
Works here with 0.9.6 beta. The behaviour of that input-field by the way is VERY WEIRD here (inputfield-limit is set by window-width - and no scrolling allowed).

edit: inputfield length issue described above was reported and verified.
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #16
You'd need to add another space between "$replace(" and "$meta" for it to work at the beginning of the title. As well as add another set with a dot for it to work with titles like "Ii. Adagio".
Full-quoting makes you scroll past the same junk over and over.

"Undoing" AutoCapitilise ?

Reply #17
You'd need to add another space between "$replace(" and "$meta" for it to work at the beginning of the title. As well as add another set with a dot for it to work with titles like "Ii. Adagio".


Brilliant - thanks again.

There does seem to be a character limit though - after adding most Roman numerals with dots I couldn't type in V. . It just wouldn't let me.

ie. I got as far as :

[$trim($replace( $meta(title) , ep , EP , Ep , EP , cd , CD , Cd , CD , dj , DJ , Dj , DJ , Ii , II , Iii , III , Iv , IV , Vi , VI , Vii , VII , Viii , VIII , I. , I , Ix , IX , Ii. , II , Iii. , III , Iv. , IV , Vi. , VI , Vii. , VII , Viii., VIII , Ix. , IX , X. , X , Xi. , XI , Xii. , XII , Xiii. , XIII , Xiv. , XIV  ))]

"Undoing" AutoCapitilise ?

Reply #18
I've tried to adapt that string to correct the album field as well - but it seems to still want to change the title field .. ??




Am I doing this wrong ?

"Undoing" AutoCapitilise ?

Reply #19
The column "Title" is apparently only for reference, the old value of the field you selected is not shown.
Full-quoting makes you scroll past the same junk over and over.

"Undoing" AutoCapitilise ?

Reply #20
The column "Title" is apparently only for reference, the old value of the field you selected is not shown.


Ah - so if I go with this, I'm not going to rename all those tracks to the new album value ?

"Undoing" AutoCapitilise ?

Reply #21
No.
Besides, no changes are done to your files until you close the Properties dialog, so you can safely verify the result. You would save yourself a lot of time if you had just tried it right away.
Full-quoting makes you scroll past the same junk over and over.

"Undoing" AutoCapitilise ?

Reply #22
Thanks.

Does FB2K have an undo function that could correct "accidental" massive changes like this ?

That would be very useful ....

 

"Undoing" AutoCapitilise ?

Reply #23
No.
The closest you can get to such a feature would probably be opening the Properties dialog twice - once for managing, once as a backup. Then if something goes wrong, you'd display another Properties, copy all data from the backup one to the new one and rewrite it back. (Simply pressing OK on the backup dialog wouldn't work, as it doesn't write anything if no items were changed in it.)
Full-quoting makes you scroll past the same junk over and over.

"Undoing" AutoCapitilise ?

Reply #24
OK - thanks. That's useful to know ..