mirror of
https://github.com/Dangoware/dango-music-player.git
synced 2025-04-19 01:52:53 -05:00
Updated dependencies, removed unused deps
This commit is contained in:
parent
69c3cd7427
commit
2dd455d81c
4 changed files with 13 additions and 31 deletions
|
@ -13,15 +13,7 @@ categories = []
|
|||
|
||||
[dependencies]
|
||||
kushi = { path = "../kushi-queue" }
|
||||
file-format = { version = "0.23.0", features = [
|
||||
"reader-asf",
|
||||
"reader-ebml",
|
||||
"reader-mp4",
|
||||
"reader-rm",
|
||||
"reader-txt",
|
||||
"reader-xml",
|
||||
"serde",
|
||||
] }
|
||||
file-format = { version = "0.26", features = ["reader"] }
|
||||
lofty = "0.21"
|
||||
serde = { version = "1.0.195", features = ["derive"] }
|
||||
walkdir = "2.4.0"
|
||||
|
@ -39,16 +31,10 @@ thiserror = "1.0.56"
|
|||
uuid = { version = "1.6.1", features = ["v4", "serde"] }
|
||||
serde_json = "1.0.111"
|
||||
deunicode = "1.4.2"
|
||||
opener = { version = "0.7.0", features = ["reveal"] }
|
||||
tempfile = "3.10.1"
|
||||
nestify = "0.3.3"
|
||||
moro = "0.4.0"
|
||||
moro-local = "0.4.0"
|
||||
futures = "0.3.30"
|
||||
text_io = "0.1.12"
|
||||
tokio = { version = "1.40.0", features = ["macros", "rt"] }
|
||||
async-channel = "2.3.1"
|
||||
ciborium = "0.2.2"
|
||||
itertools = "0.13.0"
|
||||
directories = "5.0.1"
|
||||
prismriver = { git = "https://github.com/Dangoware/prismriver.git" }
|
||||
|
|
|
@ -188,7 +188,7 @@ impl ExternalLibrary for ITunesLibrary {
|
|||
},
|
||||
rating: track.rating,
|
||||
format: match FileFormat::from_file(PathBuf::from(&loc)) {
|
||||
Ok(e) => Some(e),
|
||||
Ok(e) => Some(e.media_type().to_string()),
|
||||
Err(_) => None,
|
||||
},
|
||||
duration: dur,
|
||||
|
|
|
@ -90,7 +90,7 @@ pub enum Field {
|
|||
Skips(i32),
|
||||
Favorited(bool),
|
||||
Rating(u8),
|
||||
Format(FileFormat),
|
||||
Format(String),
|
||||
Duration(Duration),
|
||||
PlayTime(Duration),
|
||||
LastPlayed(DateTime<Utc>),
|
||||
|
@ -106,10 +106,7 @@ impl ToString for Field {
|
|||
Self::Skips(skips) => skips.to_string(),
|
||||
Self::Favorited(fav) => fav.to_string(),
|
||||
Self::Rating(rating) => rating.to_string(),
|
||||
Self::Format(format) => match format.short_name() {
|
||||
Some(name) => name.to_string(),
|
||||
None => format.to_string(),
|
||||
},
|
||||
Self::Format(format) => format.clone(),
|
||||
Self::Duration(duration) => duration.as_millis().to_string(),
|
||||
Self::PlayTime(time) => time.as_millis().to_string(),
|
||||
Self::LastPlayed(last) => last.to_rfc2822(),
|
||||
|
@ -167,7 +164,8 @@ pub struct Song {
|
|||
pub favorited: bool,
|
||||
pub banned: Option<BannedType>,
|
||||
pub rating: Option<u8>,
|
||||
pub format: Option<FileFormat>,
|
||||
/// MIME type
|
||||
pub format: Option<String>,
|
||||
pub duration: Duration,
|
||||
pub play_time: Duration,
|
||||
#[serde(with = "ts_milliseconds_option")]
|
||||
|
@ -207,7 +205,7 @@ impl Song {
|
|||
"rating" => self.rating.map(Field::Rating),
|
||||
"duration" => Some(Field::Duration(self.duration)),
|
||||
"play_time" => Some(Field::PlayTime(self.play_time)),
|
||||
"format" => self.format.map(Field::Format),
|
||||
"format" => self.format.clone().map(|m| Field::Format(m)),
|
||||
_ => todo!(), // Other field types are not yet supported
|
||||
}
|
||||
}
|
||||
|
@ -309,7 +307,7 @@ impl Song {
|
|||
favorited: false,
|
||||
banned: None,
|
||||
rating: None,
|
||||
format,
|
||||
format: format.map(|f| f.media_type().to_string()),
|
||||
duration,
|
||||
play_time: Duration::from_secs(0),
|
||||
last_played: None,
|
||||
|
@ -432,7 +430,7 @@ impl Song {
|
|||
favorited: false,
|
||||
banned: None,
|
||||
rating: None,
|
||||
format,
|
||||
format: format.map(|f| f.media_type().to_string()),
|
||||
duration,
|
||||
play_time: Duration::from_secs(0),
|
||||
last_played: None,
|
||||
|
|
|
@ -2,15 +2,13 @@ use std::{collections::BTreeMap, path::PathBuf};
|
|||
|
||||
use chrono::{DateTime, Utc, serde::ts_milliseconds_option};
|
||||
use crossbeam::channel::Sender;
|
||||
use dmp_core::{music_controller::controller::{ControllerHandle, LibraryCommand, LibraryResponse, PlayerResponse, QueueCommand, QueueResponse}, music_storage::library::{BannedType, Song, Tag, URI}};
|
||||
use dmp_core::{music_controller::controller::{ControllerHandle, LibraryCommand, LibraryResponse, PlayerResponse, QueueCommand, QueueResponse}, music_storage::library::{Song, Tag, URI}};
|
||||
use itertools::Itertools;
|
||||
use kushi::QueueItemType;
|
||||
use serde::Serialize;
|
||||
use tauri::{ipc::Response, AppHandle, Emitter, State, Wry};
|
||||
use tauri::{AppHandle, Emitter, State, Wry};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::commands;
|
||||
|
||||
pub struct ArtworkRx(pub Sender<Vec<u8>>);
|
||||
|
||||
#[tauri::command]
|
||||
|
@ -120,7 +118,7 @@ impl From<&Song> for _Song {
|
|||
uuid: value.uuid.clone(),
|
||||
plays: value.plays.clone(),
|
||||
duration: value.duration.as_secs().to_string(),
|
||||
format: value.format.map(|format| format.to_string()),
|
||||
format: value.format.clone().map(|format| format.to_string()),
|
||||
last_played: value.last_played,
|
||||
date_added: value.date_added,
|
||||
date_modified: value.date_modified,
|
||||
|
|
Loading…
Reference in a new issue