forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
This commit is contained in:
@ -8,8 +8,7 @@ import subprocess
|
||||
import psutil
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
from aircox.conf import settings
|
||||
|
||||
from ..conf import settings
|
||||
from ..connector import Connector
|
||||
from .sources import PlaylistSource, QueueSource
|
||||
|
||||
@ -46,8 +45,8 @@ class Streamer:
|
||||
self.outputs = self.station.port_set.active().output()
|
||||
|
||||
self.id = self.station.slug.replace("-", "_")
|
||||
self.path = os.path.join(station.path, "station.liq")
|
||||
self.connector = connector or Connector(os.path.join(station.path, "station.sock"))
|
||||
self.path = settings.get_dir(station, "station.liq")
|
||||
self.connector = connector or Connector(settings.get_dir(station, "station.sock"))
|
||||
self.init_sources()
|
||||
|
||||
@property
|
||||
@ -96,9 +95,10 @@ class Streamer:
|
||||
data = render_to_string(
|
||||
self.template_name,
|
||||
{
|
||||
"dir": settings.get_dir(self.station),
|
||||
"log_file": settings.get_dir(self.station, "liquidsoap.log"),
|
||||
"station": self.station,
|
||||
"streamer": self,
|
||||
"settings": settings,
|
||||
},
|
||||
)
|
||||
data = re.sub("[\t ]+\n", "\n", data)
|
||||
|
Reference in New Issue
Block a user