This query ran fine in 7.5. I only had to change rand() to random(). 

-- PlaylistName:1) Evening Breeze
-- PlaylistGroups:Casual/Jazz & Pop
select tracks.url from tracks
        join genre_track on
                tracks.id=genre_track.track
        join genres on
                genre_track.genre=genres.id
        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id and
dynamicplaylist_history.client='PlaylistPlayer'
        left join track_statistics on
                tracks.url=track_statistics.url
        where
                audio=1
                and dynamicplaylist_history.id is null
                and genres.name in ('Brazilian','Brazilian: Bossa Nova','Jazz:
Brazilian','Jazz: Guitar','Jazz: Piano','Jazz Vocal','Jazz Vocal:
Female','Jazz Vocal: Male','Jazz Vocal: Pop','Pop Vocal','Pop Vocal:
Female','Pop Vocal: Male')
                and 
ifnull(track_statistics.lastplayed,0)<(unix_timestamp()-2419200)
        group by tracks.id
order by random()
        limit 100;



But when I test it, I get the following error. (I am currently scanning
a large set of music files on a NAS elsehwhere on my LAN-- could this be
the cause of thte error.)

Error:
Carp::Clan::__ANON__(): Carp::Clan::__ANON__(): DBI Exception:
DBD::SQLite::st execute failed: database is locked [for Statement
"DELETE FROM tracks WHERE ( id = ? )"] at /Slim/Schema/Storage.pm line
126


------------------------------------------------------------------------
Goattee's Profile: http://forums.slimdevices.com/member.php?userid=23377
View this thread: http://forums.slimdevices.com/showthread.php?t=94854

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to