├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md └── src ├── main.rs └── player_event_handler.rs /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | cache 3 | .cargo 4 | spotify_appkey.key 5 | .vagrant/ 6 | .project 7 | .history 8 | 9 | **/*.rs.bk 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | rust: 3 | - 1.20.0 4 | - stable 5 | - beta 6 | - nightly 7 | 8 | cache: cargo 9 | 10 | addons: 11 | apt: 12 | packages: 13 | - gcc-arm-linux-gnueabihf 14 | - libc6-dev-armhf-cross 15 | - libpulse-dev 16 | - portaudio19-dev 17 | 18 | before_script: 19 | - mkdir -p ~/.cargo 20 | - echo '[target.armv7-unknown-linux-gnueabihf]' > ~/.cargo/config 21 | - echo 'linker = "arm-linux-gnueabihf-gcc"' >> ~/.cargo/config 22 | - rustup target add armv7-unknown-linux-gnueabihf 23 | - if [[ $TRAVIS_RUST_VERSION == *"nightly"* ]]; then 24 | rustup component add rustfmt-preview; 25 | cargo fmt --all -- --write-mode=diff; 26 | fi 27 | 28 | script: 29 | - cargo build 30 | - cargo build --locked --no-default-features --target armv7-unknown-linux-gnueabihf 31 | 32 | notifications: 33 | email: false -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "aho-corasick" 3 | version = "0.6.4" 4 | source = "registry+https://github.com/rust-lang/crates.io-index" 5 | dependencies = [ 6 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 7 | ] 8 | 9 | [[package]] 10 | name = "base64" 11 | version = "0.5.2" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | dependencies = [ 14 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 15 | ] 16 | 17 | [[package]] 18 | name = "base64" 19 | version = "0.9.0" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | dependencies = [ 22 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 23 | "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 24 | ] 25 | 26 | [[package]] 27 | name = "bit-set" 28 | version = "0.4.0" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | dependencies = [ 31 | "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 32 | ] 33 | 34 | [[package]] 35 | name = "bit-vec" 36 | version = "0.4.4" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | 39 | [[package]] 40 | name = "bitflags" 41 | version = "0.3.3" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | 44 | [[package]] 45 | name = "bitflags" 46 | version = "0.7.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | 49 | [[package]] 50 | name = "bitflags" 51 | version = "1.0.1" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | 54 | [[package]] 55 | name = "byteorder" 56 | version = "0.5.3" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | 59 | [[package]] 60 | name = "byteorder" 61 | version = "1.2.1" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | 64 | [[package]] 65 | name = "bytes" 66 | version = "0.4.6" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | dependencies = [ 69 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 70 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 71 | ] 72 | 73 | [[package]] 74 | name = "cfg-if" 75 | version = "0.1.2" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | 78 | [[package]] 79 | name = "dns-parser" 80 | version = "0.3.2" 81 | source = "git+https://github.com/plietar/dns-parser#1d3e5a5591bc72eb061c23bd426c4a25f2f73791" 82 | dependencies = [ 83 | "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 84 | "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 85 | "quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 86 | ] 87 | 88 | [[package]] 89 | name = "dtoa" 90 | version = "0.4.2" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | 93 | [[package]] 94 | name = "env_logger" 95 | version = "0.4.3" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | dependencies = [ 98 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 100 | ] 101 | 102 | [[package]] 103 | name = "error-chain" 104 | version = "0.9.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | 107 | [[package]] 108 | name = "extprim" 109 | version = "1.5.1" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | dependencies = [ 112 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 113 | "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 114 | "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 115 | "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", 116 | ] 117 | 118 | [[package]] 119 | name = "fuchsia-zircon" 120 | version = "0.3.3" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | dependencies = [ 123 | "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 125 | ] 126 | 127 | [[package]] 128 | name = "fuchsia-zircon-sys" 129 | version = "0.3.3" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | 132 | [[package]] 133 | name = "futures" 134 | version = "0.1.18" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | 137 | [[package]] 138 | name = "futures-cpupool" 139 | version = "0.1.8" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | dependencies = [ 142 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 143 | "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 144 | ] 145 | 146 | [[package]] 147 | name = "gcc" 148 | version = "0.3.54" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | 151 | [[package]] 152 | name = "getopts" 153 | version = "0.2.17" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | 156 | [[package]] 157 | name = "httparse" 158 | version = "1.2.4" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | 161 | [[package]] 162 | name = "hyper" 163 | version = "0.11.18" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | dependencies = [ 166 | "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 167 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 168 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 169 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 170 | "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 171 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 172 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 173 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 174 | "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 179 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 181 | "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 182 | "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 183 | ] 184 | 185 | [[package]] 186 | name = "idna" 187 | version = "0.1.4" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | dependencies = [ 190 | "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 191 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 192 | "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 193 | ] 194 | 195 | [[package]] 196 | name = "iovec" 197 | version = "0.1.2" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | dependencies = [ 200 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 201 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 202 | ] 203 | 204 | [[package]] 205 | name = "itoa" 206 | version = "0.3.4" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | 209 | [[package]] 210 | name = "kernel32-sys" 211 | version = "0.1.4" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | dependencies = [ 214 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 216 | ] 217 | 218 | [[package]] 219 | name = "kernel32-sys" 220 | version = "0.2.2" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | dependencies = [ 223 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 224 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 225 | ] 226 | 227 | [[package]] 228 | name = "language-tags" 229 | version = "0.2.2" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | 232 | [[package]] 233 | name = "lazy_static" 234 | version = "0.2.11" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | 237 | [[package]] 238 | name = "lazy_static" 239 | version = "1.0.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | 242 | [[package]] 243 | name = "lazycell" 244 | version = "0.6.0" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | 247 | [[package]] 248 | name = "lewton" 249 | version = "0.8.0" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | dependencies = [ 252 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 253 | "ogg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 254 | ] 255 | 256 | [[package]] 257 | name = "libc" 258 | version = "0.2.36" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | 261 | [[package]] 262 | name = "librespot" 263 | version = "0.1.0" 264 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 265 | dependencies = [ 266 | "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 267 | "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 268 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 269 | "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", 270 | "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", 271 | "librespot-audio 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 272 | "librespot-connect 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 273 | "librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 274 | "librespot-metadata 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 275 | "librespot-playback 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 276 | "librespot-protocol 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 277 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 278 | "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 279 | "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 280 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 281 | "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 282 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 283 | "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 284 | "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 285 | "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", 286 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 287 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 288 | "tokio-signal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 289 | "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 290 | "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 291 | ] 292 | 293 | [[package]] 294 | name = "librespot-audio" 295 | version = "0.1.0" 296 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 297 | dependencies = [ 298 | "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 299 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 300 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 301 | "lewton 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 302 | "librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 303 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 304 | "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 305 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 307 | "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 308 | ] 309 | 310 | [[package]] 311 | name = "librespot-connect" 312 | version = "0.1.0" 313 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 314 | dependencies = [ 315 | "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 316 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 317 | "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", 318 | "librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 319 | "librespot-playback 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 320 | "librespot-protocol 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 321 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 322 | "mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)", 323 | "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 324 | "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 325 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 326 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 327 | "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 328 | "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 329 | "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", 330 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 331 | "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 332 | ] 333 | 334 | [[package]] 335 | name = "librespot-core" 336 | version = "0.1.0" 337 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 338 | dependencies = [ 339 | "base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 340 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 341 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 342 | "error-chain 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 343 | "extprim 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 344 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 345 | "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", 346 | "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 347 | "librespot-protocol 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 348 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 349 | "num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 350 | "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 351 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 352 | "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 353 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 354 | "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 355 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 356 | "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 357 | "serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 358 | "serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", 359 | "shannon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 360 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 361 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 362 | "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 363 | "vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 364 | ] 365 | 366 | [[package]] 367 | name = "librespot-metadata" 368 | version = "0.1.0" 369 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 370 | dependencies = [ 371 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 372 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 373 | "librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 374 | "librespot-protocol 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 375 | "linear-map 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 376 | "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 377 | ] 378 | 379 | [[package]] 380 | name = "librespot-playback" 381 | version = "0.1.0" 382 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 383 | dependencies = [ 384 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 385 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 386 | "librespot-audio 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 387 | "librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 388 | "librespot-metadata 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 389 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 390 | "portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 391 | ] 392 | 393 | [[package]] 394 | name = "librespot-protocol" 395 | version = "0.1.0" 396 | source = "git+https://github.com/librespot-org/librespot?rev=8f8eb8c#8f8eb8cc23ff44ea95d2938b2760e12bd8338499" 397 | dependencies = [ 398 | "protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 399 | ] 400 | 401 | [[package]] 402 | name = "librespotd" 403 | version = "0.1.0" 404 | dependencies = [ 405 | "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 406 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 407 | "getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", 408 | "hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)", 409 | "librespot 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)", 410 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 411 | "rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 413 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 415 | "tokio-signal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 416 | ] 417 | 418 | [[package]] 419 | name = "linear-map" 420 | version = "1.2.0" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | 423 | [[package]] 424 | name = "log" 425 | version = "0.3.9" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | dependencies = [ 428 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 429 | ] 430 | 431 | [[package]] 432 | name = "log" 433 | version = "0.4.1" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | dependencies = [ 436 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 437 | ] 438 | 439 | [[package]] 440 | name = "matches" 441 | version = "0.1.6" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | 444 | [[package]] 445 | name = "mdns" 446 | version = "0.2.0" 447 | source = "git+https://github.com/plietar/rust-mdns#0abbc9bc4a0cf998fc51429d5e1941d14c18ad69" 448 | dependencies = [ 449 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 450 | "dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)", 451 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 452 | "kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 454 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 455 | "multimap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 456 | "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", 457 | "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 458 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 459 | "socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 460 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 461 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 462 | ] 463 | 464 | [[package]] 465 | name = "memchr" 466 | version = "2.0.1" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | dependencies = [ 469 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 470 | ] 471 | 472 | [[package]] 473 | name = "mime" 474 | version = "0.3.5" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | dependencies = [ 477 | "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 478 | ] 479 | 480 | [[package]] 481 | name = "mio" 482 | version = "0.6.13" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | dependencies = [ 485 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 486 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 487 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 488 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 490 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 491 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 492 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 493 | "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", 494 | "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 495 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 496 | ] 497 | 498 | [[package]] 499 | name = "mio-uds" 500 | version = "0.6.4" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | dependencies = [ 503 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 505 | ] 506 | 507 | [[package]] 508 | name = "miow" 509 | version = "0.2.1" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | dependencies = [ 512 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 513 | "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", 514 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 515 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 516 | ] 517 | 518 | [[package]] 519 | name = "multimap" 520 | version = "0.3.0" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | 523 | [[package]] 524 | name = "net2" 525 | version = "0.2.31" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | dependencies = [ 528 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 529 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 530 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 531 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 532 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 533 | ] 534 | 535 | [[package]] 536 | name = "nix" 537 | version = "0.8.1" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | dependencies = [ 540 | "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 541 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 542 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 543 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 544 | ] 545 | 546 | [[package]] 547 | name = "num-bigint" 548 | version = "0.1.43" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | dependencies = [ 551 | "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", 552 | "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 553 | "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 554 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 555 | ] 556 | 557 | [[package]] 558 | name = "num-integer" 559 | version = "0.1.36" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | dependencies = [ 562 | "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 563 | ] 564 | 565 | [[package]] 566 | name = "num-traits" 567 | version = "0.1.43" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | dependencies = [ 570 | "num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 571 | ] 572 | 573 | [[package]] 574 | name = "num-traits" 575 | version = "0.2.0" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | 578 | [[package]] 579 | name = "num_cpus" 580 | version = "1.8.0" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | dependencies = [ 583 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 584 | ] 585 | 586 | [[package]] 587 | name = "ogg" 588 | version = "0.5.1" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | dependencies = [ 591 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 592 | ] 593 | 594 | [[package]] 595 | name = "percent-encoding" 596 | version = "1.0.1" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | 599 | [[package]] 600 | name = "pkg-config" 601 | version = "0.3.9" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | 604 | [[package]] 605 | name = "portaudio-rs" 606 | version = "0.3.0" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | dependencies = [ 609 | "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 611 | "portaudio-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 612 | ] 613 | 614 | [[package]] 615 | name = "portaudio-sys" 616 | version = "0.1.1" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | dependencies = [ 619 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 620 | "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 621 | ] 622 | 623 | [[package]] 624 | name = "protobuf" 625 | version = "1.4.3" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | 628 | [[package]] 629 | name = "quick-error" 630 | version = "1.2.1" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | 633 | [[package]] 634 | name = "quote" 635 | version = "0.3.15" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | 638 | [[package]] 639 | name = "rand" 640 | version = "0.3.22" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | dependencies = [ 643 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 644 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 645 | "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 646 | ] 647 | 648 | [[package]] 649 | name = "rand" 650 | version = "0.4.2" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | dependencies = [ 653 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 654 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 655 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 656 | ] 657 | 658 | [[package]] 659 | name = "redox_syscall" 660 | version = "0.1.37" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | 663 | [[package]] 664 | name = "regex" 665 | version = "0.2.6" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | dependencies = [ 668 | "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", 669 | "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 670 | "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 671 | "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 672 | "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 673 | ] 674 | 675 | [[package]] 676 | name = "regex-syntax" 677 | version = "0.4.2" 678 | source = "registry+https://github.com/rust-lang/crates.io-index" 679 | 680 | [[package]] 681 | name = "relay" 682 | version = "0.1.1" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | dependencies = [ 685 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 686 | ] 687 | 688 | [[package]] 689 | name = "rpassword" 690 | version = "0.3.1" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | dependencies = [ 693 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 694 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 695 | "termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 696 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 697 | ] 698 | 699 | [[package]] 700 | name = "rust-crypto" 701 | version = "0.2.36" 702 | source = "git+https://github.com/awmath/rust-crypto.git?branch=avx2#394c247254dbe2ac5d44483232cf335d10cf0260" 703 | dependencies = [ 704 | "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", 705 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 706 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 707 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 708 | "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 709 | ] 710 | 711 | [[package]] 712 | name = "rust-crypto" 713 | version = "0.2.36" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | replace = "rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" 716 | 717 | [[package]] 718 | name = "rustc-serialize" 719 | version = "0.3.24" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | 722 | [[package]] 723 | name = "rustc_version" 724 | version = "0.2.2" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | dependencies = [ 727 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 728 | ] 729 | 730 | [[package]] 731 | name = "safemem" 732 | version = "0.2.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | 735 | [[package]] 736 | name = "scoped-tls" 737 | version = "0.1.0" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | 740 | [[package]] 741 | name = "semver" 742 | version = "0.9.0" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | dependencies = [ 745 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 746 | ] 747 | 748 | [[package]] 749 | name = "semver-parser" 750 | version = "0.7.0" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | 753 | [[package]] 754 | name = "serde" 755 | version = "0.9.15" 756 | source = "registry+https://github.com/rust-lang/crates.io-index" 757 | 758 | [[package]] 759 | name = "serde" 760 | version = "1.0.27" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | dependencies = [ 763 | "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", 764 | ] 765 | 766 | [[package]] 767 | name = "serde_codegen_internals" 768 | version = "0.14.2" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | dependencies = [ 771 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 772 | ] 773 | 774 | [[package]] 775 | name = "serde_derive" 776 | version = "0.9.15" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | dependencies = [ 779 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 780 | "serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", 781 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 782 | ] 783 | 784 | [[package]] 785 | name = "serde_derive" 786 | version = "1.0.27" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | dependencies = [ 789 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 790 | "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", 791 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 792 | ] 793 | 794 | [[package]] 795 | name = "serde_derive_internals" 796 | version = "0.19.0" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | dependencies = [ 799 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 800 | "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 801 | ] 802 | 803 | [[package]] 804 | name = "serde_json" 805 | version = "0.9.10" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | dependencies = [ 808 | "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 809 | "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 810 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 811 | "serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)", 812 | ] 813 | 814 | [[package]] 815 | name = "shannon" 816 | version = "0.2.0" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | dependencies = [ 819 | "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 820 | ] 821 | 822 | [[package]] 823 | name = "slab" 824 | version = "0.3.0" 825 | source = "registry+https://github.com/rust-lang/crates.io-index" 826 | 827 | [[package]] 828 | name = "slab" 829 | version = "0.4.0" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | 832 | [[package]] 833 | name = "smallvec" 834 | version = "0.2.1" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | 837 | [[package]] 838 | name = "socket2" 839 | version = "0.2.4" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | dependencies = [ 842 | "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 843 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 844 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 845 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 846 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 847 | ] 848 | 849 | [[package]] 850 | name = "syn" 851 | version = "0.11.11" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | dependencies = [ 854 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 855 | "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 856 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 857 | ] 858 | 859 | [[package]] 860 | name = "synom" 861 | version = "0.11.3" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | dependencies = [ 864 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 865 | ] 866 | 867 | [[package]] 868 | name = "take" 869 | version = "0.1.0" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | 872 | [[package]] 873 | name = "tempfile" 874 | version = "2.2.0" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | dependencies = [ 877 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 878 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 879 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 880 | "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", 881 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 882 | ] 883 | 884 | [[package]] 885 | name = "termios" 886 | version = "0.2.2" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | dependencies = [ 889 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 890 | ] 891 | 892 | [[package]] 893 | name = "thread_local" 894 | version = "0.3.5" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | dependencies = [ 897 | "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 898 | "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 899 | ] 900 | 901 | [[package]] 902 | name = "time" 903 | version = "0.1.39" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | dependencies = [ 906 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 907 | "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", 908 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 909 | ] 910 | 911 | [[package]] 912 | name = "tokio-core" 913 | version = "0.1.12" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | dependencies = [ 916 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 917 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 918 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 919 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 920 | "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 921 | "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 922 | "slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 923 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 924 | ] 925 | 926 | [[package]] 927 | name = "tokio-io" 928 | version = "0.1.5" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | dependencies = [ 931 | "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 932 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 933 | "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 934 | ] 935 | 936 | [[package]] 937 | name = "tokio-proto" 938 | version = "0.1.1" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | dependencies = [ 941 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 942 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 943 | "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", 944 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 945 | "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 946 | "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 947 | "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 948 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 949 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 950 | "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 951 | ] 952 | 953 | [[package]] 954 | name = "tokio-service" 955 | version = "0.1.0" 956 | source = "registry+https://github.com/rust-lang/crates.io-index" 957 | dependencies = [ 958 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 959 | ] 960 | 961 | [[package]] 962 | name = "tokio-signal" 963 | version = "0.1.4" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | dependencies = [ 966 | "futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", 967 | "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 968 | "mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 969 | "mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", 970 | "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 971 | "tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 972 | "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 973 | ] 974 | 975 | [[package]] 976 | name = "unicase" 977 | version = "2.1.0" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | dependencies = [ 980 | "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 981 | ] 982 | 983 | [[package]] 984 | name = "unicode-bidi" 985 | version = "0.3.4" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | dependencies = [ 988 | "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 989 | ] 990 | 991 | [[package]] 992 | name = "unicode-normalization" 993 | version = "0.1.5" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | 996 | [[package]] 997 | name = "unicode-xid" 998 | version = "0.0.4" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | 1001 | [[package]] 1002 | name = "unreachable" 1003 | version = "1.0.0" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | dependencies = [ 1006 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1007 | ] 1008 | 1009 | [[package]] 1010 | name = "url" 1011 | version = "1.6.0" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | dependencies = [ 1014 | "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1015 | "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1016 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1017 | ] 1018 | 1019 | [[package]] 1020 | name = "utf8-ranges" 1021 | version = "1.0.0" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | 1024 | [[package]] 1025 | name = "uuid" 1026 | version = "0.4.0" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | dependencies = [ 1029 | "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "vergen" 1034 | version = "0.1.1" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | dependencies = [ 1037 | "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1038 | "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "version_check" 1043 | version = "0.1.3" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | 1046 | [[package]] 1047 | name = "void" 1048 | version = "1.0.2" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | 1051 | [[package]] 1052 | name = "winapi" 1053 | version = "0.2.8" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | 1056 | [[package]] 1057 | name = "winapi" 1058 | version = "0.3.4" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | dependencies = [ 1061 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1062 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "winapi-build" 1067 | version = "0.1.1" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | 1070 | [[package]] 1071 | name = "winapi-i686-pc-windows-gnu" 1072 | version = "0.4.0" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | 1075 | [[package]] 1076 | name = "winapi-x86_64-pc-windows-gnu" 1077 | version = "0.4.0" 1078 | source = "registry+https://github.com/rust-lang/crates.io-index" 1079 | 1080 | [[package]] 1081 | name = "ws2_32-sys" 1082 | version = "0.2.1" 1083 | source = "registry+https://github.com/rust-lang/crates.io-index" 1084 | dependencies = [ 1085 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1086 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1087 | ] 1088 | 1089 | [metadata] 1090 | "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" 1091 | "checksum base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557" 1092 | "checksum base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "229d032f1a99302697f10b27167ae6d03d49d032e6a8e2550e8d3fc13356d2b4" 1093 | "checksum bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9bf6104718e80d7b26a68fdbacff3481cfc05df670821affc7e9cbc1884400c" 1094 | "checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" 1095 | "checksum bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "32866f4d103c4e438b1db1158aa1b1a80ee078e5d77a59a2f906fd62a577389c" 1096 | "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" 1097 | "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" 1098 | "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" 1099 | "checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" 1100 | "checksum bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b7db437d718977f6dc9b2e3fd6fc343c02ac6b899b73fdd2179163447bd9ce9" 1101 | "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" 1102 | "checksum dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)" = "" 1103 | "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" 1104 | "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" 1105 | "checksum error-chain 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e92ecf0a508c8e074c0e6fa8fe0fa38414848ad4dfc4db6f74c5e9753330b248" 1106 | "checksum extprim 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb09b6eb24a48a5c57729e4a60980bf538b3662c3bcec04b6c7908d7a0f3d9b9" 1107 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1108 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1109 | "checksum futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0bab5b5e94f5c31fc764ba5dd9ad16568aae5d4825538c01d6bca680c9bf94a7" 1110 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 1111 | "checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" 1112 | "checksum getopts 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "b900c08c1939860ce8b54dc6a89e26e00c04c380fd0e09796799bd7f12861e05" 1113 | "checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37" 1114 | "checksum hyper 0.11.18 (registry+https://github.com/rust-lang/crates.io-index)" = "c4f9b276c87e3fc1902a8bdfcce264c3f7c8a1c35e5e0c946062739f55026664" 1115 | "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" 1116 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 1117 | "checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" 1118 | "checksum kernel32-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e014dab1082fd9d80ea1fa6fcb261b47ed3eb511612a14198bb507701add083e" 1119 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1120 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 1121 | "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" 1122 | "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" 1123 | "checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" 1124 | "checksum lewton 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d170da25c0b3541e3260f84aa8f9d323468083bd1ed6c4c15aec7ff33e2a1c4" 1125 | "checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121" 1126 | "checksum librespot 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1127 | "checksum librespot-audio 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1128 | "checksum librespot-connect 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1129 | "checksum librespot-core 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1130 | "checksum librespot-metadata 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1131 | "checksum librespot-playback 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1132 | "checksum librespot-protocol 0.1.0 (git+https://github.com/librespot-org/librespot?rev=8f8eb8c)" = "" 1133 | "checksum linear-map 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" 1134 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 1135 | "checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" 1136 | "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" 1137 | "checksum mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)" = "" 1138 | "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" 1139 | "checksum mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e00e17be181010a91dbfefb01660b17311059dc8c7f48b9017677721e732bd" 1140 | "checksum mio 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7da01a5e23070d92d99b1ecd1cd0af36447c6fd44b0fe283c2db199fa136724f" 1141 | "checksum mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1731a873077147b626d89cc6c2a0db6288d607496c5d10c0cfcf3adc697ec673" 1142 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1143 | "checksum multimap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9223f4774d08e06185e44e555b9a7561243d387bac49c78a6205c42d6975fbf2" 1144 | "checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" 1145 | "checksum nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "47e49f6982987135c5e9620ab317623e723bd06738fd85377e8d55f57c8b6487" 1146 | "checksum num-bigint 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "81b483ea42927c463e191802e7334556b48e7875297564c0e9951bd3a0ae53e3" 1147 | "checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" 1148 | "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 1149 | "checksum num-traits 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7de20f146db9d920c45ee8ed8f71681fd9ade71909b48c3acbd766aa504cf10" 1150 | "checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" 1151 | "checksum ogg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f8de5433300a8a0ba60a3207766a3ce9efdede6aaab23311b5a8cf1664fe2e9" 1152 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1153 | "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" 1154 | "checksum portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "029e0ab393b44b2d825efbc755cae51c36be7a99d91356b2052be0ed05836636" 1155 | "checksum portaudio-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5194a4fa953b4ffd851c320ef6f0484cd7278cb7169ea9d6c433e49b23f7b7f5" 1156 | "checksum protobuf 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bec26e67194b7d991908145fdf21b7cae8b08423d96dcb9e860cd31f854b9506" 1157 | "checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" 1158 | "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" 1159 | "checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" 1160 | "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" 1161 | "checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" 1162 | "checksum regex 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b" 1163 | "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" 1164 | "checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a" 1165 | "checksum rpassword 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ec4bdede957362ec6fdd550f7e79c6d14cad2bc26b2d062786234c6ee0cb27bb" 1166 | "checksum rust-crypto 0.2.36 (git+https://github.com/awmath/rust-crypto.git?branch=avx2)" = "" 1167 | "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" 1168 | "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" 1169 | "checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" 1170 | "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" 1171 | "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" 1172 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1173 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1174 | "checksum serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af" 1175 | "checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" 1176 | "checksum serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc888bd283bd2420b16ad0d860e35ad8acb21941180a83a189bb2046f9d00400" 1177 | "checksum serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "978fd866f4d4872084a81ccc35e275158351d3b9fe620074e7d7504b816b74ba" 1178 | "checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" 1179 | "checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" 1180 | "checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1" 1181 | "checksum shannon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7ea5b41c9427b56caa7b808cb548a04fb50bb5b9e98590b53f28064ff4174561" 1182 | "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" 1183 | "checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d" 1184 | "checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" 1185 | "checksum socket2 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "36b4896961171cd3317c7e9603d88f379f8c6e45342212235d356496680c68fd" 1186 | "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" 1187 | "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" 1188 | "checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" 1189 | "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" 1190 | "checksum termios 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d9cf598a6d7ce700a4e6a9199da127e6819a61e64b68609683cc9a01b5683a" 1191 | "checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" 1192 | "checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" 1193 | "checksum tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "52b4e32d8edbf29501aabb3570f027c6ceb00ccef6538f4bddba0200503e74e8" 1194 | "checksum tokio-io 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9532748772222bf70297ec0e2ad0f17213b4a7dd0e6afb68e0a0768f69f4e4f" 1195 | "checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" 1196 | "checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" 1197 | "checksum tokio-signal 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4ef9836ecceb2583e0ddf25b7ca448fac74c1115461436f85e088a8e39e7904" 1198 | "checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a" 1199 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1200 | "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" 1201 | "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" 1202 | "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" 1203 | "checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2" 1204 | "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" 1205 | "checksum uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7cfec50b0842181ba6e713151b72f4ec84a6a7e2c9c8a8a3ffc37bb1cd16b231" 1206 | "checksum vergen 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c3365f36c57e5df714a34be40902b27a992eeddb9996eca52d0584611cf885d" 1207 | "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" 1208 | "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 1209 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1210 | "checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" 1211 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1212 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1213 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1214 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1215 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "librespotd" 3 | version = "0.1.0" 4 | authors = ["Sasha Hilton "] 5 | 6 | [[bin]] 7 | name = "librespotd" 8 | path = "src/main.rs" 9 | doc = false 10 | 11 | [dependencies] 12 | env_logger = "0.4.0" 13 | futures = "0.1.8" 14 | getopts = "0.2.14" 15 | hyper = "0.11.2" 16 | librespot = { git = "https://github.com/librespot-org/librespot", rev="8f8eb8c" } 17 | log = "0.3.5" 18 | rpassword = "0.3.0" 19 | rust-crypto = "0.2.36" 20 | tokio-core = "0.1.2" 21 | tokio-io = "0.1" 22 | tokio-signal = "0.1.2" 23 | 24 | [replace] 25 | "rust-crypto:0.2.36" = { git = "https://github.com/awmath/rust-crypto.git", branch = "avx2" } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Librespot Org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Librespot Daemon (librespotd) 2 | 3 | This will eventually become the easy to use, bells-and-whistles daemon that uses librespot to provide it's functionality. 4 | 5 | Right now, it is mostly a placeholder repo, and the reccomendation is to continue using librespot. We will make it clear on Gitter and here when we think librespotd is ready to be the main application. 6 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | extern crate crypto; 2 | extern crate env_logger; 3 | extern crate futures; 4 | extern crate getopts; 5 | extern crate librespot; 6 | #[macro_use] 7 | extern crate log; 8 | extern crate rpassword; 9 | extern crate tokio_core; 10 | extern crate tokio_io; 11 | extern crate tokio_signal; 12 | 13 | use crypto::digest::Digest; 14 | use crypto::sha1::Sha1; 15 | use env_logger::LogBuilder; 16 | use futures::{Async, Future, Poll, Stream}; 17 | use futures::sync::mpsc::UnboundedReceiver; 18 | use std::env; 19 | use std::io::{self, stderr, Write}; 20 | use std::mem; 21 | use std::path::PathBuf; 22 | use std::process::exit; 23 | use std::str::FromStr; 24 | use tokio_core::reactor::{Core, Handle}; 25 | use tokio_io::IoStream; 26 | 27 | use librespot::core::authentication::{get_credentials, Credentials}; 28 | use librespot::core::cache::Cache; 29 | use librespot::core::config::{ConnectConfig, DeviceType, SessionConfig}; 30 | use librespot::core::session::Session; 31 | use librespot::core::version; 32 | 33 | use librespot::connect::discovery::{discovery, DiscoveryStream}; 34 | use librespot::connect::spirc::{Spirc, SpircTask}; 35 | use librespot::playback::audio_backend::{self, Sink, BACKENDS}; 36 | use librespot::playback::config::{Bitrate, PlayerConfig}; 37 | use librespot::playback::mixer::{self, Mixer}; 38 | use librespot::playback::player::{Player, PlayerEvent}; 39 | 40 | mod player_event_handler; 41 | use player_event_handler::run_program_on_events; 42 | 43 | fn device_id(name: &str) -> String { 44 | let mut h = Sha1::new(); 45 | h.input_str(name); 46 | h.result_str() 47 | } 48 | 49 | fn usage(program: &str, opts: &getopts::Options) -> String { 50 | let brief = format!("Usage: {} [options]", program); 51 | opts.usage(&brief) 52 | } 53 | 54 | fn setup_logging(verbose: bool) { 55 | let mut builder = LogBuilder::new(); 56 | match env::var("RUST_LOG") { 57 | Ok(config) => { 58 | builder.parse(&config); 59 | builder.init().unwrap(); 60 | 61 | if verbose { 62 | warn!("`--verbose` flag overidden by `RUST_LOG` environment variable"); 63 | } 64 | } 65 | Err(_) => { 66 | if verbose { 67 | builder.parse("mdns=info,librespot=trace"); 68 | } else { 69 | builder.parse("mdns=info,librespot=info"); 70 | } 71 | builder.init().unwrap(); 72 | } 73 | } 74 | } 75 | 76 | fn list_backends() { 77 | println!("Available Backends : "); 78 | for (&(name, _), idx) in BACKENDS.iter().zip(0..) { 79 | if idx == 0 { 80 | println!("- {} (default)", name); 81 | } else { 82 | println!("- {}", name); 83 | } 84 | } 85 | } 86 | 87 | #[derive(Clone)] 88 | struct Setup { 89 | backend: fn(Option) -> Box, 90 | device: Option, 91 | 92 | mixer: fn() -> Box, 93 | 94 | cache: Option, 95 | player_config: PlayerConfig, 96 | session_config: SessionConfig, 97 | connect_config: ConnectConfig, 98 | credentials: Option, 99 | enable_discovery: bool, 100 | zeroconf_port: u16, 101 | player_event_program: Option, 102 | } 103 | 104 | fn setup(args: &[String]) -> Setup { 105 | let mut opts = getopts::Options::new(); 106 | opts.optopt( 107 | "c", 108 | "cache", 109 | "Path to a directory where files will be cached.", 110 | "CACHE", 111 | ).optflag( 112 | "", 113 | "disable-audio-cache", 114 | "Disable caching of the audio data.", 115 | ) 116 | .reqopt("n", "name", "Device name", "NAME") 117 | .optopt("", "device-type", "Displayed device type", "DEVICE_TYPE") 118 | .optopt( 119 | "b", 120 | "bitrate", 121 | "Bitrate (96, 160 or 320). Defaults to 160", 122 | "BITRATE", 123 | ) 124 | .optopt( 125 | "", 126 | "onevent", 127 | "Run PROGRAM when playback is about to begin.", 128 | "PROGRAM", 129 | ) 130 | .optflag("v", "verbose", "Enable verbose output") 131 | .optopt("u", "username", "Username to sign in with", "USERNAME") 132 | .optopt("p", "password", "Password", "PASSWORD") 133 | .optflag("", "disable-discovery", "Disable discovery mode") 134 | .optopt( 135 | "", 136 | "backend", 137 | "Audio backend to use. Use '?' to list options", 138 | "BACKEND", 139 | ) 140 | .optopt( 141 | "", 142 | "device", 143 | "Audio device to use. Use '?' to list options if using portaudio", 144 | "DEVICE", 145 | ) 146 | .optopt("", "mixer", "Mixer to use", "MIXER") 147 | .optopt( 148 | "", 149 | "initial-volume", 150 | "Initial volume in %, once connected (must be from 0 to 100)", 151 | "VOLUME", 152 | ) 153 | .optopt( 154 | "", 155 | "zeroconf-port", 156 | "The port the internal server advertised over zeroconf uses.", 157 | "ZEROCONF_PORT", 158 | ) 159 | .optflag( 160 | "", 161 | "enable-volume-normalisation", 162 | "Play all tracks at the same volume", 163 | ) 164 | .optopt( 165 | "", 166 | "normalisation-pregain", 167 | "Pregain (dB) applied by volume normalisation", 168 | "PREGAIN", 169 | ); 170 | 171 | let matches = match opts.parse(&args[1..]) { 172 | Ok(m) => m, 173 | Err(f) => { 174 | writeln!( 175 | stderr(), 176 | "error: {}\n{}", 177 | f.to_string(), 178 | usage(&args[0], &opts) 179 | ).unwrap(); 180 | exit(1); 181 | } 182 | }; 183 | 184 | let verbose = matches.opt_present("verbose"); 185 | setup_logging(verbose); 186 | 187 | info!( 188 | "librespot {} ({}). Built on {}. Build ID: {}", 189 | version::short_sha(), 190 | version::commit_date(), 191 | version::short_now(), 192 | version::build_id() 193 | ); 194 | 195 | let backend_name = matches.opt_str("backend"); 196 | if backend_name == Some("?".into()) { 197 | list_backends(); 198 | exit(0); 199 | } 200 | 201 | let backend = audio_backend::find(backend_name).expect("Invalid backend"); 202 | 203 | let device = matches.opt_str("device"); 204 | 205 | let mixer_name = matches.opt_str("mixer"); 206 | let mixer = mixer::find(mixer_name.as_ref()).expect("Invalid mixer"); 207 | 208 | let initial_volume = matches 209 | .opt_str("initial-volume") 210 | .map(|volume| { 211 | let volume = volume.parse::().unwrap(); 212 | if volume < 0 || volume > 100 { 213 | panic!("Initial volume must be in the range 0-100"); 214 | } 215 | volume * 0xFFFF / 100 216 | }) 217 | .unwrap_or(0x8000); 218 | 219 | let zeroconf_port = matches 220 | .opt_str("zeroconf-port") 221 | .map(|port| port.parse::().unwrap()) 222 | .unwrap_or(0); 223 | 224 | let name = matches.opt_str("name").unwrap(); 225 | let use_audio_cache = !matches.opt_present("disable-audio-cache"); 226 | 227 | let cache = matches 228 | .opt_str("c") 229 | .map(|cache_location| Cache::new(PathBuf::from(cache_location), use_audio_cache)); 230 | 231 | let credentials = { 232 | let cached_credentials = cache.as_ref().and_then(Cache::credentials); 233 | 234 | let password = |username: &String| -> String { 235 | write!(stderr(), "Password for {}: ", username).unwrap(); 236 | stderr().flush().unwrap(); 237 | rpassword::read_password().unwrap() 238 | }; 239 | 240 | get_credentials( 241 | matches.opt_str("username"), 242 | matches.opt_str("password"), 243 | cached_credentials, 244 | password, 245 | ) 246 | }; 247 | 248 | let session_config = { 249 | let device_id = device_id(&name); 250 | 251 | SessionConfig { 252 | user_agent: version::version_string(), 253 | device_id: device_id, 254 | } 255 | }; 256 | 257 | let player_config = { 258 | let bitrate = matches 259 | .opt_str("b") 260 | .as_ref() 261 | .map(|bitrate| Bitrate::from_str(bitrate).expect("Invalid bitrate")) 262 | .unwrap_or(Bitrate::default()); 263 | 264 | PlayerConfig { 265 | bitrate: bitrate, 266 | normalisation: matches.opt_present("enable-volume-normalisation"), 267 | normalisation_pregain: matches 268 | .opt_str("normalisation-pregain") 269 | .map(|pregain| pregain.parse::().expect("Invalid pregain float value")) 270 | .unwrap_or(PlayerConfig::default().normalisation_pregain), 271 | } 272 | }; 273 | 274 | let connect_config = { 275 | let device_type = matches 276 | .opt_str("device-type") 277 | .as_ref() 278 | .map(|device_type| DeviceType::from_str(device_type).expect("Invalid device type")) 279 | .unwrap_or(DeviceType::default()); 280 | 281 | ConnectConfig { 282 | name: name, 283 | device_type: device_type, 284 | volume: initial_volume, 285 | } 286 | }; 287 | 288 | let enable_discovery = !matches.opt_present("disable-discovery"); 289 | 290 | Setup { 291 | backend: backend, 292 | cache: cache, 293 | session_config: session_config, 294 | player_config: player_config, 295 | connect_config: connect_config, 296 | credentials: credentials, 297 | device: device, 298 | enable_discovery: enable_discovery, 299 | zeroconf_port: zeroconf_port, 300 | mixer: mixer, 301 | player_event_program: matches.opt_str("onevent"), 302 | } 303 | } 304 | 305 | struct Main { 306 | cache: Option, 307 | player_config: PlayerConfig, 308 | session_config: SessionConfig, 309 | connect_config: ConnectConfig, 310 | backend: fn(Option) -> Box, 311 | device: Option, 312 | mixer: fn() -> Box, 313 | handle: Handle, 314 | 315 | discovery: Option, 316 | signal: IoStream<()>, 317 | 318 | spirc: Option, 319 | spirc_task: Option, 320 | connect: Box>, 321 | 322 | shutdown: bool, 323 | 324 | player_event_channel: Option>, 325 | player_event_program: Option, 326 | } 327 | 328 | impl Main { 329 | fn new(handle: Handle, setup: Setup) -> Main { 330 | let mut task = Main { 331 | handle: handle.clone(), 332 | cache: setup.cache, 333 | session_config: setup.session_config, 334 | player_config: setup.player_config, 335 | connect_config: setup.connect_config, 336 | backend: setup.backend, 337 | device: setup.device, 338 | mixer: setup.mixer, 339 | 340 | connect: Box::new(futures::future::empty()), 341 | discovery: None, 342 | spirc: None, 343 | spirc_task: None, 344 | shutdown: false, 345 | signal: Box::new(tokio_signal::ctrl_c(&handle).flatten_stream()), 346 | 347 | player_event_channel: None, 348 | player_event_program: setup.player_event_program, 349 | }; 350 | 351 | if setup.enable_discovery { 352 | let config = task.connect_config.clone(); 353 | let device_id = task.session_config.device_id.clone(); 354 | 355 | task.discovery = 356 | Some(discovery(&handle, config, device_id, setup.zeroconf_port).unwrap()); 357 | } 358 | 359 | if let Some(credentials) = setup.credentials { 360 | task.credentials(credentials); 361 | } 362 | 363 | task 364 | } 365 | 366 | fn credentials(&mut self, credentials: Credentials) { 367 | let config = self.session_config.clone(); 368 | let handle = self.handle.clone(); 369 | 370 | let connection = Session::connect(config, credentials, self.cache.clone(), handle); 371 | 372 | self.connect = connection; 373 | self.spirc = None; 374 | let task = mem::replace(&mut self.spirc_task, None); 375 | if let Some(task) = task { 376 | self.handle.spawn(task); 377 | } 378 | } 379 | } 380 | 381 | impl Future for Main { 382 | type Item = (); 383 | type Error = (); 384 | 385 | fn poll(&mut self) -> Poll<(), ()> { 386 | loop { 387 | let mut progress = false; 388 | 389 | if let Some(Async::Ready(Some(creds))) = 390 | self.discovery.as_mut().map(|d| d.poll().unwrap()) 391 | { 392 | if let Some(ref spirc) = self.spirc { 393 | spirc.shutdown(); 394 | } 395 | self.credentials(creds); 396 | 397 | progress = true; 398 | } 399 | 400 | if let Async::Ready(session) = self.connect.poll().unwrap() { 401 | self.connect = Box::new(futures::future::empty()); 402 | let device = self.device.clone(); 403 | let mixer = (self.mixer)(); 404 | let player_config = self.player_config.clone(); 405 | let connect_config = self.connect_config.clone(); 406 | 407 | let audio_filter = mixer.get_audio_filter(); 408 | let backend = self.backend; 409 | let (player, event_channel) = 410 | Player::new(player_config, session.clone(), audio_filter, move || { 411 | (backend)(device) 412 | }); 413 | 414 | let (spirc, spirc_task) = Spirc::new(connect_config, session, player, mixer); 415 | self.spirc = Some(spirc); 416 | self.spirc_task = Some(spirc_task); 417 | self.player_event_channel = Some(event_channel); 418 | 419 | progress = true; 420 | } 421 | 422 | if let Async::Ready(Some(())) = self.signal.poll().unwrap() { 423 | if !self.shutdown { 424 | if let Some(ref spirc) = self.spirc { 425 | spirc.shutdown(); 426 | } 427 | self.shutdown = true; 428 | } else { 429 | return Ok(Async::Ready(())); 430 | } 431 | 432 | progress = true; 433 | } 434 | 435 | if let Some(ref mut spirc_task) = self.spirc_task { 436 | if let Async::Ready(()) = spirc_task.poll().unwrap() { 437 | if self.shutdown { 438 | return Ok(Async::Ready(())); 439 | } else { 440 | panic!("Spirc shut down unexpectedly"); 441 | } 442 | } 443 | } 444 | 445 | if let Some(ref mut player_event_channel) = self.player_event_channel { 446 | if let Async::Ready(Some(event)) = player_event_channel.poll().unwrap() { 447 | if let Some(ref program) = self.player_event_program { 448 | run_program_on_events(event, program); 449 | } 450 | } 451 | } 452 | 453 | if !progress { 454 | return Ok(Async::NotReady); 455 | } 456 | } 457 | } 458 | } 459 | 460 | fn main() { 461 | if env::var("RUST_BACKTRACE").is_err() { 462 | env::set_var("RUST_BACKTRACE", "full") 463 | } 464 | let mut core = Core::new().unwrap(); 465 | let handle = core.handle(); 466 | 467 | let args: Vec = std::env::args().collect(); 468 | 469 | core.run(Main::new(handle, setup(&args))).unwrap() 470 | } 471 | -------------------------------------------------------------------------------- /src/player_event_handler.rs: -------------------------------------------------------------------------------- 1 | use librespot::playback::player::PlayerEvent; 2 | use std::collections::HashMap; 3 | use std::process::Command; 4 | 5 | fn run_program(program: &str, env_vars: HashMap<&str, String>) { 6 | let mut v: Vec<&str> = program.split_whitespace().collect(); 7 | info!("Running {:?} with environment variables {:?}", v, env_vars); 8 | Command::new(&v.remove(0)) 9 | .args(&v) 10 | .envs(env_vars.iter()) 11 | .spawn() 12 | .expect("program failed to start"); 13 | } 14 | 15 | pub fn run_program_on_events(event: PlayerEvent, onevent: &str) { 16 | let mut env_vars = HashMap::new(); 17 | match event { 18 | PlayerEvent::Changed { 19 | old_track_id, 20 | new_track_id, 21 | } => { 22 | env_vars.insert("PLAYER_EVENT", "change".to_string()); 23 | env_vars.insert("OLD_TRACK_ID", old_track_id.to_base16()); 24 | env_vars.insert("TRACK_ID", new_track_id.to_base16()); 25 | } 26 | PlayerEvent::Started { track_id } => { 27 | env_vars.insert("PLAYER_EVENT", "start".to_string()); 28 | env_vars.insert("TRACK_ID", track_id.to_base16()); 29 | } 30 | PlayerEvent::Stopped { track_id } => { 31 | env_vars.insert("PLAYER_EVENT", "stop".to_string()); 32 | env_vars.insert("TRACK_ID", track_id.to_base16()); 33 | } 34 | } 35 | run_program(onevent, env_vars); 36 | } 37 | --------------------------------------------------------------------------------