mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-09-13 07:06:14 +02:00
chore: update dependencies
This commit is contained in:
parent
bf100f38e3
commit
c23d487a02
@ -7,11 +7,11 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
musicdb-lib = { path = "../musicdb-lib", default-features = false }
|
||||
clap = { version = "4.4.6", features = ["derive"] }
|
||||
directories = "5.0.1"
|
||||
regex = "1.9.3"
|
||||
speedy2d = { version = "1.12.0", optional = true }
|
||||
toml = "0.7.6"
|
||||
clap = { version = "4.5.45", features = ["derive"] }
|
||||
directories = "6.0.0"
|
||||
regex = "1.11.1"
|
||||
speedy2d = { version = "2.1.0", optional = true }
|
||||
toml = "0.9.5"
|
||||
# musicdb-mers = { version = "0.1.0", path = "../musicdb-mers", optional = true }
|
||||
uianimator = "0.1.1"
|
||||
|
||||
@ -27,7 +27,9 @@ default = ["gui", "default-playback"]
|
||||
# enables syncplayer modes, where the client mirrors the server's playback
|
||||
gui = ["speedy2d"]
|
||||
# merscfg = ["mers", "gui"]
|
||||
merscfg = []
|
||||
# mers = ["musicdb-mers"]
|
||||
mers = []
|
||||
playback = []
|
||||
default-playback = ["playback", "musicdb-lib/default-playback"]
|
||||
playback-via-playback-rs = ["playback", "musicdb-lib/playback-via-playback-rs"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::{fmt::Display, rc::Rc, sync::Arc};
|
||||
use std::{fmt::Display, sync::Arc};
|
||||
|
||||
use musicdb_lib::data::CoverId;
|
||||
use speedy2d::{
|
||||
@ -30,7 +30,7 @@ pub struct Content {
|
||||
text: String,
|
||||
color: Color,
|
||||
background: Option<Color>,
|
||||
formatted: Option<Rc<FormattedTextBlock>>,
|
||||
formatted: Option<FormattedTextBlock>,
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
|
@ -1,4 +1,5 @@
|
||||
// #![allow(unused)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_variables)]
|
||||
|
||||
use std::{
|
||||
io::{BufReader, Write},
|
||||
@ -146,7 +147,6 @@ fn main() {
|
||||
| Mode::GuiSyncplayerNetwork
|
||||
);
|
||||
#[cfg(feature = "playback")]
|
||||
#[allow(unused)]
|
||||
let mut cache_manager = None;
|
||||
#[cfg(feature = "playback")]
|
||||
let mut player = if is_syncplayer {
|
||||
@ -160,6 +160,12 @@ fn main() {
|
||||
} else {
|
||||
None
|
||||
};
|
||||
// prevent unused assignment warning, we might
|
||||
// need cache manager at some point -_-
|
||||
#[cfg(feature = "playback")]
|
||||
if false {
|
||||
drop(cache_manager);
|
||||
}
|
||||
#[allow(unused_labels)]
|
||||
'ifstatementworkaround: {
|
||||
// use if+break instead of if-else because we can't #[cfg(feature)] the if statement,
|
||||
|
@ -6,6 +6,6 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
id3 = "1.16.0"
|
||||
id3 = "1.16.3"
|
||||
mp3-duration = "0.1.10"
|
||||
musicdb-lib = { version = "0.1.0", path = "../musicdb-lib" }
|
||||
|
@ -7,10 +7,10 @@ edition = "2021"
|
||||
base64 = "0.22.1"
|
||||
colorize = "0.1.0"
|
||||
playback-rs = { version = "0.4.4", optional = true }
|
||||
rand = "0.8.5"
|
||||
rand = "0.9.2"
|
||||
rc-u8-reader = "2.0.16"
|
||||
rodio = { version = "0.20.1", optional = true }
|
||||
sysinfo = "0.30.12"
|
||||
rodio = { version = "0.21.1", optional = true }
|
||||
sysinfo = "0.37.0"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
@ -39,8 +39,8 @@ impl CacheManager {
|
||||
let sleep_dur_long = Duration::from_secs(20);
|
||||
let sleep_dur_short = Duration::from_secs(1);
|
||||
let mut si = sysinfo::System::new_with_specifics(
|
||||
sysinfo::RefreshKind::new()
|
||||
.with_memory(sysinfo::MemoryRefreshKind::new().with_ram()),
|
||||
sysinfo::RefreshKind::nothing()
|
||||
.with_memory(sysinfo::MemoryRefreshKind::nothing().with_ram()),
|
||||
);
|
||||
eprintln!("[{}] Starting CacheManager", "INFO".cyan());
|
||||
let mut sleep_short = true;
|
||||
@ -54,7 +54,7 @@ impl CacheManager {
|
||||
});
|
||||
sleep_short = false;
|
||||
// memory stuff
|
||||
si.refresh_memory_specifics(sysinfo::MemoryRefreshKind::new().with_ram());
|
||||
si.refresh_memory_specifics(sysinfo::MemoryRefreshKind::nothing().with_ram());
|
||||
let available_memory = si.available_memory();
|
||||
let min_avail_mem = min_avail_mem.load(std::sync::atomic::Ordering::Relaxed);
|
||||
let low_memory = available_memory < min_avail_mem;
|
||||
|
@ -9,7 +9,7 @@ use std::{
|
||||
};
|
||||
|
||||
use colorize::AnsiColor;
|
||||
use rand::thread_rng;
|
||||
use rand::rng;
|
||||
|
||||
use crate::{
|
||||
load::ToFromBytes,
|
||||
@ -690,7 +690,7 @@ impl Database {
|
||||
}) = elem.content_mut()
|
||||
{
|
||||
let mut ord: Vec<usize> = (0..content.len()).collect();
|
||||
ord.shuffle(&mut thread_rng());
|
||||
ord.shuffle(&mut rng());
|
||||
self.apply_action_unchecked_seq(
|
||||
Action::QueueSetShuffle(path, ord, set_index),
|
||||
client,
|
||||
|
@ -418,7 +418,7 @@ impl Queue {
|
||||
}
|
||||
|
||||
impl QueueFolder {
|
||||
pub fn iter(&self) -> QueueFolderIter {
|
||||
pub fn iter(&self) -> QueueFolderIter<'_> {
|
||||
QueueFolderIter {
|
||||
folder: self,
|
||||
index: 0,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::{ffi::OsStr, sync::Arc};
|
||||
|
||||
use rc_u8_reader::ArcU8Reader;
|
||||
use rodio::{decoder::DecoderError, Decoder, OutputStream, OutputStreamHandle, Sink, Source};
|
||||
use rodio::{decoder::DecoderError, Decoder, OutputStream, Sink, Source};
|
||||
|
||||
use crate::{
|
||||
data::{song::Song, SongId},
|
||||
@ -13,8 +13,6 @@ use super::PlayerBackend;
|
||||
pub struct PlayerBackendRodio<T> {
|
||||
#[allow(unused)]
|
||||
output_stream: OutputStream,
|
||||
#[allow(unused)]
|
||||
output_stream_handle: OutputStreamHandle,
|
||||
sink: Sink,
|
||||
stopped: bool,
|
||||
current: Option<(SongId, Arc<Vec<u8>>, Option<u128>, T)>,
|
||||
@ -34,11 +32,11 @@ impl<T> PlayerBackendRodio<T> {
|
||||
pub fn new_with_optional_command_sending(
|
||||
command_sender: Option<std::sync::mpsc::Sender<(Command, Option<u64>)>>,
|
||||
) -> Result<Self, Box<dyn std::error::Error>> {
|
||||
let (output_stream, output_stream_handle) = rodio::OutputStream::try_default()?;
|
||||
let sink = Sink::try_new(&output_stream_handle)?;
|
||||
let output_stream =
|
||||
rodio::OutputStreamBuilder::from_default_device()?.open_stream_or_fallback()?;
|
||||
let sink = Sink::connect_new(&output_stream.mixer());
|
||||
Ok(Self {
|
||||
output_stream,
|
||||
output_stream_handle,
|
||||
sink,
|
||||
stopped: true,
|
||||
current: None,
|
||||
|
@ -437,7 +437,7 @@ pub fn run_server_caching_thread_opt(
|
||||
pub fn handle_one_connection_as_main(
|
||||
db: Arc<Mutex<Database>>,
|
||||
connection: &mut impl Read,
|
||||
mut send_to: (impl Write + Sync + Send + 'static),
|
||||
mut send_to: impl Write + Sync + Send + 'static,
|
||||
command_sender: &mpsc::Sender<(Command, Option<u64>)>,
|
||||
) -> Result<(), std::io::Error> {
|
||||
// sync database
|
||||
|
@ -7,12 +7,12 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
musicdb-lib = { path = "../musicdb-lib" }
|
||||
clap = { version = "4.4.6", features = ["derive"] }
|
||||
headers = "0.3.8"
|
||||
clap = { version = "4.5.45", features = ["derive"] }
|
||||
headers = "0.4.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1.37.0", optional = true, features = ["rt"] }
|
||||
rocket = { version = "0.5.0", optional = true }
|
||||
tokio = { version = "1.47.1", optional = true, features = ["rt"] }
|
||||
rocket = { version = "0.5.1", optional = true }
|
||||
html-escape = { version = "0.2.13", optional = true }
|
||||
rocket_ws = "0.1.1"
|
||||
rocket_seek_stream = "0.2.6"
|
||||
|
@ -302,14 +302,14 @@ fn now_playing_ids(data: &State<Data>) -> String {
|
||||
}
|
||||
|
||||
#[get("/song/<id>")]
|
||||
fn song1(data: &State<Data>, id: SongId) -> Option<SeekStream> {
|
||||
fn song1(data: &State<Data>, id: SongId) -> Option<SeekStream<'_>> {
|
||||
song(data, id)
|
||||
}
|
||||
#[get("/song/<id>/<_>")]
|
||||
fn song2(data: &State<Data>, id: SongId) -> Option<SeekStream> {
|
||||
fn song2(data: &State<Data>, id: SongId) -> Option<SeekStream<'_>> {
|
||||
song(data, id)
|
||||
}
|
||||
fn song(data: &State<Data>, id: SongId) -> Option<SeekStream> {
|
||||
fn song(data: &State<Data>, id: SongId) -> Option<SeekStream<'_>> {
|
||||
let db = data.db.lock().unwrap();
|
||||
if let Some(song) = db.get_song(&id) {
|
||||
song.cached_data().cache_data_start_thread(&*db, song);
|
||||
|
Loading…
x
Reference in New Issue
Block a user