diff --git a/CHANGELOG.md b/CHANGELOG.md index b7cc2972..af50a4c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,24 +98,17 @@ The top header behavior was reworked for narrow widths: search, Live and Orbit c Waveform mouse-wheel seeking now uses fixed step-based jumps with debounce smoothing for more predictable navigation and less jitter during rapid scrolling. -### Queue — Drag Outside to Remove +### Queue Panel — Position Counter, Tri-State Duration Toggle, Collapsible Now Playing, EQ Indicator -**By [@cucadmuh](https://github.com/cucadmuh), PR [#420](https://github.com/Psychotoxical/psysonic/pull/420)** +**By [@kveld9](https://github.com/kveld9), PR [#419](https://github.com/Psychotoxical/psysonic/pull/419)** -You can remove a track from the play queue by dragging its row **outside** the queue sidebar (main window) or outside the mini player’s queue list. Drop targets still support reordering when you release inside the queue area. +The queue panel got a sweep of UX refinements. The header now shows the current position as `(N/M)` next to the queue title for at-a-glance context. -The drag ghost shows a **trash** affordance only while the cursor is outside the queue bounds; inside the queue it behaves as a normal reorder drag. The mouse-event `psy-drop` path now carries cursor coordinates so removal can be detected when the drop target is not the queue panel itself. +The clickable duration label in the header rotates through **three** modes per click instead of two: total queue time, remaining time, and **estimated end-of-queue clock time** (e.g. `· 02:10`). ETA updates every 30 seconds, is formatted in the user's locale, and is visually highlighted with the accent colour while playing. +A new chevron next to the queue title **collapses the Now Playing section and queue toolbar**, and the collapsed state is persisted across restarts, so users who treat the queue as a pure list can keep it that way. -### Statistics — Shareable Top-Albums Card - -**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#425](https://github.com/Psychotoxical/psysonic/pull/425)** - -Statistics page can now export your most-played albums as a shareable PNG, accessible via a share icon next to the **Most Played Albums** section header. Three aspect ratios for different platforms (Story 9:16, Square 1:1, Twitter Card 16:9), three grid sizes (3×3, 4×4, 5×5), with each cover carrying a thin info strip showing rank + play count. - -The card pulls the wordmark and accent color directly from the active theme, so a Catppuccin export looks Catppuccin and a Nord export looks Nord. Cover art reuses the existing IndexedDB cache, so no extra Subsonic round-trips on repeat exports. The header label is hardcoded English ("Top Albums") so a shared image stays legible to followers regardless of their language. - -Saving uses the native OS save dialog — no silent dump into Downloads, the user picks the path each time. Data source is local-only (Subsonic `getAlbumList(frequent)`); Last.fm is intentionally not used. There is no time-window selector because Navidrome's API exposes only cumulative play counts, not per-event play history. +The currently playing row in the queue list is now indicated by **animated equalizer bars** to the left of the track title; the bars freeze in place when playback is paused. The previous small play icon next to the title is removed since the EQ bars carry the same signal more clearly. ## Fixed @@ -124,10 +117,6 @@ Saving uses the native OS save dialog — no silent dump into Downloads, the use - **Polish** *(PR [#397](https://github.com/Psychotoxical/psysonic/pull/397), by [@cucadmuh](https://github.com/cucadmuh))*: multiple branch-local interaction fixes around sidebar drag/drop behavior, Live dropdown layering, queue-resize handle behavior during scroll/overlay-scrollbar interaction, and now-playing narrow-layout stability. -- **Track preview audio in sync with progress ring; huge files no longer abort** *(Issue [#421](https://github.com/Psychotoxical/psysonic/issues/421), PR [#423](https://github.com/Psychotoxical/psysonic/pull/423), by [@Psychotoxical](https://github.com/Psychotoxical))*: Previews used to start audio about 25 % into the preview window on mid-track starts because `Sink::try_seek` ran in parallel with `sink.append` while the 30 s `take_duration` cap was already counting wall-clock from append. The seek now runs on the bare source before append, and the progress-ring animation only starts once the engine actually emits `audio:preview-start` — a small loading spinner is shown during the download/decode/seek warmup. The preview HTTP-client timeout was raised from 30 s to 5 min, so multi-hundred-megabyte Hi-Res files no longer abort the download mid-fetch. - -- **Windows playback stutter under GPU load** *(Issue [#334](https://github.com/Psychotoxical/psysonic/issues/334), PR [#426](https://github.com/Psychotoxical/psysonic/pull/426), by [@Psychotoxical](https://github.com/Psychotoxical))*: Audio could stutter and crackle on Windows whenever another app put GPU/CPU pressure on the system (browser, 3D apps, games). The WASAPI render thread is now promoted to MMCSS "Pro Audio" via `AvSetMmThreadCharacteristicsW`, so it survives priority contention from competing graphics work. Reproed and validated under a Half-Life parallel-load stresstest. Companion mitigations for high-GPU situations: cosmetic UI animations now pause when the window loses OS focus, and a new **Reduce animations** toggle in **Settings → Appearance** caps animated seekbar styles (pulsewave, particletrail, liquidfill, retrotape) to 30 fps for users on GPU-constrained machines (off by default). - ## [1.44.0] - 2026-04-29 diff --git a/app-icon.png b/app-icon.png new file mode 100644 index 00000000..aba32071 Binary files /dev/null and b/app-icon.png differ diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5aca3675..578d80cc 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "adler2" @@ -39,7 +39,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" dependencies = [ "alsa-sys", - "bitflags 2.11.1", + "bitflags 2.11.0", "cfg-if", "libc", ] @@ -126,7 +126,7 @@ checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.4.1", + "fastrand 2.3.0", "futures-lite 2.6.1", "pin-project-lite", "slab", @@ -250,9 +250,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.14" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" dependencies = [ "async-io 2.6.0", "async-lock 3.4.2", @@ -336,7 +336,7 @@ version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "cexpr", "clang-sys", "itertools", @@ -357,21 +357,6 @@ dependencies = [ "libm", ] -[[package]] -name = "bit-set" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - [[package]] name = "bitflags" version = "1.3.2" @@ -380,9 +365,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.11.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" dependencies = [ "serde_core", ] @@ -484,7 +469,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "cairo-sys-rs", "glib", "libc", @@ -547,9 +532,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.60" +version = "1.2.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" dependencies = [ "find-msvc-tools", "jobserver", @@ -580,7 +565,7 @@ checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" dependencies = [ "byteorder", "fnv", - "uuid 1.23.1", + "uuid 1.22.0", ] [[package]] @@ -599,12 +584,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - [[package]] name = "chrono" version = "0.4.44" @@ -628,15 +607,6 @@ dependencies = [ "libloading 0.8.9", ] -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -747,7 +717,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "core-foundation 0.10.1", "core-graphics-types 0.2.0", "foreign-types 0.5.0", @@ -771,7 +741,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "core-foundation 0.10.1", "libc", ] @@ -799,6 +769,8 @@ dependencies = [ [[package]] name = "cpal" version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" dependencies = [ "alsa", "core-foundation-sys", @@ -877,19 +849,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "cssparser" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa", - "phf 0.13.1", - "smallvec", -] - [[package]] name = "cssparser-macros" version = "0.6.1" @@ -912,9 +871,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ "darling_core", "darling_macro", @@ -922,10 +881,11 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ + "fnv", "ident_case", "proc-macro2", "quote", @@ -935,36 +895,21 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.23.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", "quote", "syn 2.0.117", ] -[[package]] -name = "dasp_frame" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a3937f5fe2135702897535c8d4a5553f8b116f76c1529088797f2eee7c5cd6" -dependencies = [ - "dasp_sample", -] - [[package]] name = "dasp_sample" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" -[[package]] -name = "data-encoding" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" - [[package]] name = "deranged" version = "0.5.8" @@ -1010,27 +955,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "derive_more" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.117", -] - [[package]] name = "digest" version = "0.10.7" @@ -1087,7 +1011,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "block2", "libc", "objc2", @@ -1127,21 +1051,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "dom_query" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89" -dependencies = [ - "bit-set", - "cssparser 0.36.0", - "foldhash 0.2.0", - "html5ever 0.38.0", - "precomputed-hash", - "selectors 0.36.1", - "tendril 0.5.0", -] - [[package]] name = "dpi" version = "0.1.2" @@ -1178,18 +1087,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" -[[package]] -name = "ebur128" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e227cc62d64d6fe01abbef48134b9c1f17d470cef1e7a56337ad05b1f81df7f9" -dependencies = [ - "bitflags 1.3.2", - "dasp_frame", - "dasp_sample", - "smallvec", -] - [[package]] name = "either" version = "1.15.0" @@ -1198,9 +1095,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "embed-resource" -version = "3.0.8" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63a1d0de4f2249aa0ff5884d7080814f446bb241a559af6c170a41e878ed2d45" +checksum = "55a075fc573c64510038d7ee9abc7990635863992f83ebc52c8b433b8411a02e" dependencies = [ "cc", "memchr", @@ -1323,18 +1220,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365" -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fallible-streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" - [[package]] name = "fastrand" version = "1.9.0" @@ -1346,9 +1231,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.4.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fdeflate" @@ -1408,12 +1293,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" -[[package]] -name = "foldhash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" - [[package]] name = "foreign-types" version = "0.3.2" @@ -1529,7 +1408,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" dependencies = [ - "fastrand 2.4.1", + "fastrand 2.3.0", "futures-core", "futures-io", "parking", @@ -1721,10 +1600,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -1734,11 +1611,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi 5.3.0", "wasip2", - "wasm-bindgen", ] [[package]] @@ -1792,7 +1667,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "futures-channel", "futures-core", "futures-executor", @@ -1920,6 +1795,25 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.13.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1932,23 +1826,14 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash 0.1.5", + "foldhash", ] [[package]] name = "hashbrown" -version = "0.17.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" - -[[package]] -name = "hashlink" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" -dependencies = [ - "hashbrown 0.15.5", -] +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -1988,20 +1873,10 @@ checksum = "3b7410cae13cbc75623c98ac4cbfd1f0bedddf3227afc24f370cf0f50a44a11c" dependencies = [ "log", "mac", - "markup5ever 0.14.1", + "markup5ever", "match_token", ] -[[package]] -name = "html5ever" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" -dependencies = [ - "log", - "markup5ever 0.38.0", -] - [[package]] name = "http" version = "1.4.0" @@ -2043,19 +1918,21 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.9.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", + "h2", "http", "http-body", "httparse", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -2063,19 +1940,34 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.9" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http", "hyper", "hyper-util", "rustls", - "rustls-native-certs", + "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", - "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", ] [[package]] @@ -2096,9 +1988,11 @@ dependencies = [ "percent-encoding", "pin-project-lite", "socket2 0.6.3", + "system-configuration", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -2137,13 +2031,12 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", - "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -2151,9 +2044,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -2164,9 +2057,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -2178,15 +2071,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -2198,15 +2091,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", @@ -2223,17 +2116,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" -[[package]] -name = "id3" -version = "1.16.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965c5e6a62a241f2f673df956ea5f52c27780bc1031855890a551ed9b869e2d1" -dependencies = [ - "bitflags 2.11.1", - "byteorder", - "flate2", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2263,9 +2145,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.10" +version = "0.25.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" dependencies = [ "bytemuck", "byteorder-lite", @@ -2287,12 +2169,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.14.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.17.0", + "hashbrown 0.16.1", "serde", "serde_core", ] @@ -2334,9 +2216,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" -version = "0.7.12" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -2372,9 +2254,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "javascriptcore-rs" @@ -2408,7 +2290,7 @@ dependencies = [ "cesu8", "cfg-if", "combine", - "jni-sys 0.3.1", + "jni-sys", "log", "thiserror 1.0.69", "walkdir", @@ -2417,31 +2299,9 @@ dependencies = [ [[package]] name = "jni-sys" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" -dependencies = [ - "jni-sys 0.4.1", -] - -[[package]] -name = "jni-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" -dependencies = [ - "jni-sys-macros", -] - -[[package]] -name = "jni-sys-macros" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" -dependencies = [ - "quote", - "syn 2.0.117", -] +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" @@ -2455,12 +2315,10 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.95" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ - "cfg-if", - "futures-util", "once_cell", "wasm-bindgen", ] @@ -2493,7 +2351,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "serde", "unicode-segmentation", ] @@ -2504,10 +2362,10 @@ version = "0.8.8-speedreader" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" dependencies = [ - "cssparser 0.29.6", - "html5ever 0.29.1", - "indexmap 2.14.0", - "selectors 0.24.0", + "cssparser", + "html5ever", + "indexmap 2.13.0", + "selectors", ] [[package]] @@ -2548,9 +2406,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.185" +version = "0.2.182" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" [[package]] name = "libloading" @@ -2580,25 +2438,14 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "libredox" -version = "0.1.16" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "libc", "plain", - "redox_syscall 0.7.4", -] - -[[package]] -name = "libsqlite3-sys" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", + "redox_syscall 0.7.3", ] [[package]] @@ -2621,9 +2468,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lock_api" @@ -2634,44 +2481,12 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "lofty" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca260c51a9c71f823fbfd2e6fbc8eb2ee09834b98c00763d877ca8bfa85cde3e" -dependencies = [ - "byteorder", - "data-encoding", - "flate2", - "lofty_attr", - "log", - "ogg_pager", - "paste", -] - -[[package]] -name = "lofty_attr" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9983e64b2358522f745c1251924e3ab7252d55637e80f6a0a3de642d6a9efc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "log" version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - [[package]] name = "mac" version = "0.1.1" @@ -2705,20 +2520,9 @@ dependencies = [ "log", "phf 0.11.3", "phf_codegen 0.11.3", - "string_cache 0.8.9", - "string_cache_codegen 0.5.4", - "tendril 0.4.3", -] - -[[package]] -name = "markup5ever" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" -dependencies = [ - "log", - "tendril 0.5.0", - "web_atoms", + "string_cache", + "string_cache_codegen", + "tendril", ] [[package]] @@ -2808,9 +2612,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", @@ -2819,9 +2623,9 @@ dependencies = [ [[package]] name = "moxcms" -version = "0.8.1" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +checksum = "ac9557c559cd6fc9867e122e20d2cbefc9ca29d80d027a8e39310920ed2f0a97" dependencies = [ "num-traits", "pxfm", @@ -2829,9 +2633,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.17.2" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9fec5a4e89860383d778d10563a605838f8f0b2f9303868937e5ff32e86177" +checksum = "01c1738382f66ed56b3b9c8119e794a2e23148ac8ea214eda86622d4cb9d415a" dependencies = [ "crossbeam-channel", "dpi", @@ -2848,14 +2652,31 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndk" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.11.1", - "jni-sys 0.3.1", + "bitflags 2.11.0", + "jni-sys", "log", "ndk-sys 0.5.0+25.2.9519653", "num_enum", @@ -2868,8 +2689,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.11.1", - "jni-sys 0.3.1", + "bitflags 2.11.0", + "jni-sys", "log", "ndk-sys 0.6.0+11769913", "num_enum", @@ -2889,7 +2710,7 @@ version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ - "jni-sys 0.3.1", + "jni-sys", ] [[package]] @@ -2898,7 +2719,7 @@ version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ - "jni-sys 0.3.1", + "jni-sys", ] [[package]] @@ -2937,9 +2758,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-derive" @@ -2963,9 +2784,9 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.6" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" dependencies = [ "num_enum_derive", "rustversion", @@ -2973,9 +2794,9 @@ dependencies = [ [[package]] name = "num_enum_derive" -version = "0.7.6" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ "proc-macro-crate 3.5.0", "proc-macro2", @@ -3008,7 +2829,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "block2", "objc2", "objc2-core-foundation", @@ -3021,7 +2842,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "dispatch2", "objc2", ] @@ -3032,7 +2853,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "dispatch2", "objc2", "objc2-core-foundation", @@ -3060,7 +2881,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "block2", "libc", "objc2", @@ -3073,7 +2894,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "objc2", "objc2-core-foundation", ] @@ -3084,7 +2905,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f112d1746737b0da274ef79a23aac283376f335f4095a083a267a082f21db0c0" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "objc2", "objc2-app-kit", "objc2-foundation", @@ -3096,7 +2917,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "objc2", "objc2-core-foundation", "objc2-foundation", @@ -3108,7 +2929,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "objc2", "objc2-core-foundation", "objc2-foundation", @@ -3120,7 +2941,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "block2", "objc2", "objc2-app-kit", @@ -3151,26 +2972,17 @@ dependencies = [ "cc", ] -[[package]] -name = "ogg_pager" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d6d1ca8364b84e0cf725eed06b1460c44671e6c0fb28765f5262de3ece07fdc" -dependencies = [ - "byteorder", -] - [[package]] name = "once_cell" -version = "1.21.4" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "open" -version = "5.3.4" +version = "5.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3bab717c29a857abf75fcef718d441ec7cb2725f937343c734740a985d37fd" +checksum = "43bb73a7fa3799b198970490a51174027ba0d4ec504b03cd08caf513d40024bc" dependencies = [ "dunce", "is-wsl", @@ -3178,27 +2990,56 @@ dependencies = [ "pathdiff", ] +[[package]] +name = "openssl" +version = "0.10.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" +dependencies = [ + "bitflags 2.11.0", + "cfg-if", + "foreign-types 0.3.2", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "openssl-probe" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +[[package]] +name = "openssl-sys" +version = "0.9.112" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "opusic-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc3280fe5b6f97ac1a35a0ac003e2fb0b92f8e4bdf2b2057e1bf9b87acca5696" -dependencies = [ - "cmake", -] - [[package]] name = "ordered-stream" version = "0.2.0" @@ -3287,12 +3128,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pathdiff" version = "0.2.3" @@ -3335,17 +3170,6 @@ dependencies = [ "phf_shared 0.11.3", ] -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_macros 0.13.1", - "phf_shared 0.13.1", - "serde", -] - [[package]] name = "phf_codegen" version = "0.8.0" @@ -3366,16 +3190,6 @@ dependencies = [ "phf_shared 0.11.3", ] -[[package]] -name = "phf_codegen" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" -dependencies = [ - "phf_generator 0.13.1", - "phf_shared 0.13.1", -] - [[package]] name = "phf_generator" version = "0.8.0" @@ -3393,7 +3207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ "phf_shared 0.10.0", - "rand 0.8.6", + "rand 0.8.5", ] [[package]] @@ -3403,17 +3217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand 0.8.6", -] - -[[package]] -name = "phf_generator" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" -dependencies = [ - "fastrand 2.4.1", - "phf_shared 0.13.1", + "rand 0.8.5", ] [[package]] @@ -3443,19 +3247,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "phf_macros" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" -dependencies = [ - "phf_generator 0.13.1", - "phf_shared 0.13.1", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "phf_shared" version = "0.8.0" @@ -3483,21 +3274,18 @@ dependencies = [ "siphasher 1.0.2", ] -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher 1.0.2", -] - [[package]] name = "pin-project-lite" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "piper" version = "0.2.5" @@ -3505,15 +3293,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" dependencies = [ "atomic-waker", - "fastrand 2.4.1", + "fastrand 2.3.0", "futures-io", ] [[package]] name = "pkg-config" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "plain" @@ -3528,7 +3316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" dependencies = [ "base64 0.22.1", - "indexmap 2.14.0", + "indexmap 2.13.0", "quick-xml", "serde", "time", @@ -3553,7 +3341,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "crc32fast", "fdeflate", "flate2", @@ -3598,9 +3386,9 @@ checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" [[package]] name = "potential_utf" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -3662,7 +3450,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit 0.25.11+spec-1.1.0", + "toml_edit 0.25.4+spec-1.1.0", ] [[package]] @@ -3706,26 +3494,19 @@ dependencies = [ [[package]] name = "psysonic" -version = "1.45.0-dev" +version = "1.34.0" dependencies = [ "biquad", "discord-rich-presence", - "ebur128", "futures-util", - "id3", - "libc", - "lofty", "md5", "reqwest 0.12.28", "ringbuf", "rodio", - "rusqlite", "serde", "serde_json", "souvlaki", "symphonia", - "symphonia-adapter-libopus", - "sysinfo", "tauri", "tauri-build", "tauri-plugin-dialog", @@ -3737,19 +3518,15 @@ dependencies = [ "tauri-plugin-store", "tauri-plugin-updater", "tauri-plugin-window-state", - "thread-priority", "tokio", "url", - "webkit2gtk", - "windows 0.58.0", - "zbus 5.14.0", ] [[package]] name = "pxfm" -version = "0.1.29" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" +checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d" [[package]] name = "quick-xml" @@ -3760,61 +3537,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2 0.6.3", - "thiserror 2.0.18", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" -dependencies = [ - "bytes", - "getrandom 0.3.4", - "lru-slab", - "rand 0.9.4", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.18", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2 0.6.3", - "tracing", - "windows-sys 0.60.2", -] - [[package]] name = "quote" version = "1.0.45" @@ -3852,25 +3574,15 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", ] -[[package]] -name = "rand" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.5", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -3891,16 +3603,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.5", -] - [[package]] name = "rand_core" version = "0.5.1" @@ -3919,15 +3621,6 @@ dependencies = [ "getrandom 0.2.17", ] -[[package]] -name = "rand_core" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom 0.3.4", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -3958,16 +3651,16 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", ] [[package]] name = "redox_syscall" -version = "0.7.4" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" +checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", ] [[package]] @@ -4038,30 +3731,32 @@ checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-channel", "futures-core", "futures-util", + "h2", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", + "hyper-tls", "hyper-util", "js-sys", "log", + "mime", "mime_guess", + "native-tls", "percent-encoding", "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-rustls", + "tokio-native-tls", "tokio-util", "tower", "tower-http", @@ -4071,7 +3766,6 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams 0.4.2", "web-sys", - "webpki-roots", ] [[package]] @@ -4171,25 +3865,11 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "rusqlite" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f" -dependencies = [ - "bitflags 2.11.1", - "fallible-iterator", - "fallible-streaming-iterator", - "hashlink", - "libsqlite3-sys", - "smallvec", -] - [[package]] name = "rustc-hash" -version = "2.1.2" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -4220,7 +3900,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -4233,7 +3913,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "errno", "libc", "linux-raw-sys 0.12.1", @@ -4242,9 +3922,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "once_cell", "ring", @@ -4272,7 +3952,6 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ - "web-time", "zeroize", ] @@ -4305,9 +3984,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "ring", "rustls-pki-types", @@ -4356,7 +4035,7 @@ dependencies = [ "serde", "serde_json", "url", - "uuid 1.23.1", + "uuid 1.22.0", ] [[package]] @@ -4407,7 +4086,7 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -4431,41 +4110,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c37578180969d00692904465fb7f6b3d50b9a2b952b87c23d0e2e5cb5013416" dependencies = [ "bitflags 1.3.2", - "cssparser 0.29.6", - "derive_more 0.99.20", + "cssparser", + "derive_more", "fxhash", "log", "phf 0.8.0", "phf_codegen 0.8.0", "precomputed-hash", - "servo_arc 0.2.0", - "smallvec", -] - -[[package]] -name = "selectors" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c" -dependencies = [ - "bitflags 2.11.1", - "cssparser 0.36.0", - "derive_more 2.1.1", - "log", - "new_debug_unreachable", - "phf 0.13.1", - "phf_codegen 0.13.1", - "precomputed-hash", - "rustc-hash", - "servo_arc 0.4.3", + "servo_arc", "smallvec", ] [[package]] name = "semver" -version = "1.0.28" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" dependencies = [ "serde", "serde_core", @@ -4559,9 +4219,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" dependencies = [ "serde_core", ] @@ -4580,15 +4240,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.18.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5414fad8e6907dbdd5bc441a50ae8d6e26151a03b1de04d89a5576de61d01f" +checksum = "381b283ce7bc6b476d903296fb59d0d36633652b633b27f64db4fb46dcbfc3b9" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.14.0", + "indexmap 2.13.0", "schemars 0.9.0", "schemars 1.2.1", "serde_core", @@ -4599,9 +4259,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.18.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3db8978e608f1fe7357e211969fd9abdcae80bac1ba7a3369bb7eb6b404eb65" +checksum = "a6d4e30573c8cb306ed6ab1dca8423eec9a463ea0e155f45399455e0368b27e0" dependencies = [ "darling", "proc-macro2", @@ -4641,15 +4301,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "servo_arc" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "sha1" version = "0.10.6" @@ -4722,9 +4373,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "siphasher" @@ -4862,18 +4513,6 @@ dependencies = [ "serde", ] -[[package]] -name = "string_cache" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" -dependencies = [ - "new_debug_unreachable", - "parking_lot", - "phf_shared 0.13.1", - "precomputed-hash", -] - [[package]] name = "string_cache_codegen" version = "0.5.4" @@ -4886,18 +4525,6 @@ dependencies = [ "quote", ] -[[package]] -name = "string_cache_codegen" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" -dependencies = [ - "phf_generator 0.13.1", - "phf_shared 0.13.1", - "proc-macro2", - "quote", -] - [[package]] name = "strsim" version = "0.11.1" @@ -4932,7 +4559,6 @@ dependencies = [ "symphonia-bundle-mp3", "symphonia-codec-aac", "symphonia-codec-adpcm", - "symphonia-codec-alac", "symphonia-codec-pcm", "symphonia-codec-vorbis", "symphonia-core", @@ -4942,17 +4568,6 @@ dependencies = [ "symphonia-metadata", ] -[[package]] -name = "symphonia-adapter-libopus" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d17450685dda0e87467eddf3e0f9c0b2a1707fc5c3234c111f70d46c6e4494" -dependencies = [ - "log", - "opusic-sys", - "symphonia-core", -] - [[package]] name = "symphonia-bundle-flac" version = "0.5.5" @@ -4998,16 +4613,6 @@ dependencies = [ "symphonia-core", ] -[[package]] -name = "symphonia-codec-alac" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8413fa754942ac16a73634c9dfd1500ed5c61430956b33728567f667fdd393ab" -dependencies = [ - "log", - "symphonia-core", -] - [[package]] name = "symphonia-codec-pcm" version = "0.5.5" @@ -5045,6 +4650,8 @@ dependencies = [ [[package]] name = "symphonia-format-isomp4" version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243739585d11f81daf8dac8d9f3d18cc7898f6c09a259675fc364b382c30e0a5" dependencies = [ "encoding_rs", "log", @@ -5142,14 +4749,24 @@ dependencies = [ ] [[package]] -name = "sysinfo" -version = "0.33.1" +name = "system-configuration" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags 2.11.0", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", - "windows 0.57.0", ] [[package]] @@ -5167,11 +4784,11 @@ dependencies = [ [[package]] name = "tao" -version = "0.34.8" +version = "0.34.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9103edf55f2da3c82aea4c7fab7c4241032bfeea0e71fa557d98e00e7ce7cc20" +checksum = "6e06d52c379e63da659a483a958110bbde891695a0ecb53e48cc7786d5eda7bb" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "block2", "core-foundation 0.10.1", "core-graphics 0.25.0", @@ -5328,7 +4945,7 @@ dependencies = [ "thiserror 2.0.18", "time", "url", - "uuid 1.23.1", + "uuid 1.22.0", "walkdir", ] @@ -5365,9 +4982,9 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fa4150c95ae391946cc8b8f905ab14797427caba3a8a2f79628e956da91809" +checksum = "9204b425d9be8d12aa60c2a83a289cf7d1caae40f57f336ed1155b3a5c0e359b" dependencies = [ "log", "raw-window-handle", @@ -5383,15 +5000,13 @@ dependencies = [ [[package]] name = "tauri-plugin-fs" -version = "2.5.0" +version = "2.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36e1ec28b79f3d0683f4507e1615c36292c0ea6716668770d4396b9b39871ed8" +checksum = "ed390cc669f937afeb8b28032ce837bac8ea023d975a2e207375ec05afaf1804" dependencies = [ "anyhow", "dunce", "glob", - "log", - "objc2-foundation", "percent-encoding", "schemars 0.8.22", "serde", @@ -5453,9 +5068,9 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.4.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33a5b7d78f0dec4406b003ea87c40bf928d801b6fd9323a556172c91d8712c1" +checksum = "dc61e4822b8f74d68278e09161d3e3fdd1b14b9eb781e24edccaabf10c420e8c" dependencies = [ "serde", "serde_json", @@ -5484,9 +5099,9 @@ dependencies = [ [[package]] name = "tauri-plugin-updater" -version = "2.10.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806d9dac662c2e4594ff03c647a552f2c9bd544e7d0f683ec58f872f952ce4af" +checksum = "3fe8e9bebd88fc222938ffdfbdcfa0307081423bd01e3252fc337d8bde81fc61" dependencies = [ "base64 0.22.1", "dirs", @@ -5521,7 +5136,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73736611e14142408d15353e21e3cca2f12a3cfb523ad0ce85999b6d2ef1a704" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "log", "serde", "serde_json", @@ -5593,7 +5208,7 @@ dependencies = [ "ctor", "dunce", "glob", - "html5ever 0.29.1", + "html5ever", "http", "infer", "json-patch", @@ -5615,7 +5230,7 @@ dependencies = [ "toml 0.9.12+spec-1.1.0", "url", "urlpattern", - "uuid 1.23.1", + "uuid 1.22.0", "walkdir", ] @@ -5632,11 +5247,11 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.27.0" +version = "3.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" dependencies = [ - "fastrand 2.4.1", + "fastrand 2.3.0", "getrandom 0.4.2", "once_cell", "rustix 1.1.4", @@ -5654,16 +5269,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "tendril" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4790fc369d5a530f4b544b094e31388b9b3a37c0f4652ade4505945f5660d24" -dependencies = [ - "new_debug_unreachable", - "utf-8", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -5704,25 +5309,11 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "thread-priority" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe075d7053dae61ac5413a34ea7d4913b6e6207844fd726bdd858b37ff72bf5" -dependencies = [ - "bitflags 2.11.1", - "cfg-if", - "libc", - "log", - "rustversion", - "winapi", -] - [[package]] name = "time" -version = "0.3.47" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" dependencies = [ "deranged", "itoa", @@ -5735,15 +5326,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" dependencies = [ "num-conv", "time-core", @@ -5751,34 +5342,19 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.52.1" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -5791,15 +5367,25 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", "syn 2.0.117", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.26.4" @@ -5841,9 +5427,9 @@ version = "0.9.12+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" dependencies = [ - "indexmap 2.14.0", + "indexmap 2.13.0", "serde_core", - "serde_spanned 1.1.1", + "serde_spanned 1.0.4", "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "toml_writer", @@ -5870,9 +5456,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.1+spec-1.1.0" +version = "1.0.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" dependencies = [ "serde_core", ] @@ -5883,7 +5469,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.14.0", + "indexmap 2.13.0", "toml_datetime 0.6.3", "winnow 0.5.40", ] @@ -5894,7 +5480,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.14.0", + "indexmap 2.13.0", "serde", "serde_spanned 0.6.9", "toml_datetime 0.6.3", @@ -5903,30 +5489,30 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.25.11+spec-1.1.0" +version = "0.25.4+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b59c4d22ed448339746c59b905d24568fcbb3ab65a500494f7b8c3e97739f2b" +checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" dependencies = [ - "indexmap 2.14.0", - "toml_datetime 1.1.1+spec-1.1.0", + "indexmap 2.13.0", + "toml_datetime 1.0.0+spec-1.1.0", "toml_parser", - "winnow 1.0.1", + "winnow 0.7.15", ] [[package]] name = "toml_parser" -version = "1.1.2+spec-1.1.0" +version = "1.0.9+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" dependencies = [ - "winnow 1.0.1", + "winnow 0.7.15", ] [[package]] name = "toml_writer" -version = "1.1.1+spec-1.1.0" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" +checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" [[package]] name = "tower" @@ -5949,7 +5535,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "bytes", "futures-util", "http", @@ -6040,15 +5626,15 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.20.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "uds_windows" -version = "1.2.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +checksum = "51b70b87d15e91f553711b40df3048faf27a7a04e01e0ddc0cf9309f0af7c2ca" dependencies = [ "memoffset 0.9.1", "tempfile", @@ -6110,9 +5696,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" @@ -6174,9 +5760,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.23.1" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -6261,11 +5847,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.3+wasi-0.2.9" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "wit-bindgen 0.57.1", + "wit-bindgen", ] [[package]] @@ -6274,14 +5860,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen 0.51.0", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.118" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -6292,19 +5878,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.68" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ + "cfg-if", + "futures-util", "js-sys", + "once_cell", "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.118" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6312,9 +5902,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.118" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -6325,9 +5915,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.118" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] @@ -6349,7 +5939,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", - "indexmap 2.14.0", + "indexmap 2.13.0", "wasm-encoder", "wasmparser", ] @@ -6386,44 +5976,22 @@ version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.11.1", + "bitflags 2.11.0", "hashbrown 0.15.5", - "indexmap 2.14.0", + "indexmap 2.13.0", "semver", ] [[package]] name = "web-sys" -version = "0.3.95" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web_atoms" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7cff6eef815df1834fd250e3a2ff436044d82a9f1bc1980ca1dbdf07effc538" -dependencies = [ - "phf 0.13.1", - "phf_codegen 0.13.1", - "string_cache 0.9.0", - "string_cache_codegen 0.6.1", -] - [[package]] name = "webkit2gtk" version = "2.0.2" @@ -6470,18 +6038,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c" -dependencies = [ - "rustls-pki-types", -] - -[[package]] -name = "webpki-roots" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d" +checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" dependencies = [ "rustls-pki-types", ] @@ -6496,8 +6055,8 @@ dependencies = [ "webview2-com-sys", "windows 0.61.3", "windows-core 0.61.2", - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", ] [[package]] @@ -6587,26 +6146,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" -dependencies = [ - "windows-core 0.57.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.61.3" @@ -6639,39 +6178,14 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" -dependencies = [ - "windows-implement 0.57.0", - "windows-interface 0.57.0", - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings 0.1.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.1.3", "windows-result 0.3.4", "windows-strings 0.4.2", @@ -6683,8 +6197,8 @@ version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", + "windows-implement", + "windows-interface", "windows-link 0.2.1", "windows-result 0.4.1", "windows-strings 0.5.1", @@ -6701,28 +6215,6 @@ dependencies = [ "windows-threading", ] -[[package]] -name = "windows-implement" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-implement" version = "0.60.2" @@ -6734,28 +6226,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "windows-interface" -version = "0.57.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "windows-interface" version = "0.59.3" @@ -6790,19 +6260,21 @@ dependencies = [ ] [[package]] -name = "windows-result" -version = "0.1.2" +name = "windows-registry" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-targets 0.52.6", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" dependencies = [ "windows-targets 0.52.6", ] @@ -6825,16 +6297,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -7186,15 +6648,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.55.0" @@ -7214,12 +6667,6 @@ dependencies = [ "wit-bindgen-rust-macro", ] -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - [[package]] name = "wit-bindgen-core" version = "0.51.0" @@ -7239,7 +6686,7 @@ checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" dependencies = [ "anyhow", "heck 0.5.0", - "indexmap 2.14.0", + "indexmap 2.13.0", "prettyplease", "syn 2.0.117", "wasm-metadata", @@ -7269,8 +6716,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.11.1", - "indexmap 2.14.0", + "bitflags 2.11.0", + "indexmap 2.13.0", "log", "serde", "serde_derive", @@ -7289,7 +6736,7 @@ checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" dependencies = [ "anyhow", "id-arena", - "indexmap 2.14.0", + "indexmap 2.13.0", "log", "semver", "serde", @@ -7301,29 +6748,30 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "wry" -version = "0.54.4" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a8135d8676225e5744de000d4dff5a082501bf7db6a1c1495034f8c314edbc" +checksum = "bb26159b420aa77684589a744ae9a9461a95395b848764ad12290a14d960a11a" dependencies = [ "base64 0.22.1", "block2", "cookie", "crossbeam-channel", "dirs", - "dom_query", "dpi", "dunce", "gdkx11", "gtk", + "html5ever", "http", "javascriptcore-rs", "jni", + "kuchikiki", "libc", "ndk 0.9.0", "objc2", @@ -7415,9 +6863,9 @@ checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -7426,9 +6874,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -7463,7 +6911,7 @@ dependencies = [ "nix", "once_cell", "ordered-stream", - "rand 0.8.6", + "rand 0.8.5", "serde", "serde_repr", "sha1", @@ -7504,7 +6952,7 @@ dependencies = [ "serde_repr", "tracing", "uds_windows", - "uuid 1.23.1", + "uuid 1.22.0", "windows-sys 0.61.2", "winnow 0.7.15", "zbus_macros 5.14.0", @@ -7565,18 +7013,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953" dependencies = [ "proc-macro2", "quote", @@ -7585,18 +7033,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", @@ -7612,9 +7060,9 @@ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -7623,9 +7071,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -7634,9 +7082,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", @@ -7651,7 +7099,7 @@ checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1" dependencies = [ "arbitrary", "crc32fast", - "indexmap 2.14.0", + "indexmap 2.13.0", "memchr", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 8a9517e5..d11b2623 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -66,7 +66,6 @@ windows = { version = "0.58", features = [ "Win32_Graphics", "Win32_Graphics_Gdi", "Win32_System_Com", - "Win32_System_Threading", "Win32_UI_Controls", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging", diff --git a/src-tauri/src/audio.rs b/src-tauri/src/audio.rs new file mode 100644 index 00000000..37ebb53c --- /dev/null +++ b/src-tauri/src/audio.rs @@ -0,0 +1,5446 @@ +use std::io::{Cursor, Read, Seek, SeekFrom}; +use std::sync::{Arc, Mutex, OnceLock, RwLock, TryLockError}; +use std::sync::atomic::{AtomicBool, AtomicU32, AtomicU64, AtomicUsize, Ordering}; +use std::time::{Duration, Instant}; +#[cfg(unix)] +use libc; + +use ringbuf::{HeapConsumer, HeapProducer, HeapRb}; + +use biquad::{Biquad, Coefficients, DirectForm2Transposed, ToHertz, Type as FilterType}; +use rodio::{Sink, Source}; +use rodio::source::UniformSourceIterator; +use serde::Serialize; +use symphonia::core::{ + audio::{AudioBufferRef, SampleBuffer, SignalSpec}, + codecs::{CodecRegistry, DecoderOptions, CODEC_TYPE_NULL}, + formats::{FormatOptions, FormatReader, SeekMode, SeekTo}, + io::{MediaSource, MediaSourceStream, MediaSourceStreamOptions}, + meta::MetadataOptions, + probe::Hint, + units::{self, Time}, +}; +use futures_util::StreamExt; +use tauri::{AppHandle, Emitter, Manager, State}; +#[derive(Clone, Serialize)] +#[serde(rename_all = "camelCase")] +struct PartialLoudnessPayload { + track_id: Option, + gain_db: f32, + target_lufs: f32, + is_partial: bool, +} + +#[derive(Clone, Serialize)] +#[serde(rename_all = "camelCase")] +struct NormalizationStatePayload { + engine: String, + current_gain_db: Option, + target_lufs: f32, +} + +/// Last `audio:normalization-state` emit, kept so we can suppress duplicate +/// payloads. The frontend already debounces this event, but on Windows +/// (WebView2) the IPC pipe is the bottleneck — every echo we skip here is +/// renderer-thread time we don't pay. +static LAST_NORM_STATE_EMIT: OnceLock>> = OnceLock::new(); + +fn norm_state_lock() -> &'static Mutex> { + LAST_NORM_STATE_EMIT.get_or_init(|| Mutex::new(None)) +} + +fn norm_state_changed(prev: &NormalizationStatePayload, next: &NormalizationStatePayload) -> bool { + if prev.engine != next.engine { return true; } + if (prev.target_lufs - next.target_lufs).abs() >= 0.02 { return true; } + match (prev.current_gain_db, next.current_gain_db) { + (None, None) => false, + (Some(a), Some(b)) => (a - b).abs() >= 0.05, + _ => true, // None ↔ Some transition is significant + } +} + +fn maybe_emit_normalization_state(app: &AppHandle, payload: NormalizationStatePayload) { + let mut guard = norm_state_lock().lock().unwrap(); + let should_emit = match guard.as_ref() { + Some(prev) => norm_state_changed(prev, &payload), + None => true, + }; + if !should_emit { return; } + *guard = Some(payload.clone()); + drop(guard); + let _ = app.emit("audio:normalization-state", payload); +} + +/// Last `analysis:loudness-partial` gain emitted per track-identity, used to +/// suppress emits whose gain hasn't moved meaningfully (≥ 0.1 dB). The partial +/// heuristic in `emit_partial_loudness_from_bytes` and the ranged-progress curve +/// both produce values that drift by hundredths of a dB even on identical input, +/// so the time-based throttle alone is not enough to keep the loop quiet. +static LAST_PARTIAL_LOUDNESS_EMIT: OnceLock>> = OnceLock::new(); +const PARTIAL_LOUDNESS_DELTA_THRESHOLD_DB: f32 = 0.1; + +fn partial_loudness_should_emit(track_key: &str, gain_db: f32) -> bool { + let mut guard = LAST_PARTIAL_LOUDNESS_EMIT + .get_or_init(|| Mutex::new(std::collections::HashMap::new())) + .lock() + .unwrap(); + let prev = guard.get(track_key).copied(); + if let Some(p) = prev { + if (p - gain_db).abs() < PARTIAL_LOUDNESS_DELTA_THRESHOLD_DB { + return false; + } + } + guard.insert(track_key.to_string(), gain_db); + true +} + + +// ─── 10-Band Graphic Equalizer ──────────────────────────────────────────────── + +const EQ_BANDS_HZ: [f32; 10] = [31.0, 62.0, 125.0, 250.0, 500.0, 1000.0, 2000.0, 4000.0, 8000.0, 16000.0]; +const EQ_Q: f32 = 1.41; +const EQ_CHECK_INTERVAL: usize = 1024; + +struct EqSource> { + inner: S, + sample_rate: u32, + channels: u16, + gains: Arc<[AtomicU32; 10]>, + enabled: Arc, + pre_gain: Arc, + filters: [[DirectForm2Transposed; 2]; 10], + current_gains: [f32; 10], + sample_counter: usize, + channel_idx: usize, +} + +impl> EqSource { + fn new(inner: S, gains: Arc<[AtomicU32; 10]>, enabled: Arc, pre_gain: Arc) -> Self { + let sample_rate = inner.sample_rate(); + let channels = inner.channels(); + let filters = std::array::from_fn(|band| { + let freq = EQ_BANDS_HZ[band].clamp(20.0, (sample_rate as f32 / 2.0) - 100.0); + std::array::from_fn(|_| { + let coeffs = Coefficients::::from_params( + FilterType::PeakingEQ(0.0), + (sample_rate as f32).hz(), + freq.hz(), + EQ_Q, + ).unwrap_or_else(|_| Coefficients::::from_params( + FilterType::PeakingEQ(0.0), + (sample_rate as f32).hz(), + 1000.0f32.hz(), + EQ_Q, + ).unwrap()); + DirectForm2Transposed::::new(coeffs) + }) + }); + Self { + inner, sample_rate, channels, gains, enabled, pre_gain, + filters, + current_gains: [0.0; 10], + sample_counter: 0, + channel_idx: 0, + } + } + + fn refresh_if_needed(&mut self) { + for band in 0..10 { + let gain_db = f32::from_bits(self.gains[band].load(Ordering::Relaxed)); + if (gain_db - self.current_gains[band]).abs() > 0.01 { + self.current_gains[band] = gain_db; + let freq = EQ_BANDS_HZ[band].clamp(20.0, (self.sample_rate as f32 / 2.0) - 100.0); + if let Ok(coeffs) = Coefficients::::from_params( + FilterType::PeakingEQ(gain_db), + (self.sample_rate as f32).hz(), + freq.hz(), + EQ_Q, + ) { + for ch in 0..2 { + self.filters[band][ch].update_coefficients(coeffs); + } + } + } + } + } +} + +impl> Iterator for EqSource { + type Item = f32; + + fn next(&mut self) -> Option { + let sample = self.inner.next()?; + + if self.sample_counter % EQ_CHECK_INTERVAL == 0 { + self.refresh_if_needed(); + } + self.sample_counter = self.sample_counter.wrapping_add(1); + + if !self.enabled.load(Ordering::Relaxed) { + self.channel_idx = (self.channel_idx + 1) % self.channels as usize; + return Some(sample); + } + + let ch = self.channel_idx.min(1); + self.channel_idx = (self.channel_idx + 1) % self.channels as usize; + + let pre_gain_db = f32::from_bits(self.pre_gain.load(Ordering::Relaxed)); + let pre_gain_factor = 10_f32.powf(pre_gain_db / 20.0); + let mut s = sample * pre_gain_factor; + for band in 0..10 { + s = self.filters[band][ch].run(s); + } + Some(s.clamp(-1.0, 1.0)) + } +} + +impl> Source for EqSource { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.channels } + fn sample_rate(&self) -> u32 { self.sample_rate } + fn total_duration(&self) -> Option { self.inner.total_duration() } + + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + // Reset biquad filter state to avoid glitches after seek. + for band in 0..10 { + let gain_db = f32::from_bits(self.gains[band].load(Ordering::Relaxed)); + self.current_gains[band] = gain_db; + let freq = EQ_BANDS_HZ[band].clamp(20.0, (self.sample_rate as f32 / 2.0) - 100.0); + if let Ok(coeffs) = Coefficients::::from_params( + FilterType::PeakingEQ(gain_db), + (self.sample_rate as f32).hz(), + freq.hz(), + EQ_Q, + ) { + for ch in 0..2 { + self.filters[band][ch] = DirectForm2Transposed::::new(coeffs); + } + } + } + self.channel_idx = 0; + self.sample_counter = 0; + self.inner.try_seek(pos) + } +} + +// ─── DynSource — type-erased Source wrapper ─────────────────────────────────── +// +// Allows chaining differently-typed sources (with trimming applied) into a +// single concrete type accepted by EqSource>. + +struct DynSource { + inner: Box + Send>, + channels: u16, + sample_rate: u32, +} + +impl DynSource { + fn new(src: impl Source + Send + 'static) -> Self { + let channels = src.channels(); + let sample_rate = src.sample_rate(); + Self { inner: Box::new(src), channels, sample_rate } + } +} + +impl Iterator for DynSource { + type Item = f32; + fn next(&mut self) -> Option { self.inner.next() } +} + +impl Source for DynSource { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.channels } + fn sample_rate(&self) -> u32 { self.sample_rate } + fn total_duration(&self) -> Option { self.inner.total_duration() } + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + self.inner.try_seek(pos) + } +} + +// ─── EqualPowerFadeIn — per-sample sin(t·π/2) fade-in envelope ─────────────── +// +// Applied to every new track: +// • Crossfade: fade_dur = crossfade_secs → symmetric equal-power fade-in +// • Hard cut: fade_dur = 5 ms → micro-fade eliminates DC-click +// • Gapless: fade_dur = 0 → unity gain (no modification) +// +// gain(t) = sin(t · π/2), t ∈ [0, 1) +// At t = 0 gain = 0, at t = 1 gain = 1. +// Equal-power property: cos²+sin² = 1 → combined with cos fade-out on Track A +// the total perceived loudness stays constant across the crossfade. + +struct EqualPowerFadeIn> { + inner: S, + sample_count: u64, + fade_samples: u64, +} + +impl> EqualPowerFadeIn { + fn new(inner: S, fade_dur: Duration) -> Self { + let sample_rate = inner.sample_rate(); + let channels = inner.channels() as u64; + let fade_samples = if fade_dur.is_zero() { + 0 + } else { + (fade_dur.as_secs_f64() * sample_rate as f64 * channels as f64) as u64 + }; + Self { inner, sample_count: 0, fade_samples } + } +} + +impl> Iterator for EqualPowerFadeIn { + type Item = f32; + fn next(&mut self) -> Option { + let sample = self.inner.next()?; + let gain = if self.fade_samples == 0 || self.sample_count >= self.fade_samples { + 1.0 + } else { + let t = self.sample_count as f32 / self.fade_samples as f32; + (t * std::f32::consts::FRAC_PI_2).sin() + }; + self.sample_count += 1; + Some((sample * gain).clamp(-1.0, 1.0)) + } +} + +impl> Source for EqualPowerFadeIn { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.inner.channels() } + fn sample_rate(&self) -> u32 { self.inner.sample_rate() } + fn total_duration(&self) -> Option { self.inner.total_duration() } + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + // For mid-track seeks: skip straight to unity gain so the new position + // plays at full volume immediately — no audible fade-in glitch. + // For seeks to the very start (< 100 ms): keep the micro-fade to + // suppress any DC-offset click from the fresh decode. + if pos.as_millis() < 100 { + self.sample_count = 0; + } else { + self.sample_count = self.fade_samples; + } + self.inner.try_seek(pos) + } +} + +// ─── TriggeredFadeOut — sample-level cos(t·π/2) fade-out triggered externally ─ +// +// Every track source is wrapped with this. It passes through at unity gain +// until `trigger` is set to true, at which point it reads `fade_total_samples` +// and applies a cos(t·π/2) envelope: +// gain(t) = cos(t · π/2), t ∈ [0, 1] +// At t = 0 gain = 1, at t = 1 gain = 0. +// After the fade completes, returns None to exhaust the source. +// +// Combined with EqualPowerFadeIn (sin curve) on Track B, this gives a +// symmetric constant-power crossfade: sin²+cos² = 1. + +struct TriggeredFadeOut> { + inner: S, + trigger: Arc, + fade_total_samples: Arc, + fade_progress: u64, + fading: bool, + cached_total: u64, +} + +impl> TriggeredFadeOut { + fn new(inner: S, trigger: Arc, fade_total_samples: Arc) -> Self { + Self { + inner, + trigger, + fade_total_samples, + fade_progress: 0, + fading: false, + cached_total: 0, + } + } +} + +impl> Iterator for TriggeredFadeOut { + type Item = f32; + fn next(&mut self) -> Option { + // Check trigger on first fade sample only (avoid atomic load per sample). + if !self.fading && self.trigger.load(Ordering::Relaxed) { + self.fading = true; + self.cached_total = self.fade_total_samples.load(Ordering::Relaxed).max(1); + self.fade_progress = 0; + } + + if self.fading { + if self.fade_progress >= self.cached_total { + // Fade complete — exhaust the source. + return None; + } + let sample = self.inner.next()?; + let t = self.fade_progress as f32 / self.cached_total as f32; + let gain = (t * std::f32::consts::FRAC_PI_2).cos(); + self.fade_progress += 1; + Some((sample * gain).clamp(-1.0, 1.0)) + } else { + self.inner.next() + } + } +} + +impl> Source for TriggeredFadeOut { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.inner.channels() } + fn sample_rate(&self) -> u32 { self.inner.sample_rate() } + fn total_duration(&self) -> Option { self.inner.total_duration() } + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + // If we seek back during a fade, cancel the fade. + if self.fading { + self.fading = false; + self.trigger.store(false, Ordering::Relaxed); + } + self.fade_progress = 0; + self.inner.try_seek(pos) + } +} + +// ─── NotifyingSource — sets a flag when the inner iterator is exhausted ─────── +// +// This is the key mechanism for gapless: the progress task polls `done` to know +// exactly when source N has finished inside the Sink, without relying on +// wall-clock estimation or the unreliable `Sink::empty()`. + +struct NotifyingSource> { + inner: S, + done: Arc, + signalled: bool, +} + +impl> NotifyingSource { + fn new(inner: S, done: Arc) -> Self { + Self { inner, done, signalled: false } + } +} + +impl> Iterator for NotifyingSource { + type Item = f32; + fn next(&mut self) -> Option { + let sample = self.inner.next(); + if sample.is_none() && !self.signalled { + self.signalled = true; + self.done.store(true, Ordering::SeqCst); + } + sample + } +} + +impl> Source for NotifyingSource { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.inner.channels() } + fn sample_rate(&self) -> u32 { self.inner.sample_rate() } + fn total_duration(&self) -> Option { self.inner.total_duration() } + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + // If we seek backwards the source is no longer exhausted. + self.signalled = false; + self.done.store(false, Ordering::SeqCst); + self.inner.try_seek(pos) + } +} + +// ─── CountingSource — atomic sample counter for drift-free position tracking ─ +// +// Wraps the outermost source and increments a shared AtomicU64 on every sample. +// The progress task reads this counter and divides by (sample_rate * channels) +// to get the exact playback position — no wall-clock drift. + +struct CountingSource> { + inner: S, + counter: Arc, +} + +impl> CountingSource { + fn new(inner: S, counter: Arc) -> Self { + Self { inner, counter } + } +} + +impl> Iterator for CountingSource { + type Item = f32; + fn next(&mut self) -> Option { + let sample = self.inner.next(); + if sample.is_some() { + self.counter.fetch_add(1, Ordering::Relaxed); + } + sample + } +} + +impl> Source for CountingSource { + fn current_frame_len(&self) -> Option { self.inner.current_frame_len() } + fn channels(&self) -> u16 { self.inner.channels() } + fn sample_rate(&self) -> u32 { self.inner.sample_rate() } + fn total_duration(&self) -> Option { self.inner.total_duration() } + fn try_seek(&mut self, pos: Duration) -> Result<(), rodio::source::SeekError> { + // Reset counter only after confirming the inner seek succeeded. + // If we reset first and the seek fails, the counter ends up at the + // new position while the decoder is still at the old one — causing + // a permanent desync between displayed time and actual audio. + let result = self.inner.try_seek(pos); + if result.is_ok() { + let samples = (pos.as_secs_f64() * self.inner.sample_rate() as f64 + * self.inner.channels() as f64) as u64; + self.counter.store(samples, Ordering::Relaxed); + } + result + } +} + +// ─── Internet Radio v2 — Lock-Free SPSC + ICY Metadata + Hybrid Pause ──────── +// +// HTTP task (tokio) +// └─[IcyInterceptor]─► HeapProducer +// │ (4 MB HeapRb, lock-free) +// HeapConsumer +// │ +// AudioStreamReader (Read + Seek + MediaSource) +// │ +// SizedDecoder (symphonia) +// │ +// rodio Sink +// +// Pause modes: +// Logical pause — sink.pause(); download task keeps filling (time-shift). +// Hard pause — buffer ≥ RADIO_HARD_PAUSE_THRESH full + paused ≥ 5 s +// → TCP disconnect, is_hard_paused = true. +// Resume (warm) — sink.play(); buffer drains seamlessly. +// Resume (cold) — new HeapRb + new GET; consumer swapped in AudioStreamReader. +// +// New Tauri event: "radio:metadata" → String (ICY StreamTitle) + +/// 256 KB on the heap — ≈16 s at 128 kbps, ≈6 s at 320 kbps. +/// Small enough that stale audio drains within a few seconds on reconnect; +/// large enough to absorb brief network hiccups without stuttering. +const RADIO_BUF_CAPACITY: usize = 256 * 1024; +/// Minimum ring buffer for on-demand track streaming starts. +const TRACK_STREAM_MIN_BUF_CAPACITY: usize = 1024 * 1024; +/// Cap ring buffer growth when content-length is known. +const TRACK_STREAM_MAX_BUF_CAPACITY: usize = 32 * 1024 * 1024; +/// Max bytes kept in memory to promote a completed streamed track for fast replay/seek recovery. +const TRACK_STREAM_PROMOTE_MAX_BYTES: usize = 64 * 1024 * 1024; +/// Hot/offline `psysonic-local://` files are read from disk for waveform/LUFS seeding — not the +/// same heap pressure as retaining a full HTTP capture. FLAC/DSD tracks often exceed 64 MiB; +/// using the stream-promote cap here skipped analysis entirely (empty seekbar). +const LOCAL_FILE_PLAYBACK_SEED_MAX_BYTES: usize = 512 * 1024 * 1024; +/// Consecutive body-stream failures tolerated for track streaming before abort. +const TRACK_STREAM_MAX_RECONNECTS: u32 = 3; +/// Seconds at stall threshold while paused before hard-disconnect. +const RADIO_HARD_PAUSE_SECS: u64 = 5; +/// AudioStreamReader timeout: if no audio bytes arrive for this long → EOF. +const RADIO_READ_TIMEOUT_SECS: u64 = 15; +/// Sleep interval when ring buffer is empty (prevents CPU spin). +const RADIO_YIELD_MS: u64 = 2; + +// ── ICY Metadata State Machine ──────────────────────────────────────────────── +// +// Shoutcast/Icecast embed metadata every `metaint` audio bytes: +// +// ┌──────────────────────┬───┬─────────────┐ +// │ audio × metaint │ N │ meta × N×16 │ (repeating) +// └──────────────────────┴───┴─────────────┘ +// +// N = 0 → no metadata this block. Metadata bytes are stripped so only +// pure audio reaches the ring buffer and Symphonia never sees text bytes. + +enum IcyState { + /// Forwarding audio bytes; `remaining` counts down to the next boundary. + ReadingAudio { remaining: usize }, + /// Next byte is the metadata length multiplier N. + ReadingLengthByte, + /// Accumulating N×16 metadata bytes. + ReadingMetadata { remaining: usize, buf: Vec }, +} + +struct IcyInterceptor { + state: IcyState, + metaint: usize, +} + +impl IcyInterceptor { + fn new(metaint: usize) -> Self { + Self { metaint, state: IcyState::ReadingAudio { remaining: metaint } } + } + + /// Feed a raw HTTP chunk. + /// Appends only audio bytes to `audio_out`. + /// Returns `Some(IcyMeta)` when a StreamTitle is extracted. + fn process(&mut self, input: &[u8], audio_out: &mut Vec) -> Option { + let mut extracted: Option = None; + let mut i = 0; + while i < input.len() { + match &mut self.state { + IcyState::ReadingAudio { remaining } => { + let n = (input.len() - i).min(*remaining); + audio_out.extend_from_slice(&input[i..i + n]); + i += n; + *remaining -= n; + if *remaining == 0 { + self.state = IcyState::ReadingLengthByte; + } + } + IcyState::ReadingLengthByte => { + let len_n = input[i] as usize; + i += 1; + self.state = if len_n == 0 { + IcyState::ReadingAudio { remaining: self.metaint } + } else { + IcyState::ReadingMetadata { + remaining: len_n * 16, + buf: Vec::with_capacity(len_n * 16), + } + }; + } + IcyState::ReadingMetadata { remaining, buf } => { + let n = (input.len() - i).min(*remaining); + buf.extend_from_slice(&input[i..i + n]); + i += n; + *remaining -= n; + if *remaining == 0 { + let bytes = std::mem::take(buf); + extracted = parse_icy_meta(&bytes); + self.state = IcyState::ReadingAudio { remaining: self.metaint }; + } + } + } + } + extracted + } +} + +/// ICY metadata parsed from a raw metadata block. +#[derive(serde::Serialize, Clone)] +pub(crate) struct IcyMeta { + pub title: String, + /// `true` when `StreamUrl='0'` — indicates a CDN-injected ad/promo. + pub is_ad: bool, +} + +/// Extract `StreamTitle` and `StreamUrl` from a raw ICY metadata block. +/// Tolerates null padding and non-UTF-8 bytes (lossy conversion). +fn parse_icy_meta(raw: &[u8]) -> Option { + let s = String::from_utf8_lossy(raw); + let s = s.trim_end_matches('\0'); + + const TITLE_TAG: &str = "StreamTitle='"; + let title_start = s.find(TITLE_TAG)? + TITLE_TAG.len(); + let title_rest = &s[title_start..]; + // find (not rfind) — rfind would skip past StreamUrl and corrupt the title + let title_end = title_rest.find("';")?; + let title = title_rest[..title_end].trim().to_string(); + if title.is_empty() { + return None; + } + + const URL_TAG: &str = "StreamUrl='"; + let stream_url = s.find(URL_TAG).map(|pos| { + let rest = &s[pos + URL_TAG.len()..]; + let end = rest.find("';").unwrap_or(rest.len()); + rest[..end].trim().to_string() + }).unwrap_or_default(); + + Some(IcyMeta { title, is_ad: stream_url == "0" }) +} + +// ── AudioStreamReader — SPSC consumer → std::io::Read ──────────────────────── +// +// Bridges HeapConsumer (non-blocking) into the synchronous Read interface +// that Symphonia requires. Designed to run inside tokio::task::spawn_blocking. +// +// Empty buffer: sleeps RADIO_YIELD_MS ms, retries. Never busy-spins. +// Timeout: after RADIO_READ_TIMEOUT_SECS with no data → TimedOut. +// Generation: if gen_arc != self.gen → Ok(0) (EOF; new track started). +// Reconnect: audio_resume sends a fresh HeapConsumer via new_cons_rx. +// On the next read() we drain the channel (keep latest) and swap. + +struct AudioStreamReader { + cons: HeapConsumer, + /// Delivers fresh consumers on hard-pause reconnect (unbounded; drain to latest). + /// Wrapped in Mutex so AudioStreamReader is Sync (required by symphonia::MediaSource). + /// No real contention: only the audio thread ever calls read(). + new_cons_rx: Mutex>>, + deadline: std::time::Instant, + gen_arc: Arc, + gen: u64, + /// Diagnostic tag for logs ("radio" or "track-stream"). + source_tag: &'static str, + /// Optional completion marker: when true and the ring buffer is empty, + /// return EOF immediately (used by one-shot track streaming). + eof_when_empty: Option>, + /// Monotonic byte offset for SeekFrom::Current(0) "tell" (Symphonia probe). + pos: u64, +} + +impl Read for AudioStreamReader { + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + // EOF guard: new track started. + if self.gen_arc.load(Ordering::SeqCst) != self.gen { + return Ok(0); + } + // Drain reconnect channel; keep only the most recently delivered consumer + // so a double-tap of resume doesn't leave stale data in place. + let mut newest: Option> = None; + while let Ok(c) = self.new_cons_rx.lock().unwrap().try_recv() { + newest = Some(c); + } + if let Some(c) = newest { + self.cons = c; + self.deadline = + std::time::Instant::now() + Duration::from_secs(RADIO_READ_TIMEOUT_SECS); + } + loop { + if self.gen_arc.load(Ordering::SeqCst) != self.gen { + return Ok(0); + } + let available = self.cons.len(); + if available > 0 { + let n = buf.len().min(available); + let read = self.cons.pop_slice(&mut buf[..n]); + self.pos += read as u64; + // Reset deadline: data arrived, so connection is alive. + self.deadline = + std::time::Instant::now() + Duration::from_secs(RADIO_READ_TIMEOUT_SECS); + return Ok(read); + } + if self + .eof_when_empty + .as_ref() + .is_some_and(|done| done.load(Ordering::SeqCst)) + { + return Ok(0); + } + if std::time::Instant::now() >= self.deadline { + crate::app_eprintln!( + "[{}] AudioStreamReader: {}s without data → EOF", + self.source_tag, + RADIO_READ_TIMEOUT_SECS + ); + return Err(std::io::Error::new( + std::io::ErrorKind::TimedOut, + format!("{}: no data received", self.source_tag), + )); + } + std::thread::sleep(Duration::from_millis(RADIO_YIELD_MS)); + } + } +} + +impl Seek for AudioStreamReader { + fn seek(&mut self, pos: SeekFrom) -> std::io::Result { + match pos { + SeekFrom::Current(0) => Ok(self.pos), + _ => Err(std::io::Error::new( + std::io::ErrorKind::Unsupported, + format!("{} stream is not seekable", self.source_tag), + )), + } + } +} + +impl MediaSource for AudioStreamReader { + fn is_seekable(&self) -> bool { false } + fn byte_len(&self) -> Option { None } +} + +// ── RangedHttpSource — seekable HTTP-backed MediaSource ────────────────────── +// +// Pre-allocates a Vec of total track size. A background task fills it +// linearly from offset 0 via streaming HTTP. Read blocks (with timeout) until +// requested bytes are downloaded; Seek only updates the cursor. +// +// Reports is_seekable=true so Symphonia performs time-based seeks via the +// format reader. Backward seeks: instant (data in buffer). Forward seeks +// beyond downloaded_to: Read blocks until the linear download catches up. +// +// Requires server to have responded with both Content-Length and +// `Accept-Ranges: bytes` so reconnects can resume via HTTP Range. + +struct RangedHttpSource { + /// Pre-allocated buffer of total size. Filled linearly from offset 0. + buf: Arc>>, + /// Bytes contiguously downloaded from offset 0. + downloaded_to: Arc, + total_size: u64, + pos: u64, + /// Set when the download task terminates (success or hard error). + done: Arc, + gen_arc: Arc, + gen: u64, +} + +impl Read for RangedHttpSource { + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + if self.gen_arc.load(Ordering::SeqCst) != self.gen { + return Ok(0); + } + if self.pos >= self.total_size { + return Ok(0); + } + let max_read = ((self.total_size - self.pos) as usize).min(buf.len()); + if max_read == 0 { + return Ok(0); + } + let target_end = self.pos + max_read as u64; + + let deadline = Instant::now() + Duration::from_secs(RADIO_READ_TIMEOUT_SECS); + loop { + if self.gen_arc.load(Ordering::SeqCst) != self.gen { + return Ok(0); + } + let dl = self.downloaded_to.load(Ordering::SeqCst) as u64; + if dl >= target_end { + break; + } + // Download finished but our cursor is past downloaded_to (e.g. seek + // beyond a partial download that aborted). Return what we have. + if self.done.load(Ordering::SeqCst) { + if dl > self.pos { + let avail = (dl - self.pos) as usize; + let src = self.buf.lock().unwrap(); + let start = self.pos as usize; + buf[..avail].copy_from_slice(&src[start..start + avail]); + drop(src); + self.pos += avail as u64; + return Ok(avail); + } + return Ok(0); + } + if Instant::now() >= deadline { + return Err(std::io::Error::new( + std::io::ErrorKind::TimedOut, + "ranged-http: no data within timeout", + )); + } + std::thread::sleep(Duration::from_millis(RADIO_YIELD_MS)); + } + + let src = self.buf.lock().unwrap(); + let start = self.pos as usize; + let end = start + max_read; + buf[..max_read].copy_from_slice(&src[start..end]); + drop(src); + self.pos += max_read as u64; + Ok(max_read) + } +} + +impl Seek for RangedHttpSource { + fn seek(&mut self, pos: SeekFrom) -> std::io::Result { + let new_pos: i64 = match pos { + SeekFrom::Start(p) => p as i64, + SeekFrom::Current(p) => self.pos as i64 + p, + SeekFrom::End(p) => self.total_size as i64 + p, + }; + if new_pos < 0 { + return Err(std::io::Error::new( + std::io::ErrorKind::InvalidInput, + "ranged-http: seek before start", + )); + } + self.pos = (new_pos as u64).min(self.total_size); + Ok(self.pos) + } +} + +impl MediaSource for RangedHttpSource { + fn is_seekable(&self) -> bool { true } + fn byte_len(&self) -> Option { Some(self.total_size) } +} + +// ── LocalFileSource — seekable file-backed MediaSource ─────────────────────── +// +// Wraps `std::fs::File` so the decoder reads on-demand from disk instead of +// pre-loading the whole file into a Vec. Used for `psysonic-local://` URLs +// (offline library + hot playback cache hits) — gives instant track-start +// because Symphonia only needs to read ~64 KB during probe before playback +// can begin, vs the previous behaviour of `tokio::fs::read` which blocked +// until the entire file (often 100+ MB for hi-res FLAC) was in RAM. + +struct LocalFileSource { + file: std::fs::File, + len: u64, +} + +impl Read for LocalFileSource { + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + self.file.read(buf) + } +} + +impl Seek for LocalFileSource { + fn seek(&mut self, pos: SeekFrom) -> std::io::Result { + self.file.seek(pos) + } +} + +impl MediaSource for LocalFileSource { + fn is_seekable(&self) -> bool { true } + fn byte_len(&self) -> Option { Some(self.len) } +} + +// ── Pause / Reconnect Coordination ─────────────────────────────────────────── + +pub(crate) struct RadioSharedFlags { + /// Set by audio_pause; cleared by audio_resume. + is_paused: AtomicBool, + /// Set by download task on hard disconnect; cleared on resume-reconnect. + is_hard_paused: AtomicBool, + /// Delivers a fresh HeapConsumer to AudioStreamReader on reconnect. + new_cons_tx: Mutex>>, +} + +/// Live state for the current radio session, stored in AudioEngine. +/// Dropping this struct aborts the HTTP download task immediately. +pub(crate) struct RadioLiveState { + pub url: String, + pub gen: u64, + pub task: tokio::task::JoinHandle<()>, + pub flags: Arc, +} + +impl Drop for RadioLiveState { + fn drop(&mut self) { self.task.abort(); } +} + +// ── HE-AAC / FDK-AAC Fallback ──────────────────────────────────────────────── +// +// Symphonia 0.5.x: AAC-LC only. HE-AAC (AAC+) and HE-AACv2 lack SBR/PS → +// streams play at half speed with muffled audio. +// +// With Cargo feature "fdk-aac": FdkAacDecoder is tried first for CODEC_TYPE_AAC. +// Enable in Cargo.toml: +// symphonia-adapter-fdk-aac = { version = "0.1", optional = true } +// [features] +// fdk-aac = ["dep:symphonia-adapter-fdk-aac"] + +/// Symphonia’s default codec set for our enabled features, plus Opus via libopus. +fn psysonic_codec_registry() -> &'static CodecRegistry { + static REGISTRY: OnceLock = OnceLock::new(); + REGISTRY.get_or_init(|| { + let mut registry = CodecRegistry::new(); + symphonia::default::register_enabled_codecs(&mut registry); + registry.register_all::(); + registry + }) +} + +fn try_make_radio_decoder( + params: &symphonia::core::codecs::CodecParameters, + opts: &DecoderOptions, +) -> Result, symphonia::core::errors::Error> { + psysonic_codec_registry().make(params, opts) +} + +// ── Async HTTP Download Task ────────────────────────────────────────────────── +// +// Lifecycle: +// 'outer loop — reconnect on TCP drop (up to MAX_RECONNECTS) +// 'inner loop — read HTTP chunks → ICY interceptor → push audio to ring buffer +// +// Hard-pause detection: if push_slice() returns 0 (buffer full) AND sink is +// paused AND that condition persists for RADIO_HARD_PAUSE_SECS → disconnect. +// Sets is_hard_paused = true so audio_resume knows it must reconnect. + +async fn radio_download_task( + gen: u64, + gen_arc: Arc, + mut initial_response: Option, + http_client: reqwest::Client, + url: String, + mut prod: HeapProducer, + flags: Arc, + app: AppHandle, +) { + let mut bytes_total: u64 = 0; + // Counts consecutive failures (reset on each successful chunk). + // laut.fm and similar CDNs force-reconnect every ~700 KB; this is normal. + let mut reconnect_count: u32 = 0; + const MAX_CONSECUTIVE_FAILURES: u32 = 5; + let mut audio_scratch: Vec = Vec::with_capacity(65_536); + + 'outer: loop { + if gen_arc.load(Ordering::SeqCst) != gen { return; } + + // ── Obtain response (initial or reconnect) ──────────────────────────── + let response = match initial_response.take() { + Some(r) => r, + None => { + if reconnect_count >= MAX_CONSECUTIVE_FAILURES { + crate::app_eprintln!("[radio] {MAX_CONSECUTIVE_FAILURES} consecutive failures — giving up"); + break 'outer; + } + tokio::time::sleep(Duration::from_millis(500)).await; + if gen_arc.load(Ordering::SeqCst) != gen { return; } + match http_client + .get(&url) + .header("Icy-MetaData", "1") + .send() + .await + { + Ok(r) if r.status().is_success() => { + crate::app_eprintln!("[radio] reconnected ({bytes_total} B so far)"); + r + } + Ok(r) => { + crate::app_eprintln!("[radio] reconnect: HTTP {} — giving up", r.status()); + break 'outer; + } + Err(e) => { + crate::app_eprintln!("[radio] reconnect error: {e} — giving up"); + break 'outer; + } + } + } + }; + + // Parse ICY metaint from each response (consistent across reconnects). + let metaint: Option = response + .headers() + .get("icy-metaint") + .and_then(|v| v.to_str().ok()) + .and_then(|s| s.parse().ok()); + let mut icy = metaint.map(IcyInterceptor::new); + + let mut byte_stream = response.bytes_stream(); + // Stall timer: tracks how long push_slice() returns 0 while paused. + let mut stall_since: Option = None; + + 'inner: loop { + if gen_arc.load(Ordering::SeqCst) != gen { return; } + + // ── Back-pressure + hard-pause detection ────────────────────────── + if prod.is_full() { + if flags.is_paused.load(Ordering::Relaxed) { + let since = stall_since.get_or_insert(std::time::Instant::now()); + if since.elapsed() >= Duration::from_secs(RADIO_HARD_PAUSE_SECS) { + let fill_pct = ((1.0 + - prod.free_len() as f32 / RADIO_BUF_CAPACITY as f32) + * 100.0) as u32; + crate::app_eprintln!( + "[radio] hard pause: {fill_pct}% full, \ + paused >{RADIO_HARD_PAUSE_SECS}s → disconnecting" + ); + flags.is_hard_paused.store(true, Ordering::Release); + return; // Drop HeapProducer → TCP connection released. + } + } else { + stall_since = None; + } + tokio::time::sleep(Duration::from_millis(50)).await; + continue 'inner; + } + stall_since = None; + + // ── Read HTTP chunk ─────────────────────────────────────────────── + match byte_stream.next().await { + Some(Ok(chunk)) => { + bytes_total += chunk.len() as u64; + // Successful data → reset consecutive-failure counter. + reconnect_count = 0; + audio_scratch.clear(); + + if let Some(ref mut interceptor) = icy { + if let Some(meta) = interceptor.process(&chunk, &mut audio_scratch) { + let label = if meta.is_ad { "[Ad]" } else { "" }; + crate::app_eprintln!("[radio] ICY StreamTitle: {}{}", label, meta.title); + let _ = app.emit("radio:metadata", &meta); + } + } else { + audio_scratch.extend_from_slice(&chunk); + } + + // Push with per-chunk back-pressure: yield 5 ms if full mid-chunk. + let mut offset = 0; + while offset < audio_scratch.len() { + if gen_arc.load(Ordering::SeqCst) != gen { return; } + let pushed = prod.push_slice(&audio_scratch[offset..]); + if pushed == 0 { + tokio::time::sleep(Duration::from_millis(5)).await; + } else { + offset += pushed; + } + } + } + Some(Err(e)) => { + reconnect_count += 1; + crate::app_eprintln!("[radio] stream error: {e} → reconnecting (consecutive #{reconnect_count})"); + break 'inner; + } + None => { + reconnect_count += 1; + crate::app_eprintln!("[radio] stream ended cleanly → reconnecting (consecutive #{reconnect_count})"); + break 'inner; + } + } + } // 'inner + + // Do NOT swap the ring buffer here. The remaining bytes in the buffer + // are still valid audio and will drain naturally during reconnect. + // Clearing it would cause an immediate underrun/glitch. + // The buffer is kept small (RADIO_BUF_CAPACITY) so stale audio drains + // within a few seconds rather than minutes. + } // 'outer + + crate::app_eprintln!("[radio] download task done ({bytes_total} B total)"); +} + +/// One-shot HTTP downloader for track streaming starts. +/// +/// Pushes response chunks into an SPSC ring buffer consumed by `AudioStreamReader`. +/// Terminates when: +/// - generation changes (track superseded), +/// - response stream ends, or +/// - response emits an error. +async fn track_download_task( + gen: u64, + gen_arc: Arc, + http_client: reqwest::Client, + app: AppHandle, + url: String, + initial_response: reqwest::Response, + mut prod: HeapProducer, + done: Arc, + promote_cache_slot: Arc>>, + normalization_engine: Arc, + normalization_target_lufs: Arc, + loudness_pre_analysis_attenuation_db: Arc, + cache_track_id: Option, +) { + let mut downloaded: u64 = 0; + let mut reconnects: u32 = 0; + let mut next_response: Option = Some(initial_response); + let mut capture: Vec = Vec::new(); + let mut capture_over_limit = false; + let mut last_partial_loudness_emit = Instant::now() - Duration::from_secs(5); + 'outer: loop { + let response = if let Some(r) = next_response.take() { + r + } else { + let mut req = http_client.get(&url); + if downloaded > 0 { + req = req.header(reqwest::header::RANGE, format!("bytes={downloaded}-")); + } + match req.send().await { + Ok(r) => r, + Err(err) => { + if reconnects >= TRACK_STREAM_MAX_RECONNECTS { + crate::app_eprintln!( + "[audio] streaming reconnect failed after {} attempts: {}", + reconnects, err + ); + done.store(true, Ordering::SeqCst); + return; + } + reconnects += 1; + tokio::time::sleep(Duration::from_millis(200)).await; + continue 'outer; + } + } + }; + if downloaded > 0 && response.status() != reqwest::StatusCode::PARTIAL_CONTENT { + crate::app_eprintln!( + "[audio] streaming reconnect returned {}, expected 206 for range resume", + response.status() + ); + done.store(true, Ordering::SeqCst); + return; + } + if downloaded == 0 && !response.status().is_success() { + crate::app_eprintln!("[audio] streaming HTTP {}", response.status()); + done.store(true, Ordering::SeqCst); + return; + } + + let mut byte_stream = response.bytes_stream(); + while let Some(chunk) = byte_stream.next().await { + if gen_arc.load(Ordering::SeqCst) != gen { + done.store(true, Ordering::SeqCst); + return; + } + let chunk = match chunk { + Ok(c) => c, + Err(e) => { + if reconnects >= TRACK_STREAM_MAX_RECONNECTS { + crate::app_eprintln!( + "[audio] streaming download error after {} reconnects: {}", + reconnects, e + ); + done.store(true, Ordering::SeqCst); + return; + } + reconnects += 1; + crate::app_eprintln!( + "[audio] streaming download error (attempt {}/{}): {} — reconnecting", + reconnects, + TRACK_STREAM_MAX_RECONNECTS, + e + ); + next_response = None; + continue 'outer; + } + }; + reconnects = 0; + let mut offset = 0; + while offset < chunk.len() { + if gen_arc.load(Ordering::SeqCst) != gen { + done.store(true, Ordering::SeqCst); + return; + } + let pushed = prod.push_slice(&chunk[offset..]); + if pushed == 0 { + tokio::time::sleep(Duration::from_millis(5)).await; + } else { + if !capture_over_limit { + if capture.len().saturating_add(pushed) <= TRACK_STREAM_PROMOTE_MAX_BYTES { + let from = offset; + let to = offset + pushed; + capture.extend_from_slice(&chunk[from..to]); + } else { + capture.clear(); + capture_over_limit = true; + } + } + if !capture_over_limit + && last_partial_loudness_emit.elapsed() >= Duration::from_millis(PARTIAL_LOUDNESS_EMIT_INTERVAL_MS) + { + last_partial_loudness_emit = Instant::now(); + if normalization_engine.load(Ordering::Relaxed) == 2 { + let target_lufs = f32::from_bits(normalization_target_lufs.load(Ordering::Relaxed)); + let pre_db = f32::from_bits( + loudness_pre_analysis_attenuation_db.load(Ordering::Relaxed), + ) + .clamp(-24.0, 0.0); + emit_partial_loudness_from_bytes(&app, &url, &capture, target_lufs, pre_db); + } + } + offset += pushed; + downloaded += pushed as u64; + } + } + } + if !capture_over_limit && !capture.is_empty() { + if let Some(track_id) = cache_track_id { + crate::app_deprintln!( + "[stream] legacy stream: capture complete track_id={} capture_mib={:.2} — full-track analysis (cpu-seed queue)", + track_id, + capture.len() as f64 / (1024.0 * 1024.0) + ); + let high = analysis_seed_high_priority_for_track(&app, &track_id); + if let Err(e) = + crate::submit_analysis_cpu_seed(app.clone(), track_id.clone(), capture.clone(), high).await + { + crate::app_eprintln!("[analysis] track seed failed for {}: {}", track_id, e); + } + } + *promote_cache_slot.lock().unwrap() = Some(PreloadedTrack { + url: url.clone(), + data: capture, + }); + } + done.store(true, Ordering::SeqCst); + return; + } +} + +/// Linear downloader for `RangedHttpSource`: fills the pre-allocated buffer +/// from offset 0 to total_size. Reconnects via HTTP Range from the current +/// `downloaded` offset on transient errors. On completion (full track) the +/// data is promoted to `stream_completed_cache` for fast replay. +async fn ranged_download_task( + gen: u64, + gen_arc: Arc, + http_client: reqwest::Client, + app: AppHandle, + _duration_hint: f64, + url: String, + initial_response: reqwest::Response, + buf: Arc>>, + downloaded_to: Arc, + done: Arc, + promote_cache_slot: Arc>>, + normalization_engine: Arc, + normalization_target_lufs: Arc, + loudness_pre_analysis_attenuation_db: Arc, + cache_track_id: Option, + // When `Some`, ranged playback seeds on completion — defer HTTP backfill for that + // track; `None` for large files where ranged skips seed (needs backfill). + loudness_seed_hold: Option>>>, +) { + let _ranged_loudness_hold_clear = match (loudness_seed_hold.as_ref(), cache_track_id.as_ref()) { + (Some(slot), Some(tid)) => { + let t = tid.clone(); + { + let mut g = slot.lock().unwrap(); + *g = Some((t.clone(), gen)); + } + Some(RangedLoudnessSeedHoldClear { + slot: Arc::clone(slot), + tid: t, + gen, + }) + } + _ => None, + }; + let total_size = buf.lock().unwrap().len(); + let mut downloaded: usize = 0; + let mut reconnects: u32 = 0; + let mut next_response: Option = Some(initial_response); + let dl_started = Instant::now(); + let mut next_progress_mb: usize = 1; + let mut last_partial_loudness_emit = Instant::now() - Duration::from_secs(5); + + 'outer: loop { + let response = if let Some(r) = next_response.take() { + r + } else { + let mut req = http_client.get(&url); + if downloaded > 0 { + req = req.header(reqwest::header::RANGE, format!("bytes={downloaded}-")); + } + match req.send().await { + Ok(r) => r, + Err(err) => { + if reconnects >= TRACK_STREAM_MAX_RECONNECTS { + crate::app_eprintln!( + "[audio] ranged reconnect failed after {} attempts: {}", + reconnects, err + ); + break 'outer; + } + reconnects += 1; + tokio::time::sleep(Duration::from_millis(200)).await; + continue 'outer; + } + } + }; + if downloaded > 0 && response.status() != reqwest::StatusCode::PARTIAL_CONTENT { + crate::app_eprintln!( + "[audio] ranged reconnect returned {}, expected 206", + response.status() + ); + break 'outer; + } + if downloaded == 0 && !response.status().is_success() { + crate::app_eprintln!("[audio] ranged HTTP {}", response.status()); + break 'outer; + } + + let mut byte_stream = response.bytes_stream(); + while let Some(chunk) = byte_stream.next().await { + if gen_arc.load(Ordering::SeqCst) != gen { + done.store(true, Ordering::SeqCst); + return; + } + let chunk = match chunk { + Ok(c) => c, + Err(e) => { + if reconnects >= TRACK_STREAM_MAX_RECONNECTS { + crate::app_eprintln!( + "[audio] ranged dl error after {} reconnects: {}", + reconnects, e + ); + break 'outer; + } + reconnects += 1; + crate::app_eprintln!( + "[audio] ranged dl error (attempt {}/{}): {} — reconnecting", + reconnects, TRACK_STREAM_MAX_RECONNECTS, e + ); + next_response = None; + continue 'outer; + } + }; + reconnects = 0; + let writable = total_size.saturating_sub(downloaded); + if writable == 0 { + break; + } + let n = chunk.len().min(writable); + { + let mut b = buf.lock().unwrap(); + b[downloaded..downloaded + n].copy_from_slice(&chunk[..n]); + } + downloaded += n; + downloaded_to.store(downloaded, Ordering::SeqCst); + if downloaded >= PARTIAL_LOUDNESS_MIN_BYTES + && total_size > 0 + && last_partial_loudness_emit.elapsed() >= Duration::from_millis(PARTIAL_LOUDNESS_EMIT_INTERVAL_MS) + { + last_partial_loudness_emit = Instant::now(); + if normalization_engine.load(Ordering::Relaxed) == 2 { + let target_lufs = f32::from_bits(normalization_target_lufs.load(Ordering::Relaxed)); + let start_db = f32::from_bits(loudness_pre_analysis_attenuation_db.load(Ordering::Relaxed)) + .clamp(-24.0, 0.0); + if let Some(provisional_db) = + provisional_loudness_gain_from_progress(downloaded, total_size, target_lufs, start_db) + { + let track_key = playback_identity(&url).unwrap_or_else(|| url.clone()); + if partial_loudness_should_emit(&track_key, provisional_db) { + let _ = app.emit( + "analysis:loudness-partial", + PartialLoudnessPayload { + track_id: playback_identity(&url), + gain_db: provisional_db, + target_lufs, + is_partial: true, + }, + ); + } + } + } + } + let mb = downloaded / (1024 * 1024); + if mb >= next_progress_mb { + let pct = (downloaded as f64 / total_size as f64 * 100.0) as u32; + crate::app_deprintln!( + "[stream] dl progress: {} MB / {} MB ({}%)", + mb, + total_size / (1024 * 1024), + pct + ); + next_progress_mb = mb + 1; + } + if downloaded >= total_size { + break; + } + } + // Stream ended cleanly (or hit total_size). + break 'outer; + } + + done.store(true, Ordering::SeqCst); + + crate::app_deprintln!( + "[stream] dl done: {} / {} bytes in {:.2}s ({} reconnects)", + downloaded, + total_size, + dl_started.elapsed().as_secs_f64(), + reconnects + ); + + if downloaded == total_size && total_size > 0 && total_size <= TRACK_STREAM_PROMOTE_MAX_BYTES { + if let Some(ref tid) = cache_track_id { + crate::app_deprintln!( + "[stream] ranged: HTTP buffer full track_id={} size_mib={:.2} — cloning {} bytes then full-track analysis (cpu-seed queue; this task awaits completion)", + tid, + total_size as f64 / (1024.0 * 1024.0), + total_size + ); + } + let t_clone = Instant::now(); + let data = buf.lock().unwrap().clone(); + if total_size > 32 * 1024 * 1024 { + crate::app_deprintln!( + "[stream] ranged: buffer cloned in_ms={}", + t_clone.elapsed().as_millis() + ); + } + if let Some(track_id) = cache_track_id { + let high = analysis_seed_high_priority_for_track(&app, &track_id); + if let Err(e) = crate::submit_analysis_cpu_seed(app.clone(), track_id.clone(), data.clone(), high).await { + crate::app_eprintln!("[analysis] ranged seed failed for {}: {}", track_id, e); + } + } + *promote_cache_slot.lock().unwrap() = Some(PreloadedTrack { url, data }); + crate::app_deprintln!("[stream] promoted to stream_completed_cache for replay"); + } +} + +fn emit_partial_loudness_from_bytes( + app: &AppHandle, + url: &str, + bytes: &[u8], + target_lufs: f32, + pre_analysis_attenuation_db: f32, +) { + if bytes.len() < PARTIAL_LOUDNESS_MIN_BYTES { + crate::app_deprintln!( + "[normalization] partial-loudness skip reason=insufficient-bytes bytes={} min_bytes={}", + bytes.len(), + PARTIAL_LOUDNESS_MIN_BYTES + ); + return; + } + // Lightweight fallback based on buffered bytes count to keep CPU low. + let mb = bytes.len() as f32 / (1024.0 * 1024.0); + let pre_floor = pre_analysis_attenuation_db.clamp(-24.0, 0.0); + // Target-derived hint (e.g. -12 LUFS → -1 dB). Old `(hint).clamp(pre, 0)` left + // the hint when it lay inside [pre, 0] — e.g. -1 with pre=-6, so AAC/M4A + // streaming often sat at -1 dB until full analysis. Combine with user trim: + // stricter (more negative) pre wins; milder pre still caps vs the hint. + let heuristic_floor = (target_lufs + 11.0).clamp(-6.0, 0.0); + let floor_db = if pre_floor < heuristic_floor { + pre_floor + } else { + pre_floor.max(heuristic_floor) + }; + let gain_db = (-(mb * 0.7)).max(floor_db).min(0.0); + let track_key = playback_identity(url).unwrap_or_else(|| url.to_string()); + if !partial_loudness_should_emit(&track_key, gain_db as f32) { + crate::app_deprintln!( + "[normalization] partial-loudness skip reason=delta-below-threshold gain_db={:.2} threshold_db={:.2} track_id={:?}", + gain_db, + PARTIAL_LOUDNESS_DELTA_THRESHOLD_DB, + playback_identity(url) + ); + return; + } + crate::app_deprintln!( + "[normalization] partial-loudness emit bytes={} gain_db={:.2} target_lufs={:.2} track_id={:?}", + bytes.len(), + gain_db, + target_lufs, + playback_identity(url) + ); + let _ = app.emit( + "analysis:loudness-partial", + PartialLoudnessPayload { + track_id: playback_identity(url), + gain_db: gain_db as f32, + target_lufs, + is_partial: true, + }, + ); +} + +fn provisional_loudness_gain_from_progress( + downloaded: usize, + total_size: usize, + target_lufs: f32, + start_db_in: f32, +) -> Option { + if total_size == 0 || downloaded == 0 { + return None; + } + let progress = (downloaded as f32 / total_size as f32).clamp(0.0, 1.0); + // Move from startup attenuation toward a more realistic late-stream level. + // This avoids staying near -2 dB and then jumping hard when final LUFS lands. + let start_db = start_db_in.clamp(-24.0, 0.0).min(0.0); + let end_db = (target_lufs + 6.0).clamp(-10.0, -3.0).min(0.0); + let shaped = progress.powf(0.75); + Some(start_db + (end_db - start_db) * shaped) +} + +fn content_type_to_hint(ct: &str) -> Option { + let ct = ct.to_ascii_lowercase(); + if ct.contains("mpeg") || ct.contains("mp3") { Some("mp3".into()) } + else if ct.contains("aac") || ct.contains("aacp") { Some("aac".into()) } + else if ct.contains("ogg") { Some("ogg".into()) } + else if ct.contains("flac") { Some("flac".into()) } + else if ct.contains("wav") || ct.contains("wave") { Some("wav".into()) } + else if ct.contains("opus") { Some("opus".into()) } + else { None } +} + +// ─── SizedCursorSource — correct byte_len for seekable in-memory sources ────── +// +// rodio's internal ReadSeekSource wraps Cursor> but hardcodes +// byte_len() → None. This tells symphonia "stream length unknown", which +// prevents the FLAC demuxer from seeking (it validates seek offsets against +// the total stream length from byte_len). MP3 is unaffected because its +// demuxer uses Xing/LAME headers instead. +// +// This wrapper provides the actual byte length, fixing seek for all formats. + +struct SizedCursorSource { + inner: Cursor>, + len: u64, +} + +impl Read for SizedCursorSource { + fn read(&mut self, buf: &mut [u8]) -> std::io::Result { + self.inner.read(buf) + } +} + +impl Seek for SizedCursorSource { + fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result { + self.inner.seek(pos) + } +} + +impl MediaSource for SizedCursorSource { + fn is_seekable(&self) -> bool { true } + fn byte_len(&self) -> Option { Some(self.len) } +} + +// ─── SizedDecoder — symphonia decoder with correct byte_len ─────────────────── +// +// Replaces rodio::Decoder::new() which wraps the source in ReadSeekSource +// (byte_len = None). This constructs the symphonia pipeline directly, +// providing the correct byte_len via SizedCursorSource. +// +// Implements Iterator + Source — identical interface to +// rodio::Decoder, so the rest of the source chain is unchanged. + +/// Debug logging: codec parameters in human-readable form to verify whether +/// playback is genuinely lossless. +fn log_codec_resolution( + tag: &str, + params: &symphonia::core::codecs::CodecParameters, + container_hint: Option<&str>, +) { + let codec_name = symphonia::default::get_codecs() + .get_codec(params.codec) + .map(|d| d.short_name) + .unwrap_or("?"); + let rate = params.sample_rate.map(|r| format!("{} Hz", r)).unwrap_or_else(|| "? Hz".into()); + let bits = params.bits_per_sample + .or(params.bits_per_coded_sample) + .map(|b| format!("{}-bit", b)) + .unwrap_or_else(|| "?-bit".into()); + let ch = params.channels + .map(|c| format!("{}ch", c.count())) + .unwrap_or_else(|| "?ch".into()); + let lossless = codec_name.starts_with("pcm") + || matches!( + codec_name, + "flac" | "alac" | "wavpack" | "monkeys-audio" | "tta" | "shorten" + ); + let kind = if lossless { "LOSSLESS" } else { "lossy" }; + crate::app_deprintln!( + "[stream] {tag}: codec={codec_name} ({kind}) {bits} {rate} {ch} container={}", + container_hint.unwrap_or("?") + ); +} + +/// Max retries for IO/packet-read errors (fatal — network drop, truncated file). +const DECODE_MAX_RETRIES: usize = 3; +/// Max *consecutive* DecodeErrors before giving up on a file. +/// Non-fatal errors like "invalid main_data offset" are silently dropped up to +/// this limit so a handful of corrupt MP3 frames never aborts an otherwise +/// playable track (VLC-style frame dropping). +const MAX_CONSECUTIVE_DECODE_ERRORS: usize = 100; + +struct SizedDecoder { + decoder: Box, + current_frame_offset: usize, + format: Box, + total_duration: Option