mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-03-11 17:15:49 +00:00
chore: run lint
This commit is contained in:
parent
bb49a88355
commit
13db629a80
2 changed files with 11 additions and 7 deletions
|
|
@ -248,10 +248,10 @@ impl MainWindow {
|
|||
let hide_splash_sender = self.hide_splash_notice.sender();
|
||||
let focus_sender = self.focus_notice.sender();
|
||||
let autoupdater_setup_mutex = self.autoupdater_setup_file.clone();
|
||||
|
||||
|
||||
let discord_rpc: Arc<Mutex<Option<DiscordRpc>>> = Arc::new(Mutex::new(None));
|
||||
let discord_rpc_clone = discord_rpc.clone();
|
||||
|
||||
|
||||
thread::spawn(move || loop {
|
||||
if let Some(msg) = web_rx
|
||||
.recv()
|
||||
|
|
@ -373,13 +373,17 @@ impl MainWindow {
|
|||
Some("discord-set-activity") => {
|
||||
if let Some(params) = msg.get_params() {
|
||||
let state = params.get("state").and_then(|v| v.as_str()).unwrap_or("");
|
||||
let details = params.get("details").and_then(|v| v.as_str()).unwrap_or("");
|
||||
let details =
|
||||
params.get("details").and_then(|v| v.as_str()).unwrap_or("");
|
||||
let image = params.get("image").and_then(|v| v.as_str());
|
||||
let start_timestamp = params.get("startTimestamp").and_then(|v| v.as_i64());
|
||||
|
||||
let start_timestamp =
|
||||
params.get("startTimestamp").and_then(|v| v.as_i64());
|
||||
|
||||
let discord_guard = discord_rpc_clone.lock().unwrap();
|
||||
if let Some(ref discord) = *discord_guard {
|
||||
if let Err(e) = discord.set_activity(state, details, image, start_timestamp) {
|
||||
if let Err(e) =
|
||||
discord.set_activity(state, details, image, start_timestamp)
|
||||
{
|
||||
eprintln!("Discord set activity error: {}", e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
pub mod app;
|
||||
pub use app::MainWindow;
|
||||
pub mod ipc;
|
||||
pub mod discord;
|
||||
pub mod ipc;
|
||||
pub mod stremio_player;
|
||||
pub mod stremio_server;
|
||||
pub mod stremio_wevbiew;
|
||||
|
|
|
|||
Loading…
Reference in a new issue