-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from jaedb/develop
Develop
- Loading branch information
Showing
22 changed files
with
215 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import os | ||
import tornado.web | ||
import base64 | ||
import urllib, urllib2, json | ||
from tornado.escape import json_encode, json_decode | ||
|
||
from tornado.escape import json_encode | ||
import subprocess | ||
|
||
state = { | ||
'mode': 'normal' | ||
} | ||
|
||
class QueuerRequestHandler(tornado.web.RequestHandler): | ||
|
||
def set_default_headers(self): | ||
self.set_header("Access-Control-Allow-Origin", "*") | ||
|
||
def initialize(self, core, config): | ||
self.core = core | ||
self.config = config | ||
|
||
## get the current state | ||
def get(self, action): | ||
self.write(json_encode(state)) | ||
|
||
## post to update the state | ||
def post(self, mode): | ||
state['mode'] = 'radio' | ||
self.write(json_encode(state)) | ||
|
||
|
||
def spotmop_queuer_factory(config, core): | ||
return [ | ||
('/', QueuerRequestHandler, {'core': core, 'config': config}) | ||
] |
Oops, something went wrong.