From MediaMonkey Wiki
Revision as of 16:25, 26 September 2013 by Ludek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CoClass SDBSongData, Interface ISDBSongData

Property Let PathByMask As String

Property description

Similar to Path property, but allows you to set path according to Mask. The file itself is moved once UpdateDB is called.

Example script:

Option Explicit

Sub OnStartUp()
    Dim oMenuItem

    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList, 0, 0)
    oMenuItem.Caption = "PathByMask"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub

Sub Test(oMenuItem)
    Dim oSongData   
    Set oSongData = SDB.SelectedSongList.Item(0)
    oSongData.PathByMask = SDB.Tools.UFText2Mask _
        ("C:\Music\<Genre>\<Album Artist>\<Album>\<Track#:2> - <Title>")
    SDB.MessageBox oSongData.Path, mtInformation, Array(mbOK)
    SDB.MessageBox oSongData.Path, mtInformation, Array(mbOK)
End Sub

Added in MediaMonkey version 4.1

Note: Can be used also as SetPathByMask() method.