libretime/playout/tests/conftest.py
Jonas L 35d0dec4a8
fix: apply replay gain preferences on scheduled files (#2945)
### Description

The replay gain preferences are applied in the legacy code, but the
playout code was missing this feature. The replay gain was not applied
when playout fetched the schedules.


37d1a7685e/legacy/application/models/Schedule.php (L881-L886)
2024-02-08 20:29:10 +01:00

51 lines
1.5 KiB
Python

import pytest
from libretime_playout.config import Config
from libretime_playout.liquidsoap.models import StreamPreferences
@pytest.fixture()
def config():
return Config(
**{
"general": {
"public_url": "http://localhost:8080",
"api_key": "some_api_key",
"secret_key": "some_secret_key",
},
"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},
},
]
}
},
}
)
@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,
)