AirDC++ Socket Status (#58)
This commit was merged in pull request #58.
This commit is contained in:
@@ -10,7 +10,7 @@ class AirDCPPSocket {
|
||||
}
|
||||
const options = {
|
||||
url: `${socketProtocol}://${configuration.hostname}/api/v1/`,
|
||||
autoReconnect: false,
|
||||
autoReconnect: true,
|
||||
reconnectInterval: 5,
|
||||
logLevel: "verbose",
|
||||
ignoredListenerEvents: [
|
||||
@@ -18,6 +18,8 @@ class AirDCPPSocket {
|
||||
"hash_statistics",
|
||||
"hub_counts_updated",
|
||||
],
|
||||
username: `${configuration.username}`,
|
||||
password: `${configuration.password}`,
|
||||
};
|
||||
const AirDCPPSocketInstance = Socket(options, window.WebSocket as any);
|
||||
return AirDCPPSocketInstance;
|
||||
|
||||
@@ -18,7 +18,7 @@ function sleep(ms: number): Promise<NodeJS.Timeout> {
|
||||
}
|
||||
|
||||
export const search = async (data: SearchData) => {
|
||||
await SocketService.connect("admin", "password");
|
||||
await SocketService.connect();
|
||||
const instance: SearchInstance = await SocketService.post("search");
|
||||
const unsubscribe = await SocketService.addListener(
|
||||
"search",
|
||||
|
||||
Reference in New Issue
Block a user