Dear Erland,

To check if there is a issue with the special character '!', I copy all
the directory to a other place in the NAS ( I suppress the !).
I realize the same test and same issue.

So, I go in the Customize SQL for the two Playlist : 
The Dynamic is as follow :

-- PlaylistName:Random songs from playlist
-- PlaylistGroups:esa
-- PlaylistParameter1:playlist:Select playlist:
select tracks.url from tracks

        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id and
dynamicplaylist_history.client='PlaylistPlayer'

        join playlist_track on
                tracks.url=playlist_track.track and
                playlist_track.playlist='PlaylistParameter1'


        left join track_statistics on
                tracks.url=track_statistics.url
        where
                audio=1
                and dynamicplaylist_history.id is null
                and 
ifnull(track_statistics.lastplayed,0)<(unix_timestamp()-604800)
        group by tracks.id
        order by rand()
        limit 10;


The SQL is as follow :

-- PlaylistName:Random for new7b
-- PlaylistGroups:esa
select tracks.url from tracks

        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id and
dynamicplaylist_history.client='PlaylistPlayer'

        join playlist_track on
                tracks.id=playlist_track.track  

        join tracks playlists on
                playlists.id=playlist_track.playlist and
                playlists.title='new7b'
        
        where
                tracks.audio=1
                and dynamicplaylist_history.id is null
        group by tracks.id
        order by rand()
        limit 10;


This morning, I modify the SQL Playlist like this : 

-- PlaylistName:Random for new7b
-- PlaylistGroups:esa
select tracks.url from tracks

        left join dynamicplaylist_history on
                tracks.id=dynamicplaylist_history.id and
dynamicplaylist_history.client='PlaylistPlayer'

        join playlist_track on
                tracks.url=playlist_track.track 

        join tracks playlists on
                playlist_track.playlist=playlists.id and
                playlists.title in ('new7b')
        
        where
                tracks.audio=1
                and dynamicplaylist_history.id is null
        group by tracks.id
        order by rand()
        limit 10;


And, now It's working.
I can select the SQL playlist in the Clock Alarm.
All seems working, but I must check more time.

I don't know the Database structure, so, it is very difficult for me to
understand the link between tables. Is it a document for this ?

Can you analyze this modification and validate it ?

Thanks for your help

Eric


-- 
esa

Synology DS107+ MARVELL_88F5281
Squeeze center Version : 7.5.0 - r30464
Version Perl : 5.8.6
Version MySQL : 5.1.34
Squeezeplay...
------------------------------------------------------------------------
esa's Profile: http://forums.slimdevices.com/member.php?userid=9362
View this thread: http://forums.slimdevices.com/showthread.php?t=82259

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

Reply via email to