1919 CONF_KEY_PLAYERSETTINGS ,
2020 CONF_KEY_PROVIDERS ,
2121)
22+ from music_assistant .constants import __version__ as MASS_VERSION
2223from music_assistant .models .media_types import MediaType
2324from music_assistant .models .player_queue import QueueOption
2425from music_assistant .utils import get_external_ip , get_hostname , get_ip , json_serializer
@@ -143,6 +144,7 @@ async def async_setup(self):
143144 web .get ("/jsonrpc.js" , self .async_json_rpc ),
144145 web .post ("/jsonrpc.js" , self .async_json_rpc ),
145146 web .get ("/ws" , self .async_websocket_handler ),
147+ web .get ("/info" , self .async_info ),
146148 ]
147149 )
148150 webdir = os .path .join (os .path .dirname (os .path .abspath (__file__ )), "web/" )
@@ -217,10 +219,14 @@ def external_url(self):
217219 def discovery_info (self ):
218220 """Return (discovery) info about this instance."""
219221 return {
220- "id" : f"musicassistant_ { get_hostname ()} " ,
222+ "id" : f"{ get_hostname ()} " ,
221223 "external_url" : self .external_url ,
222224 "internal_url" : self .internal_url ,
223- "version" : 1 ,
225+ "host" : self .internal_ip ,
226+ "http_port" : self .http_port ,
227+ "https_port" : self .https_port ,
228+ "ssl_enabled" : self ._enable_ssl ,
229+ "version" : MASS_VERSION ,
224230 }
225231
226232 @routes .post ("/api/login" )
@@ -234,7 +240,7 @@ async def async_login(self, request):
234240 return web .json_response (token_info , dumps = json_serializer )
235241 return web .HTTPUnauthorized (body = "Invalid username and/or password provided!" )
236242
237- @routes .get ("/info" )
243+ @routes .get ("/api/ info" )
238244 async def async_info (self , request ):
239245 # pylint: disable=unused-argument
240246 """Return (discovery) info about this instance."""
0 commit comments