update doc
This commit is contained in:
parent
7bdb1bfd7d
commit
a5666bb376
21
README.md
21
README.md
|
@ -1,13 +1,20 @@
|
|||
# aircox
|
||||
Platform to manage radio programs, schedules, cms, etc. -- main test repo
|
||||
# Aircox
|
||||
Platform to manage a radio.
|
||||
|
||||
# Applications
|
||||
* **programs**: programs, episodes, schedules, sounds and tracks;
|
||||
## Current features
|
||||
* **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
|
||||
* **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
|
||||
* time range: timefield name "duration"
|
||||
* parents: when only one parent, named "parent", otherwise model/reference's name
|
||||
|
|
|
@ -3,8 +3,8 @@ This application makes the bridge between Aircox and LiquidSoap. It can monitor
|
|||
|
||||
|
||||
## manage.py's commands
|
||||
** 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 **: 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;
|
||||
|
||||
|
||||
## Requirements
|
||||
|
|
|
@ -10,9 +10,14 @@ import aircox.liquidsoap.utils as utils
|
|||
import aircox.programs.models as models
|
||||
|
||||
|
||||
view_monitor = None
|
||||
|
||||
def get_monitor():
|
||||
if not view_monitor:
|
||||
view_monitor = utils.Monitor(
|
||||
utils.Connector(address = settings.AIRCOX_LIQUIDSOAP_SOCKET)
|
||||
)
|
||||
return view_monitor
|
||||
|
||||
class Actions:
|
||||
@classmethod
|
||||
|
@ -37,10 +42,10 @@ class LiquidControl (View):
|
|||
template_name = 'aircox_liquidsoap/controller.html'
|
||||
|
||||
def get_context_data (self, **kwargs):
|
||||
view_monitor.update()
|
||||
get_view_monitor().update()
|
||||
return {
|
||||
'request': self.request,
|
||||
'monitor': view_monitor,
|
||||
'monitor': get_view_monitor(),
|
||||
'embed': 'embed' in self.request.GET,
|
||||
}
|
||||
|
||||
|
@ -50,7 +55,7 @@ class LiquidControl (View):
|
|||
controller = POST.get('controller')
|
||||
source = POST.get('source')
|
||||
action = POST.get('action')
|
||||
Actions.exec(view_monitor, controller, source, action)
|
||||
Actions.exec(get_view_monitor(), controller, source, action)
|
||||
return HttpResponse('')
|
||||
|
||||
def get (self, request = None, **kwargs):
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user