Hi Again! 2011/5/13 Maxens Dubois <[email protected]>: > Le 13/05/2011 23:15, Romain Beauxis a écrit : >> >> 2011/5/12 Maxens Dubois<[email protected]>: >>> >>> Hey all, >> >> Hi Maxens! >> >>> Here are those lines in my script : >>> >>> >>> ... >>> monday_show = mksafe(playlist(mode = "normal", reload_mode = "rounds", >>> reload = 1, "/home/shows/Monday/" )) >>> tuesday_show = mksafe(playlist(mode = "normal", reload_mode = "rounds", >>> reload = 1, "/home/shows/Tuesday/" )) >>> ... >>> >>> >>> I used them in a giant switch to schedule my week, and my radio-crew >>> just modify the ''/home/shows/.../'' folders via FTP. >>> >>> The aim is to automaticcaly reload the playlist to be ready every day, >>> whatever the modifications in the folders. >>> >>> But well, it fails this way. >>> >>> So my question is ... >>> >>> Is there anyway to reload those playlists at their beginings rather than >>> thier ends ? >>> >>> I could use the "reload_mode = "seconds"", but I'm feeling stupid to ask >>> the script to reload every 2s is there is juste one modification in the >>> folder during the week. >> >> Indeed :) >> >> I am not sure that I understand what you mean by it "fails". The >> playlist does not relad as you would like? >> >> One thing you could do is use the server/telnet reload command that is >> available with recent liquidsoap. I can explain how to use it in more >> length but before, I'd like to understand exactly what fails for you >> to make sure that this is the right option for you.. >> >> Romain > > This reload function seems nice ! > > Let me explain with an example : > > 1) It's monday morning. I run this script in daemon mode. > 2) Some user change the content "/home/shows/Monday" > 3) Monday night, files currently in ''/home/shows/Monday" shoud be played, > but It's not the case.
Hmm.. I think this could be due to the fact that the reload mechanism is only active when the source itself is active. I'm speaking without reading the code but it may very well be the case that reload is triggered when the playlist is actually used, so if your user changes the content say on Wednesday, then the reload will not happen until the playlist is used again the next monday. In this case, you could use the "reload" command to force the reload to happen when the source is not used. You may as well combine it with add_timeout so that reload is called regularly but in this case, you should check that reload is not called during a time when the playlist is used.. Romain ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
