mirror of
https://github.com/talwat/lowfi
synced 2025-11-28 13:29:20 +00:00
fix: have audio waiter act when sink is dropped
This commit is contained in:
parent
b035061fd0
commit
2dd165d562
46
Cargo.lock
generated
46
Cargo.lock
generated
@ -461,15 +461,6 @@ dependencies = [
|
||||
"windows-sys 0.60.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.8.0"
|
||||
@ -557,8 +548,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"crossterm_winapi",
|
||||
"derive_more 2.0.1",
|
||||
"document-features",
|
||||
"futures-core",
|
||||
"mio",
|
||||
@ -566,16 +555,6 @@ dependencies = [
|
||||
"rustix 1.0.8",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossterm_winapi"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -628,27 +607,6 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678"
|
||||
dependencies = [
|
||||
"derive_more-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more-impl"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
|
||||
dependencies = [
|
||||
"convert_case 0.7.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
@ -1494,7 +1452,7 @@ dependencies = [
|
||||
"arc-swap",
|
||||
"bytes",
|
||||
"clap",
|
||||
"convert_case 0.8.0",
|
||||
"convert_case",
|
||||
"crossterm",
|
||||
"dirs",
|
||||
"eyre",
|
||||
@ -2387,7 +2345,7 @@ checksum = "fd568a4c9bb598e291a08244a5c1f5a8a6650bee243b5b0f8dbb3d9cc1d87fe8"
|
||||
dependencies = [
|
||||
"bitflags 2.9.3",
|
||||
"cssparser",
|
||||
"derive_more 0.99.20",
|
||||
"derive_more",
|
||||
"fxhash",
|
||||
"log",
|
||||
"new_debug_unreachable",
|
||||
|
||||
@ -38,15 +38,17 @@ reqwest = { version = "0.12.9", features = ["stream"] }
|
||||
bytes = "1.9.0"
|
||||
|
||||
# I/O
|
||||
crossterm = { version = "0.29.0", features = ["event-stream"] }
|
||||
crossterm = { version = "0.29.0", features = ["event-stream"], default-features = false }
|
||||
rodio = { version = "0.21.1", features = ["symphonia-mp3", "playback"], default-features = false }
|
||||
mpris-server = { version = "0.8.1", optional = true }
|
||||
dirs = "6.0.0"
|
||||
|
||||
# Misc
|
||||
convert_case = "0.8.0"
|
||||
url = "2.5.4"
|
||||
unicode-segmentation = "1.12.0"
|
||||
url = "2.5.4"
|
||||
regex = "1.11.1"
|
||||
lazy_static = "1.5.0"
|
||||
|
||||
# Scraper
|
||||
serde = { version = "1.0.219", features = ["derive"], optional = true }
|
||||
@ -54,8 +56,6 @@ serde_json = { version = "1.0.142", optional = true }
|
||||
scraper = { version = "0.21.0", optional = true }
|
||||
html-escape = { version = "0.2.13", optional = true }
|
||||
indicatif = { version = "0.18.0", optional = true }
|
||||
regex = "1.11.1"
|
||||
lazy_static = "1.5.0"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
libc = "0.2.167"
|
||||
|
||||
@ -55,6 +55,10 @@ pub fn playing(status: bool) {
|
||||
|
||||
pub fn waiter(sink: Arc<Sink>, tx: mpsc::Sender<crate::Message>) -> crate::Result<()> {
|
||||
loop {
|
||||
if Arc::strong_count(&sink) == 1 {
|
||||
break Ok(());
|
||||
}
|
||||
|
||||
sleep(Duration::from_millis(100));
|
||||
sink.sleep_until_end();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user