mirror of
https://github.com/Dangoware/dango-music-player.git
synced 2025-06-22 22:52:59 -05:00
updated crates to rust 2024 edition
This commit is contained in:
parent
75ca473699
commit
db595c13f0
4 changed files with 9 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dmp-core"
|
name = "dmp-core"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
description = "Backend crate for the Dango Music Player "
|
description = "Backend crate for the Dango Music Player "
|
||||||
homepage = ""
|
homepage = ""
|
||||||
|
@ -36,7 +36,7 @@ futures = "0.3.30"
|
||||||
async-channel = "2.3.1"
|
async-channel = "2.3.1"
|
||||||
ciborium = "0.2.2"
|
ciborium = "0.2.2"
|
||||||
itertools = "0.13.0"
|
itertools = "0.13.0"
|
||||||
prismriver = { git = "https://github.com/Dangoware/prismriver.git" }
|
prismriver = { git = "https://github.com/Dangoware/prismriver.git", features = [] }
|
||||||
parking_lot = "0.12.3"
|
parking_lot = "0.12.3"
|
||||||
discord-presence = { version = "1.4.1", features = ["activity_type"] }
|
discord-presence = { version = "1.4.1", features = ["activity_type"] }
|
||||||
listenbrainz = "0.8.1"
|
listenbrainz = "0.8.1"
|
||||||
|
|
|
@ -25,7 +25,7 @@ use uuid::Uuid;
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
|
|
||||||
// Time
|
// Time
|
||||||
use chrono::{serde::ts_milliseconds_option, DateTime, Utc};
|
use chrono::{DateTime, Utc, serde::ts_milliseconds_option};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
// Serialization/Compression
|
// Serialization/Compression
|
||||||
|
@ -267,7 +267,7 @@ impl Song {
|
||||||
ItemKey::Unknown(unknown)
|
ItemKey::Unknown(unknown)
|
||||||
if unknown == "ACOUSTID_FINGERPRINT" || unknown == "Acoustid Fingerprint" =>
|
if unknown == "ACOUSTID_FINGERPRINT" || unknown == "Acoustid Fingerprint" =>
|
||||||
{
|
{
|
||||||
continue
|
continue;
|
||||||
}
|
}
|
||||||
ItemKey::Unknown(unknown) => Tag::Key(unknown.to_string()),
|
ItemKey::Unknown(unknown) => Tag::Key(unknown.to_string()),
|
||||||
custom => Tag::Key(format!("{:?}", custom)),
|
custom => Tag::Key(format!("{:?}", custom)),
|
||||||
|
@ -486,7 +486,7 @@ impl Song {
|
||||||
.to_vec(),
|
.to_vec(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
AlbumArt::External(ref path) => {
|
AlbumArt::External(path) => {
|
||||||
let mut buf = vec![];
|
let mut buf = vec![];
|
||||||
std::fs::File::open(path.path())?.read_to_end(&mut buf)?;
|
std::fs::File::open(path.path())?.read_to_end(&mut buf)?;
|
||||||
Ok(Some(buf))
|
Ok(Some(buf))
|
||||||
|
@ -962,7 +962,7 @@ impl MusicLibrary {
|
||||||
|
|
||||||
match location {
|
match location {
|
||||||
URI::Local(_) if self.query_path(location.path()).is_some() => {
|
URI::Local(_) if self.query_path(location.path()).is_some() => {
|
||||||
return Err(format!("Location exists for {:?}", location).into())
|
return Err(format!("Location exists for {:?}", location).into());
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl PlaylistFolder {
|
||||||
for item in &self.items {
|
for item in &self.items {
|
||||||
match item {
|
match item {
|
||||||
PlaylistFolderItem::Folder(folder) => return folder.query_uuid(uuid),
|
PlaylistFolderItem::Folder(folder) => return folder.query_uuid(uuid),
|
||||||
PlaylistFolderItem::List(ref playlist) => {
|
PlaylistFolderItem::List(playlist) => {
|
||||||
if &playlist.uuid == uuid {
|
if &playlist.uuid == uuid {
|
||||||
return Some(playlist);
|
return Some(playlist);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ impl PlaylistFolder {
|
||||||
let mut vec = vec![];
|
let mut vec = vec![];
|
||||||
for item in &self.items {
|
for item in &self.items {
|
||||||
match item {
|
match item {
|
||||||
PlaylistFolderItem::List(ref playlist) => vec.push(playlist),
|
PlaylistFolderItem::List(playlist) => vec.push(playlist),
|
||||||
PlaylistFolderItem::Folder(folder) => vec.append(&mut folder.lists_recursive()),
|
PlaylistFolderItem::Folder(folder) => vec.append(&mut folder.lists_recursive()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ name = "dango-music-player"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "A music player."
|
description = "A music player."
|
||||||
authors = ["G2", "MrDulfin"]
|
authors = ["G2", "MrDulfin"]
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue