View Issue Details

IDProjectCategoryView StatusLast Update
0009119MMW v4Framework: Scripts/Extensionspublic2012-02-13 08:18
Reporterzvezdan Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0009119: UpdateDB doesn't work correctly with tracks on UPnP
DescriptionHere is the test code:

Option Explicit

Sub OnStartUp
dim MenuItem

   'Adds Menu-Item To Now Playing
   SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_NP, 1, 1
   'Adds Menu to Now Playing
   set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_NP, 1, 1)
   MenuItem.IconIndex = 37
   MenuItem.Caption = "Add to the Library"
   MenuItem.Enabled = True
   MenuItem.UseScript = Script.ScriptPath
   MenuItem.OnClickFunc = "AddToLibrary"
   Set MenuItem = Nothing

   'Adds Menu-Item To Track-List
   SDB.UI.AddMenuItemSep SDB.UI.Menu_Pop_TrackList, 1, 1
   'Adds Menu to Now Playing
   set MenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList, 1, 1)
   MenuItem.IconIndex = 37
   MenuItem.Caption = "Add to the Library"
   MenuItem.Enabled = True
   MenuItem.UseScript = Script.ScriptPath
   MenuItem.OnClickFunc = "AddToLibrary"
   Set MenuItem = Nothing
end Sub

Sub AddToLibrary(Menu)
    Dim oSonglist
    Dim oSongData
    Dim i

    Set oSonglist = SDB.SelectedSongList
    For i = 0 to oSonglist.Count-1
        Set oSongData = oSonglist.Item(i)
        If oSongData.IsntInDB Or oSongData.SongID = -1 Then
            oSongData.UpdateDB
        End If
    Next
End Sub
Steps To Reproduce- Find some server from Media Servers;
- find some folder from it which contains some track that is not already added to the Library;
- select that track and choose "Add to the Library" from the pop-up menu -> track is added to the URL branch in Location, not in Media Servers.
TagsNo tags attached.
Fixed in build

Activities

There are no notes attached to this issue.