Skip to content

Commit

Permalink
chore: fix mime type
Browse files Browse the repository at this point in the history
chore: clean up

Signed-off-by: tsukinaha <sakuovds@gmail.com>
  • Loading branch information
tsukinaha committed Dec 13, 2024
1 parent 0d08ec0 commit 8ae3fca
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/client/emby_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use anyhow::{
use once_cell::sync::Lazy;
use regex::Regex;
use reqwest::{
header::{self, HeaderValue},
header::HeaderValue,
Client,
Method,
RequestBuilder,
Expand Down
10 changes: 2 additions & 8 deletions src/ui/widgets/image_dialog/image_drop_row.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
use adw::subclass::prelude::*;
use gettextrs::gettext;
use gtk::{
glib, prelude::WidgetExt, template_callbacks, CompositeTemplate
};

use crate::toast;

mod imp {
use std::cell::Cell;

use glib::{
subclass::InitializingObject,
Properties, WeakRef,
WeakRef,
};
use gtk::prelude::*;

use super::*;

#[derive(Debug, Default, CompositeTemplate, Properties)]
#[derive(Debug, Default, CompositeTemplate)]
#[template(resource = "/moe/tsuna/tsukimi/ui/image_drop_row.ui")]
#[properties(wrapper_type = super::ImageDropRow)]
pub struct ImageDropRow {
#[template_child]
pub upload_check_button: TemplateChild<gtk::CheckButton>,
Expand Down Expand Up @@ -56,7 +51,6 @@ mod imp {
}
}

#[glib::derived_properties]
impl ObjectImpl for ImageDropRow {
fn constructed(&self) {
self.parent_constructed();
Expand Down
11 changes: 4 additions & 7 deletions src/ui/widgets/image_dialog/image_edit_dialog_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,26 @@ use std::io::Read;
use adw::subclass::prelude::*;
use gettextrs::gettext;
use gtk::{
gio::Cancellable, glib, prelude::*, CompositeTemplate
glib, prelude::*, CompositeTemplate
};

use gtk::template_callbacks;
use reqwest::Response;

use crate::{client::{emby_client::EMBY_CLIENT, error::UserFacingError}, toast, utils::{spawn, spawn_tokio}};
use crate::{client::emby_client::EMBY_CLIENT, toast, utils::{spawn, spawn_tokio}};

use super::ImageDialog;

mod imp {
use std::cell::{Cell, OnceCell, RefCell};
use std::cell::OnceCell;

use glib::{
subclass::InitializingObject,
Properties,
};
use gtk::prelude::*;

use crate::ui::widgets::{
check_row::CheckRow,
image_dialog::ImageDropRow,
};
use crate::ui::widgets::image_dialog::ImageDropRow;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/image_dialog/image_infocard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use gtk::{
};

use crate::{
client::emby_client::EMBY_CLIENT, toast, ui::widgets::{search::SearchPage, window::Window}, utils::spawn_tokio
client::emby_client::EMBY_CLIENT, toast, ui::widgets::window::Window, utils::spawn_tokio
};

mod imp {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/widgets/tu_list_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ impl TuListItem {
let item = self.item();
if let Some(rating) = item.rating() {
let rating = gtk::Button::builder()
.label(&rating.to_string())
.label(rating.to_string())
.halign(gtk::Align::Start)
.valign(gtk::Align::End)
.margin_start(8)
Expand All @@ -513,7 +513,7 @@ impl TuListItem {
let count = item.unplayed_item_count();
if count > 0 {
let mark = gtk::Button::builder()
.label(&count.to_string())
.label(count.to_string())
.halign(gtk::Align::End)
.valign(gtk::Align::Start)
.margin_end(8)
Expand Down
4 changes: 2 additions & 2 deletions src/ui/widgets/tu_overview_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ impl TuOverviewItem {
let item = self.item();
if let Some(rating) = item.rating() {
let rating = gtk::Button::builder()
.label(&rating.to_string())
.label(rating.to_string())
.halign(gtk::Align::Start)
.valign(gtk::Align::End)
.margin_start(8)
Expand All @@ -309,7 +309,7 @@ impl TuOverviewItem {
let count = item.unplayed_item_count();
if count > 0 {
let mark = gtk::Button::builder()
.label(&count.to_string())
.label(count.to_string())
.halign(gtk::Align::End)
.valign(gtk::Align::Start)
.margin_end(8)
Expand Down

0 comments on commit 8ae3fca

Please sign in to comment.