2022-08-10 17:33:22 +02:00
|
|
|
import pytest
|
|
|
|
|
|
|
|
from libretime_playout.config import Config
|
2024-02-08 20:29:10 +01:00
|
|
|
from libretime_playout.liquidsoap.models import StreamPreferences
|
2022-08-10 17:33:22 +02:00
|
|
|
|
|
|
|
|
2022-08-10 17:35:06 +02:00
|
|
|
@pytest.fixture()
|
2022-08-10 17:33:22 +02:00
|
|
|
def config():
|
|
|
|
return Config(
|
|
|
|
**{
|
|
|
|
"general": {
|
|
|
|
"public_url": "http://localhost:8080",
|
|
|
|
"api_key": "some_api_key",
|
2023-12-27 18:15:47 +01:00
|
|
|
"secret_key": "some_secret_key",
|
2022-08-10 17:33:22 +02:00
|
|
|
},
|
|
|
|
"stream": {
|
|
|
|
"outputs": {
|
|
|
|
"icecast": [
|
|
|
|
{
|
|
|
|
"enabled": True,
|
|
|
|
"mount": "main",
|
|
|
|
"source_password": "hackme",
|
|
|
|
"audio": {"format": "ogg", "bitrate": 256},
|
|
|
|
"name": "LibreTime!",
|
|
|
|
"description": "LibreTime Radio! Stream #1",
|
|
|
|
"website": "https://libretime.org",
|
|
|
|
"genre": "various",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"enabled": True,
|
|
|
|
"mount": "second",
|
|
|
|
"source_password": "hackme",
|
|
|
|
"audio": {"format": "mp3", "bitrate": 256},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
)
|
2024-02-08 20:29:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
|
|
|
def stream_preferences():
|
|
|
|
return StreamPreferences(
|
|
|
|
input_fade_transition=0.0,
|
|
|
|
message_format=0,
|
|
|
|
message_offline="LibreTime - offline",
|
|
|
|
replay_gain_enabled=True,
|
|
|
|
replay_gain_offset=-3.5,
|
|
|
|
)
|