I would like to create a playlist contains songs from albums I haven't listed to in my collection since I migrated to Media Monkey.
I can obtain a list fairly easily using Microsoft Access and ODBC with this query:
SELECT TOP 100 Albums.Artist, Albums.Album, Songs.ID, Songs.TrackNumber, Songs.SongTitle, Songs.SongPath, Songs.Year
FROM Songs INNER JOIN Albums ON Songs.IDAlbum = Albums.ID
WHERE (((Exists (SELECT 'X' FROM Songs WHERE Albums.ID=Songs.IDAlbum and LastTimePlayed>0))=False));
Is there are way to create a playlist from an SQL query?
Playlist based on albums not played or not played recently
-
nynaevelan
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: Playlist based on albums not played or not played recently
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.
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:
To actually add the songs do like this:
To remove the songs from your playlist before you add new ones, either do it manually in MM or run this sql:
Nyn
Code: Select all
SELECT IDPlaylist, PlaylistName FROM Playlists WHERE PlaylistName = 'playlistname goes here'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 blaCode: Select all
INSERT INTO Playlists (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla blaCode: Select all
DELETE FROM Playlists WHERE IDPlaylist = ThePlaylistIdHere3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: Playlist based on albums not played or not played recently
This script is good - but how do I turn it into a auto-playlist?