write metadata tests; start source tests

This commit is contained in:
bkfox
2023-06-11 15:10:31 +02:00
parent 257fb6a539
commit cbd28bc946
11 changed files with 241 additions and 342 deletions

View File

@@ -6,7 +6,6 @@ import signal
import subprocess
import psutil
import tzlocal
from django.template.loader import render_to_string
from aircox.conf import settings
@@ -17,7 +16,6 @@ from .sources import PlaylistSource, QueueSource
__all__ = ("Streamer",)
local_tz = tzlocal.get_localzone()
logger = logging.getLogger("aircox")
@@ -49,7 +47,9 @@ class Streamer:
self.id = self.station.slug.replace("-", "_")
self.path = os.path.join(station.path, "station.liq")
self.connector = Connector(os.path.join(station.path, "station.sock"))
self.connector = connector or Connector(
os.path.join(station.path, "station.sock")
)
self.init_sources()
@property