diff --git a/Cargo.lock b/Cargo.lock index f0e3c57..a25dfde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,17 +55,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.16", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.12" @@ -106,12 +95,6 @@ dependencies = [ "equator", ] -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - [[package]] name = "android-activity" version = "0.6.0" @@ -128,11 +111,20 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "thiserror 1.0.69", ] +[[package]] +name = "android-build" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cac4c64175d504608cf239756339c07f6384a476f97f20a7043f92920b0b8fd" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "android-properties" version = "0.2.2" @@ -218,18 +210,10 @@ dependencies = [ "tokio", "tokio-test", "toml 0.9.8", + "tracing", "uuid", ] -[[package]] -name = "approx" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" -dependencies = [ - "num-traits", -] - [[package]] name = "ar_archive_writer" version = "0.2.0" @@ -283,22 +267,13 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "ash" -version = "0.37.3+1.3.251" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" -dependencies = [ - "libloading 0.7.4", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading 0.8.9", + "libloading", ] [[package]] @@ -307,7 +282,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52bca67b61cb81e5553babde81b8211f713cb6db79766f80168f3e5f40ea6c82" dependencies = [ - "ash 0.38.0+1.3.281", + "ash", "raw-window-handle", "raw-window-metal", ] @@ -330,7 +305,7 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols 0.32.9", - "zbus 5.12.0", + "zbus", ] [[package]] @@ -348,7 +323,7 @@ dependencies = [ "serde", "serde_repr", "url", - "zbus 5.12.0", + "zbus", ] [[package]] @@ -692,30 +667,15 @@ dependencies = [ "syn 2.0.110", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", -] - [[package]] name = "bit-set" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit-vec" version = "0.8.0" @@ -755,18 +715,18 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4deb8f595ce7f00dee3543ebf6fd9a20ea86fc421ab79600dac30876250bdae" dependencies = [ - "ash 0.38.0+1.3.281", + "ash", "ash-window", "bitflags 2.10.0", "bytemuck", - "codespan-reporting 0.12.0", - "glow 0.16.0", + "codespan-reporting", + "glow", "gpu-alloc", "gpu-alloc-ash", "hidden-trait", "js-sys", "khronos-egl", - "libloading 0.8.9", + "libloading", "log", "mint", "naga 25.0.1", @@ -914,12 +874,6 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" -[[package]] -name = "by_address" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" - [[package]] name = "bytemuck" version = "1.24.0" @@ -1078,12 +1032,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -1145,7 +1093,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading 0.8.9", + "libloading", ] [[package]] @@ -1296,16 +1244,6 @@ dependencies = [ "objc", ] -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width 0.1.14", -] - [[package]] name = "codespan-reporting" version = "0.12.0" @@ -1314,7 +1252,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ "serde", "termcolor", - "unicode-width 0.2.2", + "unicode-width", ] [[package]] @@ -1329,37 +1267,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" -[[package]] -name = "com" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" -dependencies = [ - "com_macros", -] - -[[package]] -name = "com_macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" -dependencies = [ - "com_macros_support", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "com_macros_support" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1544,29 +1451,6 @@ dependencies = [ "libm", ] -[[package]] -name = "cosmic-text" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" -dependencies = [ - "bitflags 2.10.0", - "fontdb 0.16.2", - "log", - "rangemap", - "rayon", - "rustc-hash 1.1.0", - "rustybuzz 0.14.1", - "self_cell", - "swash 0.1.19", - "sys-locale", - "ttf-parser 0.21.1", - "unicode-bidi", - "unicode-linebreak", - "unicode-script", - "unicode-segmentation", -] - [[package]] name = "cosmic-text" version = "0.14.2" @@ -1581,7 +1465,7 @@ dependencies = [ "rustybuzz 0.14.1", "self_cell", "smol_str", - "swash 0.2.6", + "swash", "sys-locale", "ttf-parser 0.21.1", "unicode-bidi", @@ -1590,6 +1474,30 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "cosmic-text" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173852283a9a57a3cbe365d86e74dc428a09c50421477d5ad6fe9d9509e37737" +dependencies = [ + "bitflags 2.10.0", + "fontdb 0.23.0", + "harfrust", + "linebender_resource_handle", + "log", + "rangemap", + "rustc-hash 1.1.0", + "self_cell", + "skrifa", + "smol_str", + "swash", + "sys-locale", + "unicode-bidi", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -1648,6 +1556,18 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" +[[package]] +name = "cryoglyph" +version = "0.1.0" +source = "git+https://github.com/iced-rs/cryoglyph.git?rev=99b46959369f38a06c11353bf1be81d383b289fc#99b46959369f38a06c11353bf1be81d383b289fc" +dependencies = [ + "cosmic-text 0.15.0", + "etagere", + "lru", + "rustc-hash 2.1.1", + "wgpu", +] + [[package]] name = "crypto-common" version = "0.1.7" @@ -1687,45 +1607,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "d3d12" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" -dependencies = [ - "bitflags 2.10.0", - "libloading 0.8.9", - "winapi", -] - -[[package]] -name = "dark-light" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a76fa97167fa740dcdbfe18e8895601e1bc36525f09b044e00916e717c03a3c" -dependencies = [ - "dconf_rs", - "detect-desktop-environment", - "dirs 4.0.0", - "objc", - "rust-ini", - "web-sys", - "winreg 0.10.1", - "zbus 4.4.0", -] - [[package]] name = "data-url" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" -[[package]] -name = "dconf_rs" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7046468a81e6a002061c01e6a7c83139daf91b11c30e66795b13217c2d885c8b" - [[package]] name = "deflate64" version = "0.1.10" @@ -1745,12 +1632,6 @@ dependencies = [ "syn 2.0.110", ] -[[package]] -name = "detect-desktop-environment" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d8ad60dd5b13a4ee6bd8fa2d5d88965c597c67bce32b5fc49c94f55cb50810" - [[package]] name = "digest" version = "0.10.7" @@ -1836,14 +1717,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.9", + "libloading", ] [[package]] -name = "dlv-list" -version = "0.3.0" +name = "document-features" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] [[package]] name = "dotenvy" @@ -1859,9 +1743,8 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +version = "0.1.1" +source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" [[package]] name = "drm" @@ -1958,7 +1841,7 @@ dependencies = [ "rustc_version", "toml 0.9.8", "vswhom", - "winreg 0.55.0", + "winreg", ] [[package]] @@ -2121,12 +2004,6 @@ dependencies = [ "zune-inflate", ] -[[package]] -name = "fast-srgb8" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1" - [[package]] name = "fastrand" version = "1.9.0" @@ -2253,13 +2130,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] -name = "font-types" -version = "0.7.3" +name = "foldhash" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3971f9a5ca983419cdc386941ba3b9e1feba01a0ab888adf78739feb2798492" -dependencies = [ - "bytemuck", -] +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "font-types" @@ -2544,16 +2418,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gif" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gif" version = "0.14.0" @@ -2612,18 +2476,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "glow" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "glow" version = "0.16.0" @@ -2638,9 +2490,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" dependencies = [ "gl_generator", ] @@ -2661,7 +2513,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbda7a18a29bc98c2e0de0435c347df935bf59489935d0cbd0b73f1679b6f79a" dependencies = [ - "ash 0.38.0+1.3.281", + "ash", "gpu-alloc-types", "tinyvec", ] @@ -2677,33 +2529,32 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", "thiserror 1.0.69", - "winapi", - "windows 0.52.0", + "windows 0.58.0", ] [[package]] name = "gpu-descriptor" -version = "0.2.4" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ "bitflags 2.10.0", "gpu-descriptor-types", - "hashbrown 0.14.5", + "hashbrown 0.15.5", ] [[package]] name = "gpu-descriptor-types" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ "bitflags 2.10.0", ] @@ -2751,7 +2602,7 @@ dependencies = [ "gpui_sum_tree", "gpui_util", "gpui_util_macros", - "image 0.25.9", + "image", "inventory", "itertools 0.14.0", "libc", @@ -2764,7 +2615,7 @@ dependencies = [ "oo7", "open", "parking", - "parking_lot 0.12.5", + "parking_lot", "pathfinder_geometry", "pin-project", "postage", @@ -2793,7 +2644,7 @@ dependencies = [ "wayland-protocols-plasma 0.2.0", "windows 0.61.3", "windows-core 0.61.2", - "windows-numerics", + "windows-numerics 0.2.0", "windows-registry 0.5.3", "xkbcommon", "zed-font-kit", @@ -2848,7 +2699,7 @@ dependencies = [ "http", "http-body", "log", - "parking_lot 0.12.5", + "parking_lot", "serde", "serde_json", "sha2", @@ -3010,22 +2861,16 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "harfrust" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "92c020db12c71d8a12a3fe7607873cade3a01a6287e29d540c8723276221b9d8" dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash 0.8.12", - "allocator-api2", + "bitflags 2.10.0", + "bytemuck", + "core_maths", + "read-fonts", + "smallvec", ] [[package]] @@ -3034,7 +2879,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash", + "foldhash 0.1.5", ] [[package]] @@ -3042,20 +2887,8 @@ name = "hashbrown" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" - -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.10.0", - "com", - "libc", - "libloading 0.8.9", - "thiserror 1.0.69", - "widestring", - "winapi", + "foldhash 0.2.0", ] [[package]] @@ -3255,44 +3088,51 @@ dependencies = [ [[package]] name = "iced" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88acfabc84ec077eaf9ede3457ffa3a104626d79022a9bf7f296093b1d60c73f" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "iced_core", + "iced_debug", "iced_futures", "iced_renderer", + "iced_runtime", "iced_widget", "iced_winit", - "image 0.24.9", - "thiserror 1.0.69", + "image", + "thiserror 2.0.17", ] [[package]] name = "iced_core" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0013a238275494641bf8f1732a23a808196540dc67b22ff97099c044ae4c8a1c" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "bitflags 2.10.0", "bytes", - "dark-light", "glam", + "lilt", "log", "num-traits", - "once_cell", - "palette", "rustc-hash 2.1.1", "smol_str", - "thiserror 1.0.69", + "thiserror 2.0.17", "web-time", ] +[[package]] +name = "iced_debug" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" +dependencies = [ + "iced_core", + "iced_futures", + "log", +] + [[package]] name = "iced_futures" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c04a6745ba2e80f32cf01e034fd00d853aa4f4cd8b91888099cb7aaee0d5d7c" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "futures", "iced_core", @@ -3300,79 +3140,71 @@ dependencies = [ "rustc-hash 2.1.1", "tokio", "wasm-bindgen-futures", - "wasm-timer", -] - -[[package]] -name = "iced_glyphon" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c3bb56f1820ca252bc1d0994ece33d233a55657c0c263ea7cb16895adbde82" -dependencies = [ - "cosmic-text 0.12.1", - "etagere", - "lru", - "rustc-hash 2.1.1", - "wgpu", + "wasmtimer", ] [[package]] name = "iced_graphics" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba25a18cfa6d5cc160aca7e1b34f73ccdff21680fa8702168c09739767b6c66f" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "bitflags 2.10.0", "bytemuck", - "cosmic-text 0.12.1", + "cosmic-text 0.15.0", "half", "iced_core", "iced_futures", - "image 0.24.9", + "image", "kamadak-exif", "log", "lyon_path", - "once_cell", "raw-window-handle", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.17", "unicode-segmentation", ] +[[package]] +name = "iced_program" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" +dependencies = [ + "iced_graphics", + "iced_runtime", +] + [[package]] name = "iced_renderer" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73558208059f9e622df2bf434e044ee2f838ce75201a023cf0ca3e1244f46c2a" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "iced_graphics", "iced_tiny_skia", "iced_wgpu", "log", - "thiserror 1.0.69", + "thiserror 2.0.17", ] [[package]] name = "iced_runtime" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "348b5b2c61c934d88ca3b0ed1ed913291e923d086a66fa288ce9669da9ef62b5" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "bytes", "iced_core", "iced_futures", "raw-window-handle", - "thiserror 1.0.69", + "thiserror 2.0.17", ] [[package]] name = "iced_tiny_skia" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c625d368284fcc43b0b36b176f76eff1abebe7959dd58bd8ce6897d641962a50" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "bytemuck", - "cosmic-text 0.12.1", + "cosmic-text 0.15.0", + "iced_debug", "iced_graphics", "kurbo 0.10.4", "log", @@ -3383,56 +3215,51 @@ dependencies = [ [[package]] name = "iced_wgpu" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15708887133671d2bcc6c1d01d1f176f43a64d6cdc3b2bf893396c3ee498295f" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "bitflags 2.10.0", "bytemuck", + "cryoglyph", "futures", "glam", "guillotiere", - "iced_glyphon", + "iced_debug", "iced_graphics", "log", "lyon", - "once_cell", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.17", "wgpu", ] [[package]] name = "iced_widget" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81429e1b950b0e4bca65be4c4278fea6678ea782030a411778f26fa9f8983e1d" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ "iced_renderer", - "iced_runtime", + "log", "num-traits", - "once_cell", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.17", "unicode-segmentation", ] [[package]] name = "iced_winit" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44cd4e1c594b6334f409282937bf972ba14d31fedf03c23aa595d982a2fda28" +version = "0.14.0-dev" +source = "git+https://github.com/iced-rs/iced#645643bfd63ed4c01aa281f97992e3c276e71498" dependencies = [ - "iced_futures", - "iced_graphics", - "iced_runtime", + "iced_debug", + "iced_program", "log", + "mundy", "rustc-hash 2.1.1", - "thiserror 1.0.69", + "thiserror 2.0.17", "tracing", "wasm-bindgen-futures", "web-sys", - "winapi", "window_clipboard", "winit", ] @@ -3539,24 +3366,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "image" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "exr", - "gif 0.13.3", - "jpeg-decoder", - "num-traits", - "png 0.17.16", - "qoi", - "tiff 0.9.1", -] - [[package]] name = "image" version = "0.25.9" @@ -3567,7 +3376,7 @@ dependencies = [ "byteorder-lite", "color_quant", "exr", - "gif 0.14.0", + "gif", "image-webp", "moxcms", "num-traits", @@ -3576,7 +3385,7 @@ dependencies = [ "ravif", "rayon", "rgb", - "tiff 0.10.3", + "tiff", "zune-core 0.5.0", "zune-jpeg 0.5.5", ] @@ -3767,14 +3576,10 @@ name = "jello" version = "0.1.0" dependencies = [ "api", - "blurhash", "clap", "clap_complete", "dotenvy", "error-stack", - "gpui", - "image 0.25.9", - "tap", "thiserror 2.0.17", "tokio", "tracing", @@ -3856,15 +3661,6 @@ dependencies = [ "libc", ] -[[package]] -name = "jpeg-decoder" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" -dependencies = [ - "rayon", -] - [[package]] name = "js-sys" version = "0.3.82" @@ -3877,9 +3673,9 @@ dependencies = [ [[package]] name = "kamadak-exif" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4fc70d0ab7e5b6bafa30216a6b48705ea964cdfc29c050f2412295eba58077" +checksum = "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837" dependencies = [ "mutate_once", ] @@ -3891,7 +3687,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.9", + "libloading", "pkg-config", ] @@ -3977,16 +3773,6 @@ dependencies = [ "cc", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libloading" version = "0.8.9" @@ -4014,6 +3800,21 @@ dependencies = [ "redox_syscall 0.5.18", ] +[[package]] +name = "lilt" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67562e5eff6b20553fa9be1c503356768420994e28f67e3eafe6f41910e57ad" +dependencies = [ + "web-time", +] + +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -4038,6 +3839,12 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + [[package]] name = "lock_api" version = "0.4.14" @@ -4068,9 +3875,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.5" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +checksum = "96051b46fc183dc9cd4a223960ef37b9af631b55191852a8274bfef064cda20f" [[package]] name = "lru-slab" @@ -4200,9 +4007,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ "bitflags 2.10.0", "block", @@ -4215,13 +4022,13 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ "bitflags 2.10.0", "block", - "core-graphics-types 0.1.3", + "core-graphics-types 0.2.0", "foreign-types 0.5.0", "log", "objc", @@ -4287,32 +4094,37 @@ dependencies = [ "pxfm", ] +[[package]] +name = "mundy" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1507867e7cc8ae71ec01ef4a7a4b9f4b1a827324b414a0232b04e19324ec92d" +dependencies = [ + "android-build", + "async-io", + "cfg-if", + "dispatch", + "futures-channel", + "futures-lite 2.6.1", + "jni", + "ndk-context", + "objc2 0.6.3", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "pin-project-lite", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows 0.62.2", + "zbus", +] + [[package]] name = "mutate_once" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d2233c9842d08cfe13f9eac96e207ca6a2ea10b80259ebe8ad0268be27d2af" -[[package]] -name = "naga" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" -dependencies = [ - "bit-set 0.5.3", - "bitflags 2.10.0", - "codespan-reporting 0.11.1", - "hexf-parse", - "indexmap", - "log", - "num-traits", - "rustc-hash 1.1.0", - "spirv", - "termcolor", - "thiserror 1.0.69", - "unicode-xid", -] - [[package]] name = "naga" version = "25.0.1" @@ -4320,10 +4132,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b977c445f26e49757f9aca3631c3b8b836942cb278d69a92e7b80d3b24da632" dependencies = [ "arrayvec", - "bit-set 0.8.0", + "bit-set", "bitflags 2.10.0", - "cfg_aliases 0.2.1", - "codespan-reporting 0.12.0", + "cfg_aliases", + "codespan-reporting", "half", "hashbrown 0.15.5", "hexf-parse", @@ -4338,6 +4150,32 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "naga" +version = "27.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.16.0", + "hexf-parse", + "indexmap", + "libm", + "log", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.17", + "unicode-ident", +] + [[package]] name = "nanorand" version = "0.7.0" @@ -4373,7 +4211,7 @@ dependencies = [ "bitflags 2.10.0", "jni-sys", "log", - "ndk-sys 0.6.0+11769913", + "ndk-sys", "num_enum", "raw-window-handle", "thiserror 1.0.69", @@ -4385,15 +4223,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-sys" -version = "0.5.0+25.2.9519653" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" -dependencies = [ - "jni-sys", -] - [[package]] name = "ndk-sys" version = "0.6.0+11769913" @@ -4417,9 +4246,8 @@ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.10.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", - "memoffset", ] [[package]] @@ -4430,7 +4258,7 @@ checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ "bitflags 2.10.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", "memoffset", ] @@ -4610,7 +4438,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -4648,8 +4475,8 @@ dependencies = [ "block2 0.5.1", "libc", "objc2 0.5.2", - "objc2-core-data", - "objc2-core-image", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", "objc2-foundation 0.2.2", "objc2-quartz-core 0.2.2", ] @@ -4661,8 +4488,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ "bitflags 2.10.0", + "block2 0.6.2", + "libc", "objc2 0.6.3", + "objc2-cloud-kit 0.3.2", + "objc2-core-data 0.3.2", "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image 0.3.2", + "objc2-core-text", + "objc2-core-video", "objc2-foundation 0.3.2", "objc2-quartz-core 0.3.2", ] @@ -4680,6 +4515,17 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-contacts" version = "0.2.2" @@ -4703,6 +4549,17 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-core-foundation" version = "0.3.2" @@ -4714,6 +4571,19 @@ dependencies = [ "objc2 0.6.3", ] +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.10.0", + "dispatch2", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-io-surface", +] + [[package]] name = "objc2-core-image" version = "0.2.2" @@ -4726,6 +4596,16 @@ dependencies = [ "objc2-metal 0.2.2", ] +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2 0.6.3", + "objc2-foundation 0.3.2", +] + [[package]] name = "objc2-core-location" version = "0.2.2" @@ -4738,6 +4618,31 @@ dependencies = [ "objc2-foundation 0.2.2", ] +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-core-video" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d425caf1df73233f29fd8a5c3e5edbc30d2d4307870f802d18f00d83dc5141a6" +dependencies = [ + "bitflags 2.10.0", + "objc2 0.6.3", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-io-surface", +] + [[package]] name = "objc2-encode" version = "4.1.0" @@ -4762,6 +4667,19 @@ name = "objc2-foundation" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.10.0", + "block2 0.6.2", + "libc", + "objc2 0.6.3", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ "bitflags 2.10.0", "objc2 0.6.3", @@ -4849,9 +4767,9 @@ dependencies = [ "bitflags 2.10.0", "block2 0.5.1", "objc2 0.5.2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", + "objc2-cloud-kit 0.2.2", + "objc2-core-data 0.2.2", + "objc2-core-image 0.2.2", "objc2-core-location", "objc2-foundation 0.2.2", "objc2-link-presentation", @@ -4898,15 +4816,6 @@ dependencies = [ "objc2-foundation 0.2.2", ] -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - [[package]] name = "object" version = "0.32.2" @@ -4957,10 +4866,10 @@ dependencies = [ "serde", "sha2", "subtle", - "zbus 5.12.0", - "zbus_macros 5.12.0", + "zbus", + "zbus_macros", "zeroize", - "zvariant 5.8.0", + "zvariant", ] [[package]] @@ -5034,13 +4943,12 @@ dependencies = [ ] [[package]] -name = "ordered-multimap" -version = "0.4.3" +name = "ordered-float" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "7f4779c6901a562440c3786d08192c6fbda7c1c2060edd10006b05ee35d10f2d" dependencies = [ - "dlv-list", - "hashbrown 0.12.3", + "num-traits", ] [[package]] @@ -5062,47 +4970,12 @@ dependencies = [ "ttf-parser 0.25.1", ] -[[package]] -name = "palette" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6" -dependencies = [ - "approx", - "fast-srgb8", - "palette_derive", - "phf", -] - -[[package]] -name = "palette_derive" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30" -dependencies = [ - "by_address", - "proc-macro2", - "quote", - "syn 2.0.110", -] - [[package]] name = "parking" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - [[package]] name = "parking_lot" version = "0.12.5" @@ -5110,21 +4983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", - "parking_lot_core 0.9.12", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -5203,48 +5062,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_macros", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", - "syn 2.0.110", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - [[package]] name = "pico-args" version = "0.5.0" @@ -5371,7 +5188,7 @@ dependencies = [ "crossbeam-queue", "futures", "log", - "parking_lot 0.12.5", + "parking_lot", "pin-project", "pollster", "static_assertions", @@ -5545,7 +5362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", - "cfg_aliases 0.2.1", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", @@ -5585,7 +5402,7 @@ version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", "once_cell", "socket2", @@ -5773,16 +5590,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.22.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69aacb76b5c29acfb7f90155d39759a29496aebb49395830e928a9703d2eec2f" -dependencies = [ - "bytemuck", - "font-types 0.7.3", -] - [[package]] name = "read-fonts" version = "0.35.0" @@ -5790,7 +5597,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" dependencies = [ "bytemuck", - "font-types 0.10.1", + "core_maths", + "font-types", ] [[package]] @@ -6004,16 +5812,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "rust-ini" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" -dependencies = [ - "cfg-if", - "ordered-multimap", -] - [[package]] name = "rustc-hash" version = "1.1.0" @@ -6405,17 +6203,6 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha1_smol" version = "1.0.1" @@ -6487,16 +6274,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" -[[package]] -name = "skrifa" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1c44ad1f6c5bdd4eefed8326711b7dbda9ea45dfd36068c427d332aa382cbe" -dependencies = [ - "bytemuck", - "read-fonts 0.22.7", -] - [[package]] name = "skrifa" version = "0.37.0" @@ -6504,7 +6281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c31071dedf532758ecf3fed987cdb4bd9509f900e026ab684b4ecb81ea49841" dependencies = [ "bytemuck", - "read-fonts 0.35.0", + "read-fonts", ] [[package]] @@ -6635,7 +6412,7 @@ checksum = "18051cdd562e792cad055119e0cdb2cfc137e44e3987532e0f9659a77931bb08" dependencies = [ "as-raw-xcb-connection", "bytemuck", - "cfg_aliases 0.2.1", + "cfg_aliases", "core-graphics 0.24.0", "drm", "fastrand 2.3.0", @@ -6901,26 +6678,15 @@ dependencies = [ "siphasher", ] -[[package]] -name = "swash" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd59f3f359ddd2c95af4758c18270eddd9c730dde98598023cdabff472c2ca2" -dependencies = [ - "skrifa 0.22.3", - "yazi 0.1.6", - "zeno 0.2.3", -] - [[package]] name = "swash" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47846491253e976bdd07d0f9cc24b7daf24720d11309302ccbbc6e6b6e53550a" dependencies = [ - "skrifa 0.37.0", - "yazi 0.2.1", - "zeno 0.3.3", + "skrifa", + "yazi", + "zeno", ] [[package]] @@ -7101,17 +6867,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - [[package]] name = "tiff" version = "0.10.3" @@ -7160,7 +6915,7 @@ checksum = "0324504befd01cab6e0c994f34b2ffa257849ee019d3fb3b64fb2c858887d89e" dependencies = [ "as-raw-xcb-connection", "ctor-lite", - "libloading 0.8.9", + "libloading", "pkg-config", "tracing", ] @@ -7552,6 +7307,7 @@ dependencies = [ name = "ui-gpui" version = "0.1.0" dependencies = [ + "blurhash", "gpui", "tap", ] @@ -7560,8 +7316,10 @@ dependencies = [ name = "ui-iced" version = "0.1.0" dependencies = [ + "api", "gpui_util", "iced", + "tracing", "uuid", ] @@ -7637,24 +7395,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "untrusted" version = "0.9.0" @@ -7934,18 +7680,17 @@ dependencies = [ ] [[package]] -name = "wasm-timer" -version = "0.2.5" +name = "wasmtimer" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" +checksum = "1c598d6b99ea013e35844697fc4670d08339d5cda15588f193c6beedd12f644b" dependencies = [ "futures", "js-sys", - "parking_lot 0.11.2", + "parking_lot", "pin-utils", + "slab", "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", ] [[package]] @@ -8136,17 +7881,21 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "0.19.4" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", + "bitflags 2.10.0", "cfg-if", - "cfg_aliases 0.1.1", + "cfg_aliases", + "document-features", + "hashbrown 0.16.0", "js-sys", "log", - "naga 0.19.2", - "parking_lot 0.12.5", + "naga 27.0.3", + "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", @@ -8161,83 +7910,123 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.19.4" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", - "bit-vec 0.6.3", + "bit-set", + "bit-vec", "bitflags 2.10.0", - "cfg_aliases 0.1.1", - "codespan-reporting 0.11.1", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.16.0", "indexmap", "log", - "naga 0.19.2", + "naga 27.0.3", "once_cell", - "parking_lot 0.12.5", + "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror 1.0.69", - "web-sys", + "thiserror 2.0.17", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] [[package]] -name = "wgpu-hal" -version = "0.19.5" +name = "wgpu-core-deps-apple" +version = "27.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "27.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", - "ash 0.37.3+1.3.251", - "bit-set 0.5.3", + "ash", + "bit-set", "bitflags 2.10.0", "block", - "cfg_aliases 0.1.1", - "core-graphics-types 0.1.3", - "d3d12", - "glow 0.13.1", + "bytemuck", + "cfg-if", + "cfg_aliases", + "core-graphics-types 0.2.0", + "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", + "hashbrown 0.16.0", "js-sys", "khronos-egl", "libc", - "libloading 0.8.9", + "libloading", "log", - "metal 0.27.0", - "naga 0.19.2", - "ndk-sys 0.5.0+25.2.9519653", + "metal 0.32.0", + "naga 27.0.3", + "ndk-sys", "objc", "once_cell", - "parking_lot 0.12.5", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash 1.1.0", "smallvec", - "thiserror 1.0.69", + "thiserror 2.0.17", "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows 0.58.0", + "windows-core 0.58.0", ] [[package]] name = "wgpu-types" -version = "0.19.2" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ "bitflags 2.10.0", + "bytemuck", "js-sys", + "log", + "thiserror 2.0.17", "web-sys", ] @@ -8253,12 +8042,6 @@ dependencies = [ "winsafe", ] -[[package]] -name = "widestring" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" - [[package]] name = "winapi" version = "0.3.9" @@ -8306,11 +8089,11 @@ dependencies = [ [[package]] name = "windows" -version = "0.52.0" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "windows-core 0.52.0", + "windows-core 0.58.0", "windows-targets 0.52.6", ] @@ -8320,11 +8103,23 @@ version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections", + "windows-collections 0.2.0", "windows-core 0.61.2", - "windows-future", + "windows-future 0.2.1", "windows-link 0.1.3", - "windows-numerics", + "windows-numerics 0.2.0", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", ] [[package]] @@ -8337,11 +8132,24 @@ dependencies = [ ] [[package]] -name = "windows-core" -version = "0.52.0" +name = "windows-collections" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" dependencies = [ + "windows-core 0.62.2", +] + +[[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", ] @@ -8351,13 +8159,26 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.60.2", + "windows-interface 0.59.3", "windows-link 0.1.3", - "windows-result", + "windows-result 0.3.4", "windows-strings 0.4.2", ] +[[package]] +name = "windows-core" +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-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + [[package]] name = "windows-future" version = "0.2.1" @@ -8366,7 +8187,29 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ "windows-core 0.61.2", "windows-link 0.1.3", - "windows-threading", + "windows-threading 0.1.0", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", +] + +[[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.110", ] [[package]] @@ -8380,6 +8223,17 @@ dependencies = [ "syn 2.0.110", ] +[[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.110", +] + [[package]] name = "windows-interface" version = "0.59.3" @@ -8413,13 +8267,23 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", +] + [[package]] name = "windows-registry" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ - "windows-result", + "windows-result 0.3.4", "windows-strings 0.3.1", "windows-targets 0.53.5", ] @@ -8431,10 +8295,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ "windows-link 0.1.3", - "windows-result", + "windows-result 0.3.4", "windows-strings 0.4.2", ] +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.3.4" @@ -8444,6 +8317,25 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +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.3.1" @@ -8462,6 +8354,15 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -8588,6 +8489,15 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -8770,18 +8680,17 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winit" -version = "0.30.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66d4b9ed69c4009f6321f762d6e61ad8a2389cd431b97cb1e146812e9e6c732" +version = "0.30.8" +source = "git+https://github.com/iced-rs/winit.git?rev=05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed#05b8ff17a06562f0a10bb46e6eaacbe2a95cb5ed" dependencies = [ - "ahash 0.8.12", + "ahash", "android-activity", "atomic-waker", "bitflags 2.10.0", "block2 0.5.1", "bytemuck", "calloop 0.13.0", - "cfg_aliases 0.2.1", + "cfg_aliases", "concurrent-queue", "core-foundation 0.9.4", "core-graphics 0.23.2", @@ -8829,15 +8738,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.55.0" @@ -8895,7 +8795,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading 0.8.9", + "libloading", "once_cell", "rustix 1.1.2", "x11rb-protocol", @@ -8922,16 +8822,6 @@ version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" -[[package]] -name = "xdg-home" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1cdab258fb55c0da61328dc52c8764709b249011b2cad0454c72f0bf10a1f6" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - [[package]] name = "xkbcommon" version = "0.8.0" @@ -8981,12 +8871,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" -[[package]] -name = "yazi" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94451ac9513335b5e23d7a8a2b61a7102398b8cca5160829d313e84c9d98be1" - [[package]] name = "yazi" version = "0.2.1" @@ -9027,44 +8911,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "zbus" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" -dependencies = [ - "async-broadcast", - "async-executor", - "async-fs", - "async-io", - "async-lock", - "async-process", - "async-recursion", - "async-task", - "async-trait", - "blocking", - "enumflags2", - "event-listener 5.4.1", - "futures-core", - "futures-sink", - "futures-util", - "hex", - "nix 0.29.0", - "ordered-stream", - "rand 0.8.5", - "serde", - "serde_repr", - "sha1", - "static_assertions", - "tracing", - "uds_windows", - "windows-sys 0.52.0", - "xdg-home", - "zbus_macros 4.4.0", - "zbus_names 3.0.0", - "zvariant 4.2.0", -] - [[package]] name = "zbus" version = "5.12.0" @@ -9094,22 +8940,9 @@ dependencies = [ "uuid", "windows-sys 0.61.2", "winnow", - "zbus_macros 5.12.0", - "zbus_names 4.2.0", - "zvariant 5.8.0", -] - -[[package]] -name = "zbus_macros" -version = "4.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.110", - "zvariant_utils 2.1.0", + "zbus_macros", + "zbus_names", + "zvariant", ] [[package]] @@ -9122,20 +8955,9 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.110", - "zbus_names 4.2.0", - "zvariant 5.8.0", - "zvariant_utils 3.2.1", -] - -[[package]] -name = "zbus_names" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" -dependencies = [ - "serde", - "static_assertions", - "zvariant 4.2.0", + "zbus_names", + "zvariant", + "zvariant_utils", ] [[package]] @@ -9147,7 +8969,7 @@ dependencies = [ "serde", "static_assertions", "winnow", - "zvariant 5.8.0", + "zvariant", ] [[package]] @@ -9239,12 +9061,6 @@ dependencies = [ "windows-registry 0.4.0", ] -[[package]] -name = "zeno" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" - [[package]] name = "zeno" version = "0.3.3" @@ -9384,19 +9200,6 @@ dependencies = [ "zune-core 0.5.0", ] -[[package]] -name = "zvariant" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" -dependencies = [ - "endi", - "enumflags2", - "serde", - "static_assertions", - "zvariant_derive 4.2.0", -] - [[package]] name = "zvariant" version = "5.8.0" @@ -9408,21 +9211,8 @@ dependencies = [ "serde", "url", "winnow", - "zvariant_derive 5.8.0", - "zvariant_utils 3.2.1", -] - -[[package]] -name = "zvariant_derive" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.110", - "zvariant_utils 2.1.0", + "zvariant_derive", + "zvariant_utils", ] [[package]] @@ -9435,18 +9225,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.110", - "zvariant_utils 3.2.1", -] - -[[package]] -name = "zvariant_utils" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.110", + "zvariant_utils", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index dc17696..e354470 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,14 +9,10 @@ license = "MIT" [dependencies] api = { version = "0.1.0", path = "api" } -blurhash = "0.2.3" clap = { version = "4.5", features = ["derive"] } clap_complete = "4.5" dotenvy = "0.15.7" error-stack = "0.6" -gpui = { version = "0.2.2", default-features = false, features = ["wayland"] } -image = "0.25.9" -tap = "1.0.1" thiserror = "2.0" tokio = { version = "1.43.1", features = ["macros", "rt-multi-thread"] } tracing = "0.1" diff --git a/api/Cargo.toml b/api/Cargo.toml index f2c9e51..184d98a 100644 --- a/api/Cargo.toml +++ b/api/Cargo.toml @@ -13,6 +13,7 @@ tap = "1.0.1" thiserror = "2.0.17" tokio = { version = "1.48.0", features = ["fs"] } toml = "0.9.8" +tracing = "0.1.41" uuid = { version = "1.18.1", features = ["serde"] } [dev-dependencies] diff --git a/api/examples/items.rs b/api/examples/items.rs index 050aa9c..b91d8a0 100644 --- a/api/examples/items.rs +++ b/api/examples/items.rs @@ -2,15 +2,23 @@ use api::*; #[tokio::main] pub async fn main() { let config = std::fs::read_to_string("config.toml").expect("Config.toml"); - let config: JellyfinConfig = - toml::from_str(&config).expect("Failed to parse config.toml"); + let config: JellyfinConfig = toml::from_str(&config).expect("Failed to parse config.toml"); let mut jellyfin = JellyfinClient::new(config); - jellyfin.authenticate_with_cached_token(".session").await.expect("Auth"); - let items = jellyfin.raw_items().await.expect("Items"); + jellyfin + .authenticate_with_cached_token(".session") + .await + .expect("Auth"); + let items = jellyfin.items(None).await.expect("Items"); std::fs::write( "items.json", serde_json::to_string_pretty(&items).expect("Serialize items"), ); - + for item in items { + println!("{}: {:?}", item.id, item.name); + let items = jellyfin.items(item.id).await.expect("Items"); + for item in items { + println!(" {}: {:?}", item.id, item.name); + } + } } diff --git a/api/src/jellyfin.rs b/api/src/jellyfin.rs index 01f47e4..3f97e52 100644 --- a/api/src/jellyfin.rs +++ b/api/src/jellyfin.rs @@ -40,7 +40,7 @@ pub struct ActivityLogEntry { pub item_id: Option, /// Gets or sets the date. #[serde(rename = "Date")] - pub date: jiff::Zoned, + pub date: jiff::Timestamp, /// Gets or sets the user identifier. #[serde(rename = "UserId")] pub user_id: uuid::Uuid, @@ -130,7 +130,7 @@ pub struct AlbumInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, /// Gets or sets the album artist. @@ -195,7 +195,7 @@ pub struct ArtistInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, #[serde(rename = "SongInfos")] @@ -252,12 +252,12 @@ pub struct AuthenticationInfo { pub is_active: bool, /// Gets or sets the date created. #[serde(rename = "DateCreated")] - pub date_created: jiff::Zoned, + pub date_created: jiff::Timestamp, /// Gets or sets the date revoked. #[serde(rename = "DateRevoked")] - pub date_revoked: Option, + pub date_revoked: Option, #[serde(rename = "DateLastActivity")] - pub date_last_activity: jiff::Zoned, + pub date_last_activity: jiff::Timestamp, #[serde(rename = "UserName")] pub user_name: Option, } @@ -316,9 +316,9 @@ pub struct BaseItemDto { pub playlist_item_id: Option, /// Gets or sets the date created. #[serde(rename = "DateCreated")] - pub date_created: Option, + pub date_created: Option, #[serde(rename = "DateLastMediaAdded")] - pub date_last_media_added: Option, + pub date_last_media_added: Option, #[serde(rename = "ExtraType")] pub extra_type: Option, #[serde(rename = "AirsBeforeSeasonNumber")] @@ -351,7 +351,7 @@ pub struct BaseItemDto { pub video3_d_format: Option, /// Gets or sets the premiere date. #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, /// Gets or sets the external urls. #[serde(rename = "ExternalUrls")] pub external_urls: Option>, @@ -568,7 +568,7 @@ pub struct BaseItemDto { /** Gets or sets the blurhashes for the image tags. Maps image type to dictionary mapping image tag to blurhash value.*/ #[serde(rename = "ImageBlurHashes")] - pub image_blur_hashes: Option>, + pub image_blur_hashes: BaseItemDtoImageBlurHashes, /// Gets or sets the series studio. #[serde(rename = "SeriesStudio")] pub series_studio: Option, @@ -606,7 +606,7 @@ Maps image type to dictionary mapping image tag to blurhash value.*/ pub media_type: MediaType, /// Gets or sets the end date. #[serde(rename = "EndDate")] - pub end_date: Option, + pub end_date: Option, /// Gets or sets the locked fields. #[serde(rename = "LockedFields")] pub locked_fields: Option>, @@ -677,7 +677,7 @@ Maps image type to dictionary mapping image tag to blurhash value.*/ pub channel_primary_image_tag: Option, /// Gets or sets the start date of the recording, in UTC. #[serde(rename = "StartDate")] - pub start_date: Option, + pub start_date: Option, /// Gets or sets the completion percentage. #[serde(rename = "CompletionPercentage")] pub completion_percentage: Option, @@ -724,6 +724,37 @@ Maps image type to dictionary mapping image tag to blurhash value.*/ #[serde(rename = "CurrentProgram")] pub current_program: Option>, } +/** Gets or sets the blurhashes for the image tags. +Maps image type to dictionary mapping image tag to blurhash value.*/ +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct BaseItemDtoImageBlurHashes { + #[serde(rename = "Primary")] + pub primary: std::collections::HashMap, + #[serde(rename = "Art")] + pub art: std::collections::HashMap, + #[serde(rename = "Backdrop")] + pub backdrop: std::collections::HashMap, + #[serde(rename = "Banner")] + pub banner: std::collections::HashMap, + #[serde(rename = "Logo")] + pub logo: std::collections::HashMap, + #[serde(rename = "Thumb")] + pub thumb: std::collections::HashMap, + #[serde(rename = "Disc")] + pub disc: std::collections::HashMap, + #[serde(rename = "Box")] + pub _box: std::collections::HashMap, + #[serde(rename = "Screenshot")] + pub screenshot: std::collections::HashMap, + #[serde(rename = "Menu")] + pub menu: std::collections::HashMap, + #[serde(rename = "Chapter")] + pub chapter: std::collections::HashMap, + #[serde(rename = "BoxRear")] + pub box_rear: std::collections::HashMap, + #[serde(rename = "Profile")] + pub profile: std::collections::HashMap, +} /// Query result container. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct BaseItemDtoQueryResult { @@ -757,7 +788,37 @@ pub struct BaseItemPerson { pub primary_image_tag: Option, /// Gets or sets the primary image blurhash. #[serde(rename = "ImageBlurHashes")] - pub image_blur_hashes: Option>, + pub image_blur_hashes: BaseItemPersonImageBlurHashes, +} +/// Gets or sets the primary image blurhash. +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct BaseItemPersonImageBlurHashes { + #[serde(rename = "Primary")] + pub primary: std::collections::HashMap, + #[serde(rename = "Art")] + pub art: std::collections::HashMap, + #[serde(rename = "Backdrop")] + pub backdrop: std::collections::HashMap, + #[serde(rename = "Banner")] + pub banner: std::collections::HashMap, + #[serde(rename = "Logo")] + pub logo: std::collections::HashMap, + #[serde(rename = "Thumb")] + pub thumb: std::collections::HashMap, + #[serde(rename = "Disc")] + pub disc: std::collections::HashMap, + #[serde(rename = "Box")] + pub _box: std::collections::HashMap, + #[serde(rename = "Screenshot")] + pub screenshot: std::collections::HashMap, + #[serde(rename = "Menu")] + pub menu: std::collections::HashMap, + #[serde(rename = "Chapter")] + pub chapter: std::collections::HashMap, + #[serde(rename = "BoxRear")] + pub box_rear: std::collections::HashMap, + #[serde(rename = "Profile")] + pub profile: std::collections::HashMap, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct BookInfo { @@ -787,7 +848,7 @@ pub struct BookInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, #[serde(rename = "SeriesName")] @@ -834,7 +895,7 @@ pub struct BoxSetInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, } @@ -869,7 +930,7 @@ pub struct BrandingOptions { pub struct BufferRequestDto { /// Gets or sets when the request has been made by the client. #[serde(rename = "When")] - pub when: jiff::Zoned, + pub when: jiff::Timestamp, /// Gets or sets the position ticks. #[serde(rename = "PositionTicks")] pub position_ticks: i64, @@ -958,7 +1019,7 @@ pub struct ChapterInfo { #[serde(rename = "ImagePath")] pub image_path: Option, #[serde(rename = "ImageDateModified")] - pub image_date_modified: jiff::Zoned, + pub image_date_modified: jiff::Timestamp, #[serde(rename = "ImageTag")] pub image_tag: Option, } @@ -1183,7 +1244,7 @@ pub struct DeviceInfoDto { pub last_user_id: Option, /// Gets or sets the date last modified. #[serde(rename = "DateLastActivity")] - pub date_last_activity: Option, + pub date_last_activity: Option, /// Gets or sets the capabilities. #[serde(rename = "Capabilities")] pub capabilities: ClientCapabilitiesDto, @@ -1527,10 +1588,10 @@ pub struct FontFile { pub size: i64, /// Gets or sets the date created. #[serde(rename = "DateCreated")] - pub date_created: jiff::Zoned, + pub date_created: jiff::Timestamp, /// Gets or sets the date modified. #[serde(rename = "DateModified")] - pub date_modified: jiff::Zoned, + pub date_modified: jiff::Timestamp, } /// Force keep alive websocket messages. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -1569,7 +1630,7 @@ pub struct ForgotPasswordResult { pub pin_file: Option, /// Gets or sets the pin expiration date. #[serde(rename = "PinExpirationDate")] - pub pin_expiration_date: Option, + pub pin_expiration_date: Option, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct GeneralCommand { @@ -1605,7 +1666,7 @@ pub struct GetProgramsDto { pub user_id: Option, /// Gets or sets the minimum premiere start date. #[serde(rename = "MinStartDate")] - pub min_start_date: Option, + pub min_start_date: Option, /// Gets or sets filter by programs that have completed airing, or not. #[serde(rename = "HasAired")] pub has_aired: Option, @@ -1614,13 +1675,13 @@ pub struct GetProgramsDto { pub is_airing: Option, /// Gets or sets the maximum premiere start date. #[serde(rename = "MaxStartDate")] - pub max_start_date: Option, + pub max_start_date: Option, /// Gets or sets the minimum premiere end date. #[serde(rename = "MinEndDate")] - pub min_end_date: Option, + pub min_end_date: Option, /// Gets or sets the maximum premiere end date. #[serde(rename = "MaxEndDate")] - pub max_end_date: Option, + pub max_end_date: Option, /// Gets or sets filter for movies. #[serde(rename = "IsMovie")] pub is_movie: Option, @@ -1696,7 +1757,7 @@ pub struct GroupInfoDto { pub participants: Vec, /// Gets the date when this DTO has been created. #[serde(rename = "LastUpdatedAt")] - pub last_updated_at: jiff::Zoned, + pub last_updated_at: jiff::Timestamp, } /// Class GroupUpdate. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -1748,10 +1809,10 @@ pub struct GroupUpdate { pub struct GuideInfo { /// Gets or sets the start date. #[serde(rename = "StartDate")] - pub start_date: jiff::Zoned, + pub start_date: jiff::Timestamp, /// Gets or sets the end date. #[serde(rename = "EndDate")] - pub end_date: jiff::Zoned, + pub end_date: jiff::Timestamp, } /// Class IgnoreWaitRequestDto. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -2215,10 +2276,10 @@ pub struct LocalizationOption { pub struct LogFile { /// Gets or sets the date created. #[serde(rename = "DateCreated")] - pub date_created: jiff::Zoned, + pub date_created: jiff::Timestamp, /// Gets or sets the date modified. #[serde(rename = "DateModified")] - pub date_modified: jiff::Zoned, + pub date_modified: jiff::Timestamp, /// Gets or sets the size. #[serde(rename = "Size")] pub size: i64, @@ -2755,7 +2816,7 @@ pub struct MovieInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, } @@ -2800,7 +2861,7 @@ pub struct MusicVideoInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, #[serde(rename = "Artists")] @@ -3070,7 +3131,7 @@ pub struct PersonLookupInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, } @@ -3419,7 +3480,7 @@ pub struct PlayQueueUpdate { pub reason: PlayQueueUpdateReason, /// Gets the UTC time of the last change to the playing queue. #[serde(rename = "LastUpdate")] - pub last_update: jiff::Zoned, + pub last_update: jiff::Timestamp, /// Gets the playlist. #[serde(rename = "Playlist")] pub playlist: Vec, @@ -3729,14 +3790,14 @@ pub struct QuickConnectResult { pub app_version: String, /// Gets or sets the DateTime that this request was created. #[serde(rename = "DateAdded")] - pub date_added: jiff::Zoned, + pub date_added: jiff::Timestamp, } /// Class ReadyRequest. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct ReadyRequestDto { /// Gets or sets when the request has been made by the client. #[serde(rename = "When")] - pub when: jiff::Zoned, + pub when: jiff::Timestamp, /// Gets or sets the position ticks. #[serde(rename = "PositionTicks")] pub position_ticks: i64, @@ -3849,7 +3910,7 @@ pub struct RemoteSearchResult { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "ImageUrl")] pub image_url: Option, #[serde(rename = "SearchProviderName")] @@ -3878,7 +3939,7 @@ pub struct RemoteSubtitleInfo { #[serde(rename = "Comment")] pub comment: Option, #[serde(rename = "DateCreated")] - pub date_created: Option, + pub date_created: Option, #[serde(rename = "CommunityRating")] pub community_rating: Option, #[serde(rename = "FrameRate")] @@ -4051,10 +4112,10 @@ pub struct SearchHint { pub media_type: MediaType, /// Gets or sets the start date. #[serde(rename = "StartDate")] - pub start_date: Option, + pub start_date: Option, /// Gets or sets the end date. #[serde(rename = "EndDate")] - pub end_date: Option, + pub end_date: Option, /// Gets or sets the series. #[serde(rename = "Series")] pub series: Option, @@ -4117,7 +4178,7 @@ pub struct SendCommand { pub playlist_item_id: uuid::Uuid, /// Gets or sets the UTC time when to execute the command. #[serde(rename = "When")] - pub when: jiff::Zoned, + pub when: jiff::Timestamp, /// Gets the position ticks. #[serde(rename = "PositionTicks")] pub position_ticks: Option, @@ -4126,7 +4187,7 @@ pub struct SendCommand { pub command: SendCommandType, /// Gets the UTC time when this command has been emitted. #[serde(rename = "EmittedAt")] - pub emitted_at: jiff::Zoned, + pub emitted_at: jiff::Timestamp, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct SeriesInfo { @@ -4156,7 +4217,7 @@ pub struct SeriesInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, } @@ -4238,10 +4299,10 @@ pub struct SeriesTimerInfoDto { pub overview: Option, /// Gets or sets the start date of the recording, in UTC. #[serde(rename = "StartDate")] - pub start_date: jiff::Zoned, + pub start_date: jiff::Timestamp, /// Gets or sets the end date of the recording, in UTC. #[serde(rename = "EndDate")] - pub end_date: jiff::Zoned, + pub end_date: jiff::Timestamp, /// Gets or sets the name of the service. #[serde(rename = "ServiceName")] pub service_name: Option, @@ -4537,13 +4598,13 @@ pub struct SessionInfoDto { pub client: Option, /// Gets or sets the last activity date. #[serde(rename = "LastActivityDate")] - pub last_activity_date: jiff::Zoned, + pub last_activity_date: jiff::Timestamp, /// Gets or sets the last playback check in. #[serde(rename = "LastPlaybackCheckIn")] - pub last_playback_check_in: jiff::Zoned, + pub last_playback_check_in: jiff::Timestamp, /// Gets or sets the last paused date. #[serde(rename = "LastPausedDate")] - pub last_paused_date: Option, + pub last_paused_date: Option, /// Gets or sets the name of the device. #[serde(rename = "DeviceName")] pub device_name: Option, @@ -4699,7 +4760,7 @@ pub struct SongInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, #[serde(rename = "AlbumArtists")] @@ -4992,10 +5053,10 @@ pub struct TaskInfo { pub struct TaskResult { /// Gets or sets the start time UTC. #[serde(rename = "StartTimeUtc")] - pub start_time_utc: jiff::Zoned, + pub start_time_utc: jiff::Timestamp, /// Gets or sets the end time UTC. #[serde(rename = "EndTimeUtc")] - pub end_time_utc: jiff::Zoned, + pub end_time_utc: jiff::Timestamp, /// Gets or sets the status. #[serde(rename = "Status")] pub status: TaskCompletionStatus, @@ -5121,10 +5182,10 @@ pub struct TimerInfoDto { pub overview: Option, /// Gets or sets the start date of the recording, in UTC. #[serde(rename = "StartDate")] - pub start_date: jiff::Zoned, + pub start_date: jiff::Timestamp, /// Gets or sets the end date of the recording, in UTC. #[serde(rename = "EndDate")] - pub end_date: jiff::Zoned, + pub end_date: jiff::Timestamp, /// Gets or sets the name of the service. #[serde(rename = "ServiceName")] pub service_name: Option, @@ -5208,7 +5269,7 @@ pub struct TrailerInfo { #[serde(rename = "ParentIndexNumber")] pub parent_index_number: Option, #[serde(rename = "PremiereDate")] - pub premiere_date: Option, + pub premiere_date: Option, #[serde(rename = "IsAutomated")] pub is_automated: bool, } @@ -5518,7 +5579,7 @@ pub struct UpdateUserItemDataDto { pub likes: Option, /// Gets or sets the last played date. #[serde(rename = "LastPlayedDate")] - pub last_played_date: Option, + pub last_played_date: Option, /// Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played. #[serde(rename = "Played")] pub played: Option, @@ -5674,10 +5735,10 @@ This is not used by the server and is for client-side usage only.*/ pub enable_auto_login: Option, /// Gets or sets the last login date. #[serde(rename = "LastLoginDate")] - pub last_login_date: Option, + pub last_login_date: Option, /// Gets or sets the last activity date. #[serde(rename = "LastActivityDate")] - pub last_activity_date: Option, + pub last_activity_date: Option, /// Gets or sets the configuration. #[serde(rename = "Configuration")] pub configuration: Option, @@ -5714,7 +5775,7 @@ pub struct UserItemDataDto { pub likes: Option, /// Gets or sets the last played date. #[serde(rename = "LastPlayedDate")] - pub last_played_date: Option, + pub last_played_date: Option, /// Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played. #[serde(rename = "Played")] pub played: bool, @@ -5854,10 +5915,10 @@ pub struct UserUpdatedMessage { pub struct UtcTimeResponse { /// Gets the UTC time when request has been received. #[serde(rename = "RequestReceptionTime")] - pub request_reception_time: jiff::Zoned, + pub request_reception_time: jiff::Timestamp, /// Gets the UTC time when response has been sent. #[serde(rename = "ResponseTransmissionTime")] - pub response_transmission_time: jiff::Zoned, + pub response_transmission_time: jiff::Timestamp, } /// Validate path object. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] diff --git a/api/src/lib.rs b/api/src/lib.rs index 5928c7b..98cf325 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -1,5 +1,7 @@ pub mod jellyfin; +use std::sync::Arc; + use ::tap::*; use reqwest::Method; use serde::{Deserialize, Serialize}; @@ -12,6 +14,8 @@ pub enum JellyfinApiError { SerdeError(#[from] serde_json::Error), #[error("IO error: {0}")] IoError(#[from] std::io::Error), + #[error("Unknown Jellyfin API error")] + Unknown, } type Result = std::result::Result; @@ -19,8 +23,8 @@ type Result = std::result::Result; #[derive(Debug, Clone)] pub struct JellyfinClient { client: reqwest::Client, - access_token: Option, - config: JellyfinConfig, + access_token: Option>, + config: Arc, } impl JellyfinClient { @@ -28,13 +32,13 @@ impl JellyfinClient { JellyfinClient { client: reqwest::Client::new(), access_token: None, - config, + config: Arc::new(config), } } pub async fn save_token(&self, path: impl AsRef) -> std::io::Result<()> { if let Some(token) = &self.access_token { - tokio::fs::write(path, token).await + tokio::fs::write(path, &**token).await } else { Err(std::io::Error::new( std::io::ErrorKind::Other, @@ -43,10 +47,17 @@ impl JellyfinClient { } } - pub async fn load_token(&mut self, path: impl AsRef) -> std::io::Result<()> { + pub async fn load_token( + &mut self, + path: impl AsRef, + ) -> std::io::Result { let token = tokio::fs::read_to_string(path).await?; - self.access_token = Some(token); - Ok(()) + self.access_token = Some(token.clone().into()); + Ok(token) + } + + pub async fn set_token(&mut self, token: impl AsRef) { + self.access_token = Some(token.as_ref().into()); } pub fn request_builder( @@ -59,7 +70,7 @@ impl JellyfinClient { .header("X-Emby-Authorization", format!("MediaBrowser Client=\"Jello\", Device=\"Jello\", DeviceId=\"{}\", Version=\"1.0.0\"", self.config.device_id)) .pipe(|builder| { if let Some(token) = &self.access_token { - builder.header("X-MediaBrowser-Token", token) + builder.header("X-MediaBrowser-Token", &**token) } else { builder } @@ -118,20 +129,32 @@ impl JellyfinClient { }, ) .await?; - self.access_token = auth_result.access_token.clone(); + self.access_token = auth_result.access_token.clone().map(Into::into); Ok(auth_result) } pub async fn authenticate_with_cached_token( &mut self, path: impl AsRef, - ) -> Result<()> { + ) -> Result { let path = path.as_ref(); - if !self.load_token(path).await.is_ok() { + if let Ok(token) = self + .load_token(path) + .await + .inspect_err(|err| tracing::warn!("Failed to load cached token: {}", err)) + { self.authenticate().await?; self.save_token(path).await?; + Ok(token) + } else { + let token = self + .authenticate() + .await? + .access_token + .ok_or_else(|| JellyfinApiError::Unknown)?; + self.save_token(path).await?; + Ok(token) } - Ok(()) } pub async fn raw_items(&self) -> Result { @@ -148,7 +171,7 @@ impl JellyfinClient { pub async fn items( &self, - root: impl Into>, + root: impl Into>, ) -> Result> { let text = &self .request_builder(Method::GET, "Items") diff --git a/api/types.rs b/api/types.rs deleted file mode 100644 index 8f03c4d..0000000 --- a/api/types.rs +++ /dev/null @@ -1,3897 +0,0 @@ -use serde::{Deserialize, Serialize}; -use std::collections::BTreeMap; - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AccessSchedule { - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub user_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub day_of_week: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub start_hour: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub end_hour: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ActivityLogEntry { - #[serde(skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub overview: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub short_overview: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub item_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub date: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub user_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub user_primary_image_tag: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub severity: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ActivityLogEntryMessage { - #[serde(skip_serializing_if = "Option::is_none")] - pub data: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub message_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub message_type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ActivityLogEntryQueryResult { - #[serde(skip_serializing_if = "Option::is_none")] - pub items: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub total_record_count: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ActivityLogEntryStartMessage { - #[serde(skip_serializing_if = "Option::is_none")] - pub data: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub message_type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ActivityLogEntryStopMessage { - #[serde(skip_serializing_if = "Option::is_none")] - pub message_type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AddVirtualFolderDto { - #[serde(skip_serializing_if = "Option::is_none")] - pub library_options: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AlbumInfo { - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub original_title: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata_language: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata_country_code: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub provider_ids: Option>>, - #[serde(skip_serializing_if = "Option::is_none")] - pub year: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub index_number: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub parent_index_number: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub premiere_date: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub is_automated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub album_artists: Option>, - #[serde(skip_serializing_if = "Option::is_none")] - pub artist_provider_ids: Option>>, - #[serde(skip_serializing_if = "Option::is_none")] - pub song_infos: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AlbumInfoRemoteSearchQuery { - #[serde(skip_serializing_if = "Option::is_none")] - pub search_info: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub item_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub search_provider_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub include_disabled_providers: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AllThemeMediaResult { - #[serde(skip_serializing_if = "Option::is_none")] - pub theme_videos_result: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub theme_songs_result: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub soundtrack_songs_result: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ApiName(pub String); - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ArtistInfo { - #[serde(skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub original_title: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub path: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata_language: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub metadata_country_code: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub provider_ids: Option>>, - #[serde(skip_serializing_if = "Option::is_none")] - pub year: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub index_number: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub parent_index_number: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub premiere_date: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub is_automated: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub song_infos: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ArtistInfoRemoteSearchQuery { - #[serde(skip_serializing_if = "Option::is_none")] - pub search_info: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub item_id: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub search_provider_name: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub include_disabled_providers: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum AudioSpatialFormat { - None, - DolbyAtmos, - DTSX, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AuthenticateUserByName { - pub username: Option, - pub pw: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AuthenticationInfo { - pub id: Option, - pub access_token: Option, - pub device_id: Option, - pub app_name: Option, - pub app_version: Option, - pub device_name: Option, - pub user_id: Option, - pub is_active: Option, - pub date_created: Option, - pub date_revoked: Option, - pub date_last_activity: Option, - pub user_name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AuthenticationInfoQueryResult { - pub items: Option>, - pub total_record_count: Option, - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct AuthenticationResult { - pub user: Option, - pub session_info: Option, - pub access_token: Option, - pub server_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BaseItemDto { - pub name: Option, - pub original_title: Option, - pub server_id: Option, - pub id: String, - pub etag: Option, - pub source_type: Option, - pub playlist_item_id: Option, - pub date_created: Option, - pub date_last_media_added: Option, - pub extra_type: Option, - pub airs_before_season_number: Option, - pub airs_after_season_number: Option, - pub airs_before_episode_number: Option, - pub can_delete: Option, - pub can_download: Option, - pub has_lyrics: Option, - pub has_subtitles: Option, - pub preferred_metadata_language: Option, - pub preferred_metadata_country_code: Option, - pub container: Option, - pub sort_name: Option, - pub forced_sort_name: Option, - pub video_3_d_format: Option, - pub premiere_date: Option, - pub external_urls: Option>, - pub media_sources: Option>, - pub critic_rating: Option, - pub production_locations: Option>, - pub path: Option, - pub enable_media_source_display: Option, - pub official_rating: Option, - pub custom_rating: Option, - pub channel_id: Option, - pub channel_name: Option, - pub overview: Option, - pub taglines: Option>, - pub genres: Option>, - pub community_rating: Option, - pub cumulative_run_time_ticks: Option, - pub run_time_ticks: Option, - pub play_access: Option, - pub aspect_ratio: Option, - pub production_year: Option, - pub is_placeholder: Option, - pub number: Option, - pub channel_number: Option, - pub index_number: Option, - pub index_number_end: Option, - pub parent_index_number: Option, - pub remote_trailers: Option>, - pub provider_ids: Option>>, - pub is_hd: Option, - pub is_folder: Option, - pub parent_id: Option, - pub r#type: Option, - pub people: Option>, - pub studios: Option>, - pub genre_items: Option>, - pub parent_logo_item_id: Option, - pub parent_backdrop_item_id: Option, - pub parent_backdrop_image_tags: Option>, - pub local_trailer_count: Option, - pub user_data: Option, - pub recursive_item_count: Option, - pub child_count: Option, - pub series_name: Option, - pub series_id: Option, - pub season_id: Option, - pub special_feature_count: Option, - pub display_preferences_id: Option, - pub status: Option, - pub air_time: Option, - pub air_days: Option>, - pub tags: Option>, - pub primary_image_aspect_ratio: Option, - pub artists: Option>, - pub artist_items: Option>, - pub album: Option, - pub collection_type: Option, - pub display_order: Option, - pub album_id: Option, - pub album_primary_image_tag: Option, - pub series_primary_image_tag: Option, - pub album_artist: Option, - pub album_artists: Option>, - pub season_name: Option, - pub media_streams: Option>, - pub video_type: Option, - pub part_count: Option, - pub media_source_count: Option, - pub image_tags: Option>, - pub backdrop_image_tags: Option>, - pub screenshot_image_tags: Option>, - pub parent_logo_image_tag: Option, - pub parent_art_item_id: Option, - pub parent_art_image_tag: Option, - pub series_thumb_image_tag: Option, - pub image_blur_hashes: Option, - pub series_studio: Option, - pub parent_thumb_item_id: Option, - pub parent_thumb_image_tag: Option, - pub parent_primary_image_item_id: Option, - pub parent_primary_image_tag: Option, - pub chapters: Option>, - pub trickplay: Option>>, - pub location_type: Option, - pub iso_type: Option, - pub media_type: Option, - pub end_date: Option, - pub locked_fields: Option>, - pub trailer_count: Option, - pub movie_count: Option, - pub series_count: Option, - pub program_count: Option, - pub episode_count: Option, - pub song_count: Option, - pub album_count: Option, - pub artist_count: Option, - pub music_video_count: Option, - pub lock_data: Option, - pub width: Option, - pub height: Option, - pub camera_make: Option, - pub camera_model: Option, - pub software: Option, - pub exposure_time: Option, - pub focal_length: Option, - pub image_orientation: Option, - pub aperture: Option, - pub shutter_speed: Option, - pub latitude: Option, - pub longitude: Option, - pub altitude: Option, - pub iso_speed_rating: Option, - pub series_timer_id: Option, - pub program_id: Option, - pub channel_primary_image_tag: Option, - pub start_date: Option, - pub completion_percentage: Option, - pub is_repeat: Option, - pub episode_title: Option, - pub channel_type: Option, - pub audio: Option, - pub is_movie: Option, - pub is_sports: Option, - pub is_series: Option, - pub is_live: Option, - pub is_news: Option, - pub is_kids: Option, - pub is_premiere: Option, - pub timer_id: Option, - pub normalization_gain: Option, - pub current_program: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BaseItemDtoQueryResult { - pub items: Option>, - pub total_record_count: Option, - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum BaseItemKind { - AggregateFolder, - Audio, - AudioBook, - BasePluginFolder, - Book, - BoxSet, - Channel, - ChannelFolderItem, - CollectionFolder, - Episode, - Folder, - Genre, - ManualPlaylistsFolder, - Movie, - LiveTvChannel, - LiveTvProgram, - MusicAlbum, - MusicArtist, - MusicGenre, - MusicVideo, - Person, - Photo, - PhotoAlbum, - Playlist, - PlaylistsFolder, - Program, - Recording, - Season, - Series, - Studio, - Trailer, - TvChannel, - TvProgram, - UserRootFolder, - UserView, - Video, - Year, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BaseItemPerson { - pub name: Option, - pub id: String, - pub role: Option, - pub r#type: Option, - pub primary_image_tag: Option, - pub image_blur_hashes: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BasePluginConfiguration { - // no properties -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BookInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: Option, - pub series_name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BookInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: Option, - pub search_provider_name: Option, - pub include_disabled_providers: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BoxSetInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BoxSetInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: Option, - pub search_provider_name: Option, - pub include_disabled_providers: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BrandingOptions { - pub login_disclaimer: Option, - pub custom_css: Option, - pub splashscreen_enabled: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BufferRequestDto { - pub when: Option, - pub position_ticks: Option, - pub is_playing: Option, - pub playlist_item_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CastReceiverApplication { - pub id: String, - pub name: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ChannelFeatures { - pub name: String, - pub id: String, - pub can_search: Option, - pub media_types: Option>, - pub content_types: Option>, - pub max_page_size: Option, - pub auto_refresh_levels: Option, - pub default_sort_fields: Option>, - pub supports_sort_order_toggle: Option, - pub supports_latest_media: Option, - pub can_filter: Option, - pub supports_content_downloading: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ChannelItemSortField { - Name, - CommunityRating, - PremiereDate, - DateCreated, - Runtime, - PlayCount, - CommunityPlayCount, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ChannelMappingOptionsDto { - pub tuner_channels: Option>, - pub provider_channels: Option>, - pub mappings: Option>, - pub provider_name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ChannelMediaContentType { - Clip, - Podcast, - Trailer, - Movie, - Episode, - Song, - MovieExtra, - TvExtra, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ChannelMediaType { - Audio, - Video, - Photo, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ChannelType { - TV, - Radio, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ChapterInfo { - pub start_position_ticks: Option, - pub name: Option, - pub image_path: Option, - pub image_date_modified: Option, - pub image_tag: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CheckpointId { - pub id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ClientCapabilitiesDto { - pub playable_media_types: Option>, - pub supported_commands: Option>, - pub supports_media_control: Option, - pub supports_persistent_identifier: Option, - pub device_profile: Option, - pub app_store_url: Option, - pub icon_url: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ClientLogDocumentResponseDto { - pub file_name: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CodecProfile { - pub r#type: Option, - pub conditions: Option>, - pub apply_conditions: Option>, - pub codec: Option, - pub container: Option, - pub sub_container: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum CodecType { - Video, - VideoAudio, - Audio, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CollectionCreationResult { - pub id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum CollectionType { - Unknown, - Movies, - Tvshows, - Music, - Musicvideos, - Trailers, - Homevideos, - Boxsets, - Books, - Photos, - Livetv, - Playlists, - Folders, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum CollectionTypeOptions { - Movies, - Tvshows, - Music, - Musicvideos, - Homevideos, - Boxsets, - Books, - Mixed, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ConfigImageTypes { - pub backdrop_sizes: Option>, - pub base_url: Option, - pub logo_sizes: Option>, - pub poster_sizes: Option>, - pub profile_sizes: Option>, - pub secure_base_url: Option, - pub still_sizes: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ConfigurationPageInfo { - pub name: String, - pub enable_in_main_menu: Option, - pub menu_section: Option, - pub menu_icon: Option, - pub display_name: Option, - pub plugin_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ContainerProfile { - pub r#type: Option, - pub conditions: Option>, - pub container: Option, - pub sub_container: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum CountryInfo { - Name(String), - DisplayName(String), - TwoLetterISORegionName(String), - ThreeLetterISORegionName(String), -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CreatePlaylistDto { - pub name: String, - pub ids: Option>, - pub user_id: Option, - pub media_type: Option, - pub users: Option>, - pub is_public: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CreateUserByName { - pub name: String, - pub password: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct CultureDto { - pub name: String, - pub display_name: String, - pub two_letter_i_s_o_language_name: String, - pub three_letter_i_s_o_language_name: Option, - pub three_letter_i_s_o_language_names: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DayOfWeek { - Sunday, - Monday, - Tuesday, - Wednesday, - Thursday, - Friday, - Saturday, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DayPattern { - Daily, - Weekdays, - Weekends, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DefaultDirectoryBrowserInfoDto { - pub path: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DeinterlaceMethod { - Yadif, - Bwdif, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DeviceInfoDto { - Name: Option, - CustomName: Option, - AccessToken: Option, - Id: Option, - LastUserName: Option, - AppName: Option, - AppVersion: Option, - LastUserId: Option, - DateLastActivity: Option, - Capabilities: Option, - IconUrl: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DeviceInfoDtoQueryResult { - pub items: Option>, - pub total_record_count: Option, - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DeviceOptionsDto { - pub id: Option, - pub device_id: Option, - pub custom_name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DeviceProfile { - pub name: Option, - pub id: Option, - pub max_streaming_bitrate: Option, - pub max_static_bitrate: Option, - pub music_streaming_transcoding_bitrate: Option, - pub max_static_music_bitrate: Option, - pub direct_play_profiles: Option>, - pub transcoding_profiles: Option>, - pub container_profiles: Option>, - pub codec_profiles: Option>, - pub subtitle_profiles: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DirectPlayProfile { - pub container: Option, - pub audio_codec: Option, - pub video_codec: Option, - pub r#type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct DisplayPreferencesDto { - pub id: Option, - pub view_type: Option, - pub sort_by: Option, - pub index_by: Option, - pub remember_indexing: Option, - pub primary_image_height: Option, - pub primary_image_width: Option, - pub custom_prefs: Option>>, - pub scroll_direction: Option, - pub show_backdrop: Option, - pub remember_sorting: Option, - pub sort_order: Option, - pub show_sidebar: Option, - pub client: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DlnaProfileType { - Audio, - Video, - Photo, - Subtitle, - Lyric, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum DownMixStereoAlgorithms { - None, - Dave750, - NightmodeDialogue, - Rfc7845, - Ac4, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum EmbeddedSubtitleOptions { - AllowAll, - AllowText, - AllowImage, - AllowNone, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum EncoderPreset { - Auto, - Placebo, - Varieslow, - Slower, - Slow, - Medium, - Fast, - Faster, - Veryfast, - Superfast, - Ultrafast, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum EncodingContext { - Streaming, - Static, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct EncodingOptions { - pub encoding_thread_count: Option, - pub transcoding_temp_path: Option, - pub fallback_font_path: Option, - pub enable_fallback_font: Option, - pub enable_audio_vbr: Option, - pub down_mix_audio_boost: Option, - pub down_mix_stereo_algorithm: Option, - pub max_muxing_queue_size: Option, - pub enable_throttling: Option, - pub throttle_delay_seconds: Option, - pub enable_segment_deletion: Option, - pub segment_keep_seconds: Option, - pub hardware_acceleration_type: Option, - pub encoder_app_path: Option, - pub encoder_app_path_display: Option, - pub vaapi_device: Option, - pub qsv_device: Option, - pub enable_tonemapping: Option, - pub enable_vpp_tonemapping: Option, - pub enable_video_toolbox_tonemapping: Option, - pub tonemapping_algorithm: Option, - pub tonemapping_mode: Option, - pub tonemapping_range: Option, - pub tonemapping_desat: Option, - pub tonemapping_peak: Option, - pub tonemapping_param: Option, - pub vpp_tonemapping_brightness: Option, - pub vpp_tonemapping_contrast: Option, - pub h264_crf: Option, - pub h265_crf: Option, - pub encoder_preset: Option, - pub deinterlace_double_rate: Option, - pub deinterlace_method: Option, - pub enable_decoding_color_depth_10_hevc: Option, - pub enable_decoding_color_depth_10_vp9: Option, - pub enable_decoding_color_depth_10_hevc_rext: Option, - pub enable_decoding_color_depth_12_hevc_rext: Option, - pub enable_enhanced_nvdec_decoder: Option, - pub prefer_system_native_hw_decoder: Option, - pub enable_intel_low_power_h264_hw_encoder: Option, - pub enable_intel_low_power_hevc_hw_encoder: Option, - pub enable_hardware_encoding: Option, - pub allow_hevc_encoding: Option, - pub allow_av1_encoding: Option, - pub enable_subtitle_extraction: Option, - pub hardware_decoding_codecs: Option>, - pub allow_on_demand_metadata_based_keyframe_extraction_for_extensions: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum EndPointInfo { - is_local: Option, - is_in_network: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ExternalIdInfo { - pub name: String, - pub key: String, - pub r#type: Option, - pub url_format_string: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ExternalIdMediaType { - Album, - AlbumArtist, - Artist, - BoxSet, - Episode, - Movie, - OtherArtist, - Person, - ReleaseGroup, - Season, - Series, - Track, - Book, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ExternalUrl { - pub name: Option, - pub url: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ExtraType { - Unknown, - Clip, - Trailer, - BehindTheScenes, - DeletedScene, - Interview, - Scene, - Sample, - ThemeSong, - ThemeVideo, - Featurette, - Short, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct FileSystemEntryInfo { - pub name: String, - pub path: String, - pub r#type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum FileSystemEntryType { - File, - Directory, - NetworkComputer, - NetworkShare, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct FontFile { - pub name: Option, - pub size: i64, - pub date_created: String, - pub date_modified: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ForceKeepAliveMessage { - Data: Option, - MessageId: String, - MessageType: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ForgotPasswordAction { - ContactAdmin, - PinCode, - InNetworkRequired, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ForgotPasswordDto { - pub entered_username: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ForgotPasswordPinDto { - pub pin: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ForgotPasswordResult { - pub action: ForgotPasswordAction, - pub pin_file: Option, - pub pin_expiration_date: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GeneralCommand { - pub name: GeneralCommandType, - pub controlling_user_id: Option, - pub arguments: Option>>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GeneralCommandMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GeneralCommandType { - MoveUp, - MoveDown, - MoveLeft, - MoveRight, - PageUp, - PageDown, - PreviousLetter, - NextLetter, - ToggleOsd, - ToggleContextMenu, - Select, - Back, - TakeScreenshot, - SendKey, - SendString, - GoHome, - GoToSettings, - VolumeUp, - VolumeDown, - Mute, - Unmute, - ToggleMute, - SetVolume, - SetAudioStreamIndex, - SetSubtitleStreamIndex, - ToggleFullscreen, - DisplayContent, - GoToSearch, - DisplayMessage, - SetRepeatMode, - ChannelUp, - ChannelDown, - Guide, - ToggleStats, - PlayMediaSource, - PlayTrailers, - SetShuffleQueue, - PlayState, - PlayNext, - ToggleOsdMenu, - Play, - SetMaxStreamingBitrate, - SetPlaybackOrder, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GetProgramsDto { - pub channel_ids: Option>, - pub user_id: Option, - pub min_start_date: Option, - pub has_aired: Option, - pub is_airing: Option, - pub max_start_date: Option, - pub min_end_date: Option, - pub max_end_date: Option, - pub is_movie: Option, - pub is_series: Option, - pub is_news: Option, - pub is_kids: Option, - pub is_sports: Option, - pub start_index: Option, - pub limit: Option, - pub sort_by: Option>, - pub sort_order: Option>, - pub genres: Option>, - pub genre_ids: Option>, - pub enable_images: Option, - pub enable_total_record_count: Option, - pub image_type_limit: Option, - pub enable_image_types: Option>, - pub enable_user_data: Option, - pub series_timer_id: Option, - pub library_series_id: Option, - pub fields: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GroupInfoDto { - pub group_id: String, - pub group_name: String, - pub state: GroupStateType, - pub participants: Vec, - pub last_updated_at: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GroupInfoDtoGroupUpdate { - pub group_id: String, - pub r#type: GroupUpdateType, - pub data: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GroupQueueMode { - Queue, - QueueNext, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GroupRepeatMode { - RepeatOne, - RepeatAll, - RepeatNone, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GroupShuffleMode { - Sorted, - Shuffle, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GroupStateType { - Idle, - Waiting, - Paused, - Playing, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GroupStateUpdate { - pub state: GroupStateType, - pub reason: PlaybackRequestType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GroupStateUpdateGroupUpdate { - pub group_id: String, - pub r#type: GroupUpdateType, - pub data: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum GroupUpdateType { - UserJoined, - UserLeft, - GroupJoined, - GroupLeft, - StateUpdate, - PlayQueue, - NotInGroup, - GroupDoesNotExist, - CreateGroupDenied, - JoinGroupDenied, - LibraryAccessDenied, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct GuideInfo { - pub start_date: String, - pub end_date: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum HardwareAccelerationType { - None, - Amf, - Qsv, - Nvenc, - V4l2m2m, - Vaapi, - Videotoolbox, - Rkmpp, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct IgnoreWaitRequestDto { - pub ignore_wait: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ImageFormat { - Bmp, - Gif, - Jpg, - Png, - Webp, - Svg, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ImageInfo { - pub image_type: ImageType, - pub image_index: Option, - pub image_tag: Option, - pub path: Option, - pub blur_hash: Option, - pub height: Option, - pub width: Option, - pub size: i64, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ImageOption { - pub r#type: ImageType, - pub limit: Option, - pub min_width: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ImageOrientation { - TopLeft, - TopRight, - BottomRight, - BottomLeft, - LeftTop, - RightTop, - RightBottom, - LeftBottom, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ImageProviderInfo { - pub name: String, - pub supported_images: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ImageResolution { - MatchSource, - P144, - P240, - P360, - P480, - P720, - P1080, - P1440, - P2160, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ImageSavingConvention { - Legacy, - Compatible, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ImageType { - Primary, - Art, - Backdrop, - Banner, - Logo, - Thumb, - Disc, - Box, - Screenshot, - Menu, - Chapter, - BoxRear, - Profile, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct InboundKeepAliveMessage { - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct InboundWebSocketMessage { - #[serde(flatten)] - pub message: WebSocketMessage, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct InstallationInfo { - pub guid: String, - pub name: Option, - pub version: Option, - pub changelog: Option, - pub source_url: Option, - pub checksum: Option, - pub package_info: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct IPlugin { - pub name: Option, - pub description: Option, - pub id: String, - pub version: Option, - pub assembly_file_path: Option, - pub can_uninstall: bool, - pub data_folder_path: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum IsoType { - Dvd, - BluRay, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ItemCounts { - pub movie_count: i32, - pub series_count: i32, - pub episode_count: i32, - pub artist_count: i32, - pub program_count: i32, - pub trailer_count: i32, - pub song_count: i32, - pub album_count: i32, - pub music_video_count: i32, - pub box_set_count: i32, - pub book_count: i32, - pub item_count: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ItemFields { - AirTime, - CanDelete, - CanDownload, - ChannelInfo, - Chapters, - Trickplay, - ChildCount, - CumulativeRunTimeTicks, - CustomRating, - DateCreated, - DateLastMediaAdded, - DisplayPreferencesId, - Etag, - ExternalUrls, - Genres, - HomePageUrl, - ItemCounts, - MediaSourceCount, - MediaSources, - OriginalTitle, - Overview, - ParentId, - Path, - People, - PlayAccess, - ProductionLocations, - ProviderIds, - PrimaryImageAspectRatio, - RecursiveItemCount, - Settings, - ScreenshotImageTags, - SeriesPrimaryImage, - SeriesStudio, - SortName, - SpecialEpisodeNumbers, - Studios, - Taglines, - Tags, - RemoteTrailers, - MediaStreams, - SeasonUserData, - ServiceName, - ThemeSongIds, - ThemeVideoIds, - ExternalEtag, - PresentationUniqueKey, - InheritedParentalRatingValue, - ExternalSeriesId, - SeriesPresentationUniqueKey, - DateLastRefreshed, - DateLastSaved, - RefreshState, - ChannelImage, - EnableMediaSourceDisplay, - Width, - Height, - ExtraIds, - LocalTrailerCount, - IsHD, - SpecialFeatureCount, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ItemFilter { - IsFolder, - IsNotFolder, - IsUnplayed, - IsPlayed, - IsFavorite, - IsResumable, - Likes, - Dislikes, - IsFavoriteOrLikes, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ItemSortBy { - Default, - AiredEpisodeOrder, - Album, - AlbumArtist, - Artist, - DateCreated, - OfficialRating, - DatePlayed, - PremiereDate, - StartDate, - SortName, - Name, - Random, - Runtime, - CommunityRating, - ProductionYear, - PlayCount, - CriticRating, - IsFolder, - IsUnplayed, - IsPlayed, - SeriesSortName, - VideoBitRate, - AirTime, - Studio, - IsFavoriteOrLiked, - DateLastContentAdded, - SeriesDatePlayed, - ParentIndexNumber, - IndexNumber, - SimilarityScore, - SearchScore, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct JoinGroupRequestDto { - pub group_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum KeepUntil { - UntilDeleted, - UntilSpaceNeeded, - UntilWatched, - UntilDate, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryChangedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryOptionInfoDto { - pub name: Option, - pub default_enabled: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryOptions { - pub enabled: bool, - pub enable_photos: bool, - pub enable_realtime_monitor: bool, - pub enable_lufs_scan: bool, - pub enable_chapter_image_extraction: bool, - pub extract_chapter_images_during_library_scan: bool, - pub enable_trickplay_image_extraction: bool, - pub extract_trickplay_images_during_library_scan: bool, - pub path_infos: Option>, - pub save_local_metadata: bool, - pub enable_internet_providers: bool, - pub enable_automatic_series_grouping: bool, - pub enable_embedded_titles: bool, - pub enable_embedded_extras_titles: bool, - pub enable_embedded_episode_infos: bool, - pub automatic_refresh_interval_days: Option, - pub preferred_metadata_language: Option, - pub metadata_country_code: Option, - pub season_zero_display_name: String, - pub metadata_savers: Option>, - pub disabled_local_metadata_readers: Vec, - pub local_metadata_reader_order: Option>, - pub disabled_subtitle_fetchers: Vec, - pub subtitle_fetcher_order: Vec, - pub disabled_media_segment_providers: Vec, - pub media_segment_provide_order: Vec, - pub skip_subtitles_if_embedded_subtitles_present: bool, - pub skip_subtitles_if_audio_track_matches: bool, - pub subtitle_download_languages: Option>, - pub require_perfect_subtitle_match: bool, - pub save_subtitles_with_media: bool, - pub save_lyrics_with_media: bool, - pub save_trickplay_with_media: bool, - pub disabled_lyric_fetchers: Vec, - pub lyric_fetcher_order: Vec, - pub prefer_nonstandard_artists_tag: bool, - pub use_custom_tag_delimiters: bool, - pub custom_tag_delimiters: Option>, - pub delimiter_whitelist: Option>, - pub automatically_add_to_collection: bool, - pub allow_embedded_subtitles: EmbeddedSubtitleOptions, - pub type_options: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryOptionsResultDto { - pub metadata_savers: Option>, - pub metadata_readers: Option>, - pub subtitle_fetchers: Option>, - pub lyric_fetchers: Option>, - pub type_options: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryTypeOptionsDto { - pub r#type: Option, - pub metadata_fetchers: Option>, - pub image_fetchers: Option>, - pub supported_image_types: Option>, - pub default_image_options: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LibraryUpdateInfo { - pub folders_added_to: Option>, - pub folders_removed_from: Option>, - pub items_added: Option>, - pub items_removed: Option>, - pub items_updated: Option>, - pub collection_folders: Option>, - pub is_empty: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ListingsProviderInfo { - pub id: Option, - pub r#type: Option, - pub username: Option, - pub password: Option, - pub listings_id: Option, - pub zip_code: Option, - pub country: Option, - pub path: Option, - pub enabled_tuners: Option>, - pub enable_all_tuners: bool, - pub news_categories: Option>, - pub sports_categories: Option>, - pub kids_categories: Option>, - pub movie_categories: Option>, - pub channel_mappings: Option>, - pub movie_prefix: Option, - pub preferred_language: Option, - pub user_agent: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LiveStreamResponse { - pub media_source: MediaSourceInfo, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LiveTvInfo { - pub services: Vec, - pub is_enabled: bool, - pub enabled_users: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LiveTvOptions { - pub guide_days: Option, - pub recording_path: Option, - pub movie_recording_path: Option, - pub series_recording_path: Option, - pub enable_recording_subfolders: bool, - pub enable_original_audio_with_encoded_recordings: bool, - pub tuner_hosts: Option>, - pub listing_providers: Option>, - pub pre_padding_seconds: i32, - pub post_padding_seconds: i32, - pub media_locations_created: Option>, - pub recording_post_processor: Option, - pub recording_post_processor_arguments: Option, - pub save_recording_nfo: bool, - pub save_recording_images: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LiveTvServiceInfo { - pub name: Option, - pub home_page_url: Option, - pub status: LiveTvServiceStatus, - pub status_message: Option, - pub version: Option, - pub has_update_available: bool, - pub is_visible: bool, - pub tuners: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum LiveTvServiceStatus { - Ok, - Unavailable, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LocalizationOption { - pub name: Option, - pub value: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LocationType { - pub r#type: LocationTypeEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum LocationTypeEnum { - FileSystem, - Remote, - Virtual, - Offline, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LogFile { - pub date_created: String, - pub date_modified: String, - pub size: i64, - pub name: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LoginInfoInput { - pub username: String, - pub password: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LyricDto { - pub metadata: LyricMetadata, - pub lyrics: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LyricLine { - pub text: String, - pub start: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct LyricMetadata { - pub artist: Option, - pub album: Option, - pub title: Option, - pub author: Option, - pub length: Option, - pub by: Option, - pub offset: Option, - pub creator: Option, - pub version: Option, - pub is_synced: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaAttachment { - pub codec: Option, - pub codec_tag: Option, - pub comment: Option, - pub index: i32, - pub file_name: Option, - pub mime_type: Option, - pub delivery_url: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaPathDto { - pub name: String, - pub path: Option, - pub path_info: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaPathInfo { - pub path: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaProtocol { - File, - Http, - Rtmp, - Rtsp, - Udp, - Rtp, - Ftp, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaSegmentDto { - pub id: String, - pub item_id: String, - pub r#type: MediaSegmentType, - pub start_ticks: i64, - pub end_ticks: i64, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaSegmentType { - Unknown, - Commercial, - Preview, - Recap, - Outro, - Intro, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaSegmentDtoQueryResult { - pub items: Option>, - pub total_record_count: Option, - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaSourceInfo { - pub protocol: MediaProtocol, - pub id: Option, - pub path: Option, - pub encoder_path: Option, - pub encoder_protocol: Option, - pub r#type: MediaSourceType, - pub container: Option, - pub size: Option, - pub name: Option, - pub is_remote: bool, - pub etag: Option, - pub run_time_ticks: Option, - pub read_at_native_framerate: bool, - pub ignore_dts: bool, - pub ignore_index: bool, - pub gen_pts_input: bool, - pub supports_transcoding: bool, - pub supports_direct_stream: bool, - pub supports_direct_play: bool, - pub is_infinite_stream: bool, - pub use_most_compatible_transcoding_profile: bool, - pub requires_opening: bool, - pub open_token: Option, - pub requires_closing: bool, - pub live_stream_id: Option, - pub buffer_ms: Option, - pub requires_looping: bool, - pub supports_probing: bool, - pub video_type: Option, - pub iso_type: Option, - pub video_3_d_format: Option, - pub media_streams: Option>, - pub media_attachments: Option>, - pub formats: Option>, - pub bitrate: Option, - pub fallback_max_streaming_bitrate: Option, - pub timestamp: Option, - pub required_http_headers: Option>>, - pub transcoding_url: Option, - pub transcoding_sub_protocol: Option, - pub transcoding_container: Option, - pub analyze_duration_ms: Option, - pub default_audio_stream_index: Option, - pub default_subtitle_stream_index: Option, - pub has_segments: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaSourceType { - Default, - Grouping, - Placeholder, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaStream { - pub codec: Option, - pub codec_tag: Option, - pub language: Option, - pub color_range: Option, - pub color_space: Option, - pub color_transfer: Option, - pub color_primaries: Option, - pub dv_version_major: Option, - pub dv_version_minor: Option, - pub dv_profile: Option, - pub dv_level: Option, - pub rpu_present_flag: Option, - pub el_present_flag: Option, - pub bl_present_flag: Option, - pub dv_bl_signal_compatibility_id: Option, - pub rotation: Option, - pub comment: Option, - pub time_base: Option, - pub codec_time_base: Option, - pub title: Option, - pub video_range: VideoRange, - pub video_range_type: VideoRangeType, - pub video_do_vi_title: Option, - pub audio_spatial_format: AudioSpatialFormat, - pub localized_undefined: Option, - pub localized_default: Option, - pub localized_forced: Option, - pub localized_external: Option, - pub localized_hearing_impaired: Option, - pub display_title: Option, - pub nal_length_size: Option, - pub is_interlaced: bool, - pub is_avc: Option, - pub channel_layout: Option, - pub bitrate: Option, - pub bit_depth: Option, - pub ref_frames: Option, - pub packet_length: Option, - pub channels: Option, - pub sample_rate: Option, - pub is_default: bool, - pub is_forced: bool, - pub is_hearing_impaired: bool, - pub height: Option, - pub width: Option, - pub average_framerate: Option, - pub real_framerate: Option, - pub reference_framerate: Option, - pub profile: Option, - pub r#type: MediaStreamType, - pub aspect_ratio: Option, - pub index: i32, - pub score: Option, - pub is_external: bool, - pub delivery_method: Option, - pub delivery_url: Option, - pub is_external_url: Option, - pub is_text_subtitle_stream: bool, - pub supports_external_stream: bool, - pub path: Option, - pub pixel_format: Option, - pub level: Option, - pub is_anamorphic: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaStreamProtocol { - Http, - Hls, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaStreamType { - Audio, - Video, - Subtitle, - EmbeddedImage, - Data, - Lyric, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MediaType { - Unknown, - Video, - Audio, - Photo, - Book, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaUpdateInfoDto { - pub updates: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaUpdateInfoPathDto { - pub path: Option, - pub update_type: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MediaUrl { - pub url: Option, - pub name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MessageCommand { - pub header: Option, - pub text: String, - pub timeout_ms: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MetadataConfiguration { - pub use_file_creation_time_for_date_added: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MetadataEditorInfo { - pub parental_rating_options: Vec, - pub countries: Vec, - pub cultures: Vec, - pub external_id_infos: Vec, - pub content_type: Option, - pub content_type_options: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MetadataField { - pub r#type: MetadataFieldEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MetadataFieldEnum { - Cast, - Genres, - ProductionLocations, - Studios, - Tags, - Name, - Overview, - Runtime, - OfficialRating, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MetadataOptions { - pub item_type: Option, - pub disabled_metadata_savers: Option>, - pub local_metadata_reader_order: Option>, - pub disabled_metadata_fetchers: Option>, - pub metadata_fetcher_order: Option>, - pub disabled_image_fetchers: Option>, - pub image_fetcher_order: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MetadataRefreshMode { - None, - ValidationOnly, - Default, - FullRefresh, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MovePlaylistItemRequestDto { - pub playlist_item_id: String, - pub new_index: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MovieInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MovieInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: String, - pub search_provider_name: Option, - pub include_disabled_providers: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MusicVideoInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, - pub artists: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct MusicVideoInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: String, - pub search_provider_name: Option, - pub include_disabled_providers: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NameGuidPair { - pub name: Option, - pub id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NameIdPair { - pub name: Option, - pub id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NameValuePair { - pub name: Option, - pub value: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NetworkConfiguration { - pub base_url: String, - pub enable_https: bool, - pub require_https: bool, - pub certificate_path: String, - pub certificate_password: String, - pub internal_http_port: i32, - pub internal_https_port: i32, - pub public_http_port: i32, - pub public_https_port: i32, - pub auto_discovery: bool, - pub enable_upnp: bool, - pub enable_ipv4: bool, - pub enable_ipv6: bool, - pub enable_remote_access: bool, - pub local_network_subnets: Vec, - pub local_network_addresses: Vec, - pub known_proxies: Vec, - pub ignore_virtual_interfaces: bool, - pub virtual_interface_names: Vec, - pub enable_published_server_uri_by_request: bool, - pub published_server_uri_by_subnet: Vec, - pub remote_ip_filter: Vec, - pub is_remote_ip_filter_blacklist: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NewGroupRequestDto { - pub group_name: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct NextItemRequestDto { - pub playlist_item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct OpenLiveStreamDto { - pub open_token: Option, - pub user_id: Option, - pub play_session_id: Option, - pub max_streaming_bitrate: Option, - pub start_time_ticks: Option, - pub audio_stream_index: Option, - pub subtitle_stream_index: Option, - pub max_audio_channels: Option, - pub item_id: Option, - pub enable_direct_play: Option, - pub enable_direct_stream: Option, - pub always_burn_in_subtitle_when_transcoding: Option, - pub device_profile: Option, - pub direct_play_protocols: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct OutboundKeepAliveMessage { - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct OutboundWebSocketMessage { - #[serde(flatten)] - pub message: WebSocketMessage, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PackageInfo { - pub name: String, - pub description: String, - pub overview: String, - pub owner: String, - pub category: String, - pub guid: String, - pub versions: Vec, - pub image_url: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ParameterInclude { - pub r#type: ParameterIncludeEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ParameterIncludeEnum { - ProviderList, - LocalIpAddress, - LocalPort, - Https, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ParentalRating { - pub name: Option, - pub value: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PathSubstitution { - pub from: String, - pub to: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PersonKind { - pub r#type: PersonKindEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PersonKindEnum { - Unknown, - Actor, - Director, - Composer, - Writer, - GuestStar, - Producer, - Conductor, - Lyricist, - Arranger, - Engineer, - Mixer, - Remixer, - Creator, - Artist, - AlbumArtist, - Author, - Illustrator, - Penciller, - Inker, - Colorist, - Letterer, - CoverArtist, - Editor, - Translator, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PersonLookupInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PersonLookupInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: String, - pub search_provider_name: Option, - pub include_disabled_providers: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PingRequestDto { - pub ping: i64, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PinRedeemResult { - pub success: bool, - pub users_reset: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlayAccess { - Full, - None, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlaybackErrorCode { - NotAllowed, - NoCompatibleStream, - RateLimitExceeded, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaybackInfoDto { - pub user_id: Option, - pub max_streaming_bitrate: Option, - pub start_time_ticks: Option, - pub audio_stream_index: Option, - pub subtitle_stream_index: Option, - pub max_audio_channels: Option, - pub media_source_id: Option, - pub live_stream_id: Option, - pub device_profile: Option, - pub enable_direct_play: Option, - pub enable_direct_stream: Option, - pub enable_transcoding: Option, - pub allow_video_stream_copy: Option, - pub allow_audio_stream_copy: Option, - pub auto_open_live_stream: Option, - pub always_burn_in_subtitle_when_transcoding: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaybackInfoResponse { - pub media_sources: Vec, - pub play_session_id: Option, - pub error_code: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlaybackOrder { - Default, - Shuffle, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaybackProgressInfo { - pub can_seek: bool, - pub item: Option, - pub item_id: String, - pub session_id: Option, - pub media_source_id: Option, - pub audio_stream_index: Option, - pub subtitle_stream_index: Option, - pub is_paused: bool, - pub is_muted: bool, - pub position_ticks: Option, - pub playback_start_time_ticks: Option, - pub volume_level: Option, - pub brightness: Option, - pub aspect_ratio: Option, - pub play_method: PlayMethod, - pub live_stream_id: Option, - pub play_session_id: Option, - pub repeat_mode: RepeatMode, - pub playback_order: PlaybackOrder, - pub now_playing_queue: Option>, - pub playlist_item_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlaybackRequestType { - Play, - SetPlaylistItem, - RemoveFromPlaylist, - MovePlaylistItem, - Queue, - Unpause, - Pause, - Stop, - Seek, - Buffer, - Ready, - NextItem, - PreviousItem, - SetRepeatMode, - SetShuffleMode, - Ping, - IgnoreWait, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaybackStartInfo { - pub can_seek: bool, - pub item: Option, - pub item_id: String, - pub session_id: Option, - pub media_source_id: Option, - pub audio_stream_index: Option, - pub subtitle_stream_index: Option, - pub is_paused: bool, - pub is_muted: bool, - pub position_ticks: Option, - pub playback_start_time_ticks: Option, - pub volume_level: Option, - pub brightness: Option, - pub aspect_ratio: Option, - pub play_method: PlayMethod, - pub live_stream_id: Option, - pub play_session_id: Option, - pub repeat_mode: RepeatMode, - pub playback_order: PlaybackOrder, - pub now_playing_queue: Option>, - pub playlist_item_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaybackStopInfo { - pub item: Option, - pub item_id: String, - pub session_id: Option, - pub media_source_id: Option, - pub position_ticks: Option, - pub live_stream_id: Option, - pub play_session_id: Option, - pub failed: bool, - pub next_media_type: Option, - pub playlist_item_id: Option, - pub now_playing_queue: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlayCommand { - PlayNow, - PlayNext, - PlayLast, - PlayInstantMix, - PlayShuffle, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlayQueueUpdate { - pub reason: PlayQueueUpdateReason, - pub last_update: String, - pub playlist: Vec, - pub playing_item_index: i32, - pub start_position_ticks: i64, - pub is_playing: bool, - pub shuffle_mode: GroupShuffleMode, - pub repeat_mode: GroupRepeatMode, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlayQueueUpdateGroupUpdate { - pub group_id: String, - pub r#type: GroupUpdateType, - pub data: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlayQueueUpdateReason { - NewPlaylist, - SetCurrentItem, - RemoveItems, - MoveItem, - Queue, - QueueNext, - NextItem, - PreviousItem, - RepeatMode, - ShuffleMode, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlayRequest { - pub item_ids: Option>, - pub start_position_ticks: Option, - pub play_command: Option, - pub controlling_user_id: Option, - pub subtitle_stream_index: Option, - pub audio_stream_index: Option, - pub media_source_id: Option, - pub start_index: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlayRequestDto { - pub playing_queue: Vec, - pub playing_item_position: i32, - pub start_position_ticks: i64, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PlaystateCommand { - Stop, - Pause, - Unpause, - NextTrack, - PreviousTrack, - Seek, - Rewind, - FastForward, - PlayPause, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PlaystateRequest { - pub command: PlaystateCommand, - pub seek_position_ticks: Option, - pub controlling_user_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginInfo { - pub name: String, - pub version: String, - pub configuration_file_name: Option, - pub description: String, - pub id: String, - pub can_uninstall: bool, - pub has_image: bool, - pub status: PluginStatus, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum PluginStatus { - Active, - Restart, - Deleted, - Superceded, - Malfunctioned, - NotSupported, - Disabled, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginInstallationCancelledMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginInstallationCompletedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginInstallationFailedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginInstallingMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PluginUninstalledMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PreviousItemRequestDto { - pub playlist_item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ProblemDetails { - pub r#type: Option, - pub title: Option, - pub status: Option, - pub detail: Option, - pub instance: Option, - #[serde(flatten)] - pub additional: BTreeMap, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ProcessPriorityClass { - Normal, - Idle, - High, - RealTime, - BelowNormal, - AboveNormal, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ProfileCondition { - pub condition: ProfileConditionType, - pub property: ProfileConditionValue, - pub value: Option, - pub is_required: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ProfileConditionType { - Equals, - NotEquals, - LessThanEqual, - GreaterThanEqual, - EqualsAny, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ProfileConditionValue { - AudioChannels, - AudioBitrate, - AudioProfile, - Width, - Height, - Has64BitOffsets, - PacketLength, - VideoBitDepth, - VideoBitrate, - VideoFramerate, - VideoLevel, - VideoProfile, - VideoTimestamp, - IsAnamorphic, - RefFrames, - NumAudioStreams, - NumVideoStreams, - IsSecondaryAudio, - VideoCodecTag, - IsAvc, - IsInterlaced, - AudioSampleRate, - AudioBitDepth, - VideoRangeType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ProgramAudio { - Mono, - Stereo, - Dolby, - DolbyDigital, - Thx, - Atmos, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct PublicSystemInfo { - pub local_address: Option, - pub server_name: Option, - pub version: Option, - pub product_name: Option, - pub operating_system: Option, - pub id: Option, - pub startup_wizard_completed: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QueryFilters { - pub genres: Option>, - pub tags: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QueryFiltersLegacy { - pub genres: Option>, - pub tags: Option>, - pub official_ratings: Option>, - pub years: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QueueItem { - pub id: String, - pub playlist_item_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QueueRequestDto { - pub item_ids: Vec, - pub mode: GroupQueueMode, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QuickConnectDto { - pub secret: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct QuickConnectResult { - pub authenticated: bool, - pub secret: String, - pub code: String, - pub device_id: String, - pub device_name: String, - pub app_name: String, - pub app_version: String, - pub date_added: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum RatingType { - Score, - Likes, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ReadyRequestDto { - pub when: String, - pub position_ticks: i64, - pub is_playing: bool, - pub playlist_item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RecommendationDto { - pub items: Option>, - pub recommendation_type: RecommendationType, - pub baseline_item_name: Option, - pub category_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum RecommendationType { - SimilarToRecentlyPlayed, - SimilarToLikedItem, - HasDirectorFromRecentlyPlayed, - HasActorFromRecentlyPlayed, - HasLikedDirector, - HasLikedActor, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum RecordingStatus { - New, - InProgress, - Completed, - Cancelled, - ConflictedOk, - ConflictedNotOk, - Error, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RefreshProgressMessage { - pub data: Option>>, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoteImageInfo { - pub provider_name: Option, - pub url: Option, - pub thumbnail_url: Option, - pub height: Option, - pub width: Option, - pub community_rating: Option, - pub vote_count: Option, - pub language: Option, - pub r#type: ImageType, - pub rating_type: RatingType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoteImageResult { - pub images: Option>, - pub total_record_count: i32, - pub providers: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoteLyricInfoDto { - pub id: String, - pub provider_name: String, - pub lyrics: LyricDto, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoteSearchResult { - pub name: Option, - pub provider_ids: Option>>, - pub production_year: Option, - pub index_number: Option, - pub index_number_end: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub image_url: Option, - pub search_provider_name: Option, - pub overview: Option, - pub album_artist: Option, - pub artists: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoteSubtitleInfo { - pub three_letter_i_s_o_language_name: Option, - pub id: Option, - pub provider_name: Option, - pub name: Option, - pub format: Option, - pub author: Option, - pub comment: Option, - pub date_created: Option, - pub community_rating: Option, - pub frame_rate: Option, - pub download_count: Option, - pub is_hash_match: Option, - pub ai_translated: Option, - pub machine_translated: Option, - pub forced: Option, - pub hearing_impaired: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemovedItem { - pub item_id: String, - pub series_id: Option, - pub season: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemovedItemQueryResult { - pub items: Option>, - pub total_record_count: i32, - pub start_index: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RemoveFromPlaylistRequestDto { - pub playlist_item_ids: Option>, - pub clear_playlist: bool, - pub clear_playing_item: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum RepeatMode { - RepeatNone, - RepeatAll, - RepeatOne, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RepositoryInfo { - pub name: Option, - pub url: Option, - pub enabled: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct RestartRequiredMessage { - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ScheduledTaskEndedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ScheduledTasksInfoMessage { - pub data: Option>, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ScheduledTasksInfoStartMessage { - pub data: Option, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ScheduledTasksInfoStopMessage { - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum ScrollDirection { - Horizontal, - Vertical, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SearchHint { - pub item_id: Option, - pub id: String, - pub name: String, - pub matched_term: Option, - pub index_number: Option, - pub production_year: Option, - pub parent_index_number: Option, - pub primary_image_tag: Option, - pub thumb_image_tag: Option, - pub thumb_image_item_id: Option, - pub backdrop_image_tag: Option, - pub backdrop_image_item_id: Option, - pub r#type: Option, - pub is_folder: Option, - pub run_time_ticks: Option, - pub media_type: Option, - pub start_date: Option, - pub end_date: Option, - pub series: Option, - pub status: Option, - pub album: Option, - pub album_id: Option, - pub album_artist: Option, - pub artists: Option>, - pub song_count: Option, - pub episode_count: Option, - pub channel_id: Option, - pub channel_name: Option, - pub primary_image_aspect_ratio: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SearchHintResult { - pub search_hints: Vec, - pub total_record_count: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeekRequestDto { - pub position_ticks: i64, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SendCommand { - pub group_id: String, - pub playlist_item_id: String, - pub when: String, - pub position_ticks: Option, - pub command: SendCommandType, - pub emitted_at: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SendCommandType { - Unpause, - Pause, - Stop, - Seek, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: String, - pub search_provider_name: Option, - pub include_disabled_providers: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SeriesStatus { - Continuing, - Ended, - Unreleased, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesTimerCancelledMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesTimerCreatedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesTimerInfoDto { - pub id: Option, - pub r#type: Option, - pub server_id: Option, - pub external_id: Option, - pub channel_id: String, - pub external_channel_id: Option, - pub channel_name: Option, - pub channel_primary_image_tag: Option, - pub program_id: Option, - pub external_program_id: Option, - pub name: Option, - pub overview: Option, - pub start_date: String, - pub end_date: String, - pub service_name: Option, - pub priority: i32, - pub pre_padding_seconds: i32, - pub post_padding_seconds: i32, - pub is_pre_padding_required: bool, - pub parent_backdrop_item_id: Option, - pub parent_backdrop_image_tags: Option>, - pub is_post_padding_required: bool, - pub keep_until: KeepUntil, - pub record_any_time: bool, - pub skip_episodes_in_library: bool, - pub record_any_channel: bool, - pub keep_up_to: Option, - pub record_new_only: bool, - pub days: Option>, - pub day_pattern: Option, - pub image_tags: Option>, - pub parent_thumb_item_id: Option, - pub parent_thumb_image_tag: Option, - pub parent_primary_image_item_id: Option, - pub parent_primary_image_tag: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SeriesTimerInfoDtoQueryResult { - pub items: Option>, - pub total_record_count: i32, - pub start_index: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ServerConfiguration { - pub log_file_retention_days: i32, - pub is_startup_wizard_completed: bool, - pub cache_path: Option, - pub previous_version: Option, - pub previous_version_str: Option, - pub enable_metrics: bool, - pub enable_normalized_item_by_name_ids: bool, - pub is_port_authorized: bool, - pub quick_connect_available: bool, - pub enable_case_sensitive_item_ids: bool, - pub disable_live_tv_channel_user_data_name: bool, - pub metadata_path: Option, - pub preferred_metadata_language: Option, - pub metadata_country_code: Option, - pub sort_replace_characters: Option>, - pub sort_remove_characters: Option>, - pub sort_remove_words: Option>, - pub min_resume_pct: i32, - pub max_resume_pct: i32, - pub min_resume_duration_seconds: i32, - pub min_audiobook_resume: i32, - pub max_audiobook_resume: i32, - pub inactive_session_threshold: i32, - pub library_monitor_delay: i32, - pub library_update_duration: i32, - pub image_saving_convention: ImageSavingConvention, - pub metadata_options: Option>, - pub skip_deserialization_for_basic_types: bool, - pub server_name: String, - pub u_i_culture: String, - pub save_metadata_hidden: bool, - pub content_types: Option>, - pub remote_client_bitrate_limit: i32, - pub enable_folder_view: bool, - pub enable_grouping_into_collections: bool, - pub display_specials_within_seasons: bool, - pub codecs_used: Option>, - pub plugin_repositories: Option>, - pub enable_external_content_in_suggestions: bool, - pub image_extraction_timeout_ms: i32, - pub path_substitutions: Option>, - pub enable_slow_response_warning: bool, - pub slow_response_threshold_ms: i64, - pub cors_hosts: Option>, - pub activity_log_retention_days: Option, - pub library_scan_fanout_concurrency: i32, - pub library_metadata_refresh_concurrency: i32, - pub remove_old_plugins: bool, - pub allow_client_log_upload: bool, - pub dummy_chapter_duration: i32, - pub chapter_image_resolution: ImageResolution, - pub parallel_image_encoding_limit: i32, - pub cast_receiver_applications: Option>, - pub trickplay_options: TrickplayOptions, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ServerDiscoveryInfo { - pub address: String, - pub id: String, - pub name: String, - pub endpoint_address: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ServerRestartingMessage { - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ServerShuttingDownMessage { - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SessionInfoDto { - pub play_state: Option, - pub additional_users: Option>, - pub capabilities: Option, - pub remote_end_point: Option, - pub playable_media_types: Option>, - pub id: Option, - pub user_id: String, - pub user_name: Option, - pub client: Option, - pub last_activity_date: String, - pub last_playback_check_in: String, - pub last_paused_date: Option, - pub device_name: Option, - pub device_type: Option, - pub now_playing_item: Option, - pub now_viewing_item: Option, - pub device_id: Option, - pub application_version: Option, - pub transcoding_info: Option, - pub is_active: bool, - pub supports_media_control: bool, - pub supports_remote_control: bool, - pub now_playing_queue: Option>, - pub now_playing_queue_full_items: Option>, - pub has_custom_device_name: bool, - pub playlist_item_id: Option, - pub server_id: Option, - pub user_primary_image_tag: Option, - pub supported_commands: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SessionMessageType { - ForceKeepAlive, - GeneralCommand, - UserDataChanged, - Sessions, - Play, - SyncPlayCommand, - SyncPlayGroupUpdate, - Playstate, - RestartRequired, - ServerShuttingDown, - ServerRestarting, - LibraryChanged, - UserDeleted, - UserUpdated, - SeriesTimerCreated, - TimerCreated, - SeriesTimerCancelled, - TimerCancelled, - RefreshProgress, - ScheduledTaskEnded, - PackageInstallationCancelled, - PackageInstallationFailed, - PackageInstallationCompleted, - PackageInstalling, - PackageUninstalled, - ActivityLogEntry, - ScheduledTasksInfo, - ActivityLogEntryStart, - ActivityLogEntryStop, - SessionsStart, - SessionsStop, - ScheduledTasksInfoStart, - ScheduledTasksInfoStop, - KeepAlive, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SessionsMessage { - pub data: Option>, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SessionsStartMessage { - pub data: Option, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SessionsStopMessage { - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SessionUserInfo { - pub user_id: String, - pub user_name: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SetChannelMappingDto { - pub provider_id: String, - pub tuner_channel_id: String, - pub provider_channel_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SetPlaylistItemRequestDto { - pub playlist_item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SetRepeatModeRequestDto { - pub mode: GroupRepeatMode, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SetShuffleModeRequestDto { - pub mode: GroupShuffleMode, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SongInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, - pub album_artists: Option>, - pub album: Option, - pub artists: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SortOrder { - Ascending, - Descending, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SpecialViewOptionDto { - pub name: Option, - pub id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct StartupConfigurationDto { - pub u_i_culture: Option, - pub metadata_country_code: Option, - pub preferred_metadata_language: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct StartupRemoteAccessDto { - pub enable_remote_access: bool, - pub enable_automatic_port_mapping: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct StartupUserDto { - pub name: Option, - pub password: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum Status { - Completed, - Watching, - Both, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct StringGroupUpdate { - pub group_id: String, - pub r#type: GroupUpdateType, - pub data: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SubtitleDeliveryMethod { - Encode, - Embed, - External, - Hls, - Drop, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SubtitleOptions { - pub skip_if_embedded_subtitles_present: bool, - pub skip_if_audio_track_matches: bool, - pub download_languages: Option>, - pub download_movie_subtitles: bool, - pub download_episode_subtitles: bool, - pub open_subtitles_username: Option, - pub open_subtitles_password_hash: Option, - pub is_open_subtitle_vip_account: bool, - pub require_perfect_match: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SubtitlePlaybackMode { - Default, - Always, - OnlyForced, - None, - Smart, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SubtitleProfile { - pub format: Option, - pub method: SubtitleDeliveryMethod, - pub didl_mode: Option, - pub language: Option, - pub container: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SyncAction { - UpdateProvider, - UpdateJellyfin, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SyncPlayCommandMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SyncPlayGroupUpdateCommandMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SyncPlayQueueItem { - pub item_id: String, - pub playlist_item_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum SyncPlayUserAccessType { - CreateAndJoinGroups, - JoinGroups, - None, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SyncStats { - pub updated_folders: i32, - pub removed_folders: i32, - pub updated_box_sets: i32, - pub removed_box_sets: i32, - pub updated_playlists: i32, - pub removed_playlists: i32, - pub updated_tv_shows: i32, - pub removed_tv_shows: i32, - pub updated_seasons: i32, - pub removed_seasons: i32, - pub updated_videos: i32, - pub removed_videos: i32, - pub updated_collection_folders: i32, - pub updated_user_data: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SystemInfo { - pub local_address: Option, - pub server_name: Option, - pub version: Option, - pub product_name: Option, - pub operating_system: Option, - pub id: Option, - pub startup_wizard_completed: Option, - pub operating_system_display_name: Option, - pub package_name: Option, - pub has_pending_restart: bool, - pub is_shutting_down: bool, - pub supports_library_monitor: bool, - pub web_socket_port_number: i32, - pub completed_installations: Option>, - pub can_self_restart: bool, - pub can_launch_web_browser: bool, - pub program_data_path: Option, - pub web_path: Option, - pub items_by_name_path: Option, - pub cache_path: Option, - pub log_path: Option, - pub internal_metadata_path: Option, - pub transcoding_temp_path: Option, - pub cast_receiver_applications: Option>, - pub has_update_available: bool, - pub encoder_location: String, - pub system_architecture: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TaskCompletionStatus { - pub r#type: TaskCompletionStatusEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TaskCompletionStatusEnum { - Completed, - Failed, - Cancelled, - Aborted, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TaskInfo { - pub name: Option, - pub state: TaskState, - pub current_progress_percentage: Option, - pub id: Option, - pub last_execution_result: Option, - pub triggers: Option>, - pub description: Option, - pub category: Option, - pub is_hidden: bool, - pub key: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TaskResult { - pub start_time_utc: String, - pub end_time_utc: String, - pub status: TaskCompletionStatus, - pub name: Option, - pub key: Option, - pub id: Option, - pub error_message: Option, - pub long_error_message: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TaskState { - Idle, - Cancelling, - Running, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TaskTriggerInfo { - pub r#type: Option, - pub time_of_day_ticks: Option, - pub interval_ticks: Option, - pub day_of_week: Option, - pub max_runtime_ticks: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct ThemeMediaResult { - pub items: Option>, - pub total_record_count: i32, - pub start_index: i32, - pub owner_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TimerCancelledMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TimerCreatedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TimerEventInfo { - pub id: String, - pub program_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TimerInfoDto { - pub id: Option, - pub r#type: Option, - pub server_id: Option, - pub external_id: Option, - pub channel_id: String, - pub external_channel_id: Option, - pub channel_name: Option, - pub channel_primary_image_tag: Option, - pub program_id: Option, - pub external_program_id: Option, - pub name: Option, - pub overview: Option, - pub start_date: String, - pub end_date: String, - pub service_name: Option, - pub priority: i32, - pub pre_padding_seconds: i32, - pub post_padding_seconds: i32, - pub is_pre_padding_required: bool, - pub parent_backdrop_item_id: Option, - pub parent_backdrop_image_tags: Option>, - pub is_post_padding_required: bool, - pub keep_until: KeepUntil, - pub status: RecordingStatus, - pub series_timer_id: Option, - pub external_series_timer_id: Option, - pub run_time_ticks: Option, - pub program_info: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TimerInfoDtoQueryResult { - pub items: Option>, - pub total_record_count: i32, - pub start_index: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TonemappingAlgorithm { - pub r#type: TonemappingAlgorithmEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TonemappingAlgorithmEnum { - None, - Clip, - Linear, - Gamma, - Reinhard, - Hable, - Mobius, - Bt2390, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TonemappingMode { - pub r#type: TonemappingModeEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TonemappingModeEnum { - Auto, - Max, - Rgb, - Lum, - Itp, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TonemappingRange { - pub r#type: TonemappingRangeEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TonemappingRangeEnum { - Auto, - Tv, - Pc, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TrailerInfo { - pub name: Option, - pub original_title: Option, - pub path: Option, - pub metadata_language: Option, - pub metadata_country_code: Option, - pub provider_ids: Option>>, - pub year: Option, - pub index_number: Option, - pub parent_index_number: Option, - pub premiere_date: Option, - pub is_automated: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TrailerInfoRemoteSearchQuery { - pub search_info: Option, - pub item_id: String, - pub search_provider_name: Option, - pub include_disabled_providers: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TranscodeReason { - pub r#type: TranscodeReasonEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TranscodeReasonEnum { - ContainerNotSupported, - VideoCodecNotSupported, - AudioCodecNotSupported, - SubtitleCodecNotSupported, - AudioIsExternal, - SecondaryAudioNotSupported, - VideoProfileNotSupported, - VideoLevelNotSupported, - VideoResolutionNotSupported, - VideoBitDepthNotSupported, - VideoFramerateNotSupported, - RefFramesNotSupported, - AnamorphicVideoNotSupported, - InterlacedVideoNotSupported, - AudioChannelsNotSupported, - AudioProfileNotSupported, - AudioSampleRateNotSupported, - AudioBitDepthNotSupported, - ContainerBitrateExceedsLimit, - VideoBitrateNotSupported, - AudioBitrateNotSupported, - UnknownVideoStreamInfo, - UnknownAudioStreamInfo, - DirectPlayError, - VideoRangeTypeNotSupported, - VideoCodecTagNotSupported, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TranscodeSeekInfo { - pub r#type: TranscodeSeekInfoEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TranscodeSeekInfoEnum { - Auto, - Bytes, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TranscodingInfo { - pub audio_codec: Option, - pub video_codec: Option, - pub container: Option, - pub is_video_direct: bool, - pub is_audio_direct: bool, - pub bitrate: Option, - pub framerate: Option, - pub completion_percentage: Option, - pub width: Option, - pub height: Option, - pub audio_channels: Option, - pub hardware_acceleration_type: Option, - pub transcoding_reasons: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TranscodingProfile { - pub container: Option, - pub r#type: DlnaProfileType, - pub video_codec: Option, - pub audio_codec: Option, - pub protocol: MediaStreamProtocol, - pub estimate_content_length: bool, - pub enable_mpegts_m2_ts_mode: bool, - pub transcoding_seek_info: TranscodeSeekInfo, - pub copy_timestamps: bool, - pub context: EncodingContext, - pub enable_subtitles_in_manifest: bool, - pub max_audio_channels: Option, - pub min_segments: i32, - pub segment_length: i32, - pub break_on_non_key_frames: bool, - pub conditions: Option>, - pub enable_audio_vbr_encoding: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TransportStreamTimestamp { - pub r#type: TransportStreamTimestampEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TransportStreamTimestampEnum { - None, - Zero, - Valid, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TrickplayInfo { - pub width: i32, - pub height: i32, - pub tile_width: i32, - pub tile_height: i32, - pub thumbnail_count: i32, - pub interval: i32, - pub bandwidth: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TrickplayOptions { - pub enable_hw_acceleration: bool, - pub enable_hw_encoding: bool, - pub enable_key_frame_only_extraction: bool, - pub scan_behavior: TrickplayScanBehavior, - pub process_priority: ProcessPriorityClass, - pub interval: i32, - pub width_resolutions: Option>, - pub tile_width: i32, - pub tile_height: i32, - pub qscale: i32, - pub jpeg_quality: i32, - pub process_threads: i32, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum TrickplayScanBehavior { - Blocking, - NonBlocking, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TunerChannelMapping { - pub name: Option, - pub provider_channel_name: Option, - pub provider_channel_id: Option, - pub id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TunerHostInfo { - pub id: Option, - pub url: Option, - pub r#type: Option, - pub device_id: Option, - pub friendly_name: Option, - pub import_favorites_only: bool, - pub allow_hw_transcoding: bool, - pub allow_fmp4_transcoding_container: bool, - pub allow_stream_sharing: bool, - pub fallback_max_streaming_bitrate: i32, - pub enable_stream_looping: bool, - pub source: Option, - pub tuner_count: i32, - pub user_agent: Option, - pub ignore_dts: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct TypeOptions { - pub r#type: Option, - pub metadata_fetchers: Option>, - pub metadata_fetcher_order: Option>, - pub image_fetchers: Option>, - pub image_fetcher_order: Option>, - pub image_options: Option>, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UnratedItem { - pub r#type: UnratedItemEnum, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum UnratedItemEnum { - Movie, - Trailer, - Series, - Music, - Book, - LiveTvChannel, - LiveTvProgram, - ChannelContent, - Other, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdateLibraryOptionsDto { - pub id: String, - pub library_options: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdateMediaPathRequestDto { - pub name: String, - pub path_info: MediaPathInfo, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdatePlaylistDto { - pub name: Option, - pub ids: Option>, - pub users: Option>, - pub is_public: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdatePlaylistUserDto { - pub can_edit: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdateUserItemDataDto { - pub rating: Option, - pub played_percentage: Option, - pub unplayed_item_count: Option, - pub playback_position_ticks: i64, - pub play_count: i32, - pub is_favorite: bool, - pub likes: Option, - pub last_played_date: Option, - pub played: bool, - pub key: String, - pub item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UpdateUserPassword { - pub current_password: Option, - pub current_pw: Option, - pub new_pw: Option, - pub reset_password: bool, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UploadSubtitleDto { - pub language: String, - pub format: String, - pub is_forced: bool, - pub is_hearing_impaired: bool, - pub data: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserConfiguration { - pub audio_language_preference: Option, - pub play_default_audio_track: bool, - pub subtitle_language_preference: Option, - pub display_missing_episodes: bool, - pub grouped_folders: Vec, - pub subtitle_mode: SubtitlePlaybackMode, - pub display_collections_view: bool, - pub enable_local_password: bool, - pub ordered_views: Vec, - pub latest_items_excludes: Vec, - pub my_media_excludes: Vec, - pub hide_played_in_latest: bool, - pub remember_audio_selections: bool, - pub remember_subtitle_selections: bool, - pub enable_next_episode_auto_play: bool, - pub cast_receiver_id: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserDataChangedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserDataChangeInfo { - pub user_id: String, - pub user_data_list: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserDeletedMessage { - pub data: String, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserDto { - pub name: Option, - pub server_id: Option, - pub server_name: Option, - pub id: String, - pub primary_image_tag: Option, - pub has_password: bool, - pub has_configured_password: bool, - pub has_configured_easy_password: bool, - pub enable_auto_login: Option, - pub last_login_date: Option, - pub last_activity_date: Option, - pub configuration: Option, - pub policy: Option, - pub primary_image_aspect_ratio: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserItemDataDto { - pub rating: Option, - pub played_percentage: Option, - pub unplayed_item_count: i32, - pub playback_position_ticks: i64, - pub play_count: i32, - pub is_favorite: bool, - pub likes: Option, - pub last_played_date: Option, - pub played: bool, - pub key: String, - pub item_id: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserPolicy { - pub is_administrator: bool, - pub is_hidden: bool, - pub enable_collection_management: bool, - pub enable_subtitle_management: bool, - pub enable_lyric_management: bool, - pub is_disabled: bool, - pub max_parental_rating: Option, - pub blocked_tags: Option>, - pub allowed_tags: Option>, - pub enable_user_preference_access: bool, - pub access_schedules: Option>, - pub block_unrated_items: Option>, - pub enable_remote_control_of_other_users: bool, - pub enable_shared_device_control: bool, - pub enable_remote_access: bool, - pub enable_live_tv_management: bool, - pub enable_live_tv_access: bool, - pub enable_media_playback: bool, - pub enable_audio_playback_transcoding: bool, - pub enable_video_playback_transcoding: bool, - pub enable_playback_remuxing: bool, - pub force_remote_source_transcoding: bool, - pub enable_content_deletion: bool, - pub enable_content_deletion_from_folders: Option>, - pub enable_content_downloading: bool, - pub enable_sync_transcoding: bool, - pub enable_media_conversion: bool, - pub enabled_devices: Option>, - pub enable_all_devices: bool, - pub enabled_channels: Option>, - pub enable_all_channels: bool, - pub enabled_folders: Option>, - pub enable_all_folders: bool, - pub invalid_login_attempt_count: i32, - pub login_attempts_before_lockout: i32, - pub max_active_sessions: i32, - pub enable_public_sharing: bool, - pub blocked_media_folders: Option>, - pub blocked_channels: Option>, - pub remote_client_bitrate_limit: i32, - pub authentication_provider_id: String, - pub password_reset_provider_id: String, - pub sync_play_access: SyncPlayUserAccessType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UserUpdatedMessage { - pub data: Option, - pub message_id: String, - pub message_type: SessionMessageType, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct UtcTimeResponse { - pub request_reception_time: String, - pub response_transmission_time: String, -} diff --git a/flake.nix b/flake.nix index a80d6e6..79a6eb0 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,7 @@ cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); name = cargoToml.package.name; - toolchain = pkgs.rust-bin.nightly.latest.default; + toolchain = pkgs.rust-bin.stable.latest.default; toolchainWithLLvmTools = toolchain.override { extensions = ["rust-src" "llvm-tools"]; }; diff --git a/src/main.rs b/src/main.rs index 014d365..6013596 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,8 +2,7 @@ mod errors; use api::{JellyfinClient, JellyfinConfig}; use errors::*; -#[tokio::main] -pub async fn main() -> Result<()> { +fn jellyfin_config_try() -> Result { dotenvy::dotenv() .change_context(Error) .inspect_err(|err| { @@ -16,16 +15,45 @@ pub async fn main() -> Result<()> { std::env::var("JELLYFIN_SERVER_URL").change_context(Error)?, "jello".to_string(), ); - let mut jellyfin = api::JellyfinClient::new(config); - jellyfin - .authenticate_with_cached_token(".session") - .await - .change_context(Error)?; + Ok(config) +} - #[cfg(feature = "iced")] - ui_iced::ui(jellyfin); - #[cfg(feature = "gpui")] - ui_gpui::ui(jellyfin); +fn jellyfin_config() -> JellyfinConfig { + jellyfin_config_try().unwrap_or_else(|err| { + eprintln!("Error loading Jellyfin configuration: {}", err); + std::process::exit(1); + }) +} +fn main() -> Result<()> { + ui_iced::ui(jellyfin_config).change_context(Error)?; Ok(()) } + +// #[tokio::main] +// pub async fn main() -> Result<()> { +// dotenvy::dotenv() +// .change_context(Error) +// .inspect_err(|err| { +// eprintln!("Failed to load .env file: {}", err); +// }) +// .ok(); +// let config = JellyfinConfig::new( +// std::env::var("JELLYFIN_USERNAME").change_context(Error)?, +// std::env::var("JELLYFIN_PASSWORD").change_context(Error)?, +// std::env::var("JELLYFIN_SERVER_URL").change_context(Error)?, +// "jello".to_string(), +// ); +// let mut jellyfin = api::JellyfinClient::new(config); +// jellyfin +// .authenticate_with_cached_token(".session") +// .await +// .change_context(Error)?; +// +// #[cfg(feature = "iced")] +// ui_iced::ui(jellyfin); +// #[cfg(feature = "gpui")] +// ui_gpui::ui(jellyfin); +// +// Ok(()) +// } diff --git a/typegen/Cargo.toml b/typegen/Cargo.toml index 1b1af18..017a5b7 100644 --- a/typegen/Cargo.toml +++ b/typegen/Cargo.toml @@ -11,4 +11,4 @@ proc-macro2 = "1.0.103" quote = "1.0.41" serde = { version = "1.0.228", features = ["derive"] } serde_json = "1.0.145" -syn = { version = "2.0.108", features = ["full", "parsing"] } +syn = { version = "2.0.108", features = ["extra-traits", "full", "parsing"] } diff --git a/typegen/src/main.rs b/typegen/src/main.rs index 2519d75..f219110 100644 --- a/typegen/src/main.rs +++ b/typegen/src/main.rs @@ -3,7 +3,7 @@ use indexmap::IndexMap; const KEYWORDS: &[&str] = &[ "type", "match", "enum", "struct", "fn", "mod", "pub", "use", "crate", "self", "super", "as", - "in", "let", "mut", "ref", "static", "trait", "where", + "in", "let", "mut", "ref", "static", "trait", "where", "box", ]; #[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] @@ -15,6 +15,7 @@ pub struct JellyfinOpenapi { pub struct Components { schemas: indexmap::IndexMap, } + #[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] pub struct Schema { #[serde(rename = "type")] @@ -46,12 +47,15 @@ pub struct Property { nullable: Option, format: Option, items: Option>, + properties: Option>, #[serde(rename = "additionalProperties")] additional_properties: Option>, #[serde(rename = "enum")] _enum: Option>, #[serde(rename = "allOf")] all_of: Option>, + #[serde(rename = "oneOf")] + one_of: Option>, description: Option, #[serde(rename = "$ref")] _ref: Option, @@ -62,7 +66,7 @@ impl Property { let out = match self._type { Some(Types::String) => match self.format.as_deref() { Some("uuid") => "uuid::Uuid".to_string(), - Some("date-time") => "jiff::Zoned".to_string(), + Some("date-time") => "jiff::Timestamp".to_string(), _ => "String".to_string(), }, Some(Types::Integer) => match self.format.as_deref() { @@ -89,6 +93,8 @@ impl Property { "std::collections::HashMap", properties.to_string() ) + // } else if let Some(props) = &self.properties { + // todo!() } else { "std::collections::HashMap".to_string() } @@ -115,7 +121,7 @@ impl Property { } } -#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)] +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] #[serde(rename_all = "lowercase")] pub enum Types { Object, @@ -144,73 +150,10 @@ fn main() { .map(|(k, v)| (k.clone(), v.clone())) .collect(); - let syn_structs: Vec = structs + let syn_structs: Vec = structs .iter() - .map(|(key, value)| { - let fields = value - .properties - .as_ref() - .expect("Possible properties") - .iter() - .map(|(name, _type)| { - let og_name = name.clone(); - let name = modify_keyword(&name.to_snake_case()); - let _type_desc = _type.description(); - let _type_desc = if let Some(desc) = &_type_desc { - Some(format!(" {}", desc)) - } else { - None - }; - let _type = _type.to_string(); - let _type = if _type.contains(key) { - _type.replace(&format!("<{}>", key), format!(">", key).as_str()) - } else { - _type - }; - syn::Field { - attrs: if let Some(desc) = _type_desc { - syn::parse_quote! { - #[doc = #desc] - #[serde(rename = #og_name)] - } - } else { - syn::parse_quote! { - #[serde(rename = #og_name)] - } - }, - mutability: syn::FieldMutability::None, - vis: syn::Visibility::Public(syn::Token![pub]( - proc_macro2::Span::call_site(), - )), - ident: Some(syn::Ident::new(&name, proc_macro2::Span::call_site())), - colon_token: Some(syn::token::Colon(proc_macro2::Span::call_site())), - ty: syn::parse_str(&_type).expect("Failed to parse type"), - } - }) - .collect::>(); - let key = modify_keyword(key); - let desc = value.description.clone(); - let key = syn::Ident::new(&key.to_pascal_case(), proc_macro2::Span::call_site()); - let tokens = if let Some(desc) = desc { - let desc = format!(" {}", desc); - quote::quote! { - #[doc = #desc] - #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] - pub struct #key { - #(#fields),* - } - } - } else { - quote::quote! { - #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] - pub struct #key { - #(#fields),* - } - } - }; - - syn::parse2(tokens).expect("Failed to parse struct") - }) + .map(|(key, value)| generate_struct(key, value)) + .flatten() .collect(); let syn_enums = enums @@ -262,7 +205,6 @@ fn main() { attrs: vec![], items: syn_structs .into_iter() - .map(syn::Item::Struct) .chain(syn_enums.into_iter().map(syn::Item::Enum)) .collect(), }; @@ -277,3 +219,104 @@ fn modify_keyword(name: &str) -> String { name.to_string() } } + +fn generate_struct(key: impl AsRef, value: &Schema) -> Vec { + let key = key.as_ref(); + + let extra_structs = value + .properties + .as_ref() + .expect("Possible properties") + .iter() + .filter_map(|(name, property)| { + if property._type == Some(Types::Object) && property.properties.is_some() { + Some(generate_struct( + &format!("{}_{}", key, name), + &Schema { + _type: Types::Object, + properties: property.properties.clone(), + one_of: None, + _enum: None, + description: property.description.clone(), + }, + )) + } else { + None + } + }) + .flatten() + .collect::>(); + + let fields = value + .properties + .as_ref() + .expect("Possible properties") + .iter() + .map(|(name, property)| { + let nested_struct = + property._type == Some(Types::Object) && property.properties.is_some(); + let og_name = name.clone(); + let name = modify_keyword(&name.to_snake_case()); + let _type_desc = property.description(); + let _type_desc = if let Some(desc) = &_type_desc { + Some(format!(" {}", desc)) + } else { + None + }; + let _type = if !nested_struct { + property.to_string() + } else { + format!("{}_{}", key, og_name).to_pascal_case() + }; + let _type = if _type.contains(key) { + _type.replace(&format!("<{}>", key), format!(">", key).as_str()) + } else { + _type + }; + syn::Field { + attrs: if let Some(desc) = _type_desc { + syn::parse_quote! { + #[doc = #desc] + #[serde(rename = #og_name)] + } + } else { + syn::parse_quote! { + #[serde(rename = #og_name)] + } + }, + mutability: syn::FieldMutability::None, + vis: syn::Visibility::Public(syn::Token![pub](proc_macro2::Span::call_site())), + ident: Some(syn::Ident::new(&name, proc_macro2::Span::call_site())), + colon_token: Some(syn::token::Colon(proc_macro2::Span::call_site())), + ty: syn::parse_str(&_type).expect("Failed to parse type"), + } + }) + .collect::>(); + + let key = modify_keyword(key); + let desc = value.description.clone(); + let key = syn::Ident::new(&key.to_pascal_case(), proc_macro2::Span::call_site()); + let tokens = if let Some(desc) = desc { + let desc = format!(" {}", desc); + quote::quote! { + #[doc = #desc] + #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] + pub struct #key { + #(#fields),* + } + } + } else { + quote::quote! { + #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] + pub struct #key { + #(#fields),* + } + } + }; + + let mut out = syn::parse2::(tokens) + .expect("Failed to parse struct") + .items; + out.extend(extra_structs); + out +} diff --git a/ui-gpui/Cargo.toml b/ui-gpui/Cargo.toml index 5d28148..90c2739 100644 --- a/ui-gpui/Cargo.toml +++ b/ui-gpui/Cargo.toml @@ -6,3 +6,4 @@ edition = "2024" [dependencies] gpui = { version = "0.2.2", default-features = false, features = ["wayland"] } tap = "1.0.1" +blurhash = "0.2.3" diff --git a/ui-iced/Cargo.toml b/ui-iced/Cargo.toml index 51aa022..2cd604e 100644 --- a/ui-iced/Cargo.toml +++ b/ui-iced/Cargo.toml @@ -4,6 +4,13 @@ version = "0.1.0" edition = "2024" [dependencies] +api = { version = "0.1.0", path = "../api" } gpui_util = "0.2.2" -iced = { version = "0.13.1", features = ["canvas", "image", "tokio"] } +iced = { git = "https://github.com/iced-rs/iced", features = [ + "advanced", + "canvas", + "image", + "tokio", +] } +tracing = "0.1.41" uuid = "1.18.1" diff --git a/ui-iced/src/lib.rs b/ui-iced/src/lib.rs index 9ff4f06..ea01193 100644 --- a/ui-iced/src/lib.rs +++ b/ui-iced/src/lib.rs @@ -1,33 +1,228 @@ -use std::{collections::BTreeMap, sync::Arc}; -type SharedString = Arc; +mod shared_string; +use shared_string::SharedString; -use iced::{Element, Task}; - -struct State { - loading: Option, - current: Screen, - cache: ItemCache, -} - -pub struct ItemCache { - pub items: BTreeMap, -} - -#[derive(Clone, Debug)] -pub struct Item { - pub id: SharedString, - pub name: SharedString, - pub item_type: SharedString, - pub media_type: SharedString, -} - -pub enum Screen { - Home, - Settings, - Profile, -} +use iced::{Alignment, Element, Length, Task, widget::*}; +use std::collections::BTreeMap; +#[derive(Debug, Clone)] pub struct Loading { to: Screen, from: Screen, } + +#[derive(Default, Debug, Clone)] +pub struct ItemCache { + pub items: BTreeMap, +} + +impl ItemCache { + pub fn insert(&mut self, item: Item) { + self.items.insert(item.id, item); + } + pub fn extend>(&mut self, items: I) { + self.items + .extend(items.into_iter().map(|item| (item.id, item))); + } +} + +#[derive(Clone, Debug)] +pub struct Image { + pub id: SharedString, + pub blur_hash: Option, +} + +impl From for Item { + fn from(dto: api::jellyfin::BaseItemDto) -> Self { + Item { + id: dto.id, + name: dto.name.map(Into::into), + picture: dto + .image_tags + .and_then(|tags| tags.get("Primary").cloned()) + .map(|tag| Image { + id: tag.clone().into(), + blur_hash: dto + .image_blur_hashes + .primary + .get(&tag) + .map(|s| s.clone().into()), + }), + } + } +} + +#[derive(Clone, Debug)] +pub struct Item { + pub id: uuid::Uuid, + pub name: Option, + pub picture: Option, +} + +#[derive(Debug, Clone, Default)] +pub enum Screen { + #[default] + Home, + Settings, + Profile, +} +#[derive(Debug, Clone)] +struct State { + loading: Option, + current: Option, + cache: ItemCache, + jellyfin_client: api::JellyfinClient, +} + +impl State { + pub fn new(jellyfin_client: api::JellyfinClient) -> Self { + State { + loading: None, + current: None, + cache: ItemCache::default(), + jellyfin_client, + } + } +} + +#[derive(Debug, Clone)] +pub enum Message { + OpenSettings, + Refresh, + OpenItem(uuid::Uuid), + LoadedItem(uuid::Uuid, Vec), + Error(String), + SetToken(String), +} + +fn update(state: &mut State, message: Message) -> Task { + match message { + Message::OpenSettings => { + // Foo + Task::none() + } + Message::OpenItem(id) => { + let client = state.jellyfin_client.clone(); + Task::perform( + async move { + let items: Result, api::JellyfinApiError> = client + .items(id) + .await + .map(|items| items.into_iter().map(Item::from).collect()); + (id, items) + }, + |(msg, items)| match items { + Err(e) => Message::Error(format!("Failed to load item: {}", e)), + Ok(items) => Message::LoadedItem(msg, items), + }, + ) + } + Message::LoadedItem(id, items) => { + state.cache.extend(items); + state.current = Some(id); + Task::none() + } + Message::Refresh => { + // Handle refresh logic + Task::none() + } + Message::Error(err) => { + tracing::error!("Error: {}", err); + Task::none() + } + Message::SetToken(token) => { + state.jellyfin_client.set_token(token); + Task::none() + } + } +} + +fn view(state: &State) -> Element<'_, Message> { + column([header(), body(state)]).into() +} + +fn body(state: &State) -> Element<'_, Message> { + container(Text::new("Home Screen")) + .align_x(Alignment::Center) + .align_y(Alignment::Center) + .height(Length::Fill) + .width(Length::Fill) + .into() +} + +fn header() -> Element<'static, Message> { + row([ + container( + Text::new("Jello") + .width(Length::Fill) + .align_x(Alignment::Start), + ) + .padding(10) + .width(Length::Fill) + .height(Length::Fill) + .align_x(Alignment::Start) + .align_y(Alignment::Center) + .style(container::rounded_box) + .into(), + container( + row([ + button("Settings").on_press(Message::OpenSettings).into(), + button("Refresh").on_press(Message::Refresh).into(), + ]) + .spacing(10), + ) + .padding(10) + .width(Length::Fill) + .height(Length::Fill) + .align_x(Alignment::End) + .align_y(Alignment::Center) + .style(container::rounded_box) + .into(), + ]) + .align_y(Alignment::Center) + .width(Length::Fill) + .height(50) + .into() +} + +fn card(item: &Item) -> Element<'_, Message> { + let name = item + .name + .as_ref() + .map(|s| s.as_ref()) + .unwrap_or("Unnamed Item"); + container( + column([ + Text::new(name).size(16).into(), + iced::widget::Image::new("placeholder.png") + .width(Length::Fill) + .height(150) + .into(), + ]) + .spacing(10), + ) + .padding(10) + .width(Length::FillPortion(5)) + .height(Length::FillPortion(5)) + .style(container::rounded_box) + .into() +} + +fn init(config: impl Fn() -> api::JellyfinConfig + 'static) -> impl Fn() -> (State, Task) { + move || { + let mut jellyfin = api::JellyfinClient::new(config()); + ( + State::new(jellyfin.clone()), + Task::perform( + async move { jellyfin.authenticate_with_cached_token(".session").await }, + |token| match token { + Ok(token) => Message::SetToken(token), + Err(e) => Message::Error(format!("Authentication failed: {}", e)), + }, + ), + ) + } +} + +pub fn ui(config: impl Fn() -> api::JellyfinConfig + 'static) -> iced::Result { + iced::application(init(config), update, view).run() +} diff --git a/ui-iced/src/shared_string.rs b/ui-iced/src/shared_string.rs new file mode 100644 index 0000000..90dd052 --- /dev/null +++ b/ui-iced/src/shared_string.rs @@ -0,0 +1,68 @@ +use std::{borrow::Cow, sync::Arc}; +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct SharedString(ArcCow<'static, str>); + +impl From for SharedString { + fn from(s: String) -> Self { + SharedString(ArcCow::Owned(Arc::from(s))) + } +} + +impl<'a> iced::advanced::text::IntoFragment<'a> for SharedString { + fn into_fragment(self) -> Cow<'a, str> { + match self.0 { + ArcCow::Borrowed(b) => Cow::Borrowed(b), + ArcCow::Owned(o) => Cow::Owned(o.as_ref().to_string()), + } + } +} + +impl<'a> iced::advanced::text::IntoFragment<'a> for &SharedString { + fn into_fragment(self) -> Cow<'a, str> { + match &self.0 { + ArcCow::Borrowed(b) => Cow::Borrowed(b), + ArcCow::Owned(o) => Cow::Owned(o.as_ref().to_string()), + } + } +} + +impl From<&'static str> for SharedString { + fn from(s: &'static str) -> Self { + SharedString(ArcCow::Borrowed(s)) + } +} + +impl AsRef for SharedString { + fn as_ref(&self) -> &str { + match &self.0 { + ArcCow::Borrowed(b) => b, + ArcCow::Owned(o) => o.as_ref(), + } + } +} + +impl std::ops::Deref for SharedString { + type Target = str; + + fn deref(&self) -> &Self::Target { + self.as_ref() + } +} + +#[derive(Debug, PartialEq, Eq, Hash)] +pub enum ArcCow<'a, T: ?Sized> { + Borrowed(&'a T), + Owned(Arc), +} + +impl<'a, T> Clone for ArcCow<'a, T> +where + T: ?Sized, +{ + fn clone(&self) -> Self { + match self { + ArcCow::Borrowed(b) => ArcCow::Borrowed(b), + ArcCow::Owned(o) => ArcCow::Owned(Arc::clone(o)), + } + } +}