SQL Playlist Creation

Need help? Post your questions here.

Moderator: moderators

SQL Playlist Creation

Postby cpeb » Tue Aug 08, 2017 3:38 pm

Afternoon All

I'm using 6.1.1 and trying to create a playlist using SQL. It works BUT i end up with a load of tracks which i think are the actual directories with no duration listed and it also doesn't take into account the duration i'm setting in the statement

Code: Select all
DELETE FROM playlist_file WHERE PLAYLIST_ID = 11;
INSERT INTO playlist_file (MEDIA_FILE_ID, PLAYLIST_ID)
SELECT ID, '11'
FROM media_file
WHERE GENRE = 'Rap'
Or GENRE = 'Hip-Hop'
AND duration_seconds between '120' and '420'
And Type != 'DIRECTORY'
ORDER BY duration_seconds
LIMIT 1000;
SELECT COUNT(*) FROM playlist_file WHERE PLAYLIST_ID=11;


any advice?
cpeb
 
Posts: 1
Joined: Tue Aug 08, 2017 3:03 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 25 guests