mps wrote: 
> Thanks for the response, PasTim. Maybe I am missing something obvious. I
> use the following SQL, which works fine from "Test/Save & Play" in the
> SQL playlist menu.
> > 
Code:
--------------------
  >   > -- PlaylistName:Random Played Works
  > -- PlaylistGroups:
  > DROP TABLE IF EXISTS albumworks;
  > 
  > CREATE TEMPORARY TABLE IF NOT EXISTS albumworks 
  > AS SELECT tracks.album AS album, customscan_track_attributes.value as work, 
Ifnull(track_statistics.playcount, 0) as playcount
  > FROM tracks
  > JOIN multilibrary_track
  > LEFT JOIN track_statistics
  > JOIN customscan_track_attributes
  > ON tracks.id = customscan_track_attributes.track
  > AND tracks.url = track_statistics.url
  > AND customscan_track_attributes.module = 'customtag'
  > AND customscan_track_attributes.attr = 'WORK'
  > AND tracks.id=multilibrary_track.track 
  > AND multilibrary_track.library=2
  > GROUP BY tracks.album, customscan_track_attributes.value
  > ORDER BY random();
  > 
  > SELECT tracks.url FROM
  > (SELECT rowid AS albumworks_id, album as albumworks_album, work, playcount 
from albumworks WHERE playcount > 0 limit 10)
  > JOIN tracks
  > JOIN customscan_track_attributes
  > ON tracks.id = customscan_track_attributes.track
  > AND customscan_track_attributes.module = 'customtag'
  > AND customscan_track_attributes.attr = 'WORK'
  > AND customscan_track_attributes.value = work
  > AND tracks.album = albumworks_album
  > ORDER BY albumworks_id, tracks.tracknum;
  > 
--------------------
> > 
> 
> However, when I run it as a dynamic playlist (easily accessed from
> iPeng, etc.), it only plays the first 10 tracks and then gets one
> track at a time, disregarding any work in progress.
> 16691
> Does that make sense? What should I do differently?
I would move the 'limit 10' from the 2nd SQL statement to the end of the
first after the ORDER BY Random() - see my example.  Where it is now it
is limiting the tracks to 10 instead of the Works.



LMS 7.9 on VortexBox Midi running Xubuntu 14.04, FLACs 16->24 bit,
44.1->192kbps. Wired Touch + EDO, coax to Musical Fidelity M1 CLiC.
Alternatively squeezelite to a bit of home-cooked code and thence to M1
CLiC using a UPNP stream. Wireless Xubuntu 14.04 laptop controls LMS via
Chromium.   Meridian Explorer USB DAC to listen via Squeezelite on
Vortexbox & other PCs as required.  Spare Touch in loft.
------------------------------------------------------------------------
PasTim's Profile: http://forums.slimdevices.com/member.php?userid=41642
View this thread: http://forums.slimdevices.com/showthread.php?t=49483

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

Reply via email to