Ways to Trigger Your Rotation Script,Using Python,PHP,Liquidsoap etc. Write Yours Here
  • This script have now being merge
    See https://forum.sourcefabric.org/discussion/18336/autodj-script-using-php-2-1-5-6-solution-you-were-waiting-on-no-ls_script-modification-need

    If you are anxious to try and use the autodj Rotation script I am including a modification which definitely works with  6 lines of code

    sudo gedit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    and place the information
    Included
    • text of the modification
    • notes of the modification
    • ls scipt of what it should look like and
    • for those who are ready to go
    • Proof of concept

    You see I can do almost anything with liquidsoap quickly but it will take a time for me to whip up a script for php or python


    1280 x 1024 - 156K
    Post edited by Voisses Tech at 2017-04-10 06:53:56
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • 5 Comments sorted by
  • I own no rights to the music in the playlist library and they are there for entertainment purpose only
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • YOU See My Rotation it works.Implementing it across the board. Think I can improve on it

    Are you Paying for yours. I thind I need some more down votes cause the Joke is On You
    :-)) =)) :-B :)) =D> =D>
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • You can trigger this by any method you like

    make sure your script is located at /usr/local/bin/
    1. You can just run the command  php /usr/local/bin/airtime_rotation.php
    2. You can search the framework and just use an if statement to say if nothing is schedule run getopt of this script
    3. use python
    4. I use liquidsoap since it has its own built in slient detector .You donot have to use it

    at about line 320

    put this

    def rotation_trigger()
       command= "php /usr/local/bin/airtime_rotation.php"
       log(label="Rotation Created",level=5,command)
        system(command)      
      
    end

    station_id=single(id="s_stationId","/srv/backup/files/station_id/station_id.mp3")
    #or uses
    # s=mksafe(s)
                     
    s  =fallback(id="radio",
                track_sensitive=false,
                         transitions=[transition,transition,transition],
                         [strip_blank(id="main_silence",max_blank=240.,threshold=-70.,default),
                         on_blank(rotation_trigger, strip_blank(id="url_silence",max_blank=120.,threshold=-70.,s)),
                          station_id])



    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Voisses Tech  Add also these lines to the end of function insertIntoCcSchedule() :

     $query  = "UPDATE cc_files SET is_scheduled = 'true' WHERE id = '$file[id]'";
     $result = query($conn, $query);

    (before { { )

    You know for what ;-)
    Post edited by Serge Kukharski at 2017-04-10 16:11:00
  • Yep and its great.

    It place that nice tick in the schedule box.

    Hey thank you I just hope other people will do contribute  to make this perfect or near that.

    Its Still Beta and I am still work on it and for it to be a module

    I even see how this can be used for spots using argv and Zendcron
    Here
    http://stackoverflow.com/questions/8191059/how-do-i-setup-a-cron-job-a-script-that-is-part-of-a-zend-framework-project

    using what Jason Brumwell
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.