Disable RPC by default
This commit is contained in:
parent
8ca2ec9b27
commit
7358be85e3
|
@ -261,6 +261,8 @@ namespace DML.Application.Classes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.UseRPC)
|
||||||
|
{
|
||||||
Logger.Info("Initializing RPC client");
|
Logger.Info("Initializing RPC client");
|
||||||
Logger.Trace("Registering RPC handlers");
|
Logger.Trace("Registering RPC handlers");
|
||||||
RpcHandlers.readyCallback += RpcReadyCallback;
|
RpcHandlers.readyCallback += RpcReadyCallback;
|
||||||
|
@ -280,6 +282,7 @@ namespace DML.Application.Classes
|
||||||
await Task.Delay(5000);
|
await Task.Delay(5000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
splash.Close();
|
splash.Close();
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace DML.Application.Classes
|
||||||
public string FileNameScheme { get; set; } = @"%guild%\%channel%\%id%";
|
public string FileNameScheme { get; set; } = @"%guild%\%channel%\%id%";
|
||||||
public bool SkipExistingFiles { get; set; } = true;
|
public bool SkipExistingFiles { get; set; } = true;
|
||||||
public int ThreadLimit { get; set; } = 50;
|
public int ThreadLimit { get; set; } = 50;
|
||||||
|
public bool UseRPC { get; set; } = false;
|
||||||
|
|
||||||
public void Store()
|
public void Store()
|
||||||
{
|
{
|
||||||
|
|
|
@ -252,6 +252,8 @@ namespace DML.Application
|
||||||
|
|
||||||
lbProgress.Text = $"Scanned: {scanned} Downloaded: {done} Open: {totalAttachments - done}";
|
lbProgress.Text = $"Scanned: {scanned} Downloaded: {done} Open: {totalAttachments - done}";
|
||||||
|
|
||||||
|
if (Core.Settings.UseRPC)
|
||||||
|
{
|
||||||
Core.RpcPresence.details = "Downloading media files";
|
Core.RpcPresence.details = "Downloading media files";
|
||||||
Core.RpcPresence.state = $"{done} / {totalAttachments} ({pgbProgress.Value}%)";
|
Core.RpcPresence.state = $"{done} / {totalAttachments} ({pgbProgress.Value}%)";
|
||||||
Core.RpcPresence.largeImageKey = "main";
|
Core.RpcPresence.largeImageKey = "main";
|
||||||
|
@ -261,6 +263,7 @@ namespace DML.Application
|
||||||
|
|
||||||
Core.RpcUpdatePresence();
|
Core.RpcUpdatePresence();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void aboutToolStripMenuItem_Click(object sender, System.EventArgs e)
|
private void aboutToolStripMenuItem_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue