Commit 85cb788c authored by David Trattnig's avatar David Trattnig
Browse files

Flattening source. #72

parent 039fd24c
......@@ -70,7 +70,7 @@ class EngineRunner:
"""
Starts Engine Core.
"""
from src.core.engine import Engine
from src.engine import Engine
self.engine = Engine()
......
......@@ -20,7 +20,7 @@
from enum import Enum
from src.base.utils import SimpleUtil as SU
from src.core.resources import ResourceType
from src.resources import ResourceType
class TransitionType(Enum):
......
......@@ -23,7 +23,7 @@ import time
from src.base.config import AuraConfig
from src.base.utils import TerminalColors, SimpleUtil as SU
from src.base.exceptions import LQConnectionError
from src.core.client.playerclient import LiquidSoapPlayerClient
from src.client.playerclient import LiquidSoapPlayerClient
......
......@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from src.core.client.client import LiquidSoapClient
from src.client.client import LiquidSoapClient
class LiquidSoapPlayerClient(LiquidSoapClient):
......
......@@ -209,7 +209,7 @@ class EngineExecutor(Timer):
param (object): Parameter passt to the function
"""
self._lock = Lock()
from src.core.engine import Engine
from src.engine import Engine
now_unix = Engine.engine_time()
# Init parent-child relation
......
......@@ -20,20 +20,20 @@
import time
import logging
from contextlib import suppress
from threading import Thread
from contextlib import suppress
from threading import Thread
import meta
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.base.exceptions import LQConnectionError, InvalidChannelException, LQStreamException, LoadSourceException
from src.core.resources import ResourceClass, ResourceUtil
from src.core.channels import ChannelType, TransitionType, LiquidsoapResponse, EntryPlayState, ResourceType, ChannelRouter
from src.core.events import EngineEventDispatcher
from src.core.control import EngineControlInterface
from src.core.mixer import Mixer, MixerType
from src.core.client.connector import PlayerConnector
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.base.exceptions import LQConnectionError, InvalidChannelException, LQStreamException, LoadSourceException
from src.resources import ResourceClass, ResourceUtil
from src.channels import ChannelType, TransitionType, LiquidsoapResponse, EntryPlayState, ResourceType, ChannelRouter
from src.events import EngineEventDispatcher
from src.control import EngineControlInterface
from src.mixer import Mixer, MixerType
from src.client.connector import PlayerConnector
......
......@@ -26,8 +26,8 @@ from datetime import datetime, timedelta
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.core.resources import ResourceClass
from src.core.resources import ResourceUtil
from src.resources import ResourceClass
from src.resources import ResourceUtil
from src.scheduling.fallback import FallbackType
......
......@@ -26,9 +26,9 @@ from datetime import timedelta
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.core.resources import ResourceClass, ResourceUtil
from src.core.channels import Channel
from src.core.control import EngineExecutor
from src.resources import ResourceClass, ResourceUtil
from src.channels import Channel
from src.control import EngineExecutor
from src.scheduling.models import DB
......@@ -300,7 +300,7 @@ class FallbackCommand(EngineExecutor):
timeslot (Timeslot): The timeslot any fallback entries should be scheduled for
entries (List): List of entries to be scheduled as fallback
"""
from src.core.engine import Engine
from src.engine import Engine
def do_play(entries):
self.logger.info(SU.cyan(f"=== start_fallback_playlist('{entries}') ==="))
......
......@@ -33,7 +33,7 @@ from sqlalchemy.ext.hybrid import hybrid_property
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil
from src.core.resources import ResourceUtil
from src.resources import ResourceUtil
# Initialize DB Model and session
config = AuraConfig()
......
......@@ -27,7 +27,7 @@ from datetime import datetime
from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.core.engine import Engine
from src.engine import Engine
from src.scheduling.utils import M3UPlaylistProcessor
from src.scheduling.models import Timeslot, Playlist, PlaylistEntry, PlaylistEntryMetaData
from src.scheduling.api import ApiFetcher
......
......@@ -27,10 +27,10 @@ from src.base.config import AuraConfig
from src.base.utils import SimpleUtil as SU
from src.scheduling.models import AuraDatabaseModel
from src.base.exceptions import NoActiveTimeslotException, LoadSourceException
from src.core.control import EngineExecutor
from src.core.engine import Engine
from src.core.channels import ChannelType, TransitionType, EntryPlayState
from src.core.resources import ResourceClass, ResourceUtil
from src.control import EngineExecutor
from src.engine import Engine
from src.channels import ChannelType, TransitionType, EntryPlayState
from src.resources import ResourceClass, ResourceUtil
from src.scheduling.utils import TimeslotRenderer
from src.scheduling.programme import ProgrammeService
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment