1From b66aac80f433dc3301be26e379f2ecea6fbbf990 Mon Sep 17 00:00:00 2001
2From: Guillaume Desmottes <guillaume.desmottes@onestream.live>
3Date: Wed, 15 Dec 2021 17:15:20 +0100
4Subject: [PATCH] spotify: replace username/password auth with access token.
5
6Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1801>
7---
8 Cargo.lock | 1082 +++++++++++++++++-----
9 audio/spotify/Cargo.toml | 6 +-
10 audio/spotify/README.md | 25 +-
11 audio/spotify/src/common.rs | 141 ++-
12 audio/spotify/src/spotifyaudiosrc/imp.rs | 19 +-
13 docs/plugins/gst_plugins_cache.json | 12 +
14 6 files changed, 973 insertions(+), 312 deletions(-)
15
16diff --git a/Cargo.lock b/Cargo.lock
17index 244256cd..226254e3 100644
18--- a/Cargo.lock
19+++ b/Cargo.lock
20@@ -19,45 +19,13 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
21
22 [[package]]
23 name = "aes"
24-version = "0.6.0"
25-source = "registry+https://github.com/rust-lang/crates.io-index"
26-checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561"
27-dependencies = [
28- "aes-soft",
29- "aesni",
30- "cipher",
31-]
32-
33-[[package]]
34-name = "aes-ctr"
35-version = "0.6.0"
36-source = "registry+https://github.com/rust-lang/crates.io-index"
37-checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763"
38-dependencies = [
39- "aes-soft",
40- "aesni",
41- "cipher",
42- "ctr",
43-]
44-
45-[[package]]
46-name = "aes-soft"
47-version = "0.6.4"
48-source = "registry+https://github.com/rust-lang/crates.io-index"
49-checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072"
50-dependencies = [
51- "cipher",
52- "opaque-debug",
53-]
54-
55-[[package]]
56-name = "aesni"
57-version = "0.10.0"
58+version = "0.8.4"
59 source = "registry+https://github.com/rust-lang/crates.io-index"
60-checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce"
61+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
62 dependencies = [
63+ "cfg-if",
64 "cipher",
65- "opaque-debug",
66+ "cpufeatures",
67 ]
68
69 [[package]]
70@@ -370,6 +338,29 @@ dependencies = [
71 "zeroize",
72 ]
73
74+[[package]]
75+name = "aws-lc-rs"
76+version = "1.13.0"
77+source = "registry+https://github.com/rust-lang/crates.io-index"
78+checksum = "19b756939cb2f8dc900aa6dcd505e6e2428e9cae7ff7b028c49e3946efa70878"
79+dependencies = [
80+ "aws-lc-sys",
81+ "zeroize",
82+]
83+
84+[[package]]
85+name = "aws-lc-sys"
86+version = "0.28.0"
87+source = "registry+https://github.com/rust-lang/crates.io-index"
88+checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f"
89+dependencies = [
90+ "bindgen",
91+ "cc",
92+ "cmake",
93+ "dunce",
94+ "fs_extra",
95+]
96+
97 [[package]]
98 name = "aws-runtime"
99 version = "1.2.0"
100@@ -461,7 +452,7 @@ dependencies = [
101 "bytes",
102 "fastrand",
103 "hex",
104- "hmac 0.12.1",
105+ "hmac",
106 "http 0.2.12",
107 "http-body 0.4.6",
108 "lru 0.12.5",
109@@ -603,7 +594,7 @@ dependencies = [
110 "crypto-bigint 0.5.5",
111 "form_urlencoded",
112 "hex",
113- "hmac 0.12.1",
114+ "hmac",
115 "http 0.2.12",
116 "http 1.2.0",
117 "once_cell",
118@@ -869,6 +860,29 @@ dependencies = [
119 "serde",
120 ]
121
122+[[package]]
123+name = "bindgen"
124+version = "0.69.5"
125+source = "registry+https://github.com/rust-lang/crates.io-index"
126+checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
127+dependencies = [
128+ "bitflags 2.9.0",
129+ "cexpr",
130+ "clang-sys",
131+ "itertools 0.12.1",
132+ "lazy_static",
133+ "lazycell",
134+ "log",
135+ "prettyplease",
136+ "proc-macro2",
137+ "quote",
138+ "regex",
139+ "rustc-hash 1.1.0",
140+ "shlex",
141+ "syn 2.0.99",
142+ "which",
143+]
144+
145 [[package]]
146 name = "bitflags"
147 version = "1.3.2"
148@@ -887,15 +901,6 @@ version = "2.3.0"
149 source = "registry+https://github.com/rust-lang/crates.io-index"
150 checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e"
151
152-[[package]]
153-name = "block-buffer"
154-version = "0.9.0"
155-source = "registry+https://github.com/rust-lang/crates.io-index"
156-checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
157-dependencies = [
158- "generic-array",
159-]
160-
161 [[package]]
162 name = "block-buffer"
163 version = "0.10.4"
164@@ -1041,6 +1046,15 @@ dependencies = [
165 "thiserror 2.0.12",
166 ]
167
168+[[package]]
169+name = "cexpr"
170+version = "0.6.0"
171+source = "registry+https://github.com/rust-lang/crates.io-index"
172+checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
173+dependencies = [
174+ "nom 7.1.3",
175+]
176+
177 [[package]]
178 name = "cfg-expr"
179 version = "0.15.8"
180@@ -1090,11 +1104,23 @@ dependencies = [
181
182 [[package]]
183 name = "cipher"
184-version = "0.2.5"
185+version = "0.4.4"
186 source = "registry+https://github.com/rust-lang/crates.io-index"
187-checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801"
188+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
189 dependencies = [
190- "generic-array",
191+ "crypto-common",
192+ "inout",
193+]
194+
195+[[package]]
196+name = "clang-sys"
197+version = "1.8.1"
198+source = "registry+https://github.com/rust-lang/crates.io-index"
199+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
200+dependencies = [
201+ "glob",
202+ "libc",
203+ "libloading",
204 ]
205
206 [[package]]
207@@ -1143,6 +1169,15 @@ version = "0.4.3"
208 source = "registry+https://github.com/rust-lang/crates.io-index"
209 checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688"
210
211+[[package]]
212+name = "cmake"
213+version = "0.1.54"
214+source = "registry+https://github.com/rust-lang/crates.io-index"
215+checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0"
216+dependencies = [
217+ "cc",
218+]
219+
220 [[package]]
221 name = "color-name"
222 version = "1.1.0"
223@@ -1233,6 +1268,16 @@ dependencies = [
224 "libc",
225 ]
226
227+[[package]]
228+name = "core-foundation"
229+version = "0.10.0"
230+source = "registry+https://github.com/rust-lang/crates.io-index"
231+checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
232+dependencies = [
233+ "core-foundation-sys",
234+ "libc",
235+]
236+
237 [[package]]
238 name = "core-foundation-sys"
239 version = "0.8.7"
240@@ -1332,16 +1377,6 @@ dependencies = [
241 "typenum",
242 ]
243
244-[[package]]
245-name = "crypto-mac"
246-version = "0.11.0"
247-source = "registry+https://github.com/rust-lang/crates.io-index"
248-checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
249-dependencies = [
250- "generic-array",
251- "subtle",
252-]
253-
254 [[package]]
255 name = "csound"
256 version = "0.1.8"
257@@ -1366,9 +1401,9 @@ dependencies = [
258
259 [[package]]
260 name = "ctr"
261-version = "0.6.0"
262+version = "0.9.2"
263 source = "registry+https://github.com/rust-lang/crates.io-index"
264-checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f"
265+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
266 dependencies = [
267 "cipher",
268 ]
269@@ -1434,7 +1469,7 @@ dependencies = [
270 "iso8601",
271 "lazy_static",
272 "num-traits",
273- "quick-xml",
274+ "quick-xml 0.37.2",
275 "regex",
276 "serde",
277 "serde_path_to_error",
278@@ -1499,6 +1534,17 @@ dependencies = [
279 "zeroize",
280 ]
281
282+[[package]]
283+name = "der"
284+version = "0.7.9"
285+source = "registry+https://github.com/rust-lang/crates.io-index"
286+checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
287+dependencies = [
288+ "const-oid",
289+ "pem-rfc7468",
290+ "zeroize",
291+]
292+
293 [[package]]
294 name = "deranged"
295 version = "0.3.11"
296@@ -1510,27 +1556,50 @@ dependencies = [
297 ]
298
299 [[package]]
300-name = "diff"
301-version = "0.1.13"
302+name = "derive_builder"
303+version = "0.20.2"
304 source = "registry+https://github.com/rust-lang/crates.io-index"
305-checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
306+checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"
307+dependencies = [
308+ "derive_builder_macro",
309+]
310
311 [[package]]
312-name = "digest"
313-version = "0.9.0"
314+name = "derive_builder_core"
315+version = "0.20.2"
316 source = "registry+https://github.com/rust-lang/crates.io-index"
317-checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
318+checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"
319 dependencies = [
320- "generic-array",
321+ "darling",
322+ "proc-macro2",
323+ "quote",
324+ "syn 2.0.99",
325+]
326+
327+[[package]]
328+name = "derive_builder_macro"
329+version = "0.20.2"
330+source = "registry+https://github.com/rust-lang/crates.io-index"
331+checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
332+dependencies = [
333+ "derive_builder_core",
334+ "syn 2.0.99",
335 ]
336
337+[[package]]
338+name = "diff"
339+version = "0.1.13"
340+source = "registry+https://github.com/rust-lang/crates.io-index"
341+checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8"
342+
343 [[package]]
344 name = "digest"
345 version = "0.10.7"
346 source = "registry+https://github.com/rust-lang/crates.io-index"
347 checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
348 dependencies = [
349- "block-buffer 0.10.4",
350+ "block-buffer",
351+ "const-oid",
352 "crypto-common",
353 "subtle",
354 ]
355@@ -1567,6 +1636,12 @@ dependencies = [
356 "rgb",
357 ]
358
359+[[package]]
360+name = "dunce"
361+version = "1.0.5"
362+source = "registry+https://github.com/rust-lang/crates.io-index"
363+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
364+
365 [[package]]
366 name = "ebml-iterable"
367 version = "0.6.3"
368@@ -1614,10 +1689,10 @@ version = "0.14.8"
369 source = "registry+https://github.com/rust-lang/crates.io-index"
370 checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c"
371 dependencies = [
372- "der",
373+ "der 0.6.1",
374 "elliptic-curve",
375 "rfc6979",
376- "signature",
377+ "signature 1.6.4",
378 ]
379
380 [[package]]
381@@ -1626,7 +1701,7 @@ version = "1.5.3"
382 source = "registry+https://github.com/rust-lang/crates.io-index"
383 checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
384 dependencies = [
385- "signature",
386+ "signature 1.6.4",
387 ]
388
389 [[package]]
390@@ -1643,12 +1718,12 @@ checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
391 dependencies = [
392 "base16ct",
393 "crypto-bigint 0.4.9",
394- "der",
395- "digest 0.10.7",
396+ "der 0.6.1",
397+ "digest",
398 "ff",
399 "generic-array",
400 "group",
401- "pkcs8",
402+ "pkcs8 0.9.0",
403 "rand_core 0.6.4",
404 "sec1",
405 "subtle",
406@@ -1856,6 +1931,12 @@ dependencies = [
407 "autocfg",
408 ]
409
410+[[package]]
411+name = "fs_extra"
412+version = "1.3.0"
413+source = "registry+https://github.com/rust-lang/crates.io-index"
414+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
415+
416 [[package]]
417 name = "fst"
418 version = "0.4.7"
419@@ -1933,6 +2014,12 @@ version = "0.3.31"
420 source = "registry+https://github.com/rust-lang/crates.io-index"
421 checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
422
423+[[package]]
424+name = "futures-timer"
425+version = "3.0.3"
426+source = "registry+https://github.com/rust-lang/crates.io-index"
427+checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24"
428+
429 [[package]]
430 name = "futures-util"
431 version = "0.3.31"
432@@ -2209,6 +2296,24 @@ dependencies = [
433 "system-deps 7.0.3",
434 ]
435
436+[[package]]
437+name = "governor"
438+version = "0.6.3"
439+source = "registry+https://github.com/rust-lang/crates.io-index"
440+checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b"
441+dependencies = [
442+ "cfg-if",
443+ "futures",
444+ "futures-timer",
445+ "no-std-compat",
446+ "nonzero_ext",
447+ "parking_lot",
448+ "portable-atomic",
449+ "rand 0.8.5",
450+ "smallvec",
451+ "spinning_top",
452+]
453+
454 [[package]]
455 name = "graphene-rs"
456 version = "0.20.9"
457@@ -2488,7 +2593,7 @@ dependencies = [
458 "gstreamer-video",
459 "m3u8-rs",
460 "once_cell",
461- "quick-xml",
462+ "quick-xml 0.37.2",
463 "serde",
464 ]
465
466@@ -2680,7 +2785,7 @@ dependencies = [
467 "gstreamer-video",
468 "libloading",
469 "once_cell",
470- "quick-xml",
471+ "quick-xml 0.37.2",
472 "smallvec",
473 "thiserror 2.0.12",
474 ]
475@@ -3763,21 +3868,20 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
476
477 [[package]]
478 name = "hmac"
479-version = "0.11.0"
480+version = "0.12.1"
481 source = "registry+https://github.com/rust-lang/crates.io-index"
482-checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
483+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
484 dependencies = [
485- "crypto-mac",
486- "digest 0.9.0",
487+ "digest",
488 ]
489
490 [[package]]
491-name = "hmac"
492-version = "0.12.1"
493+name = "home"
494+version = "0.5.11"
495 source = "registry+https://github.com/rust-lang/crates.io-index"
496-checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
497+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
498 dependencies = [
499- "digest 0.10.7",
500+ "windows-sys 0.59.0",
501 ]
502
503 [[package]]
504@@ -3923,18 +4027,24 @@ dependencies = [
505 ]
506
507 [[package]]
508-name = "hyper-proxy"
509-version = "0.9.1"
510+name = "hyper-proxy2"
511+version = "0.1.0"
512 source = "registry+https://github.com/rust-lang/crates.io-index"
513-checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc"
514+checksum = "9043b7b23fb0bc4a1c7014c27b50a4fc42cc76206f71d34fc0dfe5b28ddc3faf"
515 dependencies = [
516 "bytes",
517- "futures",
518- "headers 0.3.9",
519- "http 0.2.12",
520- "hyper 0.14.32",
521+ "futures-util",
522+ "headers 0.4.0",
523+ "http 1.2.0",
524+ "hyper 1.6.0",
525+ "hyper-rustls 0.26.0",
526+ "hyper-util",
527+ "pin-project-lite",
528+ "rustls-native-certs 0.7.3",
529 "tokio",
530+ "tokio-rustls 0.25.0",
531 "tower-service",
532+ "webpki",
533 ]
534
535 [[package]]
536@@ -3948,11 +4058,30 @@ dependencies = [
537 "hyper 0.14.32",
538 "log",
539 "rustls 0.21.12",
540- "rustls-native-certs",
541+ "rustls-native-certs 0.6.3",
542 "tokio",
543 "tokio-rustls 0.24.1",
544 ]
545
546+[[package]]
547+name = "hyper-rustls"
548+version = "0.26.0"
549+source = "registry+https://github.com/rust-lang/crates.io-index"
550+checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
551+dependencies = [
552+ "futures-util",
553+ "http 1.2.0",
554+ "hyper 1.6.0",
555+ "hyper-util",
556+ "log",
557+ "rustls 0.22.4",
558+ "rustls-native-certs 0.7.3",
559+ "rustls-pki-types",
560+ "tokio",
561+ "tokio-rustls 0.25.0",
562+ "tower-service",
563+]
564+
565 [[package]]
566 name = "hyper-rustls"
567 version = "0.27.5"
568@@ -3963,7 +4092,9 @@ dependencies = [
569 "http 1.2.0",
570 "hyper 1.6.0",
571 "hyper-util",
572+ "log",
573 "rustls 0.23.23",
574+ "rustls-native-certs 0.8.1",
575 "rustls-pki-types",
576 "tokio",
577 "tokio-rustls 0.26.2",
578@@ -4052,7 +4183,7 @@ dependencies = [
579 "iana-time-zone-haiku",
580 "js-sys",
581 "wasm-bindgen",
582- "windows-core",
583+ "windows-core 0.52.0",
584 ]
585
586 [[package]]
587@@ -4261,6 +4392,15 @@ dependencies = [
588 "serde",
589 ]
590
591+[[package]]
592+name = "inout"
593+version = "0.1.4"
594+source = "registry+https://github.com/rust-lang/crates.io-index"
595+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
596+dependencies = [
597+ "generic-array",
598+]
599+
600 [[package]]
601 name = "interpolate_name"
602 version = "0.2.4"
603@@ -4372,6 +4512,15 @@ name = "lazy_static"
604 version = "1.5.0"
605 source = "registry+https://github.com/rust-lang/crates.io-index"
606 checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
607+dependencies = [
608+ "spin",
609+]
610+
611+[[package]]
612+name = "lazycell"
613+version = "1.3.0"
614+source = "registry+https://github.com/rust-lang/crates.io-index"
615+checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
616
617 [[package]]
618 name = "lewton"
619@@ -4380,7 +4529,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
620 checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030"
621 dependencies = [
622 "byteorder",
623- "ogg",
624 "tinyvec",
625 ]
626
627@@ -4418,108 +4566,141 @@ checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
628
629 [[package]]
630 name = "librespot-audio"
631-version = "0.4.2"
632+version = "0.5.0"
633 source = "registry+https://github.com/rust-lang/crates.io-index"
634-checksum = "c176a31355e1ea8e0b9c4ced19df4947bfe4770661c25c142b6fba2365940d9d"
635+checksum = "5fbda070a5598b32718e497f585f46891f7113e64aff20a13c0f2ba8fe7ccad9"
636 dependencies = [
637- "aes-ctr",
638- "byteorder",
639+ "aes",
640 "bytes",
641+ "ctr",
642 "futures-util",
643+ "http-body-util",
644+ "hyper 1.6.0",
645+ "hyper-util",
646 "librespot-core",
647 "log",
648+ "parking_lot",
649 "tempfile",
650+ "thiserror 1.0.69",
651 "tokio",
652 ]
653
654 [[package]]
655 name = "librespot-core"
656-version = "0.4.2"
657+version = "0.5.0"
658 source = "registry+https://github.com/rust-lang/crates.io-index"
659-checksum = "046349f25888e644bf02d9c5de0164b2a493d29aa4ce18e1ad0b756da9b55d6d"
660+checksum = "505a5ddd966231755994b60435607a1e8ae1d41c7f1169b078e0511bfb82d931"
661 dependencies = [
662 "aes",
663- "base64 0.13.1",
664+ "base64 0.22.1",
665 "byteorder",
666 "bytes",
667+ "data-encoding",
668 "form_urlencoded",
669 "futures-core",
670 "futures-util",
671- "hmac 0.11.0",
672- "http 0.2.12",
673+ "governor",
674+ "hmac",
675+ "http 1.2.0",
676+ "http-body-util",
677 "httparse",
678- "hyper 0.14.32",
679- "hyper-proxy",
680+ "hyper 1.6.0",
681+ "hyper-proxy2",
682+ "hyper-rustls 0.27.5",
683+ "hyper-util",
684+ "librespot-oauth",
685 "librespot-protocol",
686 "log",
687+ "nonzero_ext",
688 "num-bigint",
689+ "num-derive",
690 "num-integer",
691 "num-traits",
692 "once_cell",
693+ "parking_lot",
694 "pbkdf2",
695+ "pin-project-lite",
696 "priority-queue",
697 "protobuf",
698+ "quick-xml 0.36.2",
699 "rand 0.8.5",
700+ "rsa",
701 "serde",
702 "serde_json",
703- "sha-1",
704+ "sha1",
705 "shannon",
706+ "sysinfo",
707 "thiserror 1.0.69",
708+ "time",
709 "tokio",
710 "tokio-stream",
711+ "tokio-tungstenite 0.24.0",
712 "tokio-util",
713 "url",
714 "uuid",
715- "vergen",
716+ "vergen-gitcl",
717 ]
718
719 [[package]]
720 name = "librespot-metadata"
721-version = "0.4.2"
722+version = "0.5.0"
723 source = "registry+https://github.com/rust-lang/crates.io-index"
724-checksum = "6b80361fcbcb5092056fd47c08c34d5d51b08385d8efb6941c0d3e46d032c21c"
725+checksum = "6a10ab5a390f65281e763cd09c617b173f0e665994eae3d242526924625fdc66"
726 dependencies = [
727 "async-trait",
728- "byteorder",
729+ "bytes",
730 "librespot-core",
731 "librespot-protocol",
732 "log",
733 "protobuf",
734+ "serde",
735+ "serde_json",
736+ "thiserror 1.0.69",
737+ "uuid",
738 ]
739
740 [[package]]
741-name = "librespot-playback"
742-version = "0.4.2"
743+name = "librespot-oauth"
744+version = "0.5.0"
745 source = "registry+https://github.com/rust-lang/crates.io-index"
746-checksum = "5190a0b9bcc7f70ee4196a6b4a1c731d405ca130d4a6fcd4c561cfdde8b7cfb7"
747+checksum = "57bda94233b358fb41c04ed15507c61136c80efe876c6e05a10ddb9a182b144e"
748 dependencies = [
749- "byteorder",
750- "futures-executor",
751- "futures-util",
752- "lewton",
753- "librespot-audio",
754- "librespot-core",
755- "librespot-metadata",
756 "log",
757- "ogg",
758+ "oauth2",
759+ "thiserror 1.0.69",
760+ "url",
761+]
762+
763+[[package]]
764+name = "librespot-playback"
765+version = "0.5.0"
766+source = "registry+https://github.com/rust-lang/crates.io-index"
767+checksum = "5b1bcfe1d72c5ac14c798c7e3e1c20e1fb6af2b9c254794545cfcb1f2a4627e2"
768+dependencies = [
769+ "futures-util",
770+ "librespot-audio",
771+ "librespot-core",
772+ "librespot-metadata",
773+ "log",
774+ "ogg",
775 "parking_lot",
776 "rand 0.8.5",
777 "rand_distr",
778 "shell-words",
779+ "symphonia",
780 "thiserror 1.0.69",
781 "tokio",
782- "zerocopy 0.6.6",
783+ "zerocopy 0.7.35",
784 ]
785
786 [[package]]
787 name = "librespot-protocol"
788-version = "0.4.2"
789+version = "0.5.0"
790 source = "registry+https://github.com/rust-lang/crates.io-index"
791-checksum = "5d6d3ac6196ac0ea67bbe039f56d6730a5d8b31502ef9bce0f504ed729dcb39f"
792+checksum = "0d6f343f573e0469d3ff8a02b99bbd9789faa01e2ff167332542ac840a8b31e7"
793 dependencies = [
794- "glob",
795 "protobuf",
796- "protobuf-codegen-pure",
797+ "protobuf-codegen",
798 ]
799
800 [[package]]
801@@ -4674,7 +4855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
802 checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
803 dependencies = [
804 "cfg-if",
805- "digest 0.10.7",
806+ "digest",
807 ]
808
809 [[package]]
810@@ -4801,7 +4982,7 @@ dependencies = [
811 "openssl-probe",
812 "openssl-sys",
813 "schannel",
814- "security-framework",
815+ "security-framework 2.11.1",
816 "security-framework-sys",
817 "tempfile",
818 ]
819@@ -4834,6 +5015,12 @@ dependencies = [
820 "rustfft",
821 ]
822
823+[[package]]
824+name = "no-std-compat"
825+version = "0.4.1"
826+source = "registry+https://github.com/rust-lang/crates.io-index"
827+checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c"
828+
829 [[package]]
830 name = "nom"
831 version = "7.1.3"
832@@ -4853,12 +5040,27 @@ dependencies = [
833 "memchr",
834 ]
835
836+[[package]]
837+name = "nonzero_ext"
838+version = "0.3.0"
839+source = "registry+https://github.com/rust-lang/crates.io-index"
840+checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21"
841+
842 [[package]]
843 name = "noop_proc_macro"
844 version = "0.3.0"
845 source = "registry+https://github.com/rust-lang/crates.io-index"
846 checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
847
848+[[package]]
849+name = "ntapi"
850+version = "0.4.1"
851+source = "registry+https://github.com/rust-lang/crates.io-index"
852+checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
853+dependencies = [
854+ "winapi",
855+]
856+
857 [[package]]
858 name = "nu-ansi-term"
859 version = "0.46.0"
860@@ -4880,6 +5082,23 @@ dependencies = [
861 "rand 0.8.5",
862 ]
863
864+[[package]]
865+name = "num-bigint-dig"
866+version = "0.8.4"
867+source = "registry+https://github.com/rust-lang/crates.io-index"
868+checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151"
869+dependencies = [
870+ "byteorder",
871+ "lazy_static",
872+ "libm",
873+ "num-integer",
874+ "num-iter",
875+ "num-traits",
876+ "rand 0.8.5",
877+ "smallvec",
878+ "zeroize",
879+]
880+
881 [[package]]
882 name = "num-complex"
883 version = "0.4.6"
884@@ -4915,6 +5134,17 @@ dependencies = [
885 "num-traits",
886 ]
887
888+[[package]]
889+name = "num-iter"
890+version = "0.1.45"
891+source = "registry+https://github.com/rust-lang/crates.io-index"
892+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
893+dependencies = [
894+ "autocfg",
895+ "num-integer",
896+ "num-traits",
897+]
898+
899 [[package]]
900 name = "num-rational"
901 version = "0.4.2"
902@@ -4947,6 +5177,35 @@ dependencies = [
903 "libc",
904 ]
905
906+[[package]]
907+name = "num_threads"
908+version = "0.1.7"
909+source = "registry+https://github.com/rust-lang/crates.io-index"
910+checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
911+dependencies = [
912+ "libc",
913+]
914+
915+[[package]]
916+name = "oauth2"
917+version = "4.4.2"
918+source = "registry+https://github.com/rust-lang/crates.io-index"
919+checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f"
920+dependencies = [
921+ "base64 0.13.1",
922+ "chrono",
923+ "getrandom 0.2.15",
924+ "http 0.2.12",
925+ "rand 0.8.5",
926+ "reqwest 0.11.27",
927+ "serde",
928+ "serde_json",
929+ "serde_path_to_error",
930+ "sha2",
931+ "thiserror 1.0.69",
932+ "url",
933+]
934+
935 [[package]]
936 name = "object"
937 version = "0.36.7"
938@@ -4958,9 +5217,9 @@ dependencies = [
939
940 [[package]]
941 name = "ogg"
942-version = "0.8.0"
943+version = "0.9.2"
944 source = "registry+https://github.com/rust-lang/crates.io-index"
945-checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e"
946+checksum = "fdab8dcd8d4052eaacaf8fb07a3ccd9a6e26efadb42878a413c68fc4af1dee2b"
947 dependencies = [
948 "byteorder",
949 ]
950@@ -4971,12 +5230,6 @@ version = "1.20.3"
951 source = "registry+https://github.com/rust-lang/crates.io-index"
952 checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
953
954-[[package]]
955-name = "opaque-debug"
956-version = "0.3.1"
957-source = "registry+https://github.com/rust-lang/crates.io-index"
958-checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
959-
960 [[package]]
961 name = "openssl"
962 version = "0.10.71"
963@@ -5188,12 +5441,12 @@ dependencies = [
964
965 [[package]]
966 name = "pbkdf2"
967-version = "0.8.0"
968+version = "0.12.2"
969 source = "registry+https://github.com/rust-lang/crates.io-index"
970-checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa"
971+checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2"
972 dependencies = [
973- "crypto-mac",
974- "hmac 0.11.0",
975+ "digest",
976+ "hmac",
977 ]
978
979 [[package]]
980@@ -5206,6 +5459,15 @@ dependencies = [
981 "serde",
982 ]
983
984+[[package]]
985+name = "pem-rfc7468"
986+version = "0.7.0"
987+source = "registry+https://github.com/rust-lang/crates.io-index"
988+checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
989+dependencies = [
990+ "base64ct",
991+]
992+
993 [[package]]
994 name = "percent-encoding"
995 version = "2.3.1"
996@@ -5254,14 +5516,35 @@ version = "0.1.0"
997 source = "registry+https://github.com/rust-lang/crates.io-index"
998 checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
999
1000+[[package]]
1001+name = "pkcs1"
1002+version = "0.7.5"
1003+source = "registry+https://github.com/rust-lang/crates.io-index"
1004+checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f"
1005+dependencies = [
1006+ "der 0.7.9",
1007+ "pkcs8 0.10.2",
1008+ "spki 0.7.3",
1009+]
1010+
1011 [[package]]
1012 name = "pkcs8"
1013 version = "0.9.0"
1014 source = "registry+https://github.com/rust-lang/crates.io-index"
1015 checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba"
1016 dependencies = [
1017- "der",
1018- "spki",
1019+ "der 0.6.1",
1020+ "spki 0.6.0",
1021+]
1022+
1023+[[package]]
1024+name = "pkcs8"
1025+version = "0.10.2"
1026+source = "registry+https://github.com/rust-lang/crates.io-index"
1027+checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
1028+dependencies = [
1029+ "der 0.7.9",
1030+ "spki 0.7.3",
1031 ]
1032
1033 [[package]]
1034@@ -5304,6 +5587,12 @@ dependencies = [
1035 "windows-sys 0.59.0",
1036 ]
1037
1038+[[package]]
1039+name = "portable-atomic"
1040+version = "1.11.0"
1041+source = "registry+https://github.com/rust-lang/crates.io-index"
1042+checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
1043+
1044 [[package]]
1045 name = "powerfmt"
1046 version = "0.2.0"
1047@@ -5350,12 +5639,13 @@ dependencies = [
1048
1049 [[package]]
1050 name = "priority-queue"
1051-version = "1.4.0"
1052+version = "2.3.1"
1053 source = "registry+https://github.com/rust-lang/crates.io-index"
1054-checksum = "a0bda9164fe05bc9225752d54aae413343c36f684380005398a6a8fde95fe785"
1055+checksum = "ef08705fa1589a1a59aa924ad77d14722cb0cd97b67dd5004ed5f4a4873fce8d"
1056 dependencies = [
1057 "autocfg",
1058- "indexmap 1.9.3",
1059+ "equivalent",
1060+ "indexmap 2.7.1",
1061 ]
1062
1063 [[package]]
1064@@ -5474,27 +5764,53 @@ dependencies = [
1065
1066 [[package]]
1067 name = "protobuf"
1068-version = "2.28.0"
1069+version = "3.7.2"
1070 source = "registry+https://github.com/rust-lang/crates.io-index"
1071-checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
1072+checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4"
1073+dependencies = [
1074+ "once_cell",
1075+ "protobuf-support",
1076+ "thiserror 1.0.69",
1077+]
1078
1079 [[package]]
1080 name = "protobuf-codegen"
1081-version = "2.28.0"
1082+version = "3.7.2"
1083 source = "registry+https://github.com/rust-lang/crates.io-index"
1084-checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6"
1085+checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace"
1086 dependencies = [
1087+ "anyhow",
1088+ "once_cell",
1089 "protobuf",
1090+ "protobuf-parse",
1091+ "regex",
1092+ "tempfile",
1093+ "thiserror 1.0.69",
1094 ]
1095
1096 [[package]]
1097-name = "protobuf-codegen-pure"
1098-version = "2.28.0"
1099+name = "protobuf-parse"
1100+version = "3.7.2"
1101 source = "registry+https://github.com/rust-lang/crates.io-index"
1102-checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865"
1103+checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973"
1104 dependencies = [
1105+ "anyhow",
1106+ "indexmap 2.7.1",
1107+ "log",
1108 "protobuf",
1109- "protobuf-codegen",
1110+ "protobuf-support",
1111+ "tempfile",
1112+ "thiserror 1.0.69",
1113+ "which",
1114+]
1115+
1116+[[package]]
1117+name = "protobuf-support"
1118+version = "3.7.2"
1119+source = "registry+https://github.com/rust-lang/crates.io-index"
1120+checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6"
1121+dependencies = [
1122+ "thiserror 1.0.69",
1123 ]
1124
1125 [[package]]
1126@@ -5513,6 +5829,16 @@ dependencies = [
1127 "psl-types",
1128 ]
1129
1130+[[package]]
1131+name = "quick-xml"
1132+version = "0.36.2"
1133+source = "registry+https://github.com/rust-lang/crates.io-index"
1134+checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe"
1135+dependencies = [
1136+ "memchr",
1137+ "serde",
1138+]
1139+
1140 [[package]]
1141 name = "quick-xml"
1142 version = "0.37.2"
1143@@ -5533,7 +5859,7 @@ dependencies = [
1144 "pin-project-lite",
1145 "quinn-proto",
1146 "quinn-udp",
1147- "rustc-hash",
1148+ "rustc-hash 2.1.1",
1149 "rustls 0.23.23",
1150 "socket2",
1151 "thiserror 2.0.12",
1152@@ -5551,7 +5877,7 @@ dependencies = [
1153 "getrandom 0.2.15",
1154 "rand 0.8.5",
1155 "ring",
1156- "rustc-hash",
1157+ "rustc-hash 2.1.1",
1158 "rustls 0.23.23",
1159 "rustls-pki-types",
1160 "slab",
1161@@ -5812,6 +6138,7 @@ dependencies = [
1162 "http 0.2.12",
1163 "http-body 0.4.6",
1164 "hyper 0.14.32",
1165+ "hyper-rustls 0.24.2",
1166 "hyper-tls 0.5.0",
1167 "ipnet",
1168 "js-sys",
1169@@ -5821,6 +6148,7 @@ dependencies = [
1170 "once_cell",
1171 "percent-encoding",
1172 "pin-project-lite",
1173+ "rustls 0.21.12",
1174 "rustls-pemfile 1.0.4",
1175 "serde",
1176 "serde_json",
1177@@ -5829,11 +6157,13 @@ dependencies = [
1178 "system-configuration 0.5.1",
1179 "tokio",
1180 "tokio-native-tls",
1181+ "tokio-rustls 0.24.1",
1182 "tower-service",
1183 "url",
1184 "wasm-bindgen",
1185 "wasm-bindgen-futures",
1186 "web-sys",
1187+ "webpki-roots",
1188 "winreg",
1189 ]
1190
1191@@ -5892,7 +6222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1192 checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
1193 dependencies = [
1194 "crypto-bigint 0.4.9",
1195- "hmac 0.12.1",
1196+ "hmac",
1197 "zeroize",
1198 ]
1199
1200@@ -5919,6 +6249,26 @@ dependencies = [
1201 "windows-sys 0.52.0",
1202 ]
1203
1204+[[package]]
1205+name = "rsa"
1206+version = "0.9.8"
1207+source = "registry+https://github.com/rust-lang/crates.io-index"
1208+checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"
1209+dependencies = [
1210+ "const-oid",
1211+ "digest",
1212+ "num-bigint-dig",
1213+ "num-integer",
1214+ "num-traits",
1215+ "pkcs1",
1216+ "pkcs8 0.10.2",
1217+ "rand_core 0.6.4",
1218+ "signature 2.2.0",
1219+ "spki 0.7.3",
1220+ "subtle",
1221+ "zeroize",
1222+]
1223+
1224 [[package]]
1225 name = "rtcp-types"
1226 version = "0.1.0"
1227@@ -5968,6 +6318,12 @@ version = "0.1.24"
1228 source = "registry+https://github.com/rust-lang/crates.io-index"
1229 checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
1230
1231+[[package]]
1232+name = "rustc-hash"
1233+version = "1.1.0"
1234+source = "registry+https://github.com/rust-lang/crates.io-index"
1235+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
1236+
1237 [[package]]
1238 name = "rustc-hash"
1239 version = "2.1.1"
1240@@ -6032,12 +6388,28 @@ dependencies = [
1241 "sct",
1242 ]
1243
1244+[[package]]
1245+name = "rustls"
1246+version = "0.22.4"
1247+source = "registry+https://github.com/rust-lang/crates.io-index"
1248+checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
1249+dependencies = [
1250+ "log",
1251+ "ring",
1252+ "rustls-pki-types",
1253+ "rustls-webpki 0.102.8",
1254+ "subtle",
1255+ "zeroize",
1256+]
1257+
1258 [[package]]
1259 name = "rustls"
1260 version = "0.23.23"
1261 source = "registry+https://github.com/rust-lang/crates.io-index"
1262 checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395"
1263 dependencies = [
1264+ "aws-lc-rs",
1265+ "log",
1266 "once_cell",
1267 "ring",
1268 "rustls-pki-types",
1269@@ -6055,7 +6427,32 @@ dependencies = [
1270 "openssl-probe",
1271 "rustls-pemfile 1.0.4",
1272 "schannel",
1273- "security-framework",
1274+ "security-framework 2.11.1",
1275+]
1276+
1277+[[package]]
1278+name = "rustls-native-certs"
1279+version = "0.7.3"
1280+source = "registry+https://github.com/rust-lang/crates.io-index"
1281+checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
1282+dependencies = [
1283+ "openssl-probe",
1284+ "rustls-pemfile 2.2.0",
1285+ "rustls-pki-types",
1286+ "schannel",
1287+ "security-framework 2.11.1",
1288+]
1289+
1290+[[package]]
1291+name = "rustls-native-certs"
1292+version = "0.8.1"
1293+source = "registry+https://github.com/rust-lang/crates.io-index"
1294+checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3"
1295+dependencies = [
1296+ "openssl-probe",
1297+ "rustls-pki-types",
1298+ "schannel",
1299+ "security-framework 3.2.0",
1300 ]
1301
1302 [[package]]
1303@@ -6101,6 +6498,7 @@ version = "0.102.8"
1304 source = "registry+https://github.com/rust-lang/crates.io-index"
1305 checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"
1306 dependencies = [
1307+ "aws-lc-rs",
1308 "ring",
1309 "rustls-pki-types",
1310 "untrusted",
1311@@ -6190,9 +6588,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1312 checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928"
1313 dependencies = [
1314 "base16ct",
1315- "der",
1316+ "der 0.6.1",
1317 "generic-array",
1318- "pkcs8",
1319+ "pkcs8 0.9.0",
1320 "subtle",
1321 "zeroize",
1322 ]
1323@@ -6204,7 +6602,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1324 checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
1325 dependencies = [
1326 "bitflags 2.9.0",
1327- "core-foundation",
1328+ "core-foundation 0.9.4",
1329+ "core-foundation-sys",
1330+ "libc",
1331+ "security-framework-sys",
1332+]
1333+
1334+[[package]]
1335+name = "security-framework"
1336+version = "3.2.0"
1337+source = "registry+https://github.com/rust-lang/crates.io-index"
1338+checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316"
1339+dependencies = [
1340+ "bitflags 2.9.0",
1341+ "core-foundation 0.10.0",
1342 "core-foundation-sys",
1343 "libc",
1344 "security-framework-sys",
1345@@ -6353,19 +6764,6 @@ dependencies = [
1346 "syn 2.0.99",
1347 ]
1348
1349-[[package]]
1350-name = "sha-1"
1351-version = "0.9.8"
1352-source = "registry+https://github.com/rust-lang/crates.io-index"
1353-checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
1354-dependencies = [
1355- "block-buffer 0.9.0",
1356- "cfg-if",
1357- "cpufeatures",
1358- "digest 0.9.0",
1359- "opaque-debug",
1360-]
1361-
1362 [[package]]
1363 name = "sha1"
1364 version = "0.10.6"
1365@@ -6374,7 +6772,7 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
1366 dependencies = [
1367 "cfg-if",
1368 "cpufeatures",
1369- "digest 0.10.7",
1370+ "digest",
1371 ]
1372
1373 [[package]]
1374@@ -6385,7 +6783,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
1375 dependencies = [
1376 "cfg-if",
1377 "cpufeatures",
1378- "digest 0.10.7",
1379+ "digest",
1380 ]
1381
1382 [[package]]
1383@@ -6443,7 +6841,17 @@ version = "1.6.4"
1384 source = "registry+https://github.com/rust-lang/crates.io-index"
1385 checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
1386 dependencies = [
1387- "digest 0.10.7",
1388+ "digest",
1389+ "rand_core 0.6.4",
1390+]
1391+
1392+[[package]]
1393+name = "signature"
1394+version = "2.2.0"
1395+source = "registry+https://github.com/rust-lang/crates.io-index"
1396+checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
1397+dependencies = [
1398+ "digest",
1399 "rand_core 0.6.4",
1400 ]
1401
1402@@ -6514,6 +6922,15 @@ dependencies = [
1403 "lock_api",
1404 ]
1405
1406+[[package]]
1407+name = "spinning_top"
1408+version = "0.3.0"
1409+source = "registry+https://github.com/rust-lang/crates.io-index"
1410+checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300"
1411+dependencies = [
1412+ "lock_api",
1413+]
1414+
1415 [[package]]
1416 name = "spki"
1417 version = "0.6.0"
1418@@ -6521,7 +6938,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1419 checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b"
1420 dependencies = [
1421 "base64ct",
1422- "der",
1423+ "der 0.6.1",
1424+]
1425+
1426+[[package]]
1427+name = "spki"
1428+version = "0.7.3"
1429+source = "registry+https://github.com/rust-lang/crates.io-index"
1430+checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
1431+dependencies = [
1432+ "base64ct",
1433+ "der 0.7.9",
1434 ]
1435
1436 [[package]]
1437@@ -6569,6 +6996,90 @@ version = "2.6.1"
1438 source = "registry+https://github.com/rust-lang/crates.io-index"
1439 checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
1440
1441+[[package]]
1442+name = "symphonia"
1443+version = "0.5.4"
1444+source = "registry+https://github.com/rust-lang/crates.io-index"
1445+checksum = "815c942ae7ee74737bb00f965fa5b5a2ac2ce7b6c01c0cc169bbeaf7abd5f5a9"
1446+dependencies = [
1447+ "lazy_static",
1448+ "symphonia-bundle-mp3",
1449+ "symphonia-codec-vorbis",
1450+ "symphonia-core",
1451+ "symphonia-format-ogg",
1452+ "symphonia-metadata",
1453+]
1454+
1455+[[package]]
1456+name = "symphonia-bundle-mp3"
1457+version = "0.5.4"
1458+source = "registry+https://github.com/rust-lang/crates.io-index"
1459+checksum = "c01c2aae70f0f1fb096b6f0ff112a930b1fb3626178fba3ae68b09dce71706d4"
1460+dependencies = [
1461+ "lazy_static",
1462+ "log",
1463+ "symphonia-core",
1464+ "symphonia-metadata",
1465+]
1466+
1467+[[package]]
1468+name = "symphonia-codec-vorbis"
1469+version = "0.5.4"
1470+source = "registry+https://github.com/rust-lang/crates.io-index"
1471+checksum = "5a98765fb46a0a6732b007f7e2870c2129b6f78d87db7987e6533c8f164a9f30"
1472+dependencies = [
1473+ "log",
1474+ "symphonia-core",
1475+ "symphonia-utils-xiph",
1476+]
1477+
1478+[[package]]
1479+name = "symphonia-core"
1480+version = "0.5.4"
1481+source = "registry+https://github.com/rust-lang/crates.io-index"
1482+checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3"
1483+dependencies = [
1484+ "arrayvec",
1485+ "bitflags 1.3.2",
1486+ "bytemuck",
1487+ "lazy_static",
1488+ "log",
1489+]
1490+
1491+[[package]]
1492+name = "symphonia-format-ogg"
1493+version = "0.5.4"
1494+source = "registry+https://github.com/rust-lang/crates.io-index"
1495+checksum = "ada3505789516bcf00fc1157c67729eded428b455c27ca370e41f4d785bfa931"
1496+dependencies = [
1497+ "log",
1498+ "symphonia-core",
1499+ "symphonia-metadata",
1500+ "symphonia-utils-xiph",
1501+]
1502+
1503+[[package]]
1504+name = "symphonia-metadata"
1505+version = "0.5.4"
1506+source = "registry+https://github.com/rust-lang/crates.io-index"
1507+checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c"
1508+dependencies = [
1509+ "encoding_rs",
1510+ "lazy_static",
1511+ "log",
1512+ "symphonia-core",
1513+]
1514+
1515+[[package]]
1516+name = "symphonia-utils-xiph"
1517+version = "0.5.4"
1518+source = "registry+https://github.com/rust-lang/crates.io-index"
1519+checksum = "484472580fa49991afda5f6550ece662237b00c6f562c7d9638d1b086ed010fe"
1520+dependencies = [
1521+ "symphonia-core",
1522+ "symphonia-metadata",
1523+]
1524+
1525 [[package]]
1526 name = "syn"
1527 version = "1.0.109"
1528@@ -6617,6 +7128,19 @@ dependencies = [
1529 "syn 2.0.99",
1530 ]
1531
1532+[[package]]
1533+name = "sysinfo"
1534+version = "0.31.4"
1535+source = "registry+https://github.com/rust-lang/crates.io-index"
1536+checksum = "355dbe4f8799b304b05e1b0f05fc59b2a18d36645cf169607da45bde2f69a1be"
1537+dependencies = [
1538+ "core-foundation-sys",
1539+ "libc",
1540+ "memchr",
1541+ "ntapi",
1542+ "windows",
1543+]
1544+
1545 [[package]]
1546 name = "system-configuration"
1547 version = "0.5.1"
1548@@ -6624,7 +7148,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1549 checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
1550 dependencies = [
1551 "bitflags 1.3.2",
1552- "core-foundation",
1553+ "core-foundation 0.9.4",
1554 "system-configuration-sys 0.5.0",
1555 ]
1556
1557@@ -6635,7 +7159,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1558 checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
1559 dependencies = [
1560 "bitflags 2.9.0",
1561- "core-foundation",
1562+ "core-foundation 0.9.4",
1563 "system-configuration-sys 0.6.0",
1564 ]
1565
1566@@ -6819,7 +7343,9 @@ checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21"
1567 dependencies = [
1568 "deranged",
1569 "itoa",
1570+ "libc",
1571 "num-conv",
1572+ "num_threads",
1573 "powerfmt",
1574 "serde",
1575 "time-core",
1576@@ -6916,6 +7442,17 @@ dependencies = [
1577 "tokio",
1578 ]
1579
1580+[[package]]
1581+name = "tokio-rustls"
1582+version = "0.25.0"
1583+source = "registry+https://github.com/rust-lang/crates.io-index"
1584+checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f"
1585+dependencies = [
1586+ "rustls 0.22.4",
1587+ "rustls-pki-types",
1588+ "tokio",
1589+]
1590+
1591 [[package]]
1592 name = "tokio-rustls"
1593 version = "0.26.2"
1594@@ -6963,6 +7500,22 @@ dependencies = [
1595 "tungstenite 0.21.0",
1596 ]
1597
1598+[[package]]
1599+name = "tokio-tungstenite"
1600+version = "0.24.0"
1601+source = "registry+https://github.com/rust-lang/crates.io-index"
1602+checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9"
1603+dependencies = [
1604+ "futures-util",
1605+ "log",
1606+ "rustls 0.23.23",
1607+ "rustls-native-certs 0.8.1",
1608+ "rustls-pki-types",
1609+ "tokio",
1610+ "tokio-rustls 0.26.2",
1611+ "tungstenite 0.24.0",
1612+]
1613+
1614 [[package]]
1615 name = "tokio-util"
1616 version = "0.7.13"
1617@@ -7154,6 +7707,26 @@ dependencies = [
1618 "utf-8",
1619 ]
1620
1621+[[package]]
1622+name = "tungstenite"
1623+version = "0.24.0"
1624+source = "registry+https://github.com/rust-lang/crates.io-index"
1625+checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a"
1626+dependencies = [
1627+ "byteorder",
1628+ "bytes",
1629+ "data-encoding",
1630+ "http 1.2.0",
1631+ "httparse",
1632+ "log",
1633+ "rand 0.8.5",
1634+ "rustls 0.23.23",
1635+ "rustls-pki-types",
1636+ "sha1",
1637+ "thiserror 1.0.69",
1638+ "utf-8",
1639+]
1640+
1641 [[package]]
1642 name = "tungstenite"
1643 version = "0.26.2"
1644@@ -7218,6 +7791,7 @@ dependencies = [
1645 "form_urlencoded",
1646 "idna",
1647 "percent-encoding",
1648+ "serde",
1649 ]
1650
1651 [[package]]
1652@@ -7266,6 +7840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1653 checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587"
1654 dependencies = [
1655 "getrandom 0.3.1",
1656+ "rand 0.9.0",
1657 ]
1658
1659 [[package]]
1660@@ -7299,13 +7874,40 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
1661
1662 [[package]]
1663 name = "vergen"
1664-version = "3.2.0"
1665+version = "9.0.4"
1666 source = "registry+https://github.com/rust-lang/crates.io-index"
1667-checksum = "e7141e445af09c8919f1d5f8a20dae0b20c3b57a45dee0d5823c6ed5d237f15a"
1668+checksum = "e0d2f179f8075b805a43a2a21728a46f0cc2921b3c58695b28fa8817e103cd9a"
1669 dependencies = [
1670- "bitflags 1.3.2",
1671- "chrono",
1672- "rustc_version",
1673+ "anyhow",
1674+ "derive_builder",
1675+ "rustversion",
1676+ "time",
1677+ "vergen-lib",
1678+]
1679+
1680+[[package]]
1681+name = "vergen-gitcl"
1682+version = "1.0.5"
1683+source = "registry+https://github.com/rust-lang/crates.io-index"
1684+checksum = "b2f89d70a58a4506a6079cedf575c64cf51649ccbb4e02a63dac539b264b7711"
1685+dependencies = [
1686+ "anyhow",
1687+ "derive_builder",
1688+ "rustversion",
1689+ "time",
1690+ "vergen",
1691+ "vergen-lib",
1692+]
1693+
1694+[[package]]
1695+name = "vergen-lib"
1696+version = "0.1.6"
1697+source = "registry+https://github.com/rust-lang/crates.io-index"
1698+checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166"
1699+dependencies = [
1700+ "anyhow",
1701+ "derive_builder",
1702+ "rustversion",
1703 ]
1704
1705 [[package]]
1706@@ -7495,12 +8097,40 @@ dependencies = [
1707 "ebml-iterable",
1708 ]
1709
1710+[[package]]
1711+name = "webpki"
1712+version = "0.22.4"
1713+source = "registry+https://github.com/rust-lang/crates.io-index"
1714+checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
1715+dependencies = [
1716+ "ring",
1717+ "untrusted",
1718+]
1719+
1720+[[package]]
1721+name = "webpki-roots"
1722+version = "0.25.4"
1723+source = "registry+https://github.com/rust-lang/crates.io-index"
1724+checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1"
1725+
1726 [[package]]
1727 name = "weezl"
1728 version = "0.1.8"
1729 source = "registry+https://github.com/rust-lang/crates.io-index"
1730 checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
1731
1732+[[package]]
1733+name = "which"
1734+version = "4.4.2"
1735+source = "registry+https://github.com/rust-lang/crates.io-index"
1736+checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
1737+dependencies = [
1738+ "either",
1739+ "home",
1740+ "once_cell",
1741+ "rustix",
1742+]
1743+
1744 [[package]]
1745 name = "winapi"
1746 version = "0.3.9"
1747@@ -7532,6 +8162,16 @@ version = "0.4.0"
1748 source = "registry+https://github.com/rust-lang/crates.io-index"
1749 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1750
1751+[[package]]
1752+name = "windows"
1753+version = "0.57.0"
1754+source = "registry+https://github.com/rust-lang/crates.io-index"
1755+checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143"
1756+dependencies = [
1757+ "windows-core 0.57.0",
1758+ "windows-targets 0.52.6",
1759+]
1760+
1761 [[package]]
1762 name = "windows-core"
1763 version = "0.52.0"
1764@@ -7541,6 +8181,40 @@ dependencies = [
1765 "windows-targets 0.52.6",
1766 ]
1767
1768+[[package]]
1769+name = "windows-core"
1770+version = "0.57.0"
1771+source = "registry+https://github.com/rust-lang/crates.io-index"
1772+checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d"
1773+dependencies = [
1774+ "windows-implement",
1775+ "windows-interface",
1776+ "windows-result 0.1.2",
1777+ "windows-targets 0.52.6",
1778+]
1779+
1780+[[package]]
1781+name = "windows-implement"
1782+version = "0.57.0"
1783+source = "registry+https://github.com/rust-lang/crates.io-index"
1784+checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7"
1785+dependencies = [
1786+ "proc-macro2",
1787+ "quote",
1788+ "syn 2.0.99",
1789+]
1790+
1791+[[package]]
1792+name = "windows-interface"
1793+version = "0.57.0"
1794+source = "registry+https://github.com/rust-lang/crates.io-index"
1795+checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7"
1796+dependencies = [
1797+ "proc-macro2",
1798+ "quote",
1799+ "syn 2.0.99",
1800+]
1801+
1802 [[package]]
1803 name = "windows-link"
1804 version = "0.1.0"
1805@@ -7553,11 +8227,20 @@ version = "0.2.0"
1806 source = "registry+https://github.com/rust-lang/crates.io-index"
1807 checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0"
1808 dependencies = [
1809- "windows-result",
1810+ "windows-result 0.2.0",
1811 "windows-strings",
1812 "windows-targets 0.52.6",
1813 ]
1814
1815+[[package]]
1816+name = "windows-result"
1817+version = "0.1.2"
1818+source = "registry+https://github.com/rust-lang/crates.io-index"
1819+checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
1820+dependencies = [
1821+ "windows-targets 0.52.6",
1822+]
1823+
1824 [[package]]
1825 name = "windows-result"
1826 version = "0.2.0"
1827@@ -7573,7 +8256,7 @@ version = "0.1.0"
1828 source = "registry+https://github.com/rust-lang/crates.io-index"
1829 checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
1830 dependencies = [
1831- "windows-result",
1832+ "windows-result 0.2.0",
1833 "windows-targets 0.52.6",
1834 ]
1835
1836@@ -7836,16 +8519,6 @@ dependencies = [
1837 "synstructure",
1838 ]
1839
1840-[[package]]
1841-name = "zerocopy"
1842-version = "0.6.6"
1843-source = "registry+https://github.com/rust-lang/crates.io-index"
1844-checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6"
1845-dependencies = [
1846- "byteorder",
1847- "zerocopy-derive 0.6.6",
1848-]
1849-
1850 [[package]]
1851 name = "zerocopy"
1852 version = "0.7.35"
1853@@ -7865,17 +8538,6 @@ dependencies = [
1854 "zerocopy-derive 0.8.21",
1855 ]
1856
1857-[[package]]
1858-name = "zerocopy-derive"
1859-version = "0.6.6"
1860-source = "registry+https://github.com/rust-lang/crates.io-index"
1861-checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91"
1862-dependencies = [
1863- "proc-macro2",
1864- "quote",
1865- "syn 2.0.99",
1866-]
1867-
1868 [[package]]
1869 name = "zerocopy-derive"
1870 version = "0.7.35"
1871diff --git a/audio/spotify/Cargo.toml b/audio/spotify/Cargo.toml
1872index 387785cd..b063b8ca 100644
1873--- a/audio/spotify/Cargo.toml
1874+++ b/audio/spotify/Cargo.toml
1875@@ -11,9 +11,9 @@ rust-version.workspace = true
1876 [dependencies]
1877 gst.workspace = true
1878 gst-base.workspace = true
1879-librespot-core = "0.4"
1880-librespot-playback = "0.4"
1881-tokio = { version = "1", features = ["rt-multi-thread"] }
1882+librespot-core = "0.5"
1883+librespot-playback = { version = "0.5", features = ['passthrough-decoder'] }
1884+tokio = { version = "1.0", features = ["rt-multi-thread"] }
1885 futures = "0.3"
1886 anyhow = "1.0"
1887 url = "2.3"
1888diff --git a/audio/spotify/README.md b/audio/spotify/README.md
1889index 98237747..2e364926 100644
1890--- a/audio/spotify/README.md
1891+++ b/audio/spotify/README.md
1892@@ -9,23 +9,36 @@ to respect their legal/licensing restrictions.
1893 ## Spotify Credentials
1894
1895 This plugin requires a [Spotify Premium](https://www.spotify.com/premium/) account.
1896-If your account is linked with Facebook, you'll need to setup
1897-a [device username and password](https://www.spotify.com/us/account/set-device-password/).
1898
1899-Those username and password are then set using the `username` and `password` properties.
1900+Provide a Spotify access token with 'streaming' scope using the `access-token` property. Such a token can be obtained by completing
1901+[Spotify's OAuth flow](https://developer.spotify.com/documentation/web-api/concepts/authorization) or using the facility on their
1902+[Web SDK getting started guide](https://developer.spotify.com/documentation/web-playback-sdk/tutorials/getting-started).
1903+A token can also be obtained using [librespot-oauth](https://github.com/librespot-org/librespot/blob/dev/oauth/examples/oauth.rs):
1904
1905-You may also want to cache credentials and downloaded files, see the `cache-` properties on the element.
1906+```console
1907+cargo install librespot-oauth --example oauth && oauth
1908+```
1909+
1910+Note, Spotify access tokens are only valid for 1 hour and must be [refreshed](https://developer.spotify.com/documentation/web-api/tutorials/refreshing-tokens)
1911+for usage beyond that.
1912+
1913+It is therefore advisable to also use the `cache-credentials` property. On first usage, your access token is exchanged for a reusable credentials blob and
1914+stored at the location specified by this property. Once obtained, that credentials blob is used for login and any provided `access-token` is ignored.
1915+Unlike Spotify access tokens, the user's credentials blob does not expire. Avoiding handling token refresh greatly simplifies plugin usage.
1916+If you do not set `cache-credentials`, you must manage refreshing your Spotify access token so it's valid for login when the element starts.
1917+
1918+You may also want to cache downloaded files, see the `cache-files` property.
1919
1920 ## spotifyaudiosrc
1921
1922 The `spotifyaudiosrc` element can be used to play a song from Spotify using its [Spotify URI](https://community.spotify.com/t5/FAQs/What-s-a-Spotify-URI/ta-p/919201).
1923
1924 ```
1925-gst-launch-1.0 spotifyaudiosrc username=$USERNAME password=$PASSWORD track=spotify:track:3i3P1mGpV9eRlfKccjDjwi ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink
1926+gst-launch-1.0 spotifyaudiosrc access-token=$ACCESS_TOKEN track=spotify:track:3i3P1mGpV9eRlfKccjDjwi ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink
1927 ```
1928
1929 The element also implements an URI handler which accepts credentials and cache settings as URI parameters:
1930
1931 ```console
1932-gst-launch-1.0 playbin3 uri=spotify:track:3i3P1mGpV9eRlfKccjDjwi?username=$USERNAME\&password=$PASSWORD\&cache-credentials=cache\&cache-files=cache
1933+gst-launch-1.0 playbin3 uri=spotify:track:3i3P1mGpV9eRlfKccjDjwi?access-token=$ACCESS_TOKEN\&cache-credentials=cache\&cache-files=cache
1934 ```
1935\ No newline at end of file
1936diff --git a/audio/spotify/src/common.rs b/audio/spotify/src/common.rs
1937index ed77dcc6..a5764ef8 100644
1938--- a/audio/spotify/src/common.rs
1939+++ b/audio/spotify/src/common.rs
1940@@ -18,8 +18,7 @@ use librespot_core::{
1941
1942 #[derive(Default, Debug, Clone)]
1943 pub struct Settings {
1944- username: String,
1945- password: String,
1946+ access_token: String,
1947 cache_credentials: String,
1948 cache_files: String,
1949 cache_max_size: u64,
1950@@ -28,52 +27,46 @@ pub struct Settings {
1951
1952 impl Settings {
1953 pub fn properties() -> Vec<glib::ParamSpec> {
1954- vec![glib::ParamSpecString::builder("username")
1955- .nick("Username")
1956- .blurb("Spotify username, Facebook accounts need a device username from https://www.spotify.com/us/account/set-device-password/")
1957- .default_value(Some(""))
1958- .mutable_ready()
1959- .build(),
1960- glib::ParamSpecString::builder("password")
1961- .nick("Password")
1962- .blurb("Spotify password, Facebook accounts need a device password from https://www.spotify.com/us/account/set-device-password/")
1963- .default_value(Some(""))
1964- .mutable_ready()
1965- .build(),
1966- glib::ParamSpecString::builder("cache-credentials")
1967- .nick("Credentials cache")
1968- .blurb("Directory where to cache Spotify credentials")
1969- .default_value(Some(""))
1970- .mutable_ready()
1971- .build(),
1972- glib::ParamSpecString::builder("cache-files")
1973- .nick("Files cache")
1974- .blurb("Directory where to cache downloaded files from Spotify")
1975- .default_value(Some(""))
1976- .mutable_ready()
1977- .build(),
1978- glib::ParamSpecUInt64::builder("cache-max-size")
1979- .nick("Cache max size")
1980- .blurb("The max allowed size of the cache, in bytes, or 0 to disable the cache limit")
1981- .default_value(0)
1982- .mutable_ready()
1983- .build(),
1984- glib::ParamSpecString::builder("track")
1985- .nick("Spotify URI")
1986- .blurb("Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'")
1987- .default_value(Some(""))
1988- .mutable_ready()
1989- .build(),
1990- ]
1991+ vec![
1992+ glib::ParamSpecString::builder("access-token")
1993+ .nick("Access token")
1994+ .blurb("Spotify access token, requires 'streaming' scope")
1995+ .default_value(Some(""))
1996+ .mutable_ready()
1997+ .build(),
1998+ glib::ParamSpecString::builder("cache-credentials")
1999+ .nick("Credentials cache")
2000+ .blurb("Directory where to cache Spotify credentials")
2001+ .default_value(Some(""))
2002+ .mutable_ready()
2003+ .build(),
2004+ glib::ParamSpecString::builder("cache-files")
2005+ .nick("Files cache")
2006+ .blurb("Directory where to cache downloaded files from Spotify")
2007+ .default_value(Some(""))
2008+ .mutable_ready()
2009+ .build(),
2010+ glib::ParamSpecUInt64::builder("cache-max-size")
2011+ .nick("Cache max size")
2012+ .blurb(
2013+ "The max allowed size of the cache, in bytes, or 0 to disable the cache limit",
2014+ )
2015+ .default_value(0)
2016+ .mutable_ready()
2017+ .build(),
2018+ glib::ParamSpecString::builder("track")
2019+ .nick("Spotify URI")
2020+ .blurb("Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'")
2021+ .default_value(Some(""))
2022+ .mutable_ready()
2023+ .build(),
2024+ ]
2025 }
2026
2027 pub fn set_property(&mut self, value: &glib::Value, pspec: &glib::ParamSpec) {
2028 match pspec.name() {
2029- "username" => {
2030- self.username = value.get().expect("type checked upstream");
2031- }
2032- "password" => {
2033- self.password = value.get().expect("type checked upstream");
2034+ "access-token" => {
2035+ self.access_token = value.get().expect("type checked upstream");
2036 }
2037 "cache-credentials" => {
2038 self.cache_credentials = value.get().expect("type checked upstream");
2039@@ -93,8 +86,7 @@ impl Settings {
2040
2041 pub fn property(&self, pspec: &glib::ParamSpec) -> glib::Value {
2042 match pspec.name() {
2043- "username" => self.username.to_value(),
2044- "password" => self.password.to_value(),
2045+ "access-token" => self.access_token.to_value(),
2046 "cache-credentials" => self.cache_credentials.to_value(),
2047 "cache-files" => self.cache_files.to_value(),
2048 "cache-max-size" => self.cache_max_size.to_value(),
2049@@ -132,32 +124,20 @@ impl Settings {
2050 let cache = Cache::new(credentials_cache, None, files_cache, max_size)?;
2051
2052 if let Some(cached_cred) = cache.credentials() {
2053- if !self.username.is_empty() && self.username != cached_cred.username {
2054- gst::debug!(
2055- cat,
2056- obj = &src,
2057- "ignore cached credentials for user {} which mismatch user {}",
2058- cached_cred.username,
2059- self.username
2060- );
2061- } else {
2062- gst::debug!(
2063- cat,
2064- obj = &src,
2065- "reuse cached credentials for user {}",
2066- cached_cred.username
2067- );
2068- if let Ok((session, _credentials)) = Session::connect(
2069- SessionConfig::default(),
2070- cached_cred,
2071- Some(cache.clone()),
2072- true,
2073- )
2074- .await
2075- {
2076- return Ok(session);
2077- }
2078- }
2079+ let cached_username = cached_cred
2080+ .username
2081+ .as_ref()
2082+ .map_or("UNKNOWN", |s| s.as_str());
2083+ gst::debug!(
2084+ cat,
2085+ obj = &src,
2086+ "reuse cached credentials for user {}",
2087+ cached_username
2088+ );
2089+
2090+ let session = Session::new(SessionConfig::default(), Some(cache));
2091+ session.connect(cached_cred, true).await?;
2092+ return Ok(session);
2093 }
2094
2095 gst::debug!(
2096@@ -166,17 +146,14 @@ impl Settings {
2097 "credentials not in cache or cached credentials invalid",
2098 );
2099
2100- if self.username.is_empty() {
2101- bail!("username is not set and credentials are not in cache");
2102- }
2103- if self.password.is_empty() {
2104- bail!("password is not set and credentials are not in cache");
2105+ if self.access_token.is_empty() {
2106+ bail!("access-token is not set and credentials are not in cache");
2107 }
2108
2109- let cred = Credentials::with_password(&self.username, &self.password);
2110+ let cred = Credentials::with_access_token(&self.access_token);
2111
2112- let (session, _credentials) =
2113- Session::connect(SessionConfig::default(), cred, Some(cache), true).await?;
2114+ let session = Session::new(SessionConfig::default(), Some(cache));
2115+ session.connect(cred, true).await?;
2116
2117 Ok(session)
2118 }
2119@@ -185,9 +162,7 @@ impl Settings {
2120 if self.track.is_empty() {
2121 bail!("track is not set");
2122 }
2123- let track = SpotifyId::from_uri(&self.track).map_err(|_| {
2124- anyhow::anyhow!("failed to create Spotify URI from track {}", self.track)
2125- })?;
2126+ let track = SpotifyId::from_uri(&self.track)?;
2127
2128 Ok(track)
2129 }
2130diff --git a/audio/spotify/src/spotifyaudiosrc/imp.rs b/audio/spotify/src/spotifyaudiosrc/imp.rs
2131index 6f429682..932f5a9f 100644
2132--- a/audio/spotify/src/spotifyaudiosrc/imp.rs
2133+++ b/audio/spotify/src/spotifyaudiosrc/imp.rs
2134@@ -52,7 +52,7 @@ enum Message {
2135 }
2136
2137 struct State {
2138- player: Player,
2139+ player: Arc<Player>,
2140
2141 /// receiver sending buffer to streaming thread
2142 receiver: mpsc::Receiver<Message>,
2143@@ -321,11 +321,10 @@ struct BufferSink {
2144
2145 impl Sink for BufferSink {
2146 fn write(&mut self, packet: AudioPacket, _converter: &mut Converter) -> SinkResult<()> {
2147- let oggdata = match packet {
2148- AudioPacket::OggData(data) => data,
2149- AudioPacket::Samples(_) => unimplemented!(),
2150+ let buffer = match packet {
2151+ AudioPacket::Samples(_) => unreachable!(),
2152+ AudioPacket::Raw(ogg) => gst::Buffer::from_slice(ogg),
2153 };
2154- let buffer = gst::Buffer::from_slice(oggdata);
2155
2156 // ignore if sending fails as that means the source element is being shutdown
2157 let _ = self.sender.send(Message::Buffer(buffer));
2158@@ -360,7 +359,7 @@ impl URIHandlerImpl for SpotifyAudioSrc {
2159 // allow to configure auth and cache settings from the URI
2160 for (key, value) in url.query_pairs() {
2161 match key.as_ref() {
2162- "username" | "password" | "cache-credentials" | "cache-files" => {
2163+ "access-token" | "cache-credentials" | "cache-files" => {
2164 self.obj().set_property(&key, value.as_ref());
2165 }
2166 _ => {
2167@@ -435,10 +434,10 @@ impl SpotifyAudioSrc {
2168 let (sender, receiver) = mpsc::sync_channel(2);
2169 let sender_clone = sender.clone();
2170
2171- let (mut player, mut player_event_channel) =
2172- Player::new(player_config, session, Box::new(NoOpVolume), || {
2173- Box::new(BufferSink { sender })
2174- });
2175+ let player = Player::new(player_config, session, Box::new(NoOpVolume), || {
2176+ Box::new(BufferSink { sender })
2177+ });
2178+ let mut player_event_channel = player.get_player_event_channel();
2179
2180 player.load(track, true, 0);
2181
2182diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json
2183index 4e2a1361..73aba5b9 100644
2184--- a/docs/plugins/gst_plugins_cache.json
2185+++ b/docs/plugins/gst_plugins_cache.json
2186@@ -11472,6 +11472,18 @@
2187 }
2188 },
2189 "properties": {
2190+ "access-token": {
2191+ "blurb": "Spotify access token, requires 'streaming' scope",
2192+ "conditionally-available": false,
2193+ "construct": false,
2194+ "construct-only": false,
2195+ "controllable": false,
2196+ "default": "",
2197+ "mutable": "ready",
2198+ "readable": true,
2199+ "type": "gchararray",
2200+ "writable": true
2201+ },
2202 "bitrate": {
2203 "blurb": "Spotify audio bitrate in kbit/s",
2204 "conditionally-available": false,
2205--
22062.48.1
2207