topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:43 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Count my jazz albums  (Read 7642 times)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
IDEA: Count my jazz albums
« on: April 08, 2007, 08:14 PM »
My dad wants a little tool, doesn't have time to post it and follow up on it, so I get to do it for him:

I want to count the number of albums on my jazz drive. 

It's impossible to do it manually-there are just too many.

So what I need is a utility that will count the number of folders at the lowest sub level of the drive. This may vary in depth. 

The first level is the single folder holding all the CDs (there are several other folders on the drive at this level.

Next down is the level of Group/lead musician:  there are currently 1197 folders at this level. 

The next level down is the album/collection.  This last folder may or may not be subdivided depending on whether there is one or more CDs to the album (In some cases there are over 20 CDs to any given album).  In some cases this last level may be broken down even further.   

Well you get the idea. 

A super utility would not only give you counts by level, but would also  let you aggregate the numbers by level either top down or in reverse- and further give you the option to print the names of the subdirectories by level (or not as the case might be.) 

What do you think?

I don't think a tool that uses any data from the ID tags of the files would be a good idea. They are not all .mp3's and chances are many are not properly tagged. So reading the album names from the tags and listing them & a count of the albums wouldn't work.

This has to do it based on the directory structure he described.

I would attempt to do this one myself, but I am currently pulling my hair out with another project. Any tool that can do what he wants would be greatly appreciated.

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #1 on: April 13, 2007, 02:06 AM »
Okay let me get it straight. He has a drive with a couple of folders, of which one is the folder containing his CDs. That folder has many subfolders by artist, and each artist has their albums.

This last folder may or may not be subdivided depending on whether there is one or more CDs to the album (In some cases there are over 20 CDs to any given album).  In some cases this last level may be broken down even further.

Does the tool need to count these subdivisions as well?


Root
  |---CDs
    |---Artist
      |---Album1
        |---CD1
          |---SubCD1
          |---SubCD2
        |---CD2
        |---CD3
      |---Album2
        |---CD1
  |---Other stuff


So in this example, would he like to have CD1, CD2 and CD3 included in the count? And what about SubCD1, SubCD2? And the Album1, Album2 folders should not be counted if they have subfolders?

Another question: is a count all he wants for output?

I can write up something if I know that ;)
Regards,
RuffNekk

Programming is an art form that fights back.
« Last Edit: April 13, 2007, 02:09 AM by Ruffnekk »

dMbTiger

  • Member
  • Joined in 2007
  • **
  • Posts: 22
    • View Profile
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #2 on: April 13, 2007, 01:29 PM »
The above description is correct as far as it goes.  The only problem is that below the album level, you may have folders which contain artwork rather than CDs. So unless you can determine this from the folder names (eliminate folders called 'artwork' or 'cartulas', etc.) or test the folder to see if it actually contains mp3s.  I would like two counts: 1) a count of the albums, and 2) a count of the CDs.   I would also like an index list of the album names.   I suppose I could go in and dump all the artwork back into the album folders and delete the separate artwork folders, but this would be a lot of work, since the drive may contain as many as around 6000 CDs.

             Dan
Dan

dMbTiger

  • Member
  • Joined in 2007
  • **
  • Posts: 22
    • View Profile
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #3 on: April 13, 2007, 01:40 PM »
I was looking back over the posts and I guess I should point out that you can't base counts or lists on track names.  Although all the music is in mp3 format, the file names are unreliable.  Some are int the format artist - album - # track, but many contain only track, # track, or some other combination and the separators also include _, spaces, parentheses, brackets, etc.-a real hodge-podge!  And the internal track info is completely unreliable, as well.  The folder names are consistent, because I created them: with a few rare exceptions the folder names consist of artist - album name.

               Dan
Dan

dMbTiger

  • Member
  • Joined in 2007
  • **
  • Posts: 22
    • View Profile
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #4 on: May 17, 2007, 09:48 AM »
Its looks like my original idea is too complicated to implement and would be useful to very few people even if it can be done.  To make it easier and possibly more usefel, the utility could be generalized to a degree.  If you assume that you only search/downward from the level you are in, then you could limit yourself to two levels. That would give you, Level 1 = Artist; Level 2 = Album/Set.  You would lose the detail where an album contained several CDs or was a boxed set and you would lose the count of total CDs (You could only count total albums/sets), but you would still end up with a total album/set count (with, hopefully, subtotals by artist), and, if a list can be generated, it would give a beautiful index of the entire collection. You would only need a list at one level since the album folder names contain the name of the artist and the album for each folder.  Doing it that way turns it into a much simpler task and would give you a general utility which could be applied to any system where a 2 level index would be useful-music or otherwise.

               Dan 8)
Dan

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,347
    • View Profile
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #5 on: May 17, 2007, 11:51 AM »
This sounds interesting.  I would suggest buying MP3 Collector, and using it's exporting features.    I haven't exported for a while, but last time I remember, it would export all the mp3 files into one big long grid (you can tweak how it appears).  The only problem I had with it is that sometimes, I'd want to just see a list of the albums, and not any of the tracks.  But there was no way (at the time) to export a list of albums without tracks.

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: IDEA: Count my jazz albums
« Reply #6 on: May 19, 2007, 04:53 AM »
given a folder structure like this,
x:\cds\ARTIST1\ALBUM1\file.mp3
x:\cds\ARTIST1\ALBUM2\file.mp3
x:\cds\ARTIST2\ALBUM1\file.mp3
x:\cds\ARTIST2\ALBUM2\CD1\file.mp3
x:\cds\ARTIST2\ALBUM2\CD2\file.mp3
x:\cds\ARTIST2\OTHERFOLDER\no .mp3/.ogg/.wma/.wav files
...
the AHK script below takes a folder as input, counts the total number of artists, counts the total number of albums and output a list with this format:
total albums = XX
total artists = YY
-----------

ARTIST1
  ALBUM1
  ALBUM2
ARTIST2
  ALBUM1
  ALBUM2
...
script:
FileSelectFolder, xroot,,3, Select root CD folder. Example:
C:\rootCD`nThen click OK to run script
if xroot =
 exitapp
Loop, %xroot%\*.* , 2, 0
{
xartist = %A_LoopFileName%
xtext = %xtext%%xartist%`n
xartistcount += 1

Loop, %xroot%\%xartist%\*.* , 2, 0
{
xalbum = %A_LoopFileName%
Loop, %xroot%\%xartist%\%xalbum%\*.*,,1     ;recursive file loop
{
if A_LoopFileExt not in mp3,ogg,wma,wav             ;add ext. for other music file formats if needed
 continue
xtext = %xtext%%A_space%%A_space%%xalbum%`n
xalbumcount += 1
break
}
}
}
xout = total albums = %xalbumcount%`ntotal artists = %xartistcount%`n-----------`n%xtext%
xfile = %A_Temp%\%A_Now%.txt
FileAppend, %xout%, %xfile%
run, %xfile%
« Last Edit: May 19, 2007, 05:00 AM by Nod5 »