diff --git a/src/client/emby_client.rs b/src/client/emby_client.rs index e641d22a..b2e820a4 100644 --- a/src/client/emby_client.rs +++ b/src/client/emby_client.rs @@ -10,7 +10,11 @@ use anyhow::{ use once_cell::sync::Lazy; use regex::Regex; use reqwest::{ - header::HeaderValue, Client, Method, RequestBuilder, Response + header::HeaderValue, + Client, + Method, + RequestBuilder, + Response, }; use serde::{ de::DeserializeOwned, @@ -123,7 +127,7 @@ impl EmbyClient { "x-emby-authorization", HeaderValue::from_str(&generate_emby_authorization( "", - &CLIENT_ID, + CLIENT_ID, &DEVICE_NAME, &DEVICE_ID, VERSION, @@ -205,7 +209,7 @@ impl EmbyClient { "x-emby-authorization", HeaderValue::from_str(&generate_emby_authorization( user_id, - &CLIENT_ID, + CLIENT_ID, &DEVICE_NAME, &DEVICE_ID, VERSION, diff --git a/src/client/proxy.rs b/src/client/proxy.rs index 9058a59f..80faa347 100644 --- a/src/client/proxy.rs +++ b/src/client/proxy.rs @@ -3,11 +3,14 @@ use once_cell::sync::Lazy; use reqwest::Client; use tower::limit::ConcurrencyLimit; -use crate::{config::VERSION, ui::models::SETTINGS}; +use crate::{ + config::VERSION, + ui::models::SETTINGS, +}; pub struct ReqClient; -const APP_USER_AGENT: Lazy = Lazy::new(|| format!("Tsukimi/{}", VERSION)); +static APP_USER_AGENT: Lazy = Lazy::new(|| format!("Tsukimi/{}", VERSION)); impl ReqClient { pub fn build() -> ConcurrencyLimit { diff --git a/src/ui/provider/tu_item.rs b/src/ui/provider/tu_item.rs index eb60dfa2..f5cce3a3 100644 --- a/src/ui/provider/tu_item.rs +++ b/src/ui/provider/tu_item.rs @@ -421,7 +421,8 @@ impl TuItem { } pub async fn play_video(&self, obj: &impl IsA) { - self.direct_play_video_id(obj, self.clone(), Vec::new()).await; + self.direct_play_video_id(obj, self.clone(), Vec::new()) + .await; } pub async fn direct_play_video_id( diff --git a/src/ui/widgets/window.rs b/src/ui/widgets/window.rs index ef16f5ce..0cc9654a 100644 --- a/src/ui/widgets/window.rs +++ b/src/ui/widgets/window.rs @@ -345,7 +345,8 @@ impl Window { imp.popbutton.set_visible(false); imp.navipage.set_title(""); - if imp.insidestack.visible_child_name() == Some("homepage".into()) && SETTINGS.is_refresh() { + if imp.insidestack.visible_child_name() == Some("homepage".into()) && SETTINGS.is_refresh() + { let binding = imp.homepage.child(); let Some(homepage) = binding.and_downcast_ref::() else { return;