sintonia/3rd_party/pypo/scripts/include_dynamic_vars.liq
paul.baranowski 3613812012 Pypo fixes and improvements
General:
 * Moved pypo author info into one file
 * Added two database columns in schedule table: "schedule_group_played"
   and "media_item_played".

API clients:
 * Created get_liquidsoap_data() function which allows you
   to give arbitrary data to liquidsoap.
 * Added documentation
 * Renamed functions to make it more obvious what is happening

pypo_cli:
 * Got rid of more constants that were not needed
 * Created function set_export_source() to reduce code repetition
 * Separated the downloading of the schedule from tracking what has
   been played.  The tracking info is now kept in a separate file.
   This fixes the major bug that the playlist keeps restarting for
   the first minute of playback.
 * converted more print statements to debug statements

pypoTester:
 * Now uses samples from the audio_samples directory, and schedules two
   audio clips back-to-back.
2010-11-29 18:34:22 -05:00

37 lines
No EOL
1,007 B
Text

#######################################################################
# Dynamic variables
#######################################################################
playlist_id = ref '0'
user_id = ref '0'
transmission_id = ref '0'
playlist_type = ref '0'
pypo_data = ref '0'
def set_pypo_data(s)
pypo_data := s
end
def set_user_id(s)
user_id := s
end
def set_playlist_id(s)
playlist_id := s
end
def set_transmission_id(s)
transmission_id := s
end
def set_playlist_type(s)
playlist_type := s
end
server.register(namespace="vars", "user_id", fun (s) -> begin set_user_id(s) "Done!" end)
server.register(namespace="vars", "playlist_id", fun (s) -> begin set_playlist_id(s) "Done!" end)
server.register(namespace="vars", "transmission_id", fun (s) -> begin set_transmission_id(s) "Done!" end)
server.register(namespace="vars", "playlist_type", fun (s) -> begin set_playlist_type(s) "Done!" end)
server.register(namespace="vars", "pypo_data", fun (s) -> begin set_pypo_data(s) "Done!" end)