Exposing ws ioloop for Frontend to piggy-back

This commit is contained in:
James Barnsley
2020-01-25 22:18:52 +13:00
parent 87aa88a908
commit 564839c92b
6 changed files with 19407 additions and 27426 deletions

View File

@ -1,4 +1,4 @@
import pykka, logging, tornado
import pykka, logging, tornado, functools
from mopidy.core import CoreListener
from .core import IrisCore
from .mem import iris
@ -22,7 +22,7 @@ class IrisFrontend(pykka.ThreadingActor, CoreListener):
iris.stop()
def track_playback_ended(self, tl_track, time_position):
iris.check_for_radio_update()
iris.ioloop.add_callback( functools.partial(iris.check_for_radio_update) )
def tracklist_changed(self):
iris.clean_queue_metadata()
iris.ioloop.add_callback( functools.partial(iris.clean_queue_metadata) )

View File

@ -14,6 +14,7 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler):
self.core = core
self.config = config
self.ioloop = tornado.ioloop.IOLoop.current()
iris.ioloop = self.ioloop # Make available elsewhere in the Frontend
def check_origin(self, origin):
return True

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -100,7 +100,7 @@
// Release details
// These are automatically injected to built HTML
var build = "1579826432";
var build = "1579940570";
var version = "3.44.0";
// Construct the script tag

View File

@ -11,7 +11,9 @@ const ProgressRing = ({ radius, stroke, progress }) => {
className="loader__spinner__progress"
height={radius * 2}
width={radius * 2}
style={{ transform: `rotate(-90deg) translate(${stroke}px, -${stroke}px)` }}
style={{
transform: `rotate(-90deg) translate(${stroke}px, -${stroke}px)`,
}}
>
<circle
stroke="white"