By abhishek |
Airtime Image from Wikipedia

No one likes a silence when tuning to a radio station, and for a radio manager its tough to have 24*7 programmes, in case you are running an Internet Radio Station using Airtime you probably would be programming your shows and in Offtime your radio is always silent i would suggest you to play some random tracks in this Offtime and also include a track which tells when your station plays live so here is how to achieve this

  1. Put some MP3 files in a folder of your server, please also record a message with the showtimings etc or what ever you want this folder may contain any number of files which you want to play in off time (Folder used in the below script /store00/rand)
  2. Edit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq (below is the patch) the modified lines are in bold

@@ -150,14 +150,14 @@
 #                "read_stop_all",
 #                fun (s) -> begin log("dynamic_source.read_stop") destroy_dynamic_source_all() end)

-default = amplify(id="silence_src", 0.00001, noise())
+#default = amplify(id="silence_src", 0.00001, noise())
 ref_off_air_meta = ref off_air_meta
 if !ref_off_air_meta == "" then
     ref_off_air_meta := "Airtime - offline"
 end
-default = rewrite_metadata([("title", !ref_off_air_meta)], default)
-ignore(output.dummy(default, fallible=true))
-
+#default = rewrite_metadata([("title", !ref_off_air_meta)], default)
+#ignore(output.dummy(default, fallible=true))
+default = playlist(mode='random', "/store00/rand/")
 master_dj_enabled = ref false
 live_dj_enabled = ref false
 scheduled_play_enabled = ref false

Once you have modifed you are good to go restart the services, upon restarting you will listem random tracks in offtime from the folder you have set in the script.

Tested on Airtime 2.5.1, do listem to VMOU's stream @ http://vmou.ac.in/stream