Author Topic: Missing track detector  (Read 2242 times)

mrbenn

  • Full Member
  • ***
  • Posts: 167
I'm working with a very large set of tracks, and for a variety of reasons some albums are split, incomplete or missing tags, and a lot are unofficial compilations so cannot be tagged using beets or picard etc.

I'm trying to confirm if each album is complete based on the track number tags highest value vs how many actual tracks are in the folder.

What I'd love is a way to do this automatically, ideally with results showing what numbers are missing in the numerical sequence.

My current way is to re-purpose the track renumbering tool, resize the columns and eyeball it. For 15k tracks this is getting tricky.

A basic guess at how it would work is
Code
 if int(count_of_tracks_in_folder) != int(highest_track_number) then... 

This is not the same as the "track count" tag as that isn't populated in most cases, and reflects what /should/ be there not what /is/ there.

It doesn't need to be doing this all the time, just as a right click or key combination when needed.


Thanks

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
There is an "album complete?" display field that looks at gaps in track sequences which might help

mrbenn

  • Full Member
  • ***
  • Posts: 167
Thanks for the reply Steven

I've enabled this and from what I can see it only shows a Y or N for albums that have the track count field populated, and ? for ones that do not.






hiccup

  • Sr. Member
  • ****
  • Posts: 7790
That was an interesting puzzle. I think this might work:

Create two virtual tags: <Numerals> and <Missing>
The 'Missing' tag should then display the track numbers that are missing from an album.

note, this method has two restrictions:
- it only works for track numbers up to 18
- if the last track of an album is missing it won't indicate that track missing

To catch if an album has tracks missing also for the above cases, you will need to combine this with MusicBee's built-in 'Album Complete?' feature.

Also, it doesn't seem to update real-time, so you might need a restart of MB to update the 'Missing' output.

Numerals
Code
$IsNull(<Album>,,$IsNull(<Track#>,,$Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Replace($Pad(<Track#>,2),01,3),02,30),03,300),04,3000),05,30000),06,300000),07,3000000),08,30000000),09,300000000),10,1000000000),11,10000000000),12,100000000000),13,1000000000000),14,10000000000000),15,100000000000000),16,1000000000000000),17,10000000000000000),18,100000000000000000),19,1000000000000000000)))

Missing
Code
$IsNull(<Album>,,$If($Right($Sum(<Numerals>,<Album>),1)=0,"1 ",)$If($Left($Right($Sum(<Numerals>,<Album>),2),1)=0,"2 ",)$If($Left($Right($Sum(<Numerals>,<Album>),3),1)=0,"3 ",)$If($Left($Right($Sum(<Numerals>,<Album>),4),1)=0,"4 ",)$If($Left($Right($Sum(<Numerals>,<Album>),5),1)=0,"5 ",)$If($Left($Right($Sum(<Numerals>,<Album>),6),1)=0,"6 ",)$If($Left($Right($Sum(<Numerals>,<Album>),7),1)=0,"7 ",)$If($Left($Right($Sum(<Numerals>,<Album>),8),1)=0,"8 ",)$If($Left($Right($Sum(<Numerals>,<Album>),9),1)=0,"9 ",)$If($Left($Right($Sum(<Numerals>,<Album>),10),1)=0,"10 ",)$If($Left($Right($Sum(<Numerals>,<Album>),11),1)=0,"11 ",)$If($Left($Right($Sum(<Numerals>,<Album>),12),1)=0,"12 ",)$If($Left($Right($Sum(<Numerals>,<Album>),13),1)=0,"13 ",)$If($Left($Right($Sum(<Numerals>,<Album>),14),1)=0,"14 ",)$If($Left($Right($Sum(<Numerals>,<Album>),15),1)=0,"15 ",)$If($Left($Right($Sum(<Numerals>,<Album>),16),1)=0,"16 ",)$If($Left($Right($Sum(<Numerals>,<Album>),17),1)=0,"17 ",)$If($Left($Right($Sum(<Numerals>,<Album>),18),1)=0,"18 ",)$If($Left($Right($Sum(<Numerals>,<Album>),19),1)=0,"19 ",))
Last Edit: May 08, 2022, 06:18:30 AM by hiccup

mrbenn

  • Full Member
  • ***
  • Posts: 167
Nice work hiccup. I really should read up on virtual tags more!

I ended up tack-welding some python together to look at a playlist, gather all relevant folders then compare the tags/file count.

It turns out there was only one track missing from the set in question, and I'd just resolved that when I put in the feature request.

I have a bunch of python tools for things like this in a script that use the very old but still working MusicbeeIPC, which I intend to post at some point.

Thanks

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9305
That's pretty damn elegant, hiccup.

I have no need for it, but I appreciate the time you put into solving the issue.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
That's pretty damn elegant, hiccup.

I have no need for it, but I appreciate the time you put into solving the issue.
Thanks phred.
To be honest, after my first look at this I thought that this could not be done, and wanted to reply that.
But that is obviously not an answer that we like much, so I woke brain cells #3 and #4 from hibernation and then concocted this ;-)

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9305
I raise a glass to those who are coming out of winter hibernation. And another glass to those who are heading into it.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

aktor

  • Jr. Member
  • **
  • Posts: 110

The 'Missing' tag should display the track numbers that are missing from an album, but the in a couple of cases the tracks are not missing. Any idea what is going on.