[Delete This!]

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

[Delete This!]

Post by some1 »

Dw, ZvezdanD has done it for me :D
Last edited by some1 on Sun Nov 11, 2007 5:39 am, edited 2 times in total.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I've not studied it properly yet, but there are some differences between SQL and SQLite. Check out the syntax here: http://www.sqlite.org/lang.html.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

You had too many errors, so I needed to attach full modified code:

Code: Select all

Modified version is below.
Last edited by ZvezdanD on Wed Nov 07, 2007 8:41 pm, edited 1 time in total.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Of course, as I said in the another thread, this approach don't work with multi-disc albums and with those tracks which have letters instead of numbers.

By multi-disc album I consider following syntax:
CD 01
01 - xxx
02 - xxx
...

CD 02
01 - xxx
02 - xxx
...

Now, when we have DiscNumber field in MM3, it is unnecessary to have such hacking syntax as some of users prefer, like 101, 102, ..., 201, ...
some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

Post by some1 »

@ZvezdanD

BIGGEST THANK YOU!
Yea, I know about the bugs (ive been working on it for v0.5), but that code is for v0.4....
Again, thank you! :) :wink: :lol: 8) :D :) :o :D :D :) :) :D :D :)

--Some1
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

I am glad if I could help :)
nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac »

OK, it isn't "released", not even as an alpha :)

But I tried the ZvezdanD version. It didn't work as I had expected. I assume this has to do with the "composer"-issue in RC1, the script seems to use some info from the composer field of my library instead of the Album Artist field.

I even rescanned my library without success. (So there is no apparent Composer issue in my library any more)

Is it possible to let the popup windows close automaticly when I move to the next album?

Why not delete the > in the popup?

And when you release it I suggest you use another name than [Find The] I associate this with the "The" problem (deleting The in front of artist names etc)
"Missing Tracks" is better name, even though I know it has some extra features.
some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

Post by some1 »

dfd
Last edited by some1 on Sun Nov 11, 2007 5:40 am, edited 2 times in total.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

nojac wrote:It didn't work as I had expected. I assume this has to do with the "composer"-issue
Its my fault. Please, try the following code:

Code: Select all

'                                                           _ _      ___       
'                                                          (_) |    / _ \       
'                                                 __      ___| |___| | | |_ __ 
'                                                 \ \ /\ / / | / __| | | | '_ \
'                                                  \ V  V /| | \__ \ |_| | | | |
'                                                   \_/\_/ |_|_|___/\___/|_| |_|
'                          01110111 01101001 01101100 01110011 00110000 01101110
' *********************************************************************
' * Program Name   : [FindThe]                            *
' * Version       : 0.xx                           *
' * Release Date   : xx/xx/xx                           *
' * Requires      : MediaMonkey v3.0.0.1098                  *
' *********************************************************************
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'                                                                       [FindThe]
'                                                    v0.xx
'                                       Dont have missing bananas in your collection!
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'                 *This is my first ever MediaMonkey script (so be nice!).*
'About this script and its functions:
'   [FindThe] Missing Tracks
'       There are scripts out there, which find missing tracks, but they LIST what tracks you HAVE.
'       YOU then have to LOOk thought and find out which tracks are missing YOURSELF. THIS DOES it for YOU!
'   [FindThe] Extra Tracks
'      If you have extra tags which dont below in the album (e.g ones which haven't been tag), then you can :
'         1.) Either display/list theses tracks (and or without the rest of the album)
'         2.) Rename the album/track to "singles", "bonus" , or what ever you like   [Coming soon]
'   [FindThe] Small Albums
'      This is for albums which are incomplete and you have very few of.
'      I personally then rename the album to singles, and remove track number
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'Install (via script):
'   1) Find the "Auto" Folder ("Mediamonkey\Scripts\Auto"). Right click --> create a new/blank text file.
'   2) Name it FindThe.vbs
'         Make sure its a VBS file, i.e. the file isn't named FindThe.vbs.txt. If this was done correctly, then the icon should of changed
'        If it did NOT then, To always display all filenames with extension in explorer, do this:
'             a.).In explorer, go to Tools->Folder Options->View Tab
'             b.) Uncheck "hide file extensions for known file types"
'    3) Copy all this script into the file and save it.
'    4) (Re)start MediaMonkey
'Install (via installer package):
'   [Coming soon]
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'Version History/Change Log/Whats new:
'   v0.xx  (xx/xx/xx)
'      * ReWorked the script (Delete, move & remove parts of script,  hence runs quicker! Design to be looked at in notepad++)
'      * Remove Bugs =) (and cleaner error messages given)
'      * The report (comeout) msgbox now says if your dup/untagged/missing tracks numbers + gives a better result
'
'   v0.4 (25/10/07)
'      * Renamed [FindTheMissing] Songs to "[FindThe]" because of the (new) added functions "Missing Tracks", "Extra Tracks"  and "Small Albums"
'      * Fix bug in offset mod & Applied 'Eyal'  offset mod for multiple CD
'
'   v0.3 (15/07/07)
'      * Did a bit of moving/renaming/recoding/commenting/other methods on the script.
'      * Rewritten the algorithm, which calculates the missing song.
'      * Sorted albums in a different order (it was out of how many was missing, now by the artists, album)
'      * Overcame/fix/got working a  another "What works". (Two or more in a row missing) + ("One" & "two and more" untagged song in the album)
'
'   v0.2 (14/07/07)
'      * First got something working to work! =)
'      * Changed frameworks to "Incomplete Albums v0.1".
'      * Avilable to public! (MediaMonkey forums)
'
'   v0.1 (12/07/07)
'      * Had the idea, Used "Tagging Inconsistencies" as the framework and it didn't really work =(
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'What will be in next version:
'   * Remove ALL bugs/Debug stuff!
'   * All current functions working
'   * Make it MediaMonkey 3 Compatible
'   ** Start on the Ideas & ToDos...
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'ToDos:
'   * [FindThe] Missing Tracks - Report functions - Allow to save what is missing
'   * [FindThe] Small Albums - Allow user to pick how much!
'   * [FindThe] - Progress bars
'   * [FindThe] - Option Panel.
'   * [FindThe] - Excluded certain albums (e.g. "albums").
'   * [FindThe] - Have an OK list (tracks/albums to ignore).
'   * Take Screen Shots.
'   * Make a installer & Home Page.
'   ** Fix Known Buys. Improve/Clean Up script & Check Spelling/Grammar/Tyops (Always on going!)
'   ** Complete wish list & feedback (Always on going!)
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'WishList:
'   * Query Amazon / Google /Wiki / Other to get the missing track names.
'   * Query Amazon / Google /Wiki / Other to see first if you have the track in your libary, just not in th right order (or in a another album e.g. called "singles").
'   * Query Amazon / Google /Wiki / Othert for [FindThe] Missing Ablums --- To find missing albums by the same artist.
'   * Have more  "Album Functions" e.g. "Dup Checker" etc
'   * If has the same track number, list them all, and or rest of album. [FindThe] Same Track#
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'Authors Notes:
'   * Idea: In the artist, if it has "ft ", Ft. ", "Feat ", "Feat." or "Featuring" move it into the track names  (same with "VS", not sure with "/" or ",") OST = SOundtrack  ö = o   + = and & = and &Amp = &  ", ," = "," "-"=" " REMOVE "THE" N.E.R.D = N.E.R.D.
'   * Idea: [FindThe] Extra Tracks - for complete/ incomplete / both.
'   * Idea: What about listing all the track "4"s from ALL albums?
'   * Ive left in some debugging stuff(commented most of it out)! Along with other sorting methods, plus unsure mods to the script.
'   * Ive disabled the function yet which dont work!
'   * It goes "1,2,3,4,5,6,7 is missing", better if it would do "1-7 is missing
'   * Once it has found the missing tracks - quit? no point checking the rest!
'   * Have "about", "how to use" or "help" message box & Shortcut to option panel
'   * In the heading have a count of how many tracks/albums are effected. e.g. [FindThe] Missing Tracks (501)
'   * Would having it by "Album" instead of "Artist - Album" be better for compilation CDs? Harder to navi as people know artist better
'   * What about copying the Artist - Album onto clip board? / search something?
'   * What works:
'      >>> One or more tracks overall and or in a row missing [WORKS]
'      >>>  Checks first and or last tracks [WORKS]
'      >>> One or more untagged track in the album [WORKS]
'      >>>  Dup tracks  [Works]
'      >>> 101,102,103,105...201,202,203 (start at 101/201 for multiple CDs) [SEMI - Doesn't do CD2 (201)). Thanks Eya]
'   * This script does not update the DB or files. Use at your own risk. Do not taunt this script (please!).
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'Known Bugs
'   * Abums which start at 201 (like for mulitplue CDs)
'   * Cant cope with changes to the database, (doesn't refresh)
'   ** I made it!
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
'Acknowledgments
'   * trixmoto & Steegy & Risser & zerium for "Incomplete Albums v0.1" (which is based apon "Album (complete)")
'   * Bex for "Tagging Inconsistencies v2.2"
'   * Eyal for "multi-CD albums" (offset) mod
'   ** The rest is my doing and for that, you can blame me!
'   ** Thanks to all the people that left feedback (good, bad and thank yous!)
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////'
Option Explicit
   Dim FoldExclClause
   Dim nrofexclfolds : nrofexclfolds = 8
   Dim AlbNodes : AlbNodes = 30
   'Set Programs Name/Version?
Function albumCaption(artist, album)
      albumCaption = album & " - " & artist
      '<---Different sorting methods (personal taste. *** Idea *** Option Panel allows selection ---- >
      '   albumCaption = artist & " - " & album 
      '   albumCaption = album & " - " & artist
      '   albumCaption = album   
   End Function
Sub onStartUp
   '000 - Menu
      '100 - Missing Tracks
      '200 - Extra Tracks
         '210 - List both Ablum + Extra
         '220 - List just the Extra
      '300 - Small Albums
         '310 - x Tracks in albums
         '320 - x Tracks in albums OR LESS
      
   Dim Tree : Set Tree = SDB.MainTree
   Dim Node : Set Node = Tree.CreateNode
   Dim Subnode, Subnode2
   
   Node.Caption = "[FindThe]"
   Node.IconIndex = 40
   Node.CustomNodeID = 000
   Node.UseScript = Script.ScriptPath
   Tree.AddNode Tree.Node_FilesToEdit, Node, 2
   Node.hasChildren = True
    
      Set Subnode = Tree.CreateNode
      Subnode.Caption = "[FindThe] Missing Tracks"
      Subnode.IconIndex = 24
      Subnode.CustomNodeID = 100
      SubNode.UseScript = Script.ScriptPath
      Script.RegisterEvent Subnode, "OnFillChildren", "ListAlbums"
      Script.RegisterEvent Subnode, "OnFillTracks", "ListAlbums"
      Tree.AddNode Node, Subnode, 3
      Subnode.HasChildren = True

      Set Subnode = Tree.CreateNode
      Subnode.Caption = "[FindThe] Extra Tracks"
      Subnode.IconIndex = 46
      Subnode.CustomNodeID = 200
      SubNode.UseScript = Script.ScriptPath
      Tree.AddNode Node, Subnode, 3
      Subnode.HasChildren = True   
      
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "List both album + extra tracks"
         Subnode2.IconIndex = 44
         Subnode2.CustomNodeID = 210
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "List just extra tracks"
         Subnode2.IconIndex = 42
         Subnode2.CustomNodeID = 220
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True

      Set Subnode = Tree.CreateNode
      Subnode.Caption = "[FindThe] Small Albums"
      Subnode.IconIndex = 47
      Subnode.CustomNodeID = 300
      SubNode.UseScript = Script.ScriptPath
      Tree.AddNode Node, Subnode, 3
      Subnode.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "1 track in the album"
         Subnode2.IconIndex = 17
         Subnode2.CustomNodeID = 311
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "2 tracks in the album"
         Subnode2.IconIndex =17
         Subnode2.CustomNodeID = 312
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "3 tracks in the album"
         Subnode2.IconIndex = 17
         Subnode2.CustomNodeID = 313
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "4 tracks in the album"
         Subnode2.IconIndex = 17
         Subnode2.CustomNodeID = 314
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "5 tracks in the album"
         Subnode2.IconIndex = 17
         Subnode2.CustomNodeID = 315
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         'Same as the other one!! you cant have 1 Track or less!
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "2 tracks or less in the album"
         Subnode2.IconIndex = 42
         Subnode2.CustomNodeID = 322
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "3 tracks or less in the album"
         Subnode2.IconIndex = 42
         Subnode2.CustomNodeID = 323
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "4 tracks or less in the album"
         Subnode2.IconIndex = 42
         Subnode2.CustomNodeID = 324
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
         
         Set Subnode2 = Tree.CreateNode
         Subnode2.Caption = "5 tracks or less in the album"
         Subnode2.IconIndex = 42
         Subnode2.CustomNodeID = 325
         SubNode2.UseScript = Script.ScriptPath
         Script.RegisterEvent Subnode2, "OnFillChildren", "ListAlbums"
         Tree.AddNode Subnode, Subnode2, 4
         Subnode2.HasChildren = True
   end sub

Sub ListAlbums(Node)

   Dim i : i = Node.CustomNodeID - 310 ' *** This is bad coding!
   Dim sql, Iter, subroot, albumId
   Node.hasChildren = False
      sql = "SELECT Albums.Album, Albums.ID, Songs.AlbumArtist, COUNT(*) AS NumTracks, Max(Cast(Songs.TrackNumber As Integer)) AS MaxTracks "&_
         "FROM Albums, Songs "&_
         "WHERE Songs.IdAlbum = Albums.ID AND Songs.AlbumArtist <> '' "&_
         "GROUP BY Songs.AlbumArtist, Albums.Album, Albums.ID "
   if Node.CustomNodeID = 100 then ' [FindThe] Missing Tracks
      sql = sql &_
           "HAVING COUNT(*) < Max(Cast(Songs.TrackNumber As Integer)) AND "&_
           "COUNT(*) > 1 AND "&_
           "Albums.Album <> '' AND "&_
           "Max(Cast(Songs.TrackNumber As Integer)) > -1 "
           '<--- unsure mod to script --->
           '"COUNT(*) > 1 AND "&_
   elseif Node.CustomNodeID = 210 then ' [FindThe] Extra Tracks - List both Album + extra
      sql = sql &_
         "HAVING COUNT(*) > (Max(Cast(Songs.TrackNumber As Integer))) AND "&_
         "COUNT(*) > 1 AND "&_
         "Albums.Album <> ''  "
         '"MAX(songs.songorder) < 2 "
   elseif Node.CustomNodeID = 220 then ' [FindThe] Extra Tracks - List just extra
      sql = sql &_
         "HAVING COUNT(*) > Max(Cast(Songs.TrackNumber As Integer)) AND " &_
         "COUNT(*) > 1 AND " &_
         "Albums.Album <> '' AND " &_
         "Max(Cast(Songs.TrackNumber As Integer)) = 0 "         
   elseif Node.CustomNodeID = 311 or Node.CustomNodeID = 312 or Node.CustomNodeID = 313 or Node.CustomNodeID = 314 or Node.CustomNodeID = 315 then '[FindThe] Small albums - Track 4  on album
      sql = sql &_
         "HAVING COUNT(*) <= "& i &"  AND "&_
         "COUNT(*) >=  "& i &" AND "&_
         "Albums.Album <> '' AND "&_
         "Max(Cast(Songs.TrackNumber As Integer)) <> " & i & " "
         '<--- unsure mod to script --->
         '"Max(Cast(Songs.TrackNumber As Integer)) <> " & x & " "&_
         '"MAX(songs.songorder)  < " & x & " "&_
   elseif Node.CustomNodeID = 321 or Node.CustomNodeID = 322 or Node.CustomNodeID = 323 or Node.CustomNodeID = 324 or Node.CustomNodeID = 325 then '[FindThe] Small albums - Track 4  on album OR LESS
      i=i-10 '*** again bad coding, this can be done at the top... if Node.CostomID =  320 or 321... then i=Node.customID-320 or .customID - 310 if = 311,312 etc!
      sql = sql &_
         "HAVING COUNT(*) <= "& i &"  AND "&_
         "COUNT(*) >=  1 AND "&_
         "Albums.Album <> '' AND "&_
         "Max(Cast(Songs.TrackNumber As Integer)) <> " & i & " "
         '<--- unsure mod to script --->
         '"Max(Cast(Songs.TrackNumber As Integer)) <> " & x & " "&_
         '"MAX(songs.songorder)  < " & x & " "&_
   end if
   sql = sql & "ORDER BY Albums.Album, Songs.AlbumArtist"
         '<---Different sorting methods ---- >
         '"ORDER BY (MAX(songs.songorder)-COUNT(*))"
         '"ORDER BY artist, album"
         '"ORDER BY album,artist"

   Dim captionTable, caption
   Set captionTable = CreateObject("Scripting.Dictionary")
   Set Iter = SDB.Database.OpenSQL(sql)

   Do Until Iter.EOF 'Needs to be false
      Dim customData
      customData = Iter.StringByIndex(0)&"@@"&Iter.StringByIndex(1)
      caption = albumCaption(Iter.StringByIndex(2),Iter.StringByIndex(0))&" ("&Iter.StringByIndex(3)&"/"&Iter.StringByIndex(4)&")"
      captionTable.add caption, customData

      Set subRoot = SDB.MainTree.createNode
      subRoot.Caption = caption
      subRoot.IconIndex = 16
      subRoot.UseScript = Script.ScriptPath
      subRoot.OnFillTracksFunct = "ListTracks"
      subRoot.customData = customData
      subRoot.sortCriteria = 0
      subRoot.sortGroup = 0
      subRoot.hasChildren = False
      SDB.MainTree.AddNode Node, subRoot, 3

      Iter.Next
   Loop
   End Sub

Sub ListTracks(Node)

   Dim sql, songlist, SplitCustomData, name, albumId
   SplitCustomData = Split(Node.CustomData,"@@")
   name = SplitCustomData(0)
   albumId = SplitCustomData(1)
   sql = "SELECT Songs.Id, Songs.TrackNumber FROM Songs "&_
         "WHERE songs.idAlbum = "&albumId&" "&_
         "ORDER BY Songs.TrackNumber"

   Dim Iter, id, track, song, Tracks
   Set Iter = SDB.Database.OpenSQL(sql)
   Set Tracks = SDB.MainTracksWindow

   Do Until Iter.EOF
      id = Iter.StringByIndex(0)
      'track = Iter.StringByIndex(1) + 1

      Tracks.AddTracksFromQuery("WHERE Songs.ID = "&id)

      Iter.Next
   Loop
   
   Tracks.FinishAdding
   FindThe
 End Sub
   
Sub FindThe   
   Dim list, itm
   dim i,j,k,l,ll,lll
   dim trackno, last, offset
   dim DupTrackSongs, UnTaggedSongs, MissingSongs, outcome
   Dim TracksArray()
   Set list = SDB.CurrentSongList
      last = list.count
   Set itm = list.Item(last-1)
      if not CLng(itm.TrackOrder) > 0 then last = CLng(itm.TrackOrder)
   Redim Preserve TracksArray(last)
   
   if last-i = 0 then msgbox "*** CRASH *** Error -  'Out of Arrays' @ last-i=0" : exit sub

   'Gets the track numbers, and save them (write)
   i=0 '<<< Postion [always (j-1)] in array
   j=1 '<<< Track No
   k=0 '<<< How many tracks to do, so how many loops
   offset=0 '<<< Offset for multi-CD albums (100, 200, 300, ...)
   Do While last - i > 0 ' Dont forget to look @ other loop ending!
      Set itm=list.Item(k)
      trackno=itm.TrackOrder
    
      '[Thank you Eyal] Calculate offset for tracks begining with > 100: <<<< Untested
      If i=0 Then                        'It's the first track of the album
         If trackno >= j + 100 Then     'Check if track# begins at greater than 100
            offset = offset + 100      'Adjust offset
            j = j + 100
            i = i + 100
         End If
      'Calculate offset for tracks begining with > 100:   
      ElseIf trackno > offset + 100 Then 'Track# changes range
         offset = offset + 100           'Adjust offset
         j = offset + 1
         i = offset
      End If

       if  j = trackno then       'Everything is fine
           TracksArray(i) = "Present"
           k=k+1      
       elseif trackno = "0" then    'Track isnTagged
         TracksArray(i) = "UnTagged"
         j=j-1
         k=k+1
      elseif i = trackno then    'Dup track number
         TracksArray(i) = "DupTack"
         j=j-1
         k=k+1
      else
           if k = trackno then msgbox "*** CRASH *** Error - 'k = TrackNo' @ Tracks#: " & k & ". Skipping Album..." : exit sub
         TracksArray(i) = "Missing"
       end if

      i=i+1
      j=j+1
   Loop
 
   'Read the track numbers, and detect the missing (read)
   i=0
   j=1
   k=0
   l=0 : ll=0 : lll=0
   Do While last - i > -1 ' Dont forget to look @ other loop ending!
   if TracksArray(i) = "Present" then
   k=k+1
   elseif TracksArray(i) = "UnTagged" then
      l=l+1
      UnTaggedSongs = "icanbeanyvalue!"
      k=k+1
      j=j-1
   elseif TracksArray(i) = "DupTack" then
      if DupTrackSongs = "" then
         DupTrackSongs = i
      else
         DupTrackSongs = DupTrackSongs & "," & i
      end if
      ll=ll+1
      k=k+1
      j=j-1
   elseif TracksArray(i) = "Missing" then
      if MissingSongs = "" then
         MissingSongs = j
      else
         MissingSongs = MissingSongs & "," & j
      end if
      lll=lll+1
   end if

      i=i+1
      j=j+1
   Loop

      outcome = itm.AlbumName & "' by '"  & itm.albumArtistName & "':" & vbnewline
   if not UnTaggedSongs = "" then outcome = outcome & "   > has " & l & " untagged track(s)" & vbnewline
   if not DupTrackSongs = "" then outcome = outcome & "   > has " & ll & " duplicate track(s) @ track# " & DupTrackSongs & vbnewline
   if not MissingSongs = "" then outcome = outcome & "   > has " & lll & " missing track(s)  @ track# " & MissingSongs
   if not (UnTaggedSongs = "" AND DupTrackSongs = "" AND MissingSongs = "") then msgbox outcome, , "[FindThe]"
   end Sub

REM msgbox "Debug" & vbnewline & "[Array] i=" & i & " ( " & last - i & " arrays left)" & vbnewline & "[Tracks Done] j=" & j & vbnewline & "[How Many] k=" & k & " (tracks left="& list.count -k  &")" & vbnewline & "trackno=" & trackno & " (called:" & itm.title & ")" & vbnewline & "[Array Status] TracksArray(i)=" & TracksArray(i)                              

 
nojac wrote:Is it possible to let the popup windows close automaticly when I move to the next album?
Yeah, a modal window is really annoying. I suggest using SDBUIDockablePanel.
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

some1 wrote:ZvezdanD's works for me (and im guesses it does for him too!)
Actually, I don't need this. It is easier for me to write a mask for Magic Node with similar functionality. :)
nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac »

Thank you again, ZvezdanD. The composers are gone now.

If you can do this with a Magic Node I'd be interested. Perhaps as a (right click???) feature in a magic AlbumArtist node?
ZvezdanD
Posts: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

nojac wrote:The composers are gone now.

If you can do this with a Magic Node I'd be interested.
I am not sure that understand what you are suggesting me. I know there are a bug with the last public version of the Magic Nodes relevant to composers and other persons which are displayed in the Artist node. This bug is already resolved in the working version. You should wait for a next public version when I finish all additions to the script.
some1
Posts: 91
Joined: Tue Jul 03, 2007 3:10 am

Post by some1 »

Have a look here for the updated version

http://www.mediamonkey.com/forum/viewto ... highlight=
Post Reply