chore: bump version
This commit is contained in:
Generated
+2
-2
@@ -667,7 +667,7 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "soulseek-rs"
|
name = "soulseek-rs"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"color-eyre",
|
"color-eyre",
|
||||||
@@ -677,7 +677,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "soulseek-rs-lib"
|
name = "soulseek-rs-lib"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "static_assertions"
|
name = "static_assertions"
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ members = ["soulseek-rs-lib", "soulseek-rs"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
authors = ["Michel de Graaf"]
|
authors = ["Michel de Graaf"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ name = "soulseek-rs"
|
|||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
soulseek-rs-lib = { version = "0.2.0", path = "../soulseek-rs-lib" }
|
soulseek-rs-lib = { version = "0.2.1", path = "../soulseek-rs-lib" }
|
||||||
|
|
||||||
clap = { version = "4.5.51", features = ["derive", "color", "wrap_help", "env"] }
|
clap = { version = "4.5.51", features = ["derive", "color", "wrap_help", "env"] }
|
||||||
ratatui = "0.29.0"
|
ratatui = "0.29.0"
|
||||||
|
|||||||
@@ -11,10 +11,7 @@ use models::FileDownloadState;
|
|||||||
use soulseek_rs::{Client, ClientSettings, PeerAddress};
|
use soulseek_rs::{Client, ClientSettings, PeerAddress};
|
||||||
use std::{
|
use std::{
|
||||||
env,
|
env,
|
||||||
sync::{
|
sync::{atomic::AtomicBool, Arc},
|
||||||
atomic::AtomicBool,
|
|
||||||
Arc,
|
|
||||||
},
|
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
use ui::{show_multi_download_progress, FileSelector};
|
use ui::{show_multi_download_progress, FileSelector};
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ use ratatui::{
|
|||||||
crossterm::event::{self, poll, Event, KeyCode, KeyEvent, KeyEventKind},
|
crossterm::event::{self, poll, Event, KeyCode, KeyEvent, KeyEventKind},
|
||||||
layout::{Alignment, Constraint, Layout},
|
layout::{Alignment, Constraint, Layout},
|
||||||
style::{Color, Style},
|
style::{Color, Style},
|
||||||
widgets::{Block, Borders, Cell, Paragraph, Row, StatefulWidget, Table, TableState, Wrap},
|
widgets::{
|
||||||
|
Block, Borders, Cell, Paragraph, Row, StatefulWidget, Table,
|
||||||
|
TableState, Wrap,
|
||||||
|
},
|
||||||
DefaultTerminal, Frame,
|
DefaultTerminal, Frame,
|
||||||
};
|
};
|
||||||
use soulseek_rs::Client;
|
use soulseek_rs::Client;
|
||||||
@@ -461,11 +464,29 @@ impl FileSelector {
|
|||||||
|
|
||||||
if let Some(info_area) = info_area {
|
if let Some(info_area) = info_area {
|
||||||
let (info_text, title, color) = if self.is_searching {
|
let (info_text, title, color) = if self.is_searching {
|
||||||
(format!("Search: {}", self.search_query), "Filter", Color::Yellow)
|
(
|
||||||
|
format!("Search: {}", self.search_query),
|
||||||
|
"Filter",
|
||||||
|
Color::Yellow,
|
||||||
|
)
|
||||||
} else if !self.search_query.is_empty() {
|
} else if !self.search_query.is_empty() {
|
||||||
(format!("Current filter: {} (press / to modify, c to clear)", self.search_query), "Filter", Color::Cyan)
|
(
|
||||||
|
format!(
|
||||||
|
"Current filter: {} (press / to modify, c to clear)",
|
||||||
|
self.search_query
|
||||||
|
),
|
||||||
|
"Filter",
|
||||||
|
Color::Cyan,
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
(format!("{} file(s) selected for download", self.selected_indices.len()), "Selection", Color::Green)
|
(
|
||||||
|
format!(
|
||||||
|
"{} file(s) selected for download",
|
||||||
|
self.selected_indices.len()
|
||||||
|
),
|
||||||
|
"Selection",
|
||||||
|
Color::Green,
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
let info_widget = Paragraph::new(info_text)
|
let info_widget = Paragraph::new(info_text)
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
use crate::models::FileDownloadState;
|
use crate::models::FileDownloadState;
|
||||||
use crate::ui::{format_bytes_progress, format_speed, header_style, highlight_style};
|
use crate::ui::{
|
||||||
|
format_bytes_progress, format_speed, header_style, highlight_style,
|
||||||
|
};
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use ratatui::{
|
use ratatui::{
|
||||||
crossterm::event::{self, poll, Event, KeyCode, KeyEvent, KeyEventKind},
|
crossterm::event::{self, poll, Event, KeyCode, KeyEvent, KeyEventKind},
|
||||||
layout::{Constraint, Layout},
|
layout::{Constraint, Layout},
|
||||||
style::{Color, Style},
|
style::{Color, Style},
|
||||||
widgets::{Block, Borders, Cell, Paragraph, Row, StatefulWidget, Table, TableState},
|
widgets::{
|
||||||
|
Block, Borders, Cell, Paragraph, Row, StatefulWidget, Table, TableState,
|
||||||
|
},
|
||||||
DefaultTerminal, Frame,
|
DefaultTerminal, Frame,
|
||||||
};
|
};
|
||||||
use soulseek_rs::DownloadStatus;
|
use soulseek_rs::DownloadStatus;
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ pub fn format_speed(speed_bytes_per_sec: f64) -> String {
|
|||||||
format!("{:.1} MB/s", mb)
|
format!("{:.1} MB/s", mb)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_bitrate(attribs: &std::collections::HashMap<u32, u32>) -> Option<u32> {
|
pub fn get_bitrate(
|
||||||
|
attribs: &std::collections::HashMap<u32, u32>,
|
||||||
|
) -> Option<u32> {
|
||||||
attribs.get(&0).copied()
|
attribs.get(&0).copied()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user