by Peke » Sat Dec 12, 2009 10:41 pm
Are you using
Playlist irect in DB Playlist or as
SongList?
I would Suggest that you use new created Songlist DIM and when all is Done use AddTracks to Create new Playlist and Add all tracks at once. It will speed up Script and Lower Queries on MM Library.
Example (Not tested but it should be like that):
Code: Select all
DIM LastFavorites
'Case 1
'Set LastFavorites = CreateObject("SongsDB.SDBSongList")
'Case 2
'Set LastFavorites = SDB.NewSongList
Do While Not list.EOF
Set Add_me = list.item
LastFavorites.Add(Add_me)
SDB.ProcessMessages
Loop
Playlist.AddTracks(LastFavorites)
SDB.ProcessMessages
LastFavorites = Nothing
Experiment and see which one is better/faster
Are you using [url=http://www.mediamonkey.com/wiki/index.php/SDBPlaylist]Playlist[/url] irect in DB Playlist or as [url=http://www.mediamonkey.com/wiki/index.php/SDBSongList]SongList[/url]?
I would Suggest that you use new created Songlist DIM and when all is Done use AddTracks to Create new Playlist and Add all tracks at once. It will speed up Script and Lower Queries on MM Library.
Example (Not tested but it should be like that):
[code]DIM LastFavorites
'Case 1
'Set LastFavorites = CreateObject("SongsDB.SDBSongList")
'Case 2
'Set LastFavorites = SDB.NewSongList
Do While Not list.EOF
Set Add_me = list.item
LastFavorites.Add(Add_me)
SDB.ProcessMessages
Loop
Playlist.AddTracks(LastFavorites)
SDB.ProcessMessages
LastFavorites = Nothing[/code]
Experiment and see which one is better/faster