An installer for this script can be downloaded from my website.
You will need the following plugin to add video formats to MM: here or here
Code: Select all
'
' MediaMonkey Script
'
' NAME: VideoNode 3.2
'
' AUTHOR: trixmoto (http://trixmoto.net)
' DATE : 20/04/2008
'
' INSTALL: Copy to Scripts\Auto directory
' Edit list of formats below to match those you wish to appear
'
' FIXES: Fixed errors for some users in MM3 (thanks to Bex)
'
Option Explicit
Dim formats : formats = "('MPG','WMV','AVI')" 'add as many as you like!
Sub onStartUp
Dim Root : Set Root = SDB.Objects("VideoNodeRoot")
If Root Is Nothing Then
Dim Tree : Set Tree = SDB.MainTree
Set Root = Tree.CreateNode
Root.Caption = "Video"
Root.IconIndex = 8
Root.UseScript = Script.ScriptPath
Root.onFillTracksFunct = "FillVideos"
Tree.AddNode Tree.Node_Library, Root, 1
Set SDB.Objects("VideoNodeRoot") = Root
End If
End Sub
Sub FillVideos(Node)
Node.HasChildren = False
Dim Tracks : Set Tracks = SDB.MainTracksWindow
Dim Query ': Query = "SELECT Songs.Id FROM Songs WHERE "
If SDB.VersionHi > 2 Then
Query = "WHERE CASE WHEN SUBSTR(Songpath,-3,1)='.' THEN SUBSTR(Songpath,-2,2) WHEN SUBSTR(Songpath,-4,1)='.' THEN SUBSTR(Songpath,-3,3) WHEN SUBSTR(Songpath,-5,1)='.' THEN SUBSTR(Songpath,-4,4) END COLLATE IUNICODE IN "&formats
Tracks.AddTracksFromQuery(Query)
Else
Query = "AND IIf(Left(Right(Songpath,3),1)='.',Right(Songpath,2),IIf(Left(Right(Songpath,4),1)='.',Right(Songpath,3),Right(Songpath,4))) IN "&formats
Tracks.AddTracksFromQuery(Query)
End If
Tracks.FinishAdding
End Sub