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: Automatically Highlighting Duplicate Tracks Titles (Read 2016 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Automatically Highlighting Duplicate Tracks Titles

Hi there

First let me thank developers for making foobar2000 such a powerful player!

My query is about if it is possible to highlight automatically duplicate tracks titles for an artist and optionally for all artists in a playlist, and possibly in complete database, of foobar2000.

Let me give an example. I have 100 tracks from a compilation and another 38 tracks from another compilation of artist Mantovani. When I load these compilations into a playlist in the form of CUE sheets of images of CDs ripped by EAC, many tracks are duplicated. Normally in a listen, I do not want hear a track again. Now finding and deleting these duplicate tracks titles manually from a playlist takes a lot of time. If these titles are highlighted automatically by foobar2000, they can be very easily removed from the playlist.

If this highlighting feature is currently not available in foobar2000, the developers are requested to please include it. Thanks.
"In the beginning was the Audiophile"

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #1
IF you use number ratings, and IF no one offers a solution, you could rate the duplicates w/a "D" to be able to cull them as needed
Neither an audiophile, nor album snob. Why do ratings threads always have a poster saying 'I don't believe in rating music'?
Record Label Icons: 600x600 pngs appropriate for any color background:
freeimage.host/johnbuck/?list=images&sort=name_asc&page=1

 

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #2
Hi there,

You can find duplicates with Facets -

- Install and open with Library > Facets (or add to your layout)
- right-click headers > Columns > add columns for 'Artist' and 'Title'
- right-click 'Title' header > Statistics > select 'Items'
- left-click twice on 'Items' header to sort descending

Any titles with more than one item count are duplicates. Selecting will highlight them in the playlist. Use the Facets source toolbar button to switch between Library or Playlist mode. (Library mode to add tracks to 'Library selection' playlist, Playlist mode to browse existing playlists and highlight tracks there)

And of course in the playlist you can sort by 'Title' (click header) to group them together anyway, which might just be faster.

Cheers

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #3
Cool! Goodbye Similarity!

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #4
Thanks a lot you all guys for showing the way!
"In the beginning was the Audiophile"

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #5
Another thing I noticed was that Facets displays track titles with case-sensitivity. For example, “Bahia De Acapulco” and “Bahia de Acapulco” are treated as two different titles in two different compilations of the same artist. So there is a natural question if we can toggle case-sensitivity on and off at our will.
"In the beginning was the Audiophile"

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #6
I'll add my little contribution to this which will also solve your case-sensitivity. This method is useful for large libraries with titles that are similar but not an exact match. You'll need to tag your files with an extra value for this and you'll need to use masstagger.

First create a masstagger script. Use Format Value with the following formatting pattern:
Code: [Select]
$left($crc32($lower($ascii(%artist% $replace(%title%,n$char(39) ,ng,$char(32),,$char(33),,$char(34),,$char(39),,$char(40),,$char(41),,$char(44),,$char(46),,$char(47),,$char(58),,$char(59),,$char(63),,$char(96),,$char(145),,$char(146),,$char(147),,$char(45),,$char(145),,$char(146),,$char(148),,$char(180),,’,,$char(96),,The ,,And ,&,the ,,and ,&,wanna,want to,Wanna,Want To,Gonna,going to,gonna,going to,$char(39)s, is))))$crc32($lower($ascii($replace(%artist%,$char(32),,$char(33),,$char(34),,$char(39),,$char(40),,$char(41),,$char(44),,$char(46),,$char(47),,$char(58),,$char(59),,$char(63),,$char(96),,$char(145),,$char(146),,$char(147),,$char(45),,$char(145),,$char(146),,$char(148),,$char(180),,’,,$char(96),,The ,,And ,&,the ,,and ,&,n$char(39) ,ng)))),18)

Set destination field name to FOO_ID

Basically what this does is convert to an integer value after some string values are removed and "equalized". Often the same titles will differ whether to use punctuation marks, and vs & is also a regular mix up while gonna and going to is a regular mix up with blues songs (same thing with words ending with ng but replaced by n' example: hangin' on or hanging on). Spaces are also removed so titles with hidden double spaces are matched also. This script however doesn't work with non-ascii characters so don't bother using this on something like Chinese characters or other types of non-ascii characters.

Run the script on your library. All files will be tagged with a FOO_ID value. Match those values with Facets to see your doubles. If you want to see the actual titles instead of those meaningless numbers then just tag those doubles with for examples %doubles% = 1 and then just filter in facets on that value.

It's possible there will be false positives but I've been using this for some years now and I very very rarely encounter them.

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #7
Thanks jazzthieve for your suggestion. I am thinking about re-tagging my music library, by converting tracks titles to either all capitalized or all upper-cased, with “$caps(%title%)” or “$upper(%title%)”.
"In the beginning was the Audiophile"

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #8
For example, “Bahia De Acapulco” and “Bahia de Acapulco” are treated as two different titles ...
I would think that would be an advantage, that way you can quickly identify the mismatches and retag them to match.

In track Properties, on right-clicking a field, if I recall foobar has a 'Capitalize' option.

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #9
All caps or all lower is a bit like going through the whole thing with a rough cleaver instead of with a precision scalpel. For example using all caps will make titles with roman numerals very ugly (often used in classical music). Usually I use masstagger (again) with a personalized script:

Code: [Select]
$replace(%TITLE%, Is , is , Has , has , Iii, III, Iv, IV, Ii, II, Viii, VIII, Vii, VII, Ix, IX, Vi., VI., Of , of , The , the , In , in , A , a , An , an , And , and ,.a,.A,.b,.B,.c,.C,.d,.D,.e,.E,.f,.F,.g,.G,.h,.H,.i,.I,.j,.J,.k,.K,.l,.L,.m,.M,.n,.N,.o,.O,.p,.P,.q,.Q,.r,.R,.s,.S,.t,.T,.u,.U,.v,.V,.w,.W,.x,.X,.y,.Y,.z,.Z,-a,-A,-b,-B,-c,-C,-d,-D,-e,-E,-f,-F,-g,-G,-h,-H,-i,-I,-j,-J,-k,-K,-l,-L,-m,-M,-n,-N,-o,-O,-p,-P,-q,-Q,-r,-R,-s,-S,-t,-T,-u,-U,-v,-V,-w,-W,-x,-X,-y,-Y,-z,-Z, $char(39)a, $char(39)A, $char(39)b, $char(39)B, $char(39)c, $char(39)C, $char(39)d, $char(39)D, $char(39)e, $char(39)E, $char(39)f, $char(39)F, $char(39)g, $char(39)G, $char(39)h, $char(39)H, $char(39)i, $char(39)I, $char(39)j, $char(39)J, $char(39)k, $char(39)K, $char(39)l, $char(39)L, $char(39)m, $char(39)M, $char(39)n, $char(39)N, $char(39)o, $char(39)O, $char(39)p, $char(39)P, $char(39)q, $char(39)Q, $char(39)r, $char(39)R, $char(39)s, $char(39)S, $char(39)t, $char(39)T, $char(39)u, $char(39)U, $char(39)v, $char(39)V, $char(39)w, $char(39)W, $char(39)x, $char(39)X, $char(39)y, $char(39)Y, $char(39)z, $char(39)Z)

It's not perfect but it's better than all caps. If you're going to go this route and use something similar take note on the use of spaces in the replace command. For example $replace(, Is , is ,) is between spaces so when "Is" is the first word of a title it won't get altered.
Also in the masstagger chain precede it with an all caps actions and set the above script twice as two separate actions within masstagger because the script will only change one item at a time.

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #10
What a cool!
@jazzthieve 
In this way, would all initial letters of words be capitalized?

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #11
Yes, initial letters at the start of a title will remain capitalized. Only words within a title, not at the start, will get altered if included in the script.
Example an all caps title like this:

The First And The Last Part Iii

Would become this:

The First and the Last Part III

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #12
Very nice! Thanks a lot!

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #13
Really nice!

But and what about "Capitalize First Letter Of All Words"?

I tried to modify the above code in a supposedly logical way, but I didn't get an adequate result. Could someone please help me with this?

I intend to automate a function in Masstager that does this. I know that this type of capitalization is not the right one, but this is how all my files have been tagged for 30 years... too late to fix everything now...

Thanks in advance.

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #14
This is becoming a bit too off topic for this thread tbh but I'll answer your question. If you have another question that isn't related to highlighting duplicates please consider starting a new thread.

On capitalizing all words there are multiple ways of doing this, the easiest way is to select properties of a file, in properties right click the row you want to change, select "Capitalize".

Using masstagger, create an action by selecting add - format value from other fields. Set destination field name to title, set formatting pattern to $caps(%title%) or $caps2(%title%) whichever you prefer.

Re: Automatically Highlighting Duplicate Tracks Titles

Reply #15
Thank you very much and sorry for my off topic question! It won't happen again!