diff --git a/Cargo.lock b/Cargo.lock index 2a42bf93..69c40e59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "aes" version = "0.6.0" @@ -65,6 +80,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "alsa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb213f6b3e4b1480a60931ca2035794aa67b73103d254715b1db7b70dcb3c934" +dependencies = [ + "alsa-sys", + "bitflags", + "libc", + "nix 0.15.0", +] + [[package]] name = "alsa" version = "0.5.0" @@ -127,6 +154,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" +dependencies = [ + "addr2line", + "cc", + "cfg-if 1.0.0", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base-x" version = "0.2.10" @@ -236,6 +278,12 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -329,6 +377,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + [[package]] name = "combine" version = "4.6.4" @@ -385,16 +442,32 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.8.3", "libc", ] +[[package]] +name = "core-foundation-sys" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" + [[package]] name = "core-foundation-sys" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "coreaudio-rs" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f229761965dad3e9b11081668a6ea00f1def7aa46062321b5ec245b834f6e491" +dependencies = [ + "bitflags", + "coreaudio-sys", +] + [[package]] name = "coreaudio-rs" version = "0.10.0" @@ -414,6 +487,27 @@ dependencies = [ "bindgen", ] +[[package]] +name = "cpal" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4410231e181e24e3e4612dfca601601e40942003e6a52a12d9d80f19fd9737" +dependencies = [ + "alsa 0.4.3", + "core-foundation-sys 0.6.2", + "coreaudio-rs 0.9.1", + "js-sys", + "lazy_static", + "libc", + "mach", + "nix 0.15.0", + "parking_lot 0.9.0", + "stdweb 0.1.3", + "thiserror", + "web-sys", + "winapi", +] + [[package]] name = "cpal" version = "0.13.5" @@ -421,8 +515,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74117836a5124f3629e4b474eed03e479abaf98988b4bb317e29f08cfe0e4116" dependencies = [ "alsa 0.6.0", - "core-foundation-sys", - "coreaudio-rs", + "core-foundation-sys 0.8.3", + "coreaudio-rs 0.10.0", "jni", "js-sys", "lazy_static", @@ -432,7 +526,7 @@ dependencies = [ "ndk-glue", "nix 0.23.1", "oboe", - "parking_lot", + "parking_lot 0.11.2", "stdweb 0.1.3", "thiserror", "web-sys", @@ -454,7 +548,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -464,7 +558,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "lazy_static", ] @@ -504,7 +598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfaeae1b6ebac028126197b63a4df82d70833ea724f279e236eaf94d28edcd9c" dependencies = [ "ahash", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-channel", "cursive_core", "lazy_static", @@ -643,7 +737,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf36e65a80337bea855cd4ef9b8401ffce06a7baedf2e85ec467b1ac3f6e82b6" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -653,7 +747,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -686,7 +780,7 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -748,6 +842,12 @@ dependencies = [ "log", ] +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + [[package]] name = "fixedbitset" version = "0.4.1" @@ -890,11 +990,17 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] +[[package]] +name = "gimli" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" + [[package]] name = "glob" version = "0.3.0" @@ -1110,7 +1216,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1216,7 +1322,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "winapi", ] @@ -1276,9 +1382,9 @@ dependencies = [ [[package]] name = "librespot-audio" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f7cc7e4d1c2596191be523668c933e07ec8a318d099fd66658258a4fe4a2dc" +checksum = "b4285dd96f9e681c5cbddbfb94fa5b0aeabd9ca91d9b8c78700a9c02929227e2" dependencies = [ "aes-ctr", "byteorder", @@ -1292,9 +1398,9 @@ dependencies = [ [[package]] name = "librespot-core" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255e8d8d719c020895079d140baf0b0edec8447d39a7e4760708f33b7cafaafb" +checksum = "32884e2a4d6f2b533d2dbc02564068d9975a1a546680062ebac75e5d8af2a9cb" dependencies = [ "aes", "base64", @@ -1333,9 +1439,9 @@ dependencies = [ [[package]] name = "librespot-metadata" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624ac29bb3ad2e565ef78a049a6c554d94e48b673aaba0bf7e7efd946d0b66cd" +checksum = "bae5b869471e75222969e5c763b94c883a0f3546bbe0f1415956482225702f02" dependencies = [ "async-trait", "byteorder", @@ -1347,13 +1453,13 @@ dependencies = [ [[package]] name = "librespot-playback" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "188b252b690ae7387f84a481ff4211df1a5c21eb9bddfc25cbde48793f2e0ef2" +checksum = "d19653908ad75ae3bcad2110f1c9c414bc7368c88eff3d5d53e8d6b0425586cd" dependencies = [ "alsa 0.5.0", "byteorder", - "cpal", + "cpal 0.12.1", "futures-executor", "futures-util", "lewton", @@ -1364,6 +1470,7 @@ dependencies = [ "librespot-metadata", "log", "ogg", + "parking_lot 0.11.2", "portaudio-rs", "rand", "rand_distr", @@ -1376,15 +1483,24 @@ dependencies = [ [[package]] name = "librespot-protocol" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b3699b05cb4c50caa5a5b7f5b3aadb928dfcc91cf1aa632c0dabce3ccc3ee4" +checksum = "0f63b8be57019728b0f452d1c4f61736e783cd7be5cd32437cdadf60cae6bfd0" dependencies = [ "glob", "protobuf", "protobuf-codegen-pure", ] +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + [[package]] name = "lock_api" version = "0.4.7" @@ -1401,7 +1517,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1458,6 +1574,12 @@ dependencies = [ "syn", ] +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "memchr" version = "2.5.0" @@ -1485,6 +1607,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +dependencies = [ + "adler", +] + [[package]] name = "mio" version = "0.8.3" @@ -1623,6 +1754,19 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "nix" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" +dependencies = [ + "bitflags", + "cc", + "cfg-if 0.1.10", + "libc", + "void", +] + [[package]] name = "nix" version = "0.20.0" @@ -1631,7 +1775,7 @@ checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", ] @@ -1643,7 +1787,7 @@ checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ "bitflags", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] @@ -1656,7 +1800,7 @@ checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "memoffset", ] @@ -1891,6 +2035,15 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.28.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +dependencies = [ + "memchr", +] + [[package]] name = "oboe" version = "0.4.6" @@ -1942,7 +2095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", - "cfg-if", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -2018,6 +2171,17 @@ dependencies = [ "winreg 0.5.1", ] +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.6.2", + "rustc_version 0.2.3", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -2025,8 +2189,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api", - "parking_lot_core", + "lock_api 0.4.7", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api 0.4.7", + "parking_lot_core 0.9.3", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version 0.2.3", + "smallvec 0.6.14", + "winapi", ] [[package]] @@ -2035,14 +2224,30 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if", + "backtrace", + "cfg-if 1.0.0", "instant", "libc", - "redox_syscall", - "smallvec", + "petgraph 0.5.1", + "redox_syscall 0.2.13", + "smallvec 1.8.0", + "thread-id", "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.13", + "smallvec 1.8.0", + "windows-sys", +] + [[package]] name = "parse_duration" version = "2.1.1" @@ -2086,13 +2291,23 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset 0.2.0", + "indexmap", +] + [[package]] name = "petgraph" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" dependencies = [ - "fixedbitset", + "fixedbitset 0.4.1", "indexmap", ] @@ -2277,6 +2492,12 @@ dependencies = [ "rand", ] +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + [[package]] name = "redox_syscall" version = "0.2.13" @@ -2292,7 +2513,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f" dependencies = [ - "redox_syscall", + "redox_syscall 0.2.13", ] [[package]] @@ -2302,7 +2523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.13", "thiserror", ] @@ -2389,7 +2610,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d98f5e557b61525057e2bc142c8cd7f0e70d75dc32852309bec440e6e046bf9" dependencies = [ - "cpal", + "cpal 0.13.5", ] [[package]] @@ -2445,6 +2666,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + [[package]] name = "rustc-hash" version = "1.1.0" @@ -2542,7 +2769,7 @@ checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", - "core-foundation-sys", + "core-foundation-sys 0.8.3", "libc", "security-framework-sys", ] @@ -2553,7 +2780,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ - "core-foundation-sys", + "core-foundation-sys 0.8.3", "libc", ] @@ -2638,7 +2865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -2650,7 +2877,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.3", ] @@ -2676,7 +2903,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.3", ] @@ -2727,6 +2954,15 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + [[package]] name = "smallvec" version = "1.8.0" @@ -2903,10 +3139,10 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "remove_dir_all", "winapi", ] @@ -2938,7 +3174,7 @@ checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e" dependencies = [ "libc", "numtoa", - "redox_syscall", + "redox_syscall 0.2.13", "redox_termios", ] @@ -2968,6 +3204,17 @@ dependencies = [ "syn", ] +[[package]] +name = "thread-id" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f" +dependencies = [ + "libc", + "redox_syscall 0.2.13", + "winapi", +] + [[package]] name = "time" version = "0.1.44" @@ -3055,6 +3302,7 @@ dependencies = [ "mio", "num_cpus", "once_cell", + "parking_lot 0.12.0", "pin-project-lite", "socket2", "tokio-macros", @@ -3142,7 +3390,7 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3179,7 +3427,7 @@ dependencies = [ "lazy_static", "nom", "once_cell", - "petgraph", + "petgraph 0.6.0", ] [[package]] @@ -3303,6 +3551,12 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "walkdir" version = "2.3.2" @@ -3342,7 +3596,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -3367,7 +3621,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -3425,7 +3679,7 @@ checksum = "94f6e5e340d7c13490eca867898c4cec5af56c27a5ffe5c80c6fc4708e22d33e" dependencies = [ "nix 0.22.3", "once_cell", - "smallvec", + "smallvec 1.8.0", "wayland-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 52f3a899..52d92c2f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,9 +22,9 @@ platform-dirs = "0.3.0" fern = "0.6" futures = "0.3" lazy_static = "1.3.0" -librespot-core = "0.3.1" -librespot-playback = "0.3.1" -librespot-protocol = "0.3.1" +librespot-core = "0.4.0" +librespot-playback = "0.4.0" +librespot-protocol = "0.4.0" log = "0.4.16" serde = "1.0" serde_json = "1.0" diff --git a/README.md b/README.md index a05db25e..f8c2c451 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- logo + logo

# ncspot @@ -307,29 +307,29 @@ runtime use the command prompt by typing `:reload`. Possible configuration values are: -| Name | Description | Possible values | Default | -|--------------------------|---------------------------------------------|-----------------------------------------------------------------|-------------| -| `command_key` | Key to open command line | Single character | `:` | -| `initial_screen` | Screen to show after startup | `"library"`, `"search"`, `"queue"`, `"cover"`[^2] | `"library"` | -| `use_nerdfont` | Turn nerdfont glyphs on/off | `true`, `false` | `false` | -| `flip_status_indicators` | Reverse play/pause icon meaning[^1] | `true`, `false` | `false` | -| `backend` | Audio backend to use | String [^3] | | -| `backend_device` | Audio device to configure the backend | String | | -| `audio_cache` | Enable caching of audio files | `true`, `false` | `true` | -| `audio_cache_size` | Maximum size of audio cache in MiB | Number | | -| `volnorm` | Enable volume normalization | `true`, `false` | `false` | -| `volnorm_pregain` | Normalization pregain to apply (if enabled) | Number | `0` | -| `default_keybindings` | Enable default keybindings | `true`, `false` | `false` | -| `notify` | Enable desktop notifications | `true`, `false` | `false` | -| `bitrate` | Audio bitrate to use for streaming | `96`, `160`, `320` | `320` | -| `album_column` | Show album column for tracks | `true`, `false` | `true` | -| `gapless` | Enable gapless playback | `true`, `false` | `true` | -| `shuffle` | Set default shuffle state | `true`, `false` | `false` | -| `repeat` | Set default repeat mode | `off`, `track`, `playlist` | `off` | -| `playback_state` | Set default playback state | `"Stopped"`, `"Paused"`, `"Playing"`, `"Default"` | `"Paused"` | -| `library_tabs` | Tabs to show in library screen | Array of `tracks`, `albums`, `artists`, `playlists`, `podcasts` | All tabs | -| `[theme]` | Custom theme | See [custom theme](#theming) | | -| `[keybindings]` | Custom keybindings | See [custom keybindings](#custom-keybindings) | | +| Name | Description | Possible values | Default | +|--------------------------|---------------------------------------------------|-----------------------------------------------------------------|-------------| +| `command_key` | Key to open command line | Single character | `:` | +| `initial_screen` | Screen to show after startup | `"library"`, `"search"`, `"queue"`, `"cover"`[^2] | `"library"` | +| `use_nerdfont` | Turn nerdfont glyphs on/off | `true`, `false` | `false` | +| `flip_status_indicators` | Reverse play/pause icon meaning[^1] | `true`, `false` | `false` | +| `backend` | Audio backend to use | String [^3] | | +| `backend_device` | Audio device to configure the backend | String | | +| `audio_cache` | Enable caching of audio files | `true`, `false` | `true` | +| `audio_cache_size` | Maximum size of audio cache in MiB | Number | | +| `volnorm` | Enable volume normalization | `true`, `false` | `false` | +| `volnorm_pregain` | Normalization pregain to apply in dB (if enabled) | Number | `0.0` | +| `default_keybindings` | Enable default keybindings | `true`, `false` | `false` | +| `notify` | Enable desktop notifications | `true`, `false` | `false` | +| `bitrate` | Audio bitrate to use for streaming | `96`, `160`, `320` | `320` | +| `album_column` | Show album column for tracks | `true`, `false` | `true` | +| `gapless` | Enable gapless playback | `true`, `false` | `true` | +| `shuffle` | Set default shuffle state | `true`, `false` | `false` | +| `repeat` | Set default repeat mode | `off`, `track`, `playlist` | `off` | +| `playback_state` | Set default playback state | `"Stopped"`, `"Paused"`, `"Playing"`, `"Default"` | `"Paused"` | +| `library_tabs` | Tabs to show in library screen | Array of `tracks`, `albums`, `artists`, `playlists`, `podcasts` | All tabs | +| `[theme]` | Custom theme | See [custom theme](#theming) | | +| `[keybindings]` | Custom keybindings | See [custom keybindings](#custom-keybindings) | | [^1]: By default the statusbar will show a play icon when a track is playing and diff --git a/src/main.rs b/src/main.rs index 56545fc4..753447b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -146,14 +146,9 @@ async fn main() -> Result<(), String> { let cfg: Arc = Arc::new(Config::new( matches.value_of("config").unwrap_or("config.toml"), )); - - let cache = Cache::new( - Some(config::cache_path("librespot")), - Some(config::cache_path("librespot").join("files")), - None, - ) - .expect("Could not create librespot cache"); let mut credentials = { + let cache = Cache::new(Some(config::cache_path("librespot")), None, None, None) + .expect("Could not create librespot cache"); let cached_credentials = cache.credentials(); match cached_credentials { Some(c) => { diff --git a/src/queue.rs b/src/queue.rs index 352e5fe5..0cb05acb 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -65,7 +65,7 @@ impl Queue { PlaybackState::Stopped => { spotify.stop(); } - PlaybackState::Paused | PlaybackState::Default | _ => { + PlaybackState::Paused | PlaybackState::Playing | PlaybackState::Default => { spotify.pause(); } } diff --git a/src/spotify.rs b/src/spotify.rs index 998156b7..3876ffbf 100644 --- a/src/spotify.rs +++ b/src/spotify.rs @@ -126,29 +126,33 @@ impl Spotify { pub fn test_credentials(credentials: Credentials) -> Result { let config = Self::session_config(); let handle = tokio::runtime::Handle::current(); - let jh = handle.spawn(async { Session::connect(config, credentials, None).await }); - futures::executor::block_on(jh).unwrap() + let jh = handle.spawn(async { Session::connect(config, credentials, None, true).await }); + futures::executor::block_on(jh).unwrap().map(|r| r.0) } async fn create_session( cfg: &config::Config, credentials: Credentials, ) -> Result { - let session_config = Self::session_config(); + let librespot_cache_path = config::cache_path("librespot"); let audio_cache_path = match cfg.values().audio_cache.unwrap_or(true) { - true => Some(config::cache_path("librespot").join("files")), + true => Some(librespot_cache_path.join("files")), false => None, }; let cache = Cache::new( - Some(config::cache_path("librespot")), + Some(librespot_cache_path.clone()), audio_cache_path, + Some(librespot_cache_path.join("volume")), cfg.values() .audio_cache_size .map(|size| (size * 1048576) as u64), ) .expect("Could not create cache"); debug!("opening spotify session"); - Session::connect(session_config, credentials, Some(cache)).await + let session_config = Self::session_config(); + Session::connect(session_config, credentials, Some(cache), true) + .await + .map(|r| r.0) } async fn worker( @@ -170,7 +174,7 @@ impl Spotify { gapless: cfg.values().gapless.unwrap_or(true), bitrate: bitrate.unwrap_or(Bitrate::Bitrate320), normalisation: cfg.values().volnorm.unwrap_or(false), - normalisation_pregain: cfg.values().volnorm_pregain.unwrap_or(0.0), + normalisation_pregain_db: cfg.values().volnorm_pregain.unwrap_or(0.0), ..Default::default() }; @@ -189,7 +193,7 @@ impl Spotify { let (player, player_events) = Player::new( player_config, session.clone(), - mixer.get_audio_filter(), + mixer.get_soft_volume(), move || (backend)(cfg.values().backend_device.clone(), audio_format), ); diff --git a/src/ui/library.rs b/src/ui/library.rs index a5322043..b103e441 100644 --- a/src/ui/library.rs +++ b/src/ui/library.rs @@ -27,7 +27,7 @@ impl LibraryView { .values() .library_tabs .clone() - .unwrap_or(Vec::from_iter(LibraryTab::iter())); + .unwrap_or_else(|| Vec::from_iter(LibraryTab::iter())); for tab in selected_tabs { match tab {