- 20th October 2005 at 4:25 am #107
Would someone mind writing up a simple faq for creating playlists in the nightlies sql database? I’ve scrolled around, and there are bits of information here or there, but it still requires a lot of fiddling and searching to make it work. And frankly, I’m lazy and don’t feel like duplicating the work I’m sure at least a couple of other people have done.
So, can one of you folks put together a simple tutorial on how to set up playlists, since a usable web based tool looks like it’s a long ways off, and there doesn’t appear to be any kind of movement towards bringing back the old mt-daapd.playlist file.
Thanks!20th October 2005 at 1:54 pm #3695
Actually, I’ve been working on the smart playlist stuff pretty steadily the last week or so. I’m thiiiiis close, and rather than write a tutorial for the playlist stuff as it exists right now in nightlies (which will disappear again in favor of something more like the existing smart playlists), I’m just going to finish it up.
I hope that before the weekend, I’ll have the simpler cases working (strings and ints, but not playlists based on dates). I hope to also have the web interface for editing those at the same time. Once that’s all in place, then I’ll work on finishing up dates and stuff.
It’s just hard to get traction, because there aren’t a lot of intermediate steps. Pretty much it all works or it doesn’t, and so there won’t be any visible progress on it until all of a sudden smart playlists are back.
But I’m working on it.
— Ron20th October 2005 at 11:41 pm #3696
w00t! Will we be able to define playlists based on path?21st October 2005 at 2:48 am #3697
:ohmy: Smart playlists and a web interface to edit them? My life would then be (almost) complete.
Since moving to a Slug a couple of months ago our household has been in Networked Music Heaven. Now all I need to do is to find a way to automate a process to de-DRM the music that my wife and kids keep buying from the iTMS and I will never need to touch a computer again.
Thanks again Ron for mt-daapd and keep up the good work.21st October 2005 at 10:43 am #3698
Mike: yes… any field in the database (even the ones that seem useless) will be useable for specifying playlist criteria. In the case of path, the playlist would look something like:
path includes “/some/path”
which will get translated into a sql query like:
select * from songs where path like ‘%/some/path%’
Spiral: Me too… that’s the thing that’s annoying about the slug — it’s a pain to ssh in, edit the playlist file, and restart the daemon. (okay, so that’s not a slug issue, it’s a mt-daapd issue). Would be much easier to web edit.
Course the first pass as the web-based editor with be nothing more than a textarea for freeform adding… it wouldn’t be a graphical editor thing like the iTunes smart playlist editor, but it would be cool if it eventually could become that.
Anyway… gotta stop gabbing and start coding. 🙂
— Ron24th October 2005 at 10:58 am #3699
Nightlies are up. the smart playlist editing page is the tab called ‘smart’.
Read the nightly notes for description of valid fields, etc.
I’ve exhaustively (in the sense of “for something like 5 minutes”) tested the web interface with safari and firefox. I have fair confidence it should work on a modernish IE, too. No promises, though… but I’d be interested to hear.
Editing playlists doesn’t work, you have to delete and re-add. I know, I’m working on it. no error messages either. Again, I know.
Also, as I’ve announced before, I’m web-design-challenged. I’d welcome help with making that work better, look better, whatever.
If anyone wants to make a HTML page to serve as a “help” page for smart playlist editing (with lists of valid fields and maybe example playlists), I’d welcome it. I’d also credit you and you could be FAMOUS! Or, at least less less-well-known, if that’s worth anything. 🙂25th October 2005 at 12:58 am #3700
I have playlists again! And I don’t have to restart mt-daapd when I make a new one! Have I told you how much love I have for you?25th October 2005 at 9:58 am #3701
lol… and that’s why I do it.
Glad it works for you though… It’s getting better. Slowly, but it’s getting there. 🙂
— Ron25th October 2005 at 6:41 pm #3702
Finally got the .ipk installed on the slug after I finally remembered the password (damn thing just keeps running).
No time to play around though. Looks like navigating around the new web pages causes my mt-daapd to crash…this may be caused by Apache running on my NSLU2 in addition to httpd. If I get time tonight or (more likely) tomorrow I’ll investigate.
Ron…do you have any other webserver software (other than the default httpd) running on your setup?26th October 2005 at 9:43 am #3703
No, my unslung slug is pretty bare. I run most of my stuff on my debonaras slug. I’m in the process of getting everything off the giant energy-sucking x86 server I have onto a debian slug.
throw a couple giant hard drives on that with reasonable spindown times, and I have a huge server with almost no power consumption. Mmmmm. Tasty.
As far as the web pages making it crash, I saw that too — I think I know what it is, and I hope I’ll have something on it next couple days.
— Ron26th October 2005 at 10:20 pm #3704
I’ve created a small playlist editing page with a few default templates just for fun 😉
Since I don’t remember your email address any more, I did upload it here:
Though I think such a thing (this wizard) would be better of in a popup, so I’ve also created this:
which launches this popup:
If that’s about what you had in mind, let me know and I’ll add the missing fields as well 🙂27th October 2005 at 4:02 am #3705
Ooh! I really like that second one with the popup.
Note that LIKE isn’t there anymore, it “includes”, and that adds the “%’s” on both ends when it sqlizes it.
I really like that though. Of course, Some of the comparisons aren’t valid for strings (only = and includes), but I think this is the way to go forward with that.
Plus date ones are going to be strange. But I like that concept a lot.27th October 2005 at 3:44 pm #3706
LIKE isn’t anymore? Oh, I simply wrote it for SQL statements 😉
Guess I need to find an overview of the exact format (SQL is simply more in my blood :laugh: ), but it’s easy to change. % removed and LIKE replaced by include for now 😉
Removed the all in one place, the popup one is now
I’ve added nearly all fields I found in the database (grouped, having tested the grouping only on Firefox so far). Also, the comparison listboxes now get adjusted depending on the field type upon field change (equals and includes for strings, equals, lesser-than, greater-than, lesser-or-equal-than, greater-or-equal-than for integers).
For dates, I’m not sure yet. Letting the user enter dates in Unix format surely isn’t a good way… but we can convert a few things in JS… what format does your sqlizer expect?28th October 2005 at 1:25 pm #3707
That part isn’t done yet, but I think production rules will look something like:
date_criterion = date | date_interval BEFORE date | date_interval AFTER date
date = YYYY-MM-DD | TODAY | date_interval AGO
date_interval = NUMBER timespec | THE timespec
timespec = year(s) | week(s) | day(s)
so a valid time would be:
2 weeks before yesterday
6 months ago (this is implicitly ’30*6*24*60*60 seconds before time(NULL)’)
or even something crazy like:
2 days after the week before yesterday
valid comparisons would be > and28th October 2005 at 1:30 pm #3708
errr… greater than or less than. Doh.
On retrospect, maybe the production rules will be simplified a little from that, but I really do like the expressiveness of that, and doesn’t look to be too difficult to parse.
As far as a guide to playlists, check the nightlies page… that has the syntax and currently valid fields.
The forum ‘General Discussion’ is closed to new topics and replies.