Where would i want to look in the API reference? I switched the fallback line to a switch and put everything in brackets but still get a parse error when I try to run the script.
> On Apr 7, 2016, at 12:38 PM, Fernando Carmona <[email protected]> wrote: > > Hi both, since you seem to be looking for different things, I'll answer > separately. > > Ashley, for the script you sent, the problem is you're using a fallback when > you want a switch. Your time predicates seem right, they worked for me after > changing the fallback to a switch. Also, since switch takes a list of pairs > (predicate, source), you should put them between brackets to work. Check the > api reference for details, but it should be pretty straightforward. > > As for the making sources available on a particular date, I had to make > something similar, and stumbled into an abandoned project that had its own > date type to build predicates and you might find it useful. Here it is: > https://trac.v2.nl/browser/soundpiece/src/liquidsoap > <https://trac.v2.nl/browser/soundpiece/src/liquidsoap> > > Hope that helps! > > On Thu, Apr 7, 2016 at 5:38 PM, Ashley Bernard <[email protected] > <mailto:[email protected]>> wrote: > this is my code. I’m probably missing some very necessary line, or a bracket > or something. > > #!/usr/bin/liquidsoap > # Set the files and playlists, > all = playlist("/root/ivrauto/tv") > anime = playlist("/root/ivrauto/tv/Anime") > Cartoons = playlist("/root/ivrauto/tv/Cartoons") > comedy = playlist("/root/ivrauto/tv/Comedy") > crime = playlist("/root/ivrauto/tv/Crime Drama") > drama = playlist("/root/ivrauto/tv/drama") > medical = playlist("/root/ivrauto/tv/Medical Drama") > reality = playlist("/root/ivrauto/tv/reality") > scifi = playlist("/root/ivrauto/tv/scifi") > # Play files and playlists according to the radio program, > # and the default file if anything goes wrong. > radio = fallback( > ({ (1w or 3w or 5w) and 1h-4h }, Cartoons), > ({ (1w or 3w or 5w) and 4h-7h }, anime), > ({ (1w or 3w or 5w) and 7h-10h }, reality), > ({ (1w or 3w or 5w) and 10h-13h }, comedy), > ({ (1w or 3w or 5w) and 13h-16h }, scifi), > ({ (1w or 3w or 5w) and 16h-19h }, drama), > ({ (1w or 3w or 5w) and 19h-22h }, crime), > ({ (1w or 3w or 5w) and 22h-0h }, medical), > ({ (2w or 4w or 7w) and 1h or 9h or 17h}, Cartoons), > ({ (2w or 4w or 7w) and 2h or 10h or 18h}, anime), > ({ (2w or 4w or 7w) and 3h or 11h or 19h}, comedy), > ({ (2w or 4w or 7w) and 4h or 12h or 20h}, reality), > ({ (2w or 4w or 7w) and 5h or 13h or 21h}, scifi), > ({ (2w or 4w or 7w) and 6h or 14h or 22h}, drama), > ({ (2w or 4w or 7w) and 7h or 15h or 23h}, medical), > ({ (2w or 4w or 7w) and 8h or 16h or 0h}, crime), > ({ (2w or 4w or 7w) and 2h or 10h or 18h}, anime), > ({ (2w or 4w or 7w) and 3h or 11h or 19h}, comedy), > ({ (2w or 4w or 7w) and 4h or 12h or 20h}, reality), > ({ (2w or 4w or 7w) and 5h or 13h or 21h}, scifi), > ({ (2w or 4w or 7w) and 6h or 14h or 22h}, drama), > ({ (2w or 4w or 7w) and 7h or 15h or 23h}, medical), > ({ (6w) and 1h-0h}, all), > # Stream it out > output.icecast(%mp3, > name="IVRNetwork", description=“IVR stream", > host = "server.inner-visions.org <http://server.inner-visions.org/>", port > = 8000, > password = “somepassword", mount = “tv", > radio) > > > On Apr 7, 2016, at 3:07 AM, Sarah Alawami <[email protected] > > <mailto:[email protected]>> wrote: > > > > Can you put your script on the list? Minus the passwords of corse. I'm also > > trying to figure something like this out as I need the thing to switch > > playlists from December first to jan 1 to another playist, then back to > > the default afterwords. > >> On Apr 6, 2016, at 10:38 PM, Ashley Bernard <[email protected] > >> <mailto:[email protected]>> wrote: > >> > >> Just wondering how everyone goes about creating complex schedules for > >> their playlists? I’m trying to build a setup where a different playlist > >> plays during one time for half of the week and for another time the other > >> half, and there are about eight of these playlists. I have tried to follow > >> a code example and find info in the docs but mostly I think I’ve succeeded > >> in breaking my code rather than creating it. > >> Any help would be appreciated. > >> ------------------------------------------------------------------------------ > >> _______________________________________________ > >> Savonet-users mailing list > >> [email protected] > >> <mailto:[email protected]> > >> https://lists.sourceforge.net/lists/listinfo/savonet-users > >> <https://lists.sourceforge.net/lists/listinfo/savonet-users> > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Savonet-users mailing list > > [email protected] > > <mailto:[email protected]> > > https://lists.sourceforge.net/lists/listinfo/savonet-users > > <https://lists.sourceforge.net/lists/listinfo/savonet-users> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Savonet-users mailing list > [email protected] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/savonet-users > <https://lists.sourceforge.net/lists/listinfo/savonet-users> > > ------------------------------------------------------------------------------ > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users
------------------------------------------------------------------------------
_______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
