fix(playout): invalid input source disconnect command send to liquidsoap (#3166)

### Description

The `source_disconnect` method in the liquidsoap client was still using
the old names of the 2 harbor input (currently named input_main and
input_show).

Remove the `source_disconnect` method, in favor of the
`source_switch_status` method, to have a single source name mapping
between playout and liquidsoap.

This is a missing update from a refactor made a while ago:
2f9f60e639f13854094abb0f43730aebc9c89cee

### **Links**

Potential fix for https://github.com/libretime/libretime/issues/2796
This commit is contained in:
Jonas L. 2025-06-14 13:56:16 +02:00 committed by GitHub
parent 8bd2db1661
commit 908d54805a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 9 deletions

View File

@ -100,14 +100,6 @@ class LiquidsoapClient:
self.conn.write("http.stop")
self.conn.write("web_stream.set_id -1")
def source_disconnect(self, name: Literal["master_dj", "live_dj"]) -> None:
command_map = {
"master_dj": "master_harbor.stop",
"live_dj": "live_dj_harbor.stop",
}
with self.conn:
self.conn.write(command_map[name])
def source_switch_status(
self,
name: Literal["master_dj", "live_dj", "scheduled_play"],

View File

@ -111,7 +111,7 @@ class TelnetLiquidsoap:
try:
logger.debug("Disconnecting source: %s", sourcename)
self.liq_client.source_disconnect(sourcename)
self.liq_client.source_switch_status(sourcename, False)
except OSError as exception:
logger.exception(exception)