feat(api): add /info and /stream/* endpoints
This commit is contained in:
parent
5bf62dd9cb
commit
12d2d4b15a
15 changed files with 324 additions and 173 deletions
|
@ -0,0 +1,31 @@
|
|||
from libretime_api.core.models.preference import Preference
|
||||
|
||||
|
||||
# pylint: disable=invalid-name,unused-argument
|
||||
def test_preference_get_site_preferences(db):
|
||||
result = Preference.get_site_preferences()
|
||||
assert result.dict() == {
|
||||
"station_name": "LibreTime",
|
||||
}
|
||||
|
||||
|
||||
# pylint: disable=invalid-name,unused-argument
|
||||
def test_preference_get_stream_preferences(db):
|
||||
result = Preference.get_stream_preferences()
|
||||
assert result.dict() == {
|
||||
"input_fade_transition": 0.0,
|
||||
"message_format": 0,
|
||||
"message_offline": "LibreTime - offline",
|
||||
}
|
||||
|
||||
|
||||
# pylint: disable=invalid-name,unused-argument
|
||||
def test_preference_get_stream_state(db):
|
||||
result = Preference.get_stream_state()
|
||||
assert result.dict() == {
|
||||
"input_main_connected": False,
|
||||
"input_main_streaming": False,
|
||||
"input_show_connected": False,
|
||||
"input_show_streaming": False,
|
||||
"schedule_streaming": True,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue