diff --git a/src/liquidsoap/in_queue.liq b/src/liquidsoap/in_queue.liq index d8290f34c36b7bc868fec9c16cd8d433e1fec368..6181080b0376f0eac09be39dad01a7702e10c061 100644 --- a/src/liquidsoap/in_queue.liq +++ b/src/liquidsoap/in_queue.liq @@ -17,14 +17,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. -# # Called when some new metadata info is available -# def on_metadata_notification(meta) = -# filename = meta["filename"] -# # artist = meta["artist"] -# # title = meta["title"] -# system('#{list.assoc(default="", "install_dir", ini)}/guru.py --on_play "#{filename}"') -# end - ##################################### # QUEUE SOURCES # diff --git a/tests/connection_tester.py b/tests/connection_tester.py deleted file mode 100644 index a1214df8265957333692021bbb6c0daa0e0c011c..0000000000000000000000000000000000000000 --- a/tests/connection_tester.py +++ /dev/null @@ -1,85 +0,0 @@ - -# -# Aura Engine (https://gitlab.servus.at/aura/engine) -# -# Copyright (C) 2017-2020 - The Aura Engine Team. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - - - -import urllib -import json - -from src.core.engine import Engine -from src.base.config import AuraConfig - - -# ------------------------------------------------------------------------------------------ # -class ConnectionTester(AuraConfig): - - # ------------------------------------------------------------------------------------------ # - def __init__(self): - super(ConnectionTester, self).__init__() - - # ------------------------------------------------------------------------------------------ # - def get_connection_status(self): - status = dict() - status["db"] = False # self.test_db_conn() - status["pv"] = self.test_pv_conn() - status["lqs"] = self.test_lqs_conn() - status["lqsr"] = False # self.test_lqsr_conn() - status["tank"] = self.test_tank_conn() - - return json.dumps(status) - - # ------------------------------------------------------------------------------------------ # -# def test_db_conn(self): -# try: -# TimeslotEntry.select_all() -# except: -# return False -# -# return True - - # ------------------------------------------------------------------------------------------ # - def test_lqs_conn(self): - try: - lsc = Engine() - lsc.player.mixer.mixer_status() - return True - - except Exception as e: - return False - - - # ------------------------------------------------------------------------------------------ # - def test_pv_conn(self): - return self.test_url_connection(self.config.get("calendarurl")) - - # ------------------------------------------------------------------------------------------ # - def test_tank_conn(self): - # test load of playlist 1 - return self.test_url_connection(self.config.get("importerurl")+"1") - - - def test_url_connection(self, url): - try: - request = urllib.request.Request(url) - response = urllib.request.urlopen(request) - response.read() - except Exception as e: - return False - - return True \ No newline at end of file diff --git a/tests/test_alsa_mixer.liq b/tests/liquidsoap/test_alsa_mixer.liq similarity index 100% rename from tests/test_alsa_mixer.liq rename to tests/liquidsoap/test_alsa_mixer.liq diff --git a/tests/test_alsa_settings.liq b/tests/liquidsoap/test_alsa_settings.liq similarity index 100% rename from tests/test_alsa_settings.liq rename to tests/liquidsoap/test_alsa_settings.liq diff --git a/tests/lqstest.liq b/tests/liquidsoap/test_icecast_output.liq similarity index 100% rename from tests/lqstest.liq rename to tests/liquidsoap/test_icecast_output.liq diff --git a/tests/tests.py b/tests/tests.py deleted file mode 100755 index d8785b697644e0b1609377443ec2ce5a57f04a1e..0000000000000000000000000000000000000000 --- a/tests/tests.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -''''which python3.8 >/dev/null 2>&1 && exec python3.8 "$0" "$@" # ''' -''''which python3.7 >/dev/null 2>&1 && exec python3.7 "$0" "$@" # ''' -''''exec echo "Error: Snaaakey Python, where are you?" # ''' - -# -# Aura Engine (https://gitlab.servus.at/aura/engine) -# -# Copyright (C) 2017-2020 - The Aura Engine Team. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - - - -import sqlalchemy -import decimal -import datetime - -from src.base.config import AuraConfig -from src.scheduling.models import PlaylistEntry -from src.core.engine import Engine -from src.scheduling.scheduler import AuraScheduler - - - - -def select_current_programme(): - # select_programme() - config = AuraConfig() - - engine = Engine(config) - sched = AuraScheduler(config, engine, None) - - engine.scheduler = sched - sched.engine = engine - - sched.load_programme_from_db() - - - - - -# # ## ## ## ## ## # # -# # ENTRY FUNCTION # # -# # ## ## ## ## ## # # - -def main(): - True - - -# # ## ## ## ## ## ## # # -# # End ENTRY FUNCTION # # -# # ## ## ## ## ## ## # # - - -if __name__ == "__main__": - main() -