Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > Glad it's working for you now. > BTW have you considered getting rid of those inconsistencies using SQL > (code/commands)? And you could add stuff to your library, rescan and > include a condition in your SQLite statement(s) that filters for date > added, i.e. only play tracks added before a specific date. Just a > thought. I did think about doing just that at one point, but never got around to it. I can't remember why. It's possible that my literal mind didn't want to input a fictitious value even though obviously that wouldn't have hurt anything. I REALLY like your idea about adding date logic, though. Maybe I could even try a min() on that column just for fun. Thank you again! atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > As you may have read '*here*' > (https://forums.slimdevices.com/showthread.php?115073-Announce-Dynamic-Playlists-3-(mod)=1061778=1#post1061778), > '*here*' > (https://forums.slimdevices.com/showthread.php?115501-Dynamic-Playlists-3-get-help-with-your-custom-playlists=1061779=1#post1061779), > '*here*' > (https://forums.slimdevices.com/showthread.php?115501-Dynamic-Playlists-3-get-help-with-your-custom-playlists=1039453=1#post1039453) > or in the FAQ: the correct file extension for dynamic playlists is > simply "*.sql*", i.e. -*filename.sql*- > Starting with 3.6.10 this is the only file extension that's parsed. So > if you still have files with the legacy file extension ".sql.xml", do a > simple search/replace to delete the ".xml" part of the file extension. > Should look like this: "filename.sql" I think it's quite obvious that I haven't! If I had, I wouldn't be writing here. In fact I've been listening to music on my amazing Squeezebox systems whilst sadly reading about aggression, anger and hate throughout this world. My Squeezebox systems have performed almost faultlessly for years and I update plugins semi-automatically and usually without issue. I apologize for being a nuisance but, one day, you too, may come to realise that there's more to life than constantly tweaking "under the bonnet" and reading technical FAQs. However, I have one more question. What about playlists ending *.sql.values.xml ? Thank you ChipMonk's Profile: http://forums.slimdevices.com/member.php?userid=40072 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
As you may have read '*here*' (https://forums.slimdevices.com/showthread.php?115073-Announce-Dynamic-Playlists-3-(mod)=1061778=1#post1061778), '*here*' (https://forums.slimdevices.com/showthread.php?115501-Dynamic-Playlists-3-get-help-with-your-custom-playlists=1061779=1#post1061779), '*here*' (https://forums.slimdevices.com/showthread.php?115501-Dynamic-Playlists-3-get-help-with-your-custom-playlists=1039453=1#post1039453) or in the FAQ: the correct file extension for dynamic playlists is simply "*.sql*", i.e. -*filename.sql*- Starting with 3.6.10 this is the only file extension that's parsed. So if you still have files with the legacy file extension ".sql.xml", do a simple search/replace to delete the ".xml" part of the file extension. Should look like this: "filename.sql" 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
They are all *.sql.xml Created years ago for Erlands plugins, and added to via "cloning", but seamlessly integrated into DPL3 until very recently. The fact that this problem has been replicated on two pCP LMS servers and one Ubuntu LMS and shown to be immediately after the latest DPL3 plugin update, suggests the problem is with the plugin ChipMonk's Profile: http://forums.slimdevices.com/member.php?userid=40072 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
You'll have to provide more information: error messages from the log, DPL3 version, LMS version, the code, file name and extension of a dynamic playlist that's not working... ChipMonk wrote: > that the plugin will only accept these playlists in the "root" Playlists > folder. So are we talking about *static/standard/saved* playlists (common file extensions: m3u, m3u8...) or *dynamic* playlists (file extension: "*.sql*", *not* ".xml.sql" or some other variation) *Custom* *_dynamic_* playlists have to be placed in the -DPL-custom-lists- subfolder. *_Static_* playlist can be placed *anywhere* in the LMS playlists folder, even in nested subfolders. So which are talking about? Anyway, I haven't been able to reproduce your problem with DPL 3.6.10 so far. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
ChipMonk wrote: > > > I've just checked and this "glitch" does not appear to have occurred on > my pCP backup server - greatly relieved! > > > Thanks When I wrote the above I hadn't checked that there was a DPL3 plugin update. On updating, all my favourites again stopped functioning. On each of my LMS set-ups (Ubuntu and pCP) I had moved my sql playlists into the DPL-custom-lists and they had worked just fine - until today. So something has clearly changed such that the plugin will only accept these playlists in the "root" Playlists folder. I'm not looking forward to having to make all these changes in several more LMS setups I have for myself and family members. ChipMonk's Profile: http://forums.slimdevices.com/member.php?userid=40072 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
ChipMonk wrote: > OK I've sorted it. All my playlists were in a DPL-custom-lists folder. > I'm sure this must have been specified in the move to DPL3. For reasons > unknown, they were no longer being "discovered". I copied them all over > to the base Playlists folder and then went through all the enabling and > making DPL favourites then LMS favourites. A bit of a nuisance. All > appears to be working again. > > I've just checked and this "glitch" does not appear to have occurred on > my pCP backup server - greatly relieved! > > I'd still like to know whether or not the glitch was at my end or some > change in DPL3 > > Thanks DPL3 creates an *empty* folder called -DPL-custom-lists- in the LMS -Playlists- folder. If you create your own custom *dynamic* playlists (SQLite code), this subfolder is where you place them so that DPL3 picks them up. I don't know how your *static* (standard) playlists ended up in that subfolder. DPL3 -never- moves playlist files around, neither static nor dynamic. But glad everything seems to be working again. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
OK I've sorted it. All my playlists were in a DPL-custom-lists folder. I'm sure this must have been specified in the move to DPL3. For reasons unknown, they were no longer being "discovered". I copied them all over to the base Playlists folder and then went through all the enabling and making DPL favourites then LMS favourites. A bit of a nuisance. All appears to be working again. I've just checked and this "glitch" does not appear to have occurred on my pCP backup server - greatly relieved! I'd still like to know whether or not the glitch was at my end or some change in DPL3 Thanks ChipMonk's Profile: http://forums.slimdevices.com/member.php?userid=40072 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
I am a very long term user of Squeezebox. I continue to use playlists using my own on-board flac collection. I had no problems moving over to DL3 but suddenly most of my Favourites are not working This one works: dynamicplaylist://sqlplaylist_randomRock Those of this type no longer work: dynamicplaylist://dplusercustom_HarryNilssonMix I have not been tinkering in this area for a long time so can only think that I've missed something with plugin updates. I have a lot on my plate in other areas right now and just want my music to help me relax and not to add to problems. If anyone can shed light on what may have changed and what is the easiest way to get back my favourites I would be most grateful. I suspect some folder changes but I can no longer remember where all this stuff is (Ubuntu 20.4 server LMS latest 8.3 Thanks ChipMonk's Profile: http://forums.slimdevices.com/member.php?userid=40072 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
Glad it's working for you now. BTW have you considered getting rid of those inconsistencies using SQL (code/commands)? And you could add stuff to your library, rescan and include a condition in your SQLite statement(s) that filters for date added, i.e. only play tracks added before a specific date. Just a thought. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
The reason I was getting genres I thought I'd excluded is because I was updating a different Dynamic Playlist from what I was actually playing. atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > Are you already using the lastest version of DPL3, 3.6.9 or 3.6.10 > (which should be available later tonight)? > I'm asking because you said that new album*s* (plural) = 150 tracks were > added. Your SQLite statement (like the built-in dynamic playlists) > should only add 1 album at a time (unless no of tracks in album < min. > number of unplayed tracks as explained). > After updating to the latest DPL3 version you could clear your client > playlist and restart your dynamic playlist. In my tests with the > built-in album playlists no single tracks were added. I definitely am using 3.6.10 now and the behavior I saw last night seemed exactly right. I didn't see it add any odd tracks and what's out there right now waiting for me to go to bed tonight is the remains of a large single album. So it looks like it's back to working the way it did before, which is also perfect for what I need. Thank you! AF1 wrote: > > Switching from the old DPL to DPL3 is no reason to nuke your LMS > installation or delete all of your databse tables. Apart from a > temporary database table (to prevent repeating tracks already played in > a session) DPL3 has no database tables. I can no longer remember the exact details, but when the new DPL3 came along I was getting the impression that already-played albums were playing again. Pre-retirement, my primary job function was in a billing audit center writing code to catch weird little exceptions. So I looked into the old DPL tables as well as the regular LMS ones and discovered discrepancies between last played dates and whether the track had been played at all. I have no idea how it happened, but I figured that making my query check both last played and the play count would ultimately get me where I want to go. AF1 wrote: > > Depending on the kind of the inconsistencies in your database, dynamic > playlists may show different results for you than for users without > these inconsistencies. That's not a catastrophe but not good either. A > rescan (clear) can wipe/clear the library.db and repopulate it with the > correct current data. The most important values in the -persist.db- are > ratings, play counts, date last played and date added. Those are not > affected by a rescan. Maybe get rid of the inconsistencies there, do a > restart and then a rescan (clear). As always, make a copy of library.db > and persist.db before you start working on them. Good luck. For now, I'm pretty happy with how it's working. At some point in the distant future I'll finally run out of stuff to play, at which point I'll finally do a full rescan, which will then pick up all the stuff I've added since the last rescan. To give you an idea of how desperately nerdy I am about this, I get a report emailed to me every morning at 8:30: Code: This script is: /mnt/WD8TBNAS03/Documents/ShellScripts/TrackStat-new.py 1448 Unplayed Albums Unplayed Tracks: 8,090 Played Tracks:95,712 Oldest and most recently played tracks: 2017-02-03 21:40:22 file:///mnt/WD6TBNAS01/Squeezebox%20Music/NotDTS/Hair/Hair%20Broadway%20Deluxe/D1-T01%20-%20Aquarius.flac 2022-09-25 05:02:48 file:///mnt/WD6TBNAS01/Squeezebox%20Music/NotDTS/Various%20Artists/The%20Complete%20Motown%20Singles%20Collection%20Volume%2006/D1-T06-This%20Old%20Heart%20Of%20Mine%20(Is%20Weak%20For%20You)%20(Alternate%20Mix).flac ID|Album Title|Total Tracks|Unplayed Tracks 194|(What's the Story) Morning Glory? [DSD stereo]|12|10 2649|1 [2015 remix]|27|25 4335|1,039/Smoothed Out Slappy Hours|19|16 4161|10|16|11 6829|12 X 5 [2002 DSD remaster]|12|3 7481|12 x 12 Original Remixes|12|11 7465|12x12 Original Remixes|12|7 2653|1967-1970 [2010 reissue]|28|25 7851|1968-05-09 - Fillmore Soundboard [sector boundary errors]|10|9 8777|1969: Velvet Underground Live|19|15 6161|1970-12-22 - Disgusting, Hardly Music|8|7 5292|1971-1979 Demos|28|25 6226|1972-12-09 - In a Neutral Land [Revision 1]|14|13 6796|1972-12-09 - Orchestral Tommy Live at the Rainbow|26|20 6237|1973-06-29 - Vaulting Ambition|16|15 7369|1974-03-20 - Live at the Record Plant|10|8 That last list goes on forever, but you get the idea. Every morning I compare the current report to the prior to see how many albums and tracks are left to go. You get a pretty good idea of how out of whack the data is just from the little bit above. You can see almost everything is showing as partly played, which probably means that somehow or other some of the tracks lost their play status. It's very, very unlikely that so many albums were aborted before finishing, but I have no idea how it all got so jumbled. atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
atrocity wrote: > Perfect, exactly what I want. And new albums finally did get added last > night (about 150 tracks), though once again after properly adding > several complete albums, it then put a bunch of random single tracks > down at the end: Are you already using the lastest version of DPL3, 3.6.9 or 3.6.10 (which should be available later tonight)? I'm asking because you said that new album*s* (plural) = 150 tracks were added. Your SQLite statement (like the built-in dynamic playlists) should only add 1 album at a time (unless no of tracks in album < min. number of unplayed tracks as explained). After updating to the latest DPL3 version you could clear your client playlist and restart your dynamic playlist. In my tests with the built-in album playlists no single tracks were added. atrocity wrote: > When you rewrote the plugin, I imported the old data Switching from the old DPL to DPL3 is no reason to nuke your LMS installation or delete all of your databse tables. Apart from a temporary database table (to prevent repeating tracks already played in a session) DPL3 has no database tables. atrocity wrote: > the odd inconsistencies that came from who-knows-where. Depending on the kind of the inconsistencies in your database, dynamic playlists may show different results for you than for users without these inconsistencies. That's not a catastrophe but not good either. A rescan (clear) can wipe/clear the library.db and repopulate it with the correct current data. The most important values in the -persist.db- are ratings, play counts, date last played and date added. Those are not affected by a rescan. Maybe get rid of the inconsistencies there, do a restart and then a rescan (clear). As always, make a copy of library.db and persist.db before you start working on them. Good luck. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > > For album dynamic playlists, there's the unlimited option so the max > pref value won't split albums in the middle. Then album dynamic > playlists should add 1 (or whatever album limit your SLQite code has) > entire album. So if you use the unlimted option in your dynamic > playlist, it will effectively disable the "max number of unplayed songs" > for this playlist. > Perfect, exactly what I want. And new albums finally did get added last night (about 150 tracks), though once again after properly adding several complete albums, it then put a bunch of random single tracks down at the end: 38774 AF1 wrote: > > But there are corner cases I suppose. Example: your *min* number of > -un-played tracks = 4, DPL selects an EP or CD single with only 3 tracks > (both considered 'albums"). That's below the min number of unplayed > tracks, so it will add another album until the number of unplayed tracks > in your client's playlist >= min. number of unplayed tracks. Anyway, > that's the idea behind all of this. Thought you might be interested in > how this works. I definitely am interested and your explanation makes perfect sense, thank you! AF1 wrote: > > BTW if a track's play count is null, its lastplayed value should be null > too. You only need: > ifnull(tracks_persistent.playCount, 0) = 0 I was tracking that for a couple years back when still using Erland's plugin and there were always inconsistencies. I had tracks with a lastplayed value and no count and vice versa. When you rewrote the plugin, I imported the old data so that I wouldn't have to start again from the top (my goal is to eventually play *everything*) and that included the odd inconsistencies that came from who-knows-where. +---+ |Filename: Screenshot_20220924-013840.jpg | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=38774| +---+ atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
*IMPORTANT: DROPPING LEGACY FILE EXTENSION* IF YOU HAVE CREATED YOUR OWN -CUSTOM- DYNAMIC PLAYLISTS[/B], PLEASE MAKE SURE THEIR *FILE NAMES HAVE THE CORRECT EXTENSION: -.SQL- The legacy extension [B].xml.sql* will no longer be supported in future DPL3 versions (3.6.10+). Just remove the *.xml* part so that the file extension is only "*.sql*". That's it. Thanks for your understanding. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
atrocity wrote: > intermittently selecting just individual tracks rather than entire > albums The important pref value in your case is the *min* number of *un*played songs. If the number of unplayed tracks in your client's playlist < min, then DPL3 will add new tracks, so that the remaining -un-played tracks in your client's playlist + the added unplayed tracks = max. number of *un*played songs in your playlist. For album dynamic playlists, there's the unlimited option so the max pref value won't split albums in the middle. Then album dynamic playlists should add 1 (or whatever album limit your SLQite code has) entire album. So if you use the unlimted option in your dynamic playlist, it will effectively disable the "max number of unplayed songs" for this playlist. But there are corner cases I suppose. Example: your *min* number of -un-played tracks = 4, DPL selects an EP or CD single with only 3 tracks (both considered 'albums"). That's below the min number of unplayed tracks, so it will add another album until the number of unplayed tracks in your client's playlist >= min. number of unplayed tracks. Anyway, that's the idea behind all of this. Thought you might be interested in how this works. BTW if a track's play count is null, its lastplayed value should be null too. You only need: ifnull(tracks_persistent.playCount, 0) = 0 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > Ok, I found a bug. Will release a fix later tonight. > Not sure if it applies in your case but: if you use multiple genre > values for tracks (one track = genre Pop *and* Rock) or if album tracks > don't have the same genre, your dynamic playlist will still select them. I hadn't previously found that to be the case, possibly because my SQL (which I think was adapted from code you supplied) includes "and not exists" to weed out any tracks in GENRE_TRACK that have an unwanted genre. But obviously other stuff goes on behind the scenes, so maybe I've just been lucky so far. That aside, at least some of the unwanted tracks I've been getting really do have only one genre. AF1 wrote: > > And the unlimited option was necessary before. You did nothing wrong > here. I will look at both, the unlimited option and excluding genres to > see if I can improve them. Just not today, probably over the weekend. > Meanwhile, maybe you can dl the new version tomorrow and let me know if > and how the fixed bug affects the issues you reported. My setup is still going through the very long playlist that it created, so it hasn't added anything new to the end yet, but probably will tonight. But I'm taking that as a good sign! So I can say that it's apparently no longer building a huge playlist but can't yet verify that it's no longer intermittently selecting just individual tracks rather than entire albums. Sorry I took two days to get back to you after you were so fast! atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
Ok, I found a bug. Will release a fix later tonight. Not sure if it applies in your case but: if you use multiple genre values for tracks (one track = genre Pop *and* Rock) or if album tracks don't have the same genre, your dynamic playlist will still select them. And the unlimited option was necessary before. You did nothing wrong here. I will look at both, the unlimited option and excluding genres to see if I can improve them. Just not today, probably over the weekend. Meanwhile, maybe you can dl the new version tomorrow and let me know if and how the fixed bug affects the issues you reported. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > If you use "-- PlaylistLimitOption:unlimited", there's (almost) no limit > (i.e. 2000 tracks). Here's what you could do: If you remove that line, > DPL3 will use "Max Number of Unplayed Songs". Or you add "-- > PlaylistLimitOption:50" and limit 50 at the very end manually. Either > way, that should get rid of the huge playlist issue. > In addition I think there's a bug in DPL3. I'll take a look and release > an update as soon as I have the time. The genre thing might require more > time to investigate though. Don't have much spare time right now but > I'll deal with it as soon as I can. Thank you for the quick response! Honestly, I can live with the large playlist as long as it reliably adds only complete albums (or at least complete albums minus the tracks with excluded genres). I forgot to mention in my initial post that I brought it up only because I'm pretty sure this is a new behavior. I think I originally had "-- PlaylistLimitOption:unlimited" in there because without it was not adding complete albums if the number of tracks was larger than whatever max was set elsewhere. Sorry about being so vague with "pretty sure" and "I think"--problem is that I no longer really remember why I did what I did because up until now it was working exactly the way I wanted it to. atrocity's Profile: http://forums.slimdevices.com/member.php?userid=16009 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
If you use "-- PlaylistLimitOption:unlimited", there's (almost) no limit (i.e. 2000 tracks). Here's what you could do: If you remove that line, DPL3 will use "Max Number of Unplayed Songs". Or you add "-- PlaylistLimitOption:50" and limit 50 at the very end manually. Either way, that should get rid of the huge playlist issue. In addition I think there's a bug in DPL3. I'll take a look and release an update as soon as I have the time. The genre thing might require more time to investigate though. Don't have much spare time right now but I'll deal with it as soon as I can. 'Ratings Light FAQ' (https://github.com/AF-1/lms-ratingslight) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) '*List of all plugins*' (https://github.com/AF-1/) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
My DP3 (version 3.6.7) seems to have gone a bit crazy lately. It's running on a combined player/server that literally only EVER gets turned on and off, that is, I turn it off when I get up in the morning and turn it back on when I go to bed at night. I've been using this SQL: Code: -- PlaylistName:Albums - entirely or partially unplayed -- PlaylistGroups: -- PlaylistLimitOption:unlimited -- PlaylistTrackOrder: ordered drop table if exists dynamicplaylist_random_albums; --This step obtains *ONE* album ID for an album with at least one unplayed track create temporary table dynamicplaylist_random_albums as select partiallyplayed.album as album from (select distinct tracks.album as album from tracks join tracks_persistent on tracks_persistent.urlmd5 = tracks.urlmd5 and (tracks_persistent.playCount = 0 or tracks_persistent.playCount is NULL or tracks_persistent.lastPlayed is NULL) left join dynamicplaylist_history on dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' where tracks.url not like '%/DTS/%' and tracks.url not like '%/AC3/%' and tracks.url not like '%/Temp/%' and tracks.url not like like '%Low%20Sample%20Rates%' and tracks.audio = 1 and tracks.samplerate >= 44100 and dynamicplaylist_history.id is null and not exists (select * from tracks t2, genre_track, genres where t2.id = tracks.id and tracks.id = genre_track.track and genre_track.genre = genres.id and genres.name in ('AC-3','Audiobook','Comedy','Commentary','Commercial','Documentary','DTS','History', 'Interview','Kiddie','Podcast','Self Hypnosis','Shortwave','Sound Collage', 'Sound Effects','Spoken','Spoken Word','Talk','Test')) group by tracks.album order by random() limit 10) as partiallyplayed order by random() limit 1; --This step uses the above-selected album ID to select all the tracks for that album (played or not) except for those in unwanted genres select distinct tracks.url from tracks join dynamicplaylist_random_albums on dynamicplaylist_random_albums.album = tracks.album join tracks_persistent on tracks_persistent.urlmd5 = tracks.urlmd5 left join dynamicplaylist_history on dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' where tracks.audio = 1 and dynamicplaylist_history.id is null and not exists (select * from tracks t2, genre_track, genres where t2.id = tracks.id and tracks.id = genre_track.track and genre_track.genre = genres.id and genres.name in ('AC-3','Audiobook','Comedy','Commentary','Commercial','Documentary','DTS','History', 'Interview','Kiddie','Podcast','Self Hypnosis','Shortwave','Sound Collage', 'Sound Effects','Spoken','Spoken Word','Talk','Test')) order by dynamicplaylist_random_albums.album, tracks.disc, tracks.tracknum; drop table if exists dynamicplaylist_random_albums; Originally it worked exactly as intended, but recently it's begun ignoring the genres I *don't* want, so I'll wake up in the middle of the night to find it playing an audiobook (just for one example). It's been happening rarely enough that I've just been living with it (and maybe I did something wrong with the code?), but as of last night there's a new level of weirdness: 1. I just want full albums, but during the night it started adding tracks. Below is a sample of What Was That Tune? from last night: 38758 2. Additionally, though I have Max Number of Unplayed Songs set to 50, Min Number of Unplayed Songs set to 4 and Number of Played Tracks to Keep set to 100, I just noticed that my current playlist is enormous: 18 hours, 11
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
I gave up on trying to get a copy of a "built in" Dynamic Playlist 3 xml to work. I went back and used the SQLPlaylist option to create a sql.xml file and it works straight away except for only selecting "Max. number of unplayed songs" instead of the whole album. I then replaced the "header" with: Code: -- PlaylistName:AlbumsScore(5) -- PlaylistGroups:Albums -- PlaylistCategory:albums -- PlaylistLimitOption:unlimited -- PlaylistTrackOrder:ordered I told LMS to rescan the playlists and tried it again. No change. It still does not select the entire album. If I use SQLPlaylist to edit, then test it does select the entire album, but when I tell it to Save and Play, it goes back to only selecting "Max. number of unplayed songs" instead. Thinking that there might be some conflict with my old Erland plugins and the new Dynamic Playlist 3, I created a new directory called "DynamicPlaylist" and moved these sql.xml files there. I figured that way the old plugins would not be able to find them. Unfortunately, even after adjusting the "Parent folder path for folder with custom dynamic playlist files" setting for Dynamic Playlist 3, it does not seem to be able to find them either. Finally, I tried moving my custom sql.xml files to Config/cache/InstalledPlugins/Plugins/DynamicPlaylists3/Playlists/albums, and finally they work correctly So, there does seem to be some conflict between my old Erland plugins and the new Dynamic Playlist 3. The easiest way to solve it seems to be to have Dynamic Playlist 3 look in a different directory than my default /playlist but changing that setting does not seem to work. jpoet's Profile: http://forums.slimdevices.com/member.php?userid=20621 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
Hi AF1, I wanted to try and create a Dynamic Playlist which will play unrated sound track albums but I can't seem to get it to work. If I copy "Config/cache/InstalledPlugins/Plugins/DynamicPlayList/Playlists/albums/albums_06_notrated.sql.xml" to "Playlist/soundtrack_albums_notrated.sql.xml", and simply change: > -- PlaylistName:Albums Soundtracks Unrated LMS sees the new dynamic playlist, and I can "Play it", but after asking me to "Choose songs to include", nothing happens. However, if I play the "Albums - not rated" it works perfectly. Since everything is the same except the PlaylistName, I would expect them to behave exactly the same. What step am I missing? TIA jpoet's Profile: http://forums.slimdevices.com/member.php?userid=20621 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 - OK, thanks. I've no need for more libraries yet, but I'll take a look if/when I do. As to PlaylistCurrentVirtualLibraryForClient I think I'll stick to my method for now. I need my new extra table for use with Custom Browse menus so may as well use it here rather than forgetting to set the library :) 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
PasTim wrote: > > Code: > > > -- PlaylistName:Rated songs in classical genre > -- PlaylistGroups:Random/For selected > -- PlaylistTrackOrder:ordered > -- PlaylistLimitOption:unlimited > -- PlaylistVirtualLibraryName1:Classical > -- PlaylistParameter1:customgenre:Select genre:select id,name,substr(namesort,1,1) from genres join library_libraries on library_genre.library=library_libraries.library and library_libraries.library_name='Classical' join library_genre on genres.id=library_genre.genre order by genres.namesort > select url from > (select tracks.url from tracks join library_track on > library_track.track = tracks.id and library_track.library = 'PlaylistVirtualLibraryName1' > join genre_track on > tracks.id=genre_track.track and > genre_track.genre='PlaylistParameter1' > join track_statistics on > tracks.url=track_statistics.url > left join dynamicplaylist_history on > tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' > where > audio=1 > and track_statistics.rating>=70 > and dynamicplaylist_history.id is null > group by tracks.id > order by random() > > limit 100) as rated > order by random(); > > > > I can 't use PlaylistVirtualLibraryName1 in the initial genre > selection, so I had to use my new table to do it instead. > Note that my tracks can have multiple genres, so the Classical genres > has many sub-genres, and in this case I don't want to see loads of > other non-Classical genres in my selection. > I am sure there are there are several other ways of doing this, and > it's not a problem, more of a 'neatness' question. You're right. DPL asks for playlist parameter input when you start a dynamic playlist and the parameters don't know about each other. For your use case I recommend this: DPL does actually check if there's an *active library view/virtual library set for the player* that's starting the dynamic playlist (it's client-specific). So set the virtual library with all your classical music as the active library view/virtual library for your player and then adapt your dynamic playlist or maybe try this one: Code: -- PlaylistName:Rated songs in classical genre -- PlaylistGroups:Random/For selected -- PlaylistLimitOption:unlimited -- PlaylistParameter1:multiplegenres:Select genres: select tracks.url from tracks join library_track on library_track.track = tracks.id and library_track.library = 'PlaylistCurrentVirtualLibraryForClient' join genre_track on genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter1') join tracks_persistent on tracks_persistent.urlmd5 = tracks.urlmd5 left join dynamicplaylist_history on tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' where audio=1 and tracks_persistent.rating>=70 and dynamicplaylist_history.id is null group by tracks.id order by random() limit 100; Please note that this dynamic playlist will not work if you haven't set a library view/virtual library for your player. Your own playlist example calls random() 2 times. No need: just lose the -PlaylistTrackOrder- parameter (that's for when you don't want any randomization at all: listening to complete albums, movements...) and DPL will add extra randomization. PasTim wrote: > Yes, just the one purpose. I just populate it using SQL, copying the > numbers from the library prefs. ... and somehow use that in my Custom > Browse menus. So I don't know how exactly you use your virtual libraries table with CustomBrowse. But since you're obviously comfortable with SQLite I remembered that I once had a small plugin that used custom SQLite definitions to create virtual libraries. It kind of was the predecessor of the more specific UseCommentTagInfo plugin. I've found a copy of '*SQLiteVirtualLibraries*' (https://github.com/AF-1/lms-sqlitevirtuallibraries) in my backups and uploaded it to GitHub. Maybe check it out to see if it's of any interest to you. *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) AF1's Profile:
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
AF1 wrote: > Nothing to do with DPL but just out of curiosity: your table serves just > this one purpose: to provide a name for your VLibs? Did you write a > plugin that creates your "own normal" menus based on that? Are we > talking complicated (multi-level nestedCustom menus or just > run-of-the-mill LMS menus like all kinds of contributor menus, albums, > genres... Yes, just the one purpose. I just populate it using SQL, copying the numbers from the library prefs. That way, if I have have to start again from scratch, and the codes change, it's easy for me to just change the one table entries rather than edit all my menus. I use it mainly to split Classical music (with an array of essential additional tags required to select and play it properly) from other types of music, and intend to maybe do a bit more once I'm happy I've got it working for all my main purposes. I used to be a programmer, but my coding days are mostly long gone. It would take me forever to find out how to create a plugin for LMS, let alone get access to the prefs table directly, and somehow use that in my Custom Browse menus. Using just SQL is simpler, and, I hope, more reliable long term in terms of compatibilty. > I'm not sure I understand what you're trying to do here. Can you post a > dynamic playlist example with detailled comments to illustrate what > you're trying to achieve? Simply select a subset of items at the start of a DPL menu, where the subset belongs to a partiocular library, so: Code: -- PlaylistName:Rated songs in classical genre -- PlaylistGroups:Random/For selected -- PlaylistTrackOrder:ordered -- PlaylistLimitOption:unlimited -- PlaylistVirtualLibraryName1:Classical -- PlaylistParameter1:customgenre:Select genre:select id,name,substr(namesort,1,1) from genres join library_libraries on library_genre.library=library_libraries.library and library_libraries.library_name='Classical' join library_genre on genres.id=library_genre.genre order by genres.namesort select url from (select tracks.url from tracks join library_track on library_track.track = tracks.id and library_track.library = 'PlaylistVirtualLibraryName1' join genre_track on tracks.id=genre_track.track and genre_track.genre='PlaylistParameter1' join track_statistics on tracks.url=track_statistics.url left join dynamicplaylist_history on tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' where audio=1 and track_statistics.rating>=70 and dynamicplaylist_history.id is null group by tracks.id order by random() limit 100) as rated order by random(); I can 't use PlaylistVirtualLibraryName1 in the initial genre selection, so I had to use my new table to do it instead. Note that my tracks can have multiple genres, so the Classical genres has many sub-genres, and in this case I don't want to see loads of other non-Classical genres in my selection. I am sure there are there are several other ways of doing this, and it's not a problem, more of a 'neatness' question. 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
PasTim wrote: > To get it to work well with my own normal menus I had to create an > additional table which maps the 8 character code for the library to the > name of the library (as defined in the prefs file). Nothing to do with DPL but just out of curiosity: your table serves just this one purpose: to provide a name for your VLibs? Did you write a plugin that creates your "own normal" menus based on that? Are we talking complicated (multi-level nestedCustom menus or just run-of-the-mill LMS menus like all kinds of contributor menus, albums, genres... PasTim wrote: > if I want to select a subset at run-time, say for a set of genres in > that library, defining a PlaylistParameter1, this doesn't seem to work > with a PlaylistVirtualLibraryName1 defined previously, presumably > because the definitions aren't all available to the other definitions > until the main select starts. I'm not sure I understand what you're trying to do here. Can you post a dynamic playlist example with detailled comments to illustrate what you're trying to achieve? *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) AF1's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
Hi afriend. I have managed to create a library view setup for my music, which matches my old multilibraries setup. To get it to work well with my own normal menus I had to create an additional table which maps the 8 character code for the library to the name of the library (as defined in the prefs file). That works, so far so good. In some of my DPLs this also works well, using the PlaylistVirtualLibraryName1 parameter in my sql, rather than my own extra table. However, if I want to select a subset at run-time, say for a set of genres in that library, defining a PlaylistParameter1, this doesn't seem to work with a PlaylistVirtualLibraryName1 defined previously, presumably because the definitions aren't all available to the other definitions until the main select starts. If you agree that this is a feature, could it be overcome? 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend - just to say I've got started, and several of my main random lists are working OK now that I've sorted out the 'ordered' issue and the related DPL setting. Thanks for your patience and help. If I get any insurmountable problems I'll post back here. 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > Ok then. I thought you were using SQLPlayList to get your custom dynamic > playlists into DPL - which is no longer necessary/recommended with > DPL*3*. What I described was how to use your custom dyn. playlists with > DPL3 *without* SQLPlayList. More detailled information on the relation > between DPL and SQLPlayList, and on how to create/import your custom > dyn. playlists into DPL3 can be found in the FAQ. Now I'm confused. I'll have to try the FAQ again, but I think the short version is that I only have to move my existing files to another folder, maybe with a first line edit on some. > > ?? Are you talking about the styling tags in this forum (B = bold)? > Yes, but since I'm so often reading your text as a quote, the styling tags don't work there - sorry - my confusion. > > Misunderstanding. Take your first example -Random Classical Top Rated > Works-. You pick a random -work- with rating 80+ but *then* you do want > to play this work's movements in *non*-random order, no? > That's what the *PlaylistTrackOrder* parameter is for because DPL3 adds > extra randomness/shuffling to tracks *unless* you use this line. It's > just a way to disable this extra shuffling. > That's what I though (I think) > > As for Multilibraries, what you posted was the -.sql.values.xml- > content, just the values that ML parses to create valid SQLite queries. > But that's ok. > > How many Multilibraries do you have? > And can you describe the criteria you use to create your > Mulltilibraries? > Are they basically supposed to filter by genre (Classical or > Non-Classical)? > I'd be especially interested in your *more complex* Multilibraries. > > BTW you can see the actual SQLite code of each library in the > Multilibraries web UI if you edit them and then at the bottom choose > *Customize SQL*, then click *Next*. There you can see/copy the actual > SQLite code. But *don't click save afterwards*. I don't want to waste your time on multilibrary. That would be a much bigger change for me, including almost all my menus. I only use it to separate classical from the rest, since I use different tagging and playing rules. Further, without customscan to get my classical and other tags, multilibrary wouldn't help me much. If I ever decide to review all that I'll start some other thread, but it's quite likely that I'd just have to freeze LMS at a working point, never update again, and cross my fingers. I might even have to move off LMS to something like minimserver. 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
PasTim wrote: > MY dynamic playlists already have extension .sql.xml, so I don't > understand what you are asking me to do. Ok then. I thought you were using SQLPlayList to get your custom dynamic playlists into DPL - which is no longer necessary/recommended with DPL*3*. What I described was how to use your custom dyn. playlists with DPL3 *without* SQLPlayList. More detailled information on the relation between DPL and SQLPlayList, and on how to create/import your custom dyn. playlists into DPL3 can be found in the FAQ. PasTim wrote: > By the way, what do [B] etc mean? ?? Are you talking about the styling tags in this forum (B = bold)? PasTim wrote: > All my Dynamic playlists are random, so I guess I stay with > PlaylistLimitOption:unlimited Misunderstanding. Take your first example -Random Classical Top Rated Works-. You pick a random -work- with rating 80+ but *then* you do want to play this work's movements in *non*-random order, no? That's what the *PlaylistTrackOrder* parameter is for because DPL3 adds extra randomness/shuffling to tracks *unless* you use this line. It's just a way to disable this extra shuffling. As for Multilibraries, what you posted was the -.sql.values.xml- content, just the values that ML parses to create valid SQLite queries. But that's ok. How many Multilibraries do you have? And can you describe the criteria you use to create your Mulltilibraries? Are they basically supposed to filter by genre (Classical or Non-Classical)? I'd be especially interested in your *more complex* Multilibraries. BTW you can see the actual SQLite code of each library in the Multilibraries web UI if you edit them and then at the bottom choose *Customize SQL*, then click *Next*. There you can see/copy the actual SQLite code. But *don't click save afterwards*. *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > I'm quite confident that you will succeed. Don't worry too much about > terms and new features. At the core DPL is still just a means to serve > you those tracks that you select with your SQLite code/dynamic > playlist. > > Try this: save the SQLite code of your dynamic playlists (just like the > examples you posted here) as plain text files, change the file extension > to *.sql.xml* and move these files to -DPL's folder for custom dynamic > playlists- called *DPL-custom-lists* (default location of that folder: > in your LMS playlist folder). Uninstall DPL*2* and install DPL*3*. Maybe > uninstall SQLPlayList for the time being. Your custom dynamic playlists > should show up now. Your SQLPlayLists playlists and DPL2 preferences > will still be there when you uninstall DPL3 and reinstall DPL2 and > SQLPlayList. > MY dynamic playlists already have extension .sql.xml, so I don't understand what you are asking me to do. By the way, what do [B] etc mean? > > If you want unlimited tracks and *non-random* order replace *-- > PlaylistOption Unlimited:1* (from your first example) with these 2 > lines: > > Code: > > > -- PlaylistLimitOption:unlimited > -- PlaylistTrackOrder:ordered > > > > All my Dynamic playlists are random, so I guess I stay with PlaylistLimitOption:unlimited Can you post the SQLite code of your *MultiLibraries* from the MultiLibraries plugin? (not the dynamic playlists) The more the better. That would give me a better idea of whether and how your MultiLibraries can be recreated as virtual libraries. I don't know where all the sql resides. The section defined when the user creates a library is xml like this: Code: standard.xml Classical Music 50 0 0 Classical 0 0 0 The plugin has an sql folder containing: Code: CREATE TABLE multilibrary_genre ( library int(10) not null, genre int(10) not null, primary key (library,genre) ); CREATE TABLE multilibrary_year ( library int(10) not null, year int(10) not null, primary key (library,year) ); CREATE TABLE multilibrary_contributor ( library int(10) not null, contributor int(10) not null, primary key (library,contributor) ); CREATE TABLE multilibrary_album ( library int(10) not null, album int(10) not null, primary key (library,album) ); CREATE TABLE multilibrary_track ( library int(10) not null, track int(10) not null, primary key (library,track) ); CREATE TABLE multilibrary_libraries ( id INTEGER PRIMARY KEY AUTOINCREMENT, libraryid varchar(255) not null, name varchar(255) not null ); 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
PasTim wrote: > I'm struggling with the complexity of the FAQs. There are so many > features I've never heard of, and some terms that evade me, but I'll > try. I'm quite confident that you will succeed. Don't worry too much about terms and new features. At the core DPL is still just a means to serve you those tracks that you select with your SQLite code/dynamic playlist. Try this: save the SQLite code of your dynamic playlists (just like the examples you posted here) as plain text files, change the file extension to *.sql.xml* and move these files to -DPL's folder for custom dynamic playlists- called *DPL-custom-lists* (default location of that folder: in your LMS playlist folder). Uninstall DPL*2* and install DPL*3*. Maybe uninstall SQLPlayList for the time being. Your custom dynamic playlists should show up now. Your SQLPlayLists playlists and DPL2 preferences will still be there when you uninstall DPL3 and reinstall DPL2 and SQLPlayList. If you want unlimited tracks and *non-random* order replace *-- PlaylistOption Unlimited:1* (from your first example) with these 2 lines: Code: -- PlaylistLimitOption:unlimited -- PlaylistTrackOrder:ordered Can you post the SQLite code of your *MultiLibraries* from the MultiLibraries plugin? (not the dynamic playlists) The more the better. That would give me a better idea of whether and how your MultiLibraries can be recreated as virtual libraries. *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > I removed code in DPL3 that was specifically aimed at unsupported > plugins - for all the reasons and with all the consquences (e.g. no > support) explained in the FAQ. > But as long as your SQLite code is valid and the tables you need > exists/work there's a good chance it might work with DPL3. DPL3 and DPL2 > have different names and preference files so you could temporarily > uninstall DPL2 and install DPL3 to test it. Just make sure you read the > FAQ parts on -SQLPlayList- too. In your example above --- PlaylistOption > Unlimited:1- won't have any effect with DPL*3*. It's --- > PlaylistLimitOption:unlimited- (see DPL3 wiki on DPL playlist format). I'm struggling with the complexity of the FAQs. There are so many features I've never heard of, and some terms that evade me, but I'll try. It may prove to be too hard (i'm not as young as I once was). > Just out of curiosity: Can you post the code of some of your dynamic > playlists (preferably in CODE tags) that involve the -MultiLibrary- > plugin? If there's a chance to replace this plugin with native virtual > libraries you'd have one less plugin to worry about and make your setup > a bit more 'future-proof'. I'd forgotten that the playlist I quoted didn't access the multilibrary table (it didn't need to because I only use WORK on classical tracks). Here's one that does. Code: -- PlaylistName:Random Non-Classical Rated -- PlaylistGroups:Random select url from (select tracks.url from tracks join multilibrary_track on tracks.id=multilibrary_track.track and multilibrary_track.library=1 join track_statistics on tracks.url=track_statistics.url and track_statistics.rating > 79 left join dynamicplaylist_history on tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' where audio=1 and dynamicplaylist_history.id is null group by tracks.id order by random() limit 20) as rated order by random(); 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
PasTim wrote: > I don't understand what is meant by 'removes ties to other (unsupported) > plugins'. I see that it says that it may work with such plugins, but > I'm not sure what it means by 'ties'. I removed code in DPL3 that was specifically aimed at unsupported plugins - for all the reasons and with all the consquences (e.g. no support) explained in the FAQ. But as long as your SQLite code is valid and the tables you need exists/work there's a good chance it might work with DPL3. DPL3 and DPL2 have different names and preference files so you could temporarily uninstall DPL2 and install DPL3 to test it. Just make sure you read the FAQ parts on -SQLPlayList- too. In your example above --- PlaylistOption Unlimited:1- won't have any effect with DPL*3*. It's --- PlaylistLimitOption:unlimited- (see DPL3 wiki on DPL playlist format). PasTim wrote: > I did look at the Virtual Libraries but I failed to understand how I > could get it to work in a similar way to multilibrary. Just out of curiosity: Can you post the code of some of your dynamic playlists (preferably in CODE tags) that involve the -MultiLibrary- plugin? If there's a chance to replace this plugin with native virtual libraries you'd have one less plugin to worry about and make your setup a bit more 'future-proof'. *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
With apologies for being a bit slow. I have a long standing LMS system, buit I don't quite get what the new DPL vs old DPL issues are. I've read the FAQ and everything else I could find, but I don't really understand what impact the new version will have on the dynamic play lists I already have. These make extensive use of the database entries created by custom scan and multilibrary. My use of LMS depends almost completely on those database tables. I play almost exclusively classical music, and 'works', so I have to use custom scan and browse, and multilibrary. I did look at the Virtual Libraries but I failed to understand how I could get it to work in a similar way to multilibrary. I have several dozen queries that depend on the multilibrary database. I don't understand what is meant by 'removes ties to other (unsupported) plugins'. I see that it says that it may work with such plugins, but I'm not sure what it means by 'ties'. As an example dynamic sql (I have about 20), this one selects random classical works (a series of movements/tracks) where one movement has a top 'rating' of 90 or more. Will the new DPL at least initially still work with this? Will it only fail if multilibrary or customscan fail to create the database tables, or is there some deeper 'tie' that could cause problems? -- PlaylistName:Random Classical Top Rated Works -- PlaylistGroups:Random -- PlaylistOption Unlimited:1 create temporary table sqlplaylist_random_work as select customscan_track_attributes.value as work, tracks.album as album from customscan_track_attributes join tracks on customscan_track_attributes.track = tracks.id left join dynamicplaylist_history on tracks.id=dynamicplaylist_history.id and dynamicplaylist_history.client='PlaylistPlayer' join track_statistics on tracks.url=track_statistics.url and track_statistics.rating > 89 where customscan_track_attributes.module='customtag' and customscan_track_attributes.attr='WORK' and dynamicplaylist_history.id is null and audio=1 group by customscan_track_attributes.value, tracks.album order by random() limit 10; select tracks.url from tracks join customscan_track_attributes on tracks.id = customscan_track_attributes.track join sqlplaylist_random_work on tracks.album = sqlplaylist_random_work.album where sqlplaylist_random_work.work = customscan_track_attributes.value and customscan_track_attributes.module='customtag' and customscan_track_attributes.attr='WORK' and audio=1 group by tracks.id order by tracks.album,tracks.disc,tracks.tracknum; drop table sqlplaylist_random_work; 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=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > There was a line I forgot to delete. Fixed. > > > > I recreated this as best I could. A static playlist with about 1500 > tracks incl. all Beatles tracks I could find. > Then I called the DPL context playlist from above (with year=1967 and > the genres of the tracks in the static playlist) - and no problem, 1967, > Beatles and all. Reasonably shuffled as well - though if the source is a > playlist with albums (compared to your entire library) I would expect > groups of tracks from the same album to show up. > > P.S. Your posts are easier to read if you don't quote/repost the entire > playlist code :-) Sorry about all that quoting. I've removed them so no one gets confused about your revised code. And thanks again. I'll try it out. nyindieguy's Profile: http://forums.slimdevices.com/member.php?userid=62092 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
nyindieguy wrote: > With the "multiple genres/select decade" playlist, it selected only 9 > songs in spite of there being hundreds that would have qualified. All of > the 9 songs were from 1960, in spite of having selected that entire > decade of the '60s. When I tried a second time, the exact same 8 songs > came up. There was a line I forgot to delete. Fixed. nyindieguy wrote: > With the "multiple genres/select year" playlist, the songs seemed like > they were correct, though not as shuffled as I might have wanted, but > ended after several hours of play, when there should have been enough > songs to last all day. The big tipoff was no Beatles included when Rock > and Roll was one of the selected genres and 1967 was the selected year. I recreated this as best I could. A static playlist with about 1500 tracks incl. all Beatles tracks I could find. Then I called the DPL context playlist from above (with year=1967 and the genres of the tracks in the static playlist) - and no problem, 1967, Beatles and all. Reasonably shuffled as well - though if the source is a playlist with albums (compared to your entire library) I would expect groups of tracks from the same album to show up. P.S. Your posts are easier to read if you don't quote/repost the entire playlist code :-) *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > With *year* you'll have to choose a year. Not optional. > > > Code: > > -- PlaylistName:Songs - multiple genres & year (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > -- PlaylistParameter3:year:Select year: > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.year='PlaylistParameter3' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > > > With *decades* it's optional (select -any-). > > > Code: > > -- PlaylistName:Songs - multiple genres & decade (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > -- PlaylistParameter3:customdecadechained:Select decade:select cast(((ifnull(tracks.year,0)/10)*10) as int),case when tracks.year>0 then cast(((tracks.year/10)*10) as int)||'s' else 'Unknown' end from tracks where tracks.audio=1 group by cast(((ifnull(tracks.year,0)/10)*10) as int) order by tracks.year desc > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.year='PlaylistParameter3' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > and > case > when 'PlaylistParameter3'!=9 then tracks.year>='PlaylistParameter3' and tracks.year<('PlaylistParameter3'+10) > else 1 > end > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > > > And without year/decade: > > > Code: > > -- PlaylistName:Songs - multiple genres (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > I tried these out and it appears that there is either a flaw in the code or a bug in the plugin. With the "multiple genres/select decade" playlist, it selected only 9 songs in spite of there being hundreds that would have qualified. All of the 9 songs were from 1960, in spite of having selected that entire decade of the '60s. When I tried a second time, the exact same 8 songs came up. With the "multiple genres/select year" playlist, the songs seemed like they were correct, though not as shuffled as I might have wanted, but ended after several hours of play, when there should have been enough songs to last all day. The big tipoff was no Beatles included when Rock and Roll was one of the selected genres and 1967 was the selected year. Any thoughts? nyindieguy's Profile: http://forums.slimdevices.com/member.php?userid=62092 View this thread:
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
afriend wrote: > With *year* you'll have to choose a year. Not optional. > > > Code: > > -- PlaylistName:Songs - multiple genres & year (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > -- PlaylistParameter3:year:Select year: > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.year='PlaylistParameter3' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > > > With *decades* it's optional (select -any-). > > > Code: > > -- PlaylistName:Songs - multiple genres & decade (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > -- PlaylistParameter3:customdecadechained:Select decade:select cast(((ifnull(tracks.year,0)/10)*10) as int),case when tracks.year>0 then cast(((tracks.year/10)*10) as int)||'s' else 'Unknown' end from tracks where tracks.audio=1 group by cast(((ifnull(tracks.year,0)/10)*10) as int) order by tracks.year desc > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.year='PlaylistParameter3' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > and > case > when 'PlaylistParameter3'!=9 then tracks.year>='PlaylistParameter3' and tracks.year<('PlaylistParameter3'+10) > else 1 > end > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > > > And without year/decade: > > > Code: > > -- PlaylistName:Songs - multiple genres (from selected playlist) > -- PlaylistGroups: > -- PlaylistMenuListType:contextmenu > -- PlaylistParameter1:playlist:Select playlist: > -- PlaylistParameter2:multiplegenres:Select genres: > select distinct playlist_track.track from playlist_track > join tracks on > tracks.url = playlist_track.track > join genre_track on > genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') > left join dynamicplaylist_history on > dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' > where > playlist_track.playlist='PlaylistParameter1' > and tracks.audio = 1 > and tracks.secs >= 'PlaylistTrackMinDuration' > and dynamicplaylist_history.id is null > group by playlist_track.track > order by random() > limit 'PlaylistLimit'; > > > You make all this seem easy! nyindieguy's Profile: http://forums.slimdevices.com/member.php?userid=62092 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
nyindieguy wrote: > *context menu* that uses an existing static playlist and allows me to > choose a subset of that playlist that chooses multiple genres and/or a > year. With *year* you'll have to choose a year. Not optional. Code: -- PlaylistName:Songs - multiple genres & year (from selected playlist) -- PlaylistGroups: -- PlaylistMenuListType:contextmenu -- PlaylistParameter1:playlist:Select playlist: -- PlaylistParameter2:multiplegenres:Select genres: -- PlaylistParameter3:year:Select year: select distinct playlist_track.track from playlist_track join tracks on tracks.url = playlist_track.track join genre_track on genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') left join dynamicplaylist_history on dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' where playlist_track.playlist='PlaylistParameter1' and tracks.year='PlaylistParameter3' and tracks.audio = 1 and tracks.secs >= 'PlaylistTrackMinDuration' and dynamicplaylist_history.id is null group by playlist_track.track order by random() limit 'PlaylistLimit'; With *decades* it's optional (select -any-). Code: -- PlaylistName:Songs - multiple genres & decade (from selected playlist) -- PlaylistGroups: -- PlaylistMenuListType:contextmenu -- PlaylistParameter1:playlist:Select playlist: -- PlaylistParameter2:multiplegenres:Select genres: -- PlaylistParameter3:customdecadechained:Select decade:select cast(((ifnull(tracks.year,0)/10)*10) as int),case when tracks.year>0 then cast(((tracks.year/10)*10) as int)||'s' else 'Unknown' end from tracks where tracks.audio=1 group by cast(((ifnull(tracks.year,0)/10)*10) as int) order by tracks.year desc select distinct playlist_track.track from playlist_track join tracks on tracks.url = playlist_track.track join genre_track on genre_track.track = tracks.id and genre_track.genre in ('PlaylistParameter2') left join dynamicplaylist_history on dynamicplaylist_history.id=tracks.id and dynamicplaylist_history.client='PlaylistPlayer' where playlist_track.playlist='PlaylistParameter1' and tracks.year='PlaylistParameter3' and tracks.audio = 1 and tracks.secs >= 'PlaylistTrackMinDuration' and dynamicplaylist_history.id is null and case when 'PlaylistParameter3'!=9 then tracks.year>='PlaylistParameter3' and tracks.year<('PlaylistParameter3'+10) else 1 end group by playlist_track.track order by random() limit 'PlaylistLimit'; *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
Re: [SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
Glad to see this new thread as I am one of those folks who can't code to save my life. My holy grail is a context menu that uses an existing static playlist and allows me to choose a subset of that playlist that chooses multiple genres and/or a year. If anyone wants to tackle that, I would be grateful. nyindieguy's Profile: http://forums.slimdevices.com/member.php?userid=62092 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins
[SlimDevices: Plugins] Dynamic Playlists 3 - get help with your custom playlists
THIS THREAD IS *EXCLUSIVELY* DEDICATED TO PROVIDING *HELP* WITH SQLITE STATEMENTS FOR USERS WHO WANT TO *CREATE* THEIR OWN *(CUSTOM) DYNAMIC PLAYLISTS*. OF COURSE, YOU CAN ALSO POST YOUR -WORKING- CUSTOM DYNAMIC PLAYLISTS HERE FOR OTHERS TO USE OR AS A SOURCE OF INSPIRATION. SO NOBODY HAS TO REINVENT TO WHEEL. ::Before posting I recommend you take a look at the '*dynamic playlists*' (https://github.com/AF-1/lms-dynamicplaylists/tree/main/DynamicPlaylists3/Playlists) (incl. context menu playlists) that come with the plugin. They are a good starting point and may help you understand how SQLite works. And please read the '*wiki on the DPL playlist format*' (https://github.com/AF-1/lms-dynamicplaylists/wiki/DPL-playlist-format) and the '*FAQ*' (https://github.com/AF-1/lms-dynamicplaylists#faq).:: Once you have a working SQLite statement, all you need to do is - open a -plain text- editor of your choice (e.g. -Notepad- on Windows or -BBEdit- on macOS) - paste the dynamic playlist definition (incl. your SQLite statement) - save the file with a *sql.xml* file extension (instead of txt). Example: mycustomplaylistname*.sql.xml* - move this file to the folder for custom playlists called "*DPL-custom-lists*" in the LMS playlists folder (unless you changed its location). Now your dynamic playlist should be listed in the playlist group you chose/created or in the -Not classified- group if it doesn't belong to any group. Very easy. So the challenging part is figuring out the SQLite statement. And that's what this thread is for. I can't promise that I'll have time to answer your requests. Fortunately, there are other users who I know will help you as well. *Plugin repositories:* 'Ratings Light' (https://github.com/AF-1/lms-ratingslight) 'Visual Statistics' (https://github.com/AF-1/lms-visualstatistics) 'Use Comment Tag Info' (https://github.com/AF-1/lms-usecommenttaginfo) 'Dynamic Playlists 3 FAQ' (https://github.com/AF-1/lms-dynamicplaylists#faq) 'Custom Skip 3 FAQ' (https://github.com/AF-1/lms-customskip#faq) afriend's Profile: http://forums.slimdevices.com/member.php?userid=39306 View this thread: http://forums.slimdevices.com/showthread.php?t=115501 ___ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins