sintonia/3rd_party/pypo/scripts/include_notify.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

28 lines
No EOL
1.1 KiB
Text

########################################
# call pypo api gateway
########################################
def notify(m)
# print('user_id: #{!user_id}')
# print('playlist_id: #{!playlist_id}')
# print('transmission_id: #{!transmission_id}')
# print('playlist_type: #{!playlist_type}')
if !playlist_type=='5' then
print('livesession')
system("./notify.sh --playing --playlist-type=#{!playlist_type} --transmission-id=#{!transmission_id} --export-source=scheduler")
end
if !playlist_type=='6' then
print('couchcaster')
system("./notify.sh --playing --playlist-type=#{!playlist_type} --transmission-id=#{!transmission_id} --export-source=scheduler")
end
if !playlist_type=='0' or !playlist_type=='1' or !playlist_type=='2' or !playlist_type=='3' or !playlist_type=='4' then
print('include_notify.liq: notify on playlist')
#system("./notify.sh --playing --playlist-type=#{!playlist_type} --media-id=#{m['media_id']} --export-source=#{m['export_source']}")
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['media_id']}")
end
end