You can use
Bex's SQL Viewer script for this. Here are some examples he gave me for something else, but they should get you started on your way.
Code: Select all
SELECT IDPlaylist, PlaylistName FROM Playlists WHERE PlaylistName = 'playlistname goes here'
Note the id for future use.
Construct your sql which finds the songs you want to put in the playlists.
When you then want to add the songs to your playlist you need to construct the SELECT-statement like this:
Code: Select all
SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
To actually add the songs do like this:
Code: Select all
INSERT INTO Playlists (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
To remove the songs from your playlist before you add new ones, either do it manually in MM or run this sql:
Code: Select all
DELETE FROM Playlists WHERE IDPlaylist = ThePlaylistIdHere
Nyn
You can use [url=http://www.mediamonkey.com/forum/viewtopic.php?t=24841%20]Bex's SQL Viewer[/url] script for this. Here are some examples he gave me for something else, but they should get you started on your way.
[code]
SELECT IDPlaylist, PlaylistName FROM Playlists WHERE PlaylistName = 'playlistname goes here'[/code]
Note the id for future use.
Construct your sql which finds the songs you want to put in the playlists.
When you then want to add the songs to your playlist you need to construct the SELECT-statement like this:
[code]
SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla[/code]
To actually add the songs do like this:
[code]
INSERT INTO Playlists (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla[/code]
To remove the songs from your playlist before you add new ones, either do it manually in MM or run this sql:
[code]
DELETE FROM Playlists WHERE IDPlaylist = ThePlaylistIdHere[/code]
Nyn