update doc

This commit is contained in:
bkfox 2015-12-01 16:52:53 +01:00
parent 7bdb1bfd7d
commit a5666bb376
4 changed files with 27 additions and 15 deletions

View File

@ -1,13 +1,20 @@
# aircox # Aircox
Platform to manage radio programs, schedules, cms, etc. -- main test repo Platform to manage a radio.
# Applications ## Current features
* **programs**: programs, episodes, schedules, sounds and tracks; * **streams**: multiple random music streams when no program is played. We also can specify a time range and frequency;
* **diffusions**: generate diffusions time slot for programs that have schedule informations. Check for conflicts and rerun.
* **liquidsoap**: create a configuration to use liquidsoap as a stream generator. Also provides interface and control to it;
* **sounds**: each programs have a folder where sounds can be put, that will be detected by the system. Quality can be check and reported for later use. Later, we plan to have uploaders to external plateforms. Sounds can be defined as excerpts or as archives.
* **cms**: a small CMS to generate a website with all cool informations related to programs and diffusions. On the contrary of other plateform, we keep programs and content management seperate.
* **log**: keep a trace of every played/loaded sounds on the stream generator.
## Applications
* **programs**: managing stations, programs, schedules and diffusions. This is the core application, that handle most of the work.
* **cms**: cms renderer * **cms**: cms renderer
* **website**: the website using the cms and the programs * **liquidsoap**: liquidsoap manager and control.
## Code and names conventions and uses
# Code and names conventions and uses
* absolute dates: datetime fields, named "begin" "end" for ranges and "date" otherwise * absolute dates: datetime fields, named "begin" "end" for ranges and "date" otherwise
* time range: timefield name "duration" * time range: timefield name "duration"
* parents: when only one parent, named "parent", otherwise model/reference's name * parents: when only one parent, named "parent", otherwise model/reference's name

View File

@ -3,8 +3,8 @@ This application makes the bridge between Aircox and LiquidSoap. It can monitor
## manage.py's commands ## manage.py's commands
** liquidsoap **: monitor LiquidSoap, logs what is playing on the different sources, and plays scheduled diffusions; * ** liquidsoap **: monitor LiquidSoap, logs what is playing on the different sources, and plays scheduled diffusions;
** liquidsoap_files**: generates playlists and LiquidSoap config based on Programs' parameters; * ** liquidsoap_files**: generates playlists and LiquidSoap config based on Programs' parameters;
## Requirements ## Requirements

View File

@ -10,9 +10,14 @@ import aircox.liquidsoap.utils as utils
import aircox.programs.models as models import aircox.programs.models as models
view_monitor = utils.Monitor( view_monitor = None
utils.Connector(address = settings.AIRCOX_LIQUIDSOAP_SOCKET)
) def get_monitor():
if not view_monitor:
view_monitor = utils.Monitor(
utils.Connector(address = settings.AIRCOX_LIQUIDSOAP_SOCKET)
)
return view_monitor
class Actions: class Actions:
@classmethod @classmethod
@ -37,10 +42,10 @@ class LiquidControl (View):
template_name = 'aircox_liquidsoap/controller.html' template_name = 'aircox_liquidsoap/controller.html'
def get_context_data (self, **kwargs): def get_context_data (self, **kwargs):
view_monitor.update() get_view_monitor().update()
return { return {
'request': self.request, 'request': self.request,
'monitor': view_monitor, 'monitor': get_view_monitor(),
'embed': 'embed' in self.request.GET, 'embed': 'embed' in self.request.GET,
} }
@ -50,7 +55,7 @@ class LiquidControl (View):
controller = POST.get('controller') controller = POST.get('controller')
source = POST.get('source') source = POST.get('source')
action = POST.get('action') action = POST.get('action')
Actions.exec(view_monitor, controller, source, action) Actions.exec(get_view_monitor(), controller, source, action)
return HttpResponse('') return HttpResponse('')
def get (self, request = None, **kwargs): def get (self, request = None, **kwargs):