Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
Signed-off-by: tsukinaha <sakuovds@gmail.com>
  • Loading branch information
tsukinaha committed Nov 20, 2024
1 parent 83e9474 commit 7cf7e75
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
10 changes: 7 additions & 3 deletions src/client/emby_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -123,7 +127,7 @@ impl EmbyClient {
"x-emby-authorization",
HeaderValue::from_str(&generate_emby_authorization(
"",
&CLIENT_ID,
CLIENT_ID,
&DEVICE_NAME,
&DEVICE_ID,
VERSION,
Expand Down Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions src/client/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = Lazy::new(|| format!("Tsukimi/{}", VERSION));
static APP_USER_AGENT: Lazy<String> = Lazy::new(|| format!("Tsukimi/{}", VERSION));

impl ReqClient {
pub fn build() -> ConcurrencyLimit<Client> {
Expand Down
3 changes: 2 additions & 1 deletion src/ui/provider/tu_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ impl TuItem {
}

pub async fn play_video(&self, obj: &impl IsA<gtk::Widget>) {
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(
Expand Down
3 changes: 2 additions & 1 deletion src/ui/widgets/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<HomePage>() else {
return;
Expand Down

0 comments on commit 7cf7e75

Please sign in to comment.