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.
This commit is contained in:
paul.baranowski 2010-11-29 18:34:22 -05:00
parent a138424451
commit 3613812012
20 changed files with 699 additions and 543 deletions

View file

@ -4,10 +4,10 @@
def notify(m)
print('user_id: #{!user_id}')
print('playlist_id: #{!playlist_id}')
print('transmission_id: #{!transmission_id}')
print('playlist_type: #{!playlist_type}')
# 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')
@ -20,8 +20,9 @@ def notify(m)
end
if !playlist_type=='0' or !playlist_type=='1' or !playlist_type=='2' or !playlist_type=='3' or !playlist_type=='4' then
print('playlist')
system("./notify.sh --playing --playlist-type=#{!playlist_type} --media-id=#{m['media_id']} --export-source=#{m['export_source']}")
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