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:
parent
a138424451
commit
3613812012
20 changed files with 699 additions and 543 deletions
8
3rd_party/pypo/pypo_dls.py
vendored
8
3rd_party/pypo/pypo_dls.py
vendored
|
@ -1,21 +1,18 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# author Jonas Ohrstrom <jonas@digris.ch>
|
||||
|
||||
"""
|
||||
Python part of radio playout (pypo)
|
||||
|
||||
This function acts as a gateway between liquidsoap and the obp-api.
|
||||
Mainliy used to tell the plattform what pypo/LS does.
|
||||
Mainliy used to tell the platform what pypo/LS does.
|
||||
|
||||
Main case:
|
||||
- whenever Liquidsoap starts playing a new track, its on_metadata callback calls
|
||||
a function in liquidsoap (notify(m)) which then calls the python script here
|
||||
with the currently starting filename as parameter
|
||||
- this python script takes this parameter, tries to extract the actual
|
||||
media id from it, and then calls back to obp via api to tell about
|
||||
|
||||
media id from it, and then calls back to API to tell it about it.
|
||||
|
||||
"""
|
||||
|
||||
|
@ -171,7 +168,6 @@ class Notify:
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
print
|
||||
print '#########################################'
|
||||
print '# *** pypo *** #'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue