Playlist based on albums not played or not played recently

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Playlist based on albums not played or not played recently

Re: Playlist based on albums not played or not played recently

by palmernet » Mon Nov 24, 2008 6:39 am

This script is good - but how do I turn it into a auto-playlist?

Re: Playlist based on albums not played or not played recently

by nynaevelan » Sun Nov 23, 2008 1:29 pm

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

Playlist based on albums not played or not played recently

by palmernet » Sun Nov 23, 2008 1:06 pm

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?

Top