File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11""" default configuration of pyvts """
2- vts_api = {"version" : "1.0" , "name" : "VTubeStudioPublicAPI" , "port" : 8001 }
2+ vts_api = {
3+ "version" : "1.0" ,
4+ "name" : "VTubeStudioPublicAPI" ,
5+ "host" : "localhost" ,
6+ "port" : 8001 ,
7+ }
38
49plugin_default = {
510 "developer" : "genteki" ,
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ def __init__(
4545 vts_api_info : dict = config .vts_api ,
4646 ** kwargs
4747 ) -> None :
48+ if "host" in vts_api_info :
49+ self .host = vts_api_info ["host" ]
50+ else :
51+ self .host = "localhost"
4852 self .port = vts_api_info ["port" ]
4953 self .websocket = None
5054 self .authentic_token = None
@@ -76,7 +80,7 @@ async def connect(self) -> None:
7680 """Connect to VtubeStudio API server"""
7781 try :
7882 self .websocket = await websockets .connect (
79- "ws://localhost :" + str (self .port )
83+ "ws://" + self . host + " :" + str (self .port )
8084 )
8185 self .__connection_status = 1
8286 except error .ConnectionError as e :
You can’t perform that action at this time.
0 commit comments