mps wrote: > As a workaround, I have gotten in the habit of modifying any SQL that > uses the multilibrary id to use the name and then do a join on > multilibrary_libraries to get the id. I admit it's really ugly, but I > don't really mind doing this because using names is more robust than > hardcoding library ids in the sql. Still, it's only really an option for > people comfortable modifying SQL (You can get to the SQL by choosing > Customize SQL in many of Erland's plugins) > > Here's an example of a SQL playlist that I use to randomly play work > (i.e., all the movements of a symphony). I've marked out the relevant > lines. > > Code: -------------------- > > -- PlaylistName:Random Played Works > -- PlaylistGroups: > -- PlaylistOption Unlimited:1 > 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 > *JOIN multilibrary_libraries* > 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=multilibrary_libraries.id* > WHERE playcount > 0* AND multilibrary_libraries.libraryid = 'no_duplicates'* > GROUP BY tracks.album, customscan_track_attributes.value > ORDER BY random() limit 10 ; > > SELECT tracks.url FROM > (SELECT rowid AS albumworks_id, album as albumworks_album, work, playcount from albumworks) > 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; -------------------- > > Yes, I'll do that sort of fix as well if I get too many problems with the library id. So far I seem to have been lucky. I've a lot of menus to fix, so I hope I don't need to do it.
LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO. LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers. Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers. Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones. Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver. ------------------------------------------------------------------------ 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
