Commit 28aabc54e0

28aabc54e0cad7414f98b1ff5320485f6ced5ba9

parent: af02c2d314

Unsigned

siriusmart <siriusmart@tuta.io> · 2025-07-31 12:40 UTC

added rustypipe support

Layout: unified · split

Cargo.lock +1312 −13
@@ -2,18 +2,51 @@
2# It is not intended for manual editing. 2# It is not intended for manual editing.
3version = 4 3version = 4
4 4
5[[package]]
6name = "addr2line"
7version = "0.24.2"
8source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
10dependencies = [
11 "gimli",
12]
13
5[[package]] 14[[package]]
6name = "adler2" 15name = "adler2"
7version = "2.0.0" 16version = "2.0.0"
8source = "registry+https://github.com/rust-lang/crates.io-index" 17source = "registry+https://github.com/rust-lang/crates.io-index"
9checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 18checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
10 19
20[[package]]
21name = "aho-corasick"
22version = "1.1.3"
23source = "registry+https://github.com/rust-lang/crates.io-index"
24checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
25dependencies = [
26 "memchr",
27]
28
11[[package]] 29[[package]]
12name = "aligned-vec" 30name = "aligned-vec"
13version = "0.5.0" 31version = "0.5.0"
14source = "registry+https://github.com/rust-lang/crates.io-index" 32source = "registry+https://github.com/rust-lang/crates.io-index"
15checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" 33checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
16 34
35[[package]]
36name = "alloc-no-stdlib"
37version = "2.0.4"
38source = "registry+https://github.com/rust-lang/crates.io-index"
39checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
40
41[[package]]
42name = "alloc-stdlib"
43version = "0.2.2"
44source = "registry+https://github.com/rust-lang/crates.io-index"
45checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
46dependencies = [
47 "alloc-no-stdlib",
48]
49
17[[package]] 50[[package]]
18name = "allocator-api2" 51name = "allocator-api2"
19version = "0.2.21" 52version = "0.2.21"
@@ -73,6 +106,20 @@ version = "0.7.6"
73source = "registry+https://github.com/rust-lang/crates.io-index" 106source = "registry+https://github.com/rust-lang/crates.io-index"
74checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 107checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
75 108
109[[package]]
110name = "async-compression"
111version = "0.4.27"
112source = "registry+https://github.com/rust-lang/crates.io-index"
113checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8"
114dependencies = [
115 "brotli",
116 "flate2",
117 "futures-core",
118 "memchr",
119 "pin-project-lite",
120 "tokio",
121]
122
76[[package]] 123[[package]]
77name = "autocfg" 124name = "autocfg"
78version = "1.4.0" 125version = "1.4.0"
@@ -102,12 +149,42 @@ dependencies = [
102 "arrayvec", 149 "arrayvec",
103] 150]
104 151
152[[package]]
153name = "backtrace"
154version = "0.3.75"
155source = "registry+https://github.com/rust-lang/crates.io-index"
156checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"
157dependencies = [
158 "addr2line",
159 "cfg-if",
160 "libc",
161 "miniz_oxide",
162 "object",
163 "rustc-demangle",
164 "windows-targets",
165]
166
105[[package]] 167[[package]]
106name = "base64" 168name = "base64"
107version = "0.22.1" 169version = "0.22.1"
108source = "registry+https://github.com/rust-lang/crates.io-index" 170source = "registry+https://github.com/rust-lang/crates.io-index"
109checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 171checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
110 172
173[[package]]
174name = "bit-set"
175version = "0.8.0"
176source = "registry+https://github.com/rust-lang/crates.io-index"
177checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
178dependencies = [
179 "bit-vec",
180]
181
182[[package]]
183name = "bit-vec"
184version = "0.8.0"
185source = "registry+https://github.com/rust-lang/crates.io-index"
186checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
187
111[[package]] 188[[package]]
112name = "bit_field" 189name = "bit_field"
113version = "0.10.2" 190version = "0.10.2"
@@ -141,6 +218,36 @@ version = "0.1.6"
141source = "registry+https://github.com/rust-lang/crates.io-index" 218source = "registry+https://github.com/rust-lang/crates.io-index"
142checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 219checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
143 220
221[[package]]
222name = "block-buffer"
223version = "0.10.4"
224source = "registry+https://github.com/rust-lang/crates.io-index"
225checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
226dependencies = [
227 "generic-array",
228]
229
230[[package]]
231name = "brotli"
232version = "8.0.1"
233source = "registry+https://github.com/rust-lang/crates.io-index"
234checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d"
235dependencies = [
236 "alloc-no-stdlib",
237 "alloc-stdlib",
238 "brotli-decompressor",
239]
240
241[[package]]
242name = "brotli-decompressor"
243version = "5.0.0"
244source = "registry+https://github.com/rust-lang/crates.io-index"
245checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
246dependencies = [
247 "alloc-no-stdlib",
248 "alloc-stdlib",
249]
250
144[[package]] 251[[package]]
145name = "built" 252name = "built"
146version = "0.7.7" 253version = "0.7.7"
@@ -165,6 +272,12 @@ version = "0.1.0"
165source = "registry+https://github.com/rust-lang/crates.io-index" 272source = "registry+https://github.com/rust-lang/crates.io-index"
166checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" 273checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
167 274
275[[package]]
276name = "bytes"
277version = "1.10.1"
278source = "registry+https://github.com/rust-lang/crates.io-index"
279checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
280
168[[package]] 281[[package]]
169name = "cassowary" 282name = "cassowary"
170version = "0.3.0" 283version = "0.3.0"
@@ -216,6 +329,7 @@ dependencies = [
216 "android-tzdata", 329 "android-tzdata",
217 "iana-time-zone", 330 "iana-time-zone",
218 "num-traits", 331 "num-traits",
332 "serde",
219 "windows-link", 333 "windows-link",
220] 334]
221 335
@@ -299,6 +413,15 @@ version = "0.8.7"
299source = "registry+https://github.com/rust-lang/crates.io-index" 413source = "registry+https://github.com/rust-lang/crates.io-index"
300checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 414checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
301 415
416[[package]]
417name = "cpufeatures"
418version = "0.2.17"
419source = "registry+https://github.com/rust-lang/crates.io-index"
420checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
421dependencies = [
422 "libc",
423]
424
302[[package]] 425[[package]]
303name = "crc32fast" 426name = "crc32fast"
304version = "1.4.2" 427version = "1.4.2"
@@ -383,6 +506,16 @@ version = "0.2.3"
383source = "registry+https://github.com/rust-lang/crates.io-index" 506source = "registry+https://github.com/rust-lang/crates.io-index"
384checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 507checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
385 508
509[[package]]
510name = "crypto-common"
511version = "0.1.6"
512source = "registry+https://github.com/rust-lang/crates.io-index"
513checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
514dependencies = [
515 "generic-array",
516 "typenum",
517]
518
386[[package]] 519[[package]]
387name = "darling" 520name = "darling"
388version = "0.20.11" 521version = "0.20.11"
@@ -418,6 +551,22 @@ dependencies = [
418 "syn", 551 "syn",
419] 552]
420 553
554[[package]]
555name = "data-encoding"
556version = "2.9.0"
557source = "registry+https://github.com/rust-lang/crates.io-index"
558checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
559
560[[package]]
561name = "deranged"
562version = "0.4.0"
563source = "registry+https://github.com/rust-lang/crates.io-index"
564checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
565dependencies = [
566 "powerfmt",
567 "serde",
568]
569
421[[package]] 570[[package]]
422name = "derive_more" 571name = "derive_more"
423version = "2.0.1" 572version = "2.0.1"
@@ -439,6 +588,27 @@ dependencies = [
439 "syn", 588 "syn",
440] 589]
441 590
591[[package]]
592name = "digest"
593version = "0.10.7"
594source = "registry+https://github.com/rust-lang/crates.io-index"
595checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
596dependencies = [
597 "block-buffer",
598 "crypto-common",
599]
600
601[[package]]
602name = "displaydoc"
603version = "0.2.5"
604source = "registry+https://github.com/rust-lang/crates.io-index"
605checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
606dependencies = [
607 "proc-macro2",
608 "quote",
609 "syn",
610]
611
442[[package]] 612[[package]]
443name = "document-features" 613name = "document-features"
444version = "0.2.11" 614version = "0.2.11"
@@ -497,6 +667,17 @@ dependencies = [
497 "zune-inflate", 667 "zune-inflate",
498] 668]
499 669
670[[package]]
671name = "fancy-regex"
672version = "0.14.0"
673source = "registry+https://github.com/rust-lang/crates.io-index"
674checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298"
675dependencies = [
676 "bit-set",
677 "regex-automata",
678 "regex-syntax",
679]
680
500[[package]] 681[[package]]
501name = "fastrand" 682name = "fastrand"
502version = "2.3.0" 683version = "2.3.0"
@@ -549,6 +730,114 @@ version = "0.1.1"
549source = "registry+https://github.com/rust-lang/crates.io-index" 730source = "registry+https://github.com/rust-lang/crates.io-index"
550checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 731checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
551 732
733[[package]]
734name = "form_urlencoded"
735version = "1.2.1"
736source = "registry+https://github.com/rust-lang/crates.io-index"
737checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
738dependencies = [
739 "percent-encoding",
740]
741
742[[package]]
743name = "futures"
744version = "0.3.31"
745source = "registry+https://github.com/rust-lang/crates.io-index"
746checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
747dependencies = [
748 "futures-channel",
749 "futures-core",
750 "futures-executor",
751 "futures-io",
752 "futures-sink",
753 "futures-task",
754 "futures-util",
755]
756
757[[package]]
758name = "futures-channel"
759version = "0.3.31"
760source = "registry+https://github.com/rust-lang/crates.io-index"
761checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
762dependencies = [
763 "futures-core",
764 "futures-sink",
765]
766
767[[package]]
768name = "futures-core"
769version = "0.3.31"
770source = "registry+https://github.com/rust-lang/crates.io-index"
771checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
772
773[[package]]
774name = "futures-executor"
775version = "0.3.31"
776source = "registry+https://github.com/rust-lang/crates.io-index"
777checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
778dependencies = [
779 "futures-core",
780 "futures-task",
781 "futures-util",
782]
783
784[[package]]
785name = "futures-io"
786version = "0.3.31"
787source = "registry+https://github.com/rust-lang/crates.io-index"
788checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
789
790[[package]]
791name = "futures-macro"
792version = "0.3.31"
793source = "registry+https://github.com/rust-lang/crates.io-index"
794checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
795dependencies = [
796 "proc-macro2",
797 "quote",
798 "syn",
799]
800
801[[package]]
802name = "futures-sink"
803version = "0.3.31"
804source = "registry+https://github.com/rust-lang/crates.io-index"
805checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
806
807[[package]]
808name = "futures-task"
809version = "0.3.31"
810source = "registry+https://github.com/rust-lang/crates.io-index"
811checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
812
813[[package]]
814name = "futures-util"
815version = "0.3.31"
816source = "registry+https://github.com/rust-lang/crates.io-index"
817checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
818dependencies = [
819 "futures-channel",
820 "futures-core",
821 "futures-io",
822 "futures-macro",
823 "futures-sink",
824 "futures-task",
825 "memchr",
826 "pin-project-lite",
827 "pin-utils",
828 "slab",
829]
830
831[[package]]
832name = "generic-array"
833version = "0.14.7"
834source = "registry+https://github.com/rust-lang/crates.io-index"
835checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
836dependencies = [
837 "typenum",
838 "version_check",
839]
840
552[[package]] 841[[package]]
553name = "getrandom" 842name = "getrandom"
554version = "0.2.16" 843version = "0.2.16"
@@ -582,6 +871,12 @@ dependencies = [
582 "weezl", 871 "weezl",
583] 872]
584 873
874[[package]]
875name = "gimli"
876version = "0.31.1"
877source = "registry+https://github.com/rust-lang/crates.io-index"
878checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
879
585[[package]] 880[[package]]
586name = "half" 881name = "half"
587version = "2.6.0" 882version = "2.6.0"
@@ -609,6 +904,12 @@ version = "0.5.0"
609source = "registry+https://github.com/rust-lang/crates.io-index" 904source = "registry+https://github.com/rust-lang/crates.io-index"
610checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 905checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
611 906
907[[package]]
908name = "hex"
909version = "0.4.3"
910source = "registry+https://github.com/rust-lang/crates.io-index"
911checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
912
612[[package]] 913[[package]]
613name = "home" 914name = "home"
614version = "0.5.11" 915version = "0.5.11"
@@ -618,6 +919,40 @@ dependencies = [
618 "windows-sys 0.59.0", 919 "windows-sys 0.59.0",
619] 920]
620 921
922[[package]]
923name = "http"
924version = "1.3.1"
925source = "registry+https://github.com/rust-lang/crates.io-index"
926checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
927dependencies = [
928 "bytes",
929 "fnv",
930 "itoa",
931]
932
933[[package]]
934name = "http-body"
935version = "1.0.1"
936source = "registry+https://github.com/rust-lang/crates.io-index"
937checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
938dependencies = [
939 "bytes",
940 "http",
941]
942
943[[package]]
944name = "http-body-util"
945version = "0.1.3"
946source = "registry+https://github.com/rust-lang/crates.io-index"
947checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
948dependencies = [
949 "bytes",
950 "futures-core",
951 "http",
952 "http-body",
953 "pin-project-lite",
954]
955
621[[package]] 956[[package]]
622name = "http_req" 957name = "http_req"
623version = "0.12.0" 958version = "0.12.0"
@@ -628,6 +963,71 @@ dependencies = [
628 "unicase", 963 "unicase",
629] 964]
630 965
966[[package]]
967name = "httparse"
968version = "1.10.1"
969source = "registry+https://github.com/rust-lang/crates.io-index"
970checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
971
972[[package]]
973name = "hyper"
974version = "1.6.0"
975source = "registry+https://github.com/rust-lang/crates.io-index"
976checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
977dependencies = [
978 "bytes",
979 "futures-channel",
980 "futures-util",
981 "http",
982 "http-body",
983 "httparse",
984 "itoa",
985 "pin-project-lite",
986 "smallvec",
987 "tokio",
988 "want",
989]
990
991[[package]]
992name = "hyper-tls"
993version = "0.6.0"
994source = "registry+https://github.com/rust-lang/crates.io-index"
995checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
996dependencies = [
997 "bytes",
998 "http-body-util",
999 "hyper",
1000 "hyper-util",
1001 "native-tls",
1002 "tokio",
1003 "tokio-native-tls",
1004 "tower-service",
1005]
1006
1007[[package]]
1008name = "hyper-util"
1009version = "0.1.16"
1010source = "registry+https://github.com/rust-lang/crates.io-index"
1011checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"
1012dependencies = [
1013 "base64",
1014 "bytes",
1015 "futures-channel",
1016 "futures-core",
1017 "futures-util",
1018 "http",
1019 "http-body",
1020 "hyper",
1021 "ipnet",
1022 "libc",
1023 "percent-encoding",
1024 "pin-project-lite",
1025 "socket2",
1026 "tokio",
1027 "tower-service",
1028 "tracing",
1029]
1030
631[[package]] 1031[[package]]
632name = "iana-time-zone" 1032name = "iana-time-zone"
633version = "0.1.63" 1033version = "0.1.63"
@@ -640,7 +1040,7 @@ dependencies = [
640 "js-sys", 1040 "js-sys",
641 "log", 1041 "log",
642 "wasm-bindgen", 1042 "wasm-bindgen",
643 "windows-core", 1043 "windows-core 0.61.0",
644] 1044]
645 1045
646[[package]] 1046[[package]]
@@ -652,12 +1052,119 @@ dependencies = [
652 "cc", 1052 "cc",
653] 1053]
654 1054
1055[[package]]
1056name = "icu_collections"
1057version = "2.0.0"
1058source = "registry+https://github.com/rust-lang/crates.io-index"
1059checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47"
1060dependencies = [
1061 "displaydoc",
1062 "potential_utf",
1063 "yoke",
1064 "zerofrom",
1065 "zerovec",
1066]
1067
1068[[package]]
1069name = "icu_locale_core"
1070version = "2.0.0"
1071source = "registry+https://github.com/rust-lang/crates.io-index"
1072checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a"
1073dependencies = [
1074 "displaydoc",
1075 "litemap",
1076 "tinystr",
1077 "writeable",
1078 "zerovec",
1079]
1080
1081[[package]]
1082name = "icu_normalizer"
1083version = "2.0.0"
1084source = "registry+https://github.com/rust-lang/crates.io-index"
1085checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979"
1086dependencies = [
1087 "displaydoc",
1088 "icu_collections",
1089 "icu_normalizer_data",
1090 "icu_properties",
1091 "icu_provider",
1092 "smallvec",
1093 "zerovec",
1094]
1095
1096[[package]]
1097name = "icu_normalizer_data"
1098version = "2.0.0"
1099source = "registry+https://github.com/rust-lang/crates.io-index"
1100checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3"
1101
1102[[package]]
1103name = "icu_properties"
1104version = "2.0.1"
1105source = "registry+https://github.com/rust-lang/crates.io-index"
1106checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b"
1107dependencies = [
1108 "displaydoc",
1109 "icu_collections",
1110 "icu_locale_core",
1111 "icu_properties_data",
1112 "icu_provider",
1113 "potential_utf",
1114 "zerotrie",
1115 "zerovec",
1116]
1117
1118[[package]]
1119name = "icu_properties_data"
1120version = "2.0.1"
1121source = "registry+https://github.com/rust-lang/crates.io-index"
1122checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632"
1123
1124[[package]]
1125name = "icu_provider"
1126version = "2.0.0"
1127source = "registry+https://github.com/rust-lang/crates.io-index"
1128checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af"
1129dependencies = [
1130 "displaydoc",
1131 "icu_locale_core",
1132 "stable_deref_trait",
1133 "tinystr",
1134 "writeable",
1135 "yoke",
1136 "zerofrom",
1137 "zerotrie",
1138 "zerovec",
1139]
1140
655[[package]] 1141[[package]]
656name = "ident_case" 1142name = "ident_case"
657version = "1.0.1" 1143version = "1.0.1"
658source = "registry+https://github.com/rust-lang/crates.io-index" 1144source = "registry+https://github.com/rust-lang/crates.io-index"
659checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1145checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
660 1146
1147[[package]]
1148name = "idna"
1149version = "1.0.3"
1150source = "registry+https://github.com/rust-lang/crates.io-index"
1151checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
1152dependencies = [
1153 "idna_adapter",
1154 "smallvec",
1155 "utf8_iter",
1156]
1157
1158[[package]]
1159name = "idna_adapter"
1160version = "1.2.1"
1161source = "registry+https://github.com/rust-lang/crates.io-index"
1162checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
1163dependencies = [
1164 "icu_normalizer",
1165 "icu_properties",
1166]
1167
661[[package]] 1168[[package]]
662name = "image" 1169name = "image"
663version = "0.25.6" 1170version = "0.25.6"
@@ -748,10 +1255,37 @@ dependencies = [
748] 1255]
749 1256
750[[package]] 1257[[package]]
751name = "itertools" 1258name = "io-uring"
752version = "0.12.1" 1259version = "0.7.9"
753source = "registry+https://github.com/rust-lang/crates.io-index" 1260source = "registry+https://github.com/rust-lang/crates.io-index"
754checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 1261checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4"
1262dependencies = [
1263 "bitflags 2.9.0",
1264 "cfg-if",
1265 "libc",
1266]
1267
1268[[package]]
1269name = "ipnet"
1270version = "2.11.0"
1271source = "registry+https://github.com/rust-lang/crates.io-index"
1272checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"
1273
1274[[package]]
1275name = "iri-string"
1276version = "0.7.8"
1277source = "registry+https://github.com/rust-lang/crates.io-index"
1278checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2"
1279dependencies = [
1280 "memchr",
1281 "serde",
1282]
1283
1284[[package]]
1285name = "itertools"
1286version = "0.12.1"
1287source = "registry+https://github.com/rust-lang/crates.io-index"
1288checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
755dependencies = [ 1289dependencies = [
756 "either", 1290 "either",
757] 1291]
@@ -852,12 +1386,28 @@ version = "0.9.4"
852source = "registry+https://github.com/rust-lang/crates.io-index" 1386source = "registry+https://github.com/rust-lang/crates.io-index"
853checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 1387checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
854 1388
1389[[package]]
1390name = "litemap"
1391version = "0.8.0"
1392source = "registry+https://github.com/rust-lang/crates.io-index"
1393checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
1394
855[[package]] 1395[[package]]
856name = "litrs" 1396name = "litrs"
857version = "0.4.1" 1397version = "0.4.1"
858source = "registry+https://github.com/rust-lang/crates.io-index" 1398source = "registry+https://github.com/rust-lang/crates.io-index"
859checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" 1399checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"
860 1400
1401[[package]]
1402name = "localzone"
1403version = "0.3.1"
1404source = "registry+https://github.com/rust-lang/crates.io-index"
1405checksum = "718530aa7b3842752f82224791ea1db5e6b7260513b8ab45706937dbf54f7b4d"
1406dependencies = [
1407 "js-sys",
1408 "windows",
1409]
1410
861[[package]] 1411[[package]]
862name = "lock_api" 1412name = "lock_api"
863version = "0.4.12" 1413version = "0.4.12"
@@ -999,6 +1549,12 @@ dependencies = [
999 "num-traits", 1549 "num-traits",
1000] 1550]
1001 1551
1552[[package]]
1553name = "num-conv"
1554version = "0.1.0"
1555source = "registry+https://github.com/rust-lang/crates.io-index"
1556checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
1557
1002[[package]] 1558[[package]]
1003name = "num-derive" 1559name = "num-derive"
1004version = "0.4.2" 1560version = "0.4.2"
@@ -1039,6 +1595,15 @@ dependencies = [
1039 "autocfg", 1595 "autocfg",
1040] 1596]
1041 1597
1598[[package]]
1599name = "num_threads"
1600version = "0.1.7"
1601source = "registry+https://github.com/rust-lang/crates.io-index"
1602checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
1603dependencies = [
1604 "libc",
1605]
1606
1042[[package]] 1607[[package]]
1043name = "objc" 1608name = "objc"
1044version = "0.2.7" 1609version = "0.2.7"
@@ -1068,6 +1633,15 @@ dependencies = [
1068 "objc", 1633 "objc",
1069] 1634]
1070 1635
1636[[package]]
1637name = "object"
1638version = "0.36.7"
1639source = "registry+https://github.com/rust-lang/crates.io-index"
1640checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
1641dependencies = [
1642 "memchr",
1643]
1644
1071[[package]] 1645[[package]]
1072name = "once_cell" 1646name = "once_cell"
1073version = "1.21.3" 1647version = "1.21.3"
@@ -1147,6 +1721,42 @@ version = "1.0.15"
1147source = "registry+https://github.com/rust-lang/crates.io-index" 1721source = "registry+https://github.com/rust-lang/crates.io-index"
1148checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1722checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
1149 1723
1724[[package]]
1725name = "percent-encoding"
1726version = "2.3.1"
1727source = "registry+https://github.com/rust-lang/crates.io-index"
1728checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
1729
1730[[package]]
1731name = "phf"
1732version = "0.11.3"
1733source = "registry+https://github.com/rust-lang/crates.io-index"
1734checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
1735dependencies = [
1736 "phf_shared",
1737]
1738
1739[[package]]
1740name = "phf_shared"
1741version = "0.11.3"
1742source = "registry+https://github.com/rust-lang/crates.io-index"
1743checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5"
1744dependencies = [
1745 "siphasher",
1746]
1747
1748[[package]]
1749name = "pin-project-lite"
1750version = "0.2.16"
1751source = "registry+https://github.com/rust-lang/crates.io-index"
1752checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
1753
1754[[package]]
1755name = "pin-utils"
1756version = "0.1.0"
1757source = "registry+https://github.com/rust-lang/crates.io-index"
1758checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
1759
1150[[package]] 1760[[package]]
1151name = "pkg-config" 1761name = "pkg-config"
1152version = "0.3.32" 1762version = "0.3.32"
@@ -1166,6 +1776,21 @@ dependencies = [
1166 "miniz_oxide", 1776 "miniz_oxide",
1167] 1777]
1168 1778
1779[[package]]
1780name = "potential_utf"
1781version = "0.1.2"
1782source = "registry+https://github.com/rust-lang/crates.io-index"
1783checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585"
1784dependencies = [
1785 "zerovec",
1786]
1787
1788[[package]]
1789name = "powerfmt"
1790version = "0.2.0"
1791source = "registry+https://github.com/rust-lang/crates.io-index"
1792checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
1793
1169[[package]] 1794[[package]]
1170name = "ppv-lite86" 1795name = "ppv-lite86"
1171version = "0.2.21" 1796version = "0.2.21"
@@ -1240,8 +1865,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1240checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1865checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
1241dependencies = [ 1866dependencies = [
1242 "libc", 1867 "libc",
1243 "rand_chacha", 1868 "rand_chacha 0.3.1",
1244 "rand_core", 1869 "rand_core 0.6.4",
1870]
1871
1872[[package]]
1873name = "rand"
1874version = "0.9.2"
1875source = "registry+https://github.com/rust-lang/crates.io-index"
1876checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
1877dependencies = [
1878 "rand_chacha 0.9.0",
1879 "rand_core 0.9.3",
1245] 1880]
1246 1881
1247[[package]] 1882[[package]]
@@ -1251,7 +1886,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1251checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1886checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
1252dependencies = [ 1887dependencies = [
1253 "ppv-lite86", 1888 "ppv-lite86",
1254 "rand_core", 1889 "rand_core 0.6.4",
1890]
1891
1892[[package]]
1893name = "rand_chacha"
1894version = "0.9.0"
1895source = "registry+https://github.com/rust-lang/crates.io-index"
1896checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
1897dependencies = [
1898 "ppv-lite86",
1899 "rand_core 0.9.3",
1255] 1900]
1256 1901
1257[[package]] 1902[[package]]
@@ -1263,6 +1908,15 @@ dependencies = [
1263 "getrandom 0.2.16", 1908 "getrandom 0.2.16",
1264] 1909]
1265 1910
1911[[package]]
1912name = "rand_core"
1913version = "0.9.3"
1914source = "registry+https://github.com/rust-lang/crates.io-index"
1915checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
1916dependencies = [
1917 "getrandom 0.3.3",
1918]
1919
1266[[package]] 1920[[package]]
1267name = "ratatui" 1921name = "ratatui"
1268version = "0.29.0" 1922version = "0.29.0"
@@ -1311,11 +1965,11 @@ dependencies = [
1311 "once_cell", 1965 "once_cell",
1312 "paste", 1966 "paste",
1313 "profiling", 1967 "profiling",
1314 "rand", 1968 "rand 0.8.5",
1315 "rand_chacha", 1969 "rand_chacha 0.3.1",
1316 "simd_helpers", 1970 "simd_helpers",
1317 "system-deps", 1971 "system-deps",
1318 "thiserror", 1972 "thiserror 1.0.69",
1319 "v_frame", 1973 "v_frame",
1320 "wasm-bindgen", 1974 "wasm-bindgen",
1321] 1975]
@@ -1353,6 +2007,84 @@ dependencies = [
1353 "bitflags 2.9.0", 2007 "bitflags 2.9.0",
1354] 2008]
1355 2009
2010[[package]]
2011name = "regex"
2012version = "1.11.1"
2013source = "registry+https://github.com/rust-lang/crates.io-index"
2014checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
2015dependencies = [
2016 "aho-corasick",
2017 "memchr",
2018 "regex-automata",
2019 "regex-syntax",
2020]
2021
2022[[package]]
2023name = "regex-automata"
2024version = "0.4.9"
2025source = "registry+https://github.com/rust-lang/crates.io-index"
2026checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
2027dependencies = [
2028 "aho-corasick",
2029 "memchr",
2030 "regex-syntax",
2031]
2032
2033[[package]]
2034name = "regex-syntax"
2035version = "0.8.5"
2036source = "registry+https://github.com/rust-lang/crates.io-index"
2037checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
2038
2039[[package]]
2040name = "reqwest"
2041version = "0.12.22"
2042source = "registry+https://github.com/rust-lang/crates.io-index"
2043checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
2044dependencies = [
2045 "async-compression",
2046 "base64",
2047 "bytes",
2048 "futures-core",
2049 "futures-util",
2050 "http",
2051 "http-body",
2052 "http-body-util",
2053 "hyper",
2054 "hyper-tls",
2055 "hyper-util",
2056 "js-sys",
2057 "log",
2058 "native-tls",
2059 "percent-encoding",
2060 "pin-project-lite",
2061 "rustls-pki-types",
2062 "serde",
2063 "serde_json",
2064 "serde_urlencoded",
2065 "sync_wrapper",
2066 "tokio",
2067 "tokio-native-tls",
2068 "tokio-util",
2069 "tower",
2070 "tower-http",
2071 "tower-service",
2072 "url",
2073 "wasm-bindgen",
2074 "wasm-bindgen-futures",
2075 "web-sys",
2076]
2077
2078[[package]]
2079name = "ress"
2080version = "0.11.7"
2081source = "registry+https://github.com/rust-lang/crates.io-index"
2082checksum = "0d77111a94ef694bb2fe9867a93e21007e2151943c9a48b2ed72734bde41875a"
2083dependencies = [
2084 "log",
2085 "unicode-xid",
2086]
2087
1356[[package]] 2088[[package]]
1357name = "rgb" 2089name = "rgb"
1358version = "0.8.50" 2090version = "0.8.50"
@@ -1362,6 +2094,39 @@ dependencies = [
1362 "bytemuck", 2094 "bytemuck",
1363] 2095]
1364 2096
2097[[package]]
2098name = "rquickjs"
2099version = "0.9.0"
2100source = "registry+https://github.com/rust-lang/crates.io-index"
2101checksum = "5c5227859c4dfc83f428e58f9569bf439e628c8d139020e7faff437e6f5abaa0"
2102dependencies = [
2103 "rquickjs-core",
2104]
2105
2106[[package]]
2107name = "rquickjs-core"
2108version = "0.9.0"
2109source = "registry+https://github.com/rust-lang/crates.io-index"
2110checksum = "e82e0ca83028ad5b533b53b96c395bbaab905a5774de4aaf1004eeacafa3d85d"
2111dependencies = [
2112 "rquickjs-sys",
2113]
2114
2115[[package]]
2116name = "rquickjs-sys"
2117version = "0.9.0"
2118source = "registry+https://github.com/rust-lang/crates.io-index"
2119checksum = "7fed0097b0b4fbb2a87f6dd3b995a7c64ca56de30007eb7e867dfdfc78324ba5"
2120dependencies = [
2121 "cc",
2122]
2123
2124[[package]]
2125name = "rustc-demangle"
2126version = "0.1.26"
2127source = "registry+https://github.com/rust-lang/crates.io-index"
2128checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
2129
1365[[package]] 2130[[package]]
1366name = "rustix" 2131name = "rustix"
1367version = "0.38.44" 2132version = "0.38.44"
@@ -1388,12 +2153,50 @@ dependencies = [
1388 "windows-sys 0.59.0", 2153 "windows-sys 0.59.0",
1389] 2154]
1390 2155
2156[[package]]
2157name = "rustls-pki-types"
2158version = "1.12.0"
2159source = "registry+https://github.com/rust-lang/crates.io-index"
2160checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"
2161dependencies = [
2162 "zeroize",
2163]
2164
1391[[package]] 2165[[package]]
1392name = "rustversion" 2166name = "rustversion"
1393version = "1.0.20" 2167version = "1.0.20"
1394source = "registry+https://github.com/rust-lang/crates.io-index" 2168source = "registry+https://github.com/rust-lang/crates.io-index"
1395checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 2169checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
1396 2170
2171[[package]]
2172name = "rustypipe"
2173version = "0.11.4"
2174source = "registry+https://github.com/rust-lang/crates.io-index"
2175checksum = "3bf8d7c42ac7860a078f63f90d6513dd3833585337e65b5fca9f74ddba2d59ef"
2176dependencies = [
2177 "data-encoding",
2178 "fancy-regex",
2179 "localzone",
2180 "once_cell",
2181 "phf",
2182 "rand 0.9.2",
2183 "regex",
2184 "reqwest",
2185 "ress",
2186 "rquickjs",
2187 "serde",
2188 "serde_json",
2189 "serde_plain",
2190 "serde_with",
2191 "sha1",
2192 "thiserror 2.0.12",
2193 "time",
2194 "tokio",
2195 "tracing",
2196 "url",
2197 "urlencoding",
2198]
2199
1397[[package]] 2200[[package]]
1398name = "ryu" 2201name = "ryu"
1399version = "1.0.20" 2202version = "1.0.20"
@@ -1470,6 +2273,15 @@ dependencies = [
1470 "serde", 2273 "serde",
1471] 2274]
1472 2275
2276[[package]]
2277name = "serde_plain"
2278version = "1.0.2"
2279source = "registry+https://github.com/rust-lang/crates.io-index"
2280checksum = "9ce1fc6db65a611022b23a0dec6975d63fb80a302cb3388835ff02c097258d50"
2281dependencies = [
2282 "serde",
2283]
2284
1473[[package]] 2285[[package]]
1474name = "serde_spanned" 2286name = "serde_spanned"
1475version = "0.6.8" 2287version = "0.6.8"
@@ -1479,6 +2291,46 @@ dependencies = [
1479 "serde", 2291 "serde",
1480] 2292]
1481 2293
2294[[package]]
2295name = "serde_urlencoded"
2296version = "0.7.1"
2297source = "registry+https://github.com/rust-lang/crates.io-index"
2298checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
2299dependencies = [
2300 "form_urlencoded",
2301 "itoa",
2302 "ryu",
2303 "serde",
2304]
2305
2306[[package]]
2307name = "serde_with"
2308version = "3.14.0"
2309source = "registry+https://github.com/rust-lang/crates.io-index"
2310checksum = "f2c45cd61fefa9db6f254525d46e392b852e0e61d9a1fd36e5bd183450a556d5"
2311dependencies = [
2312 "base64",
2313 "chrono",
2314 "hex",
2315 "serde",
2316 "serde_derive",
2317 "serde_json",
2318 "serde_with_macros",
2319 "time",
2320]
2321
2322[[package]]
2323name = "serde_with_macros"
2324version = "3.14.0"
2325source = "registry+https://github.com/rust-lang/crates.io-index"
2326checksum = "de90945e6565ce0d9a25098082ed4ee4002e047cb59892c318d66821e14bb30f"
2327dependencies = [
2328 "darling",
2329 "proc-macro2",
2330 "quote",
2331 "syn",
2332]
2333
1482[[package]] 2334[[package]]
1483name = "serde_yaml_ng" 2335name = "serde_yaml_ng"
1484version = "0.10.0" 2336version = "0.10.0"
@@ -1492,6 +2344,17 @@ dependencies = [
1492 "unsafe-libyaml", 2344 "unsafe-libyaml",
1493] 2345]
1494 2346
2347[[package]]
2348name = "sha1"
2349version = "0.10.6"
2350source = "registry+https://github.com/rust-lang/crates.io-index"
2351checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
2352dependencies = [
2353 "cfg-if",
2354 "cpufeatures",
2355 "digest",
2356]
2357
1495[[package]] 2358[[package]]
1496name = "shlex" 2359name = "shlex"
1497version = "1.3.0" 2360version = "1.3.0"
@@ -1543,6 +2406,12 @@ dependencies = [
1543 "quote", 2406 "quote",
1544] 2407]
1545 2408
2409[[package]]
2410name = "siphasher"
2411version = "1.0.1"
2412source = "registry+https://github.com/rust-lang/crates.io-index"
2413checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
2414
1546[[package]] 2415[[package]]
1547name = "sixel-rs" 2416name = "sixel-rs"
1548version = "0.3.3" 2417version = "0.3.3"
@@ -1561,12 +2430,34 @@ dependencies = [
1561 "make-cmd", 2430 "make-cmd",
1562] 2431]
1563 2432
2433[[package]]
2434name = "slab"
2435version = "0.4.10"
2436source = "registry+https://github.com/rust-lang/crates.io-index"
2437checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d"
2438
1564[[package]] 2439[[package]]
1565name = "smallvec" 2440name = "smallvec"
1566version = "1.15.0" 2441version = "1.15.0"
1567source = "registry+https://github.com/rust-lang/crates.io-index" 2442source = "registry+https://github.com/rust-lang/crates.io-index"
1568checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 2443checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9"
1569 2444
2445[[package]]
2446name = "socket2"
2447version = "0.6.0"
2448source = "registry+https://github.com/rust-lang/crates.io-index"
2449checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"
2450dependencies = [
2451 "libc",
2452 "windows-sys 0.59.0",
2453]
2454
2455[[package]]
2456name = "stable_deref_trait"
2457version = "1.2.0"
2458source = "registry+https://github.com/rust-lang/crates.io-index"
2459checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
2460
1570[[package]] 2461[[package]]
1571name = "static_assertions" 2462name = "static_assertions"
1572version = "1.1.0" 2463version = "1.1.0"
@@ -1612,6 +2503,26 @@ dependencies = [
1612 "unicode-ident", 2503 "unicode-ident",
1613] 2504]
1614 2505
2506[[package]]
2507name = "sync_wrapper"
2508version = "1.0.2"
2509source = "registry+https://github.com/rust-lang/crates.io-index"
2510checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
2511dependencies = [
2512 "futures-core",
2513]
2514
2515[[package]]
2516name = "synstructure"
2517version = "0.13.2"
2518source = "registry+https://github.com/rust-lang/crates.io-index"
2519checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
2520dependencies = [
2521 "proc-macro2",
2522 "quote",
2523 "syn",
2524]
2525
1615[[package]] 2526[[package]]
1616name = "system-deps" 2527name = "system-deps"
1617version = "6.2.2" 2528version = "6.2.2"
@@ -1659,7 +2570,16 @@ version = "1.0.69"
1659source = "registry+https://github.com/rust-lang/crates.io-index" 2570source = "registry+https://github.com/rust-lang/crates.io-index"
1660checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2571checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
1661dependencies = [ 2572dependencies = [
1662 "thiserror-impl", 2573 "thiserror-impl 1.0.69",
2574]
2575
2576[[package]]
2577name = "thiserror"
2578version = "2.0.12"
2579source = "registry+https://github.com/rust-lang/crates.io-index"
2580checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
2581dependencies = [
2582 "thiserror-impl 2.0.12",
1663] 2583]
1664 2584
1665[[package]] 2585[[package]]
@@ -1673,6 +2593,17 @@ dependencies = [
1673 "syn", 2593 "syn",
1674] 2594]
1675 2595
2596[[package]]
2597name = "thiserror-impl"
2598version = "2.0.12"
2599source = "registry+https://github.com/rust-lang/crates.io-index"
2600checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
2601dependencies = [
2602 "proc-macro2",
2603 "quote",
2604 "syn",
2605]
2606
1676[[package]] 2607[[package]]
1677name = "tiff" 2608name = "tiff"
1678version = "0.9.1" 2609version = "0.9.1"
@@ -1684,6 +2615,102 @@ dependencies = [
1684 "weezl", 2615 "weezl",
1685] 2616]
1686 2617
2618[[package]]
2619name = "time"
2620version = "0.3.41"
2621source = "registry+https://github.com/rust-lang/crates.io-index"
2622checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
2623dependencies = [
2624 "deranged",
2625 "itoa",
2626 "libc",
2627 "num-conv",
2628 "num_threads",
2629 "powerfmt",
2630 "serde",
2631 "time-core",
2632 "time-macros",
2633]
2634
2635[[package]]
2636name = "time-core"
2637version = "0.1.4"
2638source = "registry+https://github.com/rust-lang/crates.io-index"
2639checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
2640
2641[[package]]
2642name = "time-macros"
2643version = "0.2.22"
2644source = "registry+https://github.com/rust-lang/crates.io-index"
2645checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"
2646dependencies = [
2647 "num-conv",
2648 "time-core",
2649]
2650
2651[[package]]
2652name = "tinystr"
2653version = "0.8.1"
2654source = "registry+https://github.com/rust-lang/crates.io-index"
2655checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b"
2656dependencies = [
2657 "displaydoc",
2658 "zerovec",
2659]
2660
2661[[package]]
2662name = "tokio"
2663version = "1.47.0"
2664source = "registry+https://github.com/rust-lang/crates.io-index"
2665checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35"
2666dependencies = [
2667 "backtrace",
2668 "bytes",
2669 "io-uring",
2670 "libc",
2671 "mio",
2672 "pin-project-lite",
2673 "signal-hook-registry",
2674 "slab",
2675 "socket2",
2676 "tokio-macros",
2677 "windows-sys 0.59.0",
2678]
2679
2680[[package]]
2681name = "tokio-macros"
2682version = "2.5.0"
2683source = "registry+https://github.com/rust-lang/crates.io-index"
2684checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
2685dependencies = [
2686 "proc-macro2",
2687 "quote",
2688 "syn",
2689]
2690
2691[[package]]
2692name = "tokio-native-tls"
2693version = "0.3.1"
2694source = "registry+https://github.com/rust-lang/crates.io-index"
2695checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
2696dependencies = [
2697 "native-tls",
2698 "tokio",
2699]
2700
2701[[package]]
2702name = "tokio-util"
2703version = "0.7.15"
2704source = "registry+https://github.com/rust-lang/crates.io-index"
2705checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df"
2706dependencies = [
2707 "bytes",
2708 "futures-core",
2709 "futures-sink",
2710 "pin-project-lite",
2711 "tokio",
2712]
2713
1687[[package]] 2714[[package]]
1688name = "toml" 2715name = "toml"
1689version = "0.8.22" 2716version = "0.8.22"
@@ -1718,12 +2745,95 @@ dependencies = [
1718 "winnow", 2745 "winnow",
1719] 2746]
1720 2747
2748[[package]]
2749name = "tower"
2750version = "0.5.2"
2751source = "registry+https://github.com/rust-lang/crates.io-index"
2752checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
2753dependencies = [
2754 "futures-core",
2755 "futures-util",
2756 "pin-project-lite",
2757 "sync_wrapper",
2758 "tokio",
2759 "tower-layer",
2760 "tower-service",
2761]
2762
2763[[package]]
2764name = "tower-http"
2765version = "0.6.6"
2766source = "registry+https://github.com/rust-lang/crates.io-index"
2767checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
2768dependencies = [
2769 "bitflags 2.9.0",
2770 "bytes",
2771 "futures-util",
2772 "http",
2773 "http-body",
2774 "iri-string",
2775 "pin-project-lite",
2776 "tower",
2777 "tower-layer",
2778 "tower-service",
2779]
2780
2781[[package]]
2782name = "tower-layer"
2783version = "0.3.3"
2784source = "registry+https://github.com/rust-lang/crates.io-index"
2785checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
2786
2787[[package]]
2788name = "tower-service"
2789version = "0.3.3"
2790source = "registry+https://github.com/rust-lang/crates.io-index"
2791checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
2792
2793[[package]]
2794name = "tracing"
2795version = "0.1.41"
2796source = "registry+https://github.com/rust-lang/crates.io-index"
2797checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
2798dependencies = [
2799 "log",
2800 "pin-project-lite",
2801 "tracing-attributes",
2802 "tracing-core",
2803]
2804
2805[[package]]
2806name = "tracing-attributes"
2807version = "0.1.30"
2808source = "registry+https://github.com/rust-lang/crates.io-index"
2809checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
2810dependencies = [
2811 "proc-macro2",
2812 "quote",
2813 "syn",
2814]
2815
2816[[package]]
2817name = "tracing-core"
2818version = "0.1.34"
2819source = "registry+https://github.com/rust-lang/crates.io-index"
2820checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
2821dependencies = [
2822 "once_cell",
2823]
2824
1721[[package]] 2825[[package]]
1722name = "traitobject" 2826name = "traitobject"
1723version = "0.1.1" 2827version = "0.1.1"
1724source = "registry+https://github.com/rust-lang/crates.io-index" 2828source = "registry+https://github.com/rust-lang/crates.io-index"
1725checksum = "04a79e25382e2e852e8da874249358d382ebaf259d0d34e75d8db16a7efabbc7" 2829checksum = "04a79e25382e2e852e8da874249358d382ebaf259d0d34e75d8db16a7efabbc7"
1726 2830
2831[[package]]
2832name = "try-lock"
2833version = "0.2.5"
2834source = "registry+https://github.com/rust-lang/crates.io-index"
2835checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
2836
1727[[package]] 2837[[package]]
1728name = "tui-additions" 2838name = "tui-additions"
1729version = "0.4.1" 2839version = "0.4.1"
@@ -1746,6 +2856,12 @@ dependencies = [
1746 "unsafe-any", 2856 "unsafe-any",
1747] 2857]
1748 2858
2859[[package]]
2860name = "typenum"
2861version = "1.18.0"
2862source = "registry+https://github.com/rust-lang/crates.io-index"
2863checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
2864
1749[[package]] 2865[[package]]
1750name = "unicase" 2866name = "unicase"
1751version = "2.8.1" 2867version = "2.8.1"
@@ -1787,6 +2903,12 @@ version = "0.2.0"
1787source = "registry+https://github.com/rust-lang/crates.io-index" 2903source = "registry+https://github.com/rust-lang/crates.io-index"
1788checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 2904checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
1789 2905
2906[[package]]
2907name = "unicode-xid"
2908version = "0.2.6"
2909source = "registry+https://github.com/rust-lang/crates.io-index"
2910checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
2911
1790[[package]] 2912[[package]]
1791name = "unsafe-any" 2913name = "unsafe-any"
1792version = "0.4.2" 2914version = "0.4.2"
@@ -1802,12 +2924,29 @@ version = "0.2.11"
1802source = "registry+https://github.com/rust-lang/crates.io-index" 2924source = "registry+https://github.com/rust-lang/crates.io-index"
1803checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" 2925checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
1804 2926
2927[[package]]
2928name = "url"
2929version = "2.5.4"
2930source = "registry+https://github.com/rust-lang/crates.io-index"
2931checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
2932dependencies = [
2933 "form_urlencoded",
2934 "idna",
2935 "percent-encoding",
2936]
2937
1805[[package]] 2938[[package]]
1806name = "urlencoding" 2939name = "urlencoding"
1807version = "2.1.3" 2940version = "2.1.3"
1808source = "registry+https://github.com/rust-lang/crates.io-index" 2941source = "registry+https://github.com/rust-lang/crates.io-index"
1809checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" 2942checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
1810 2943
2944[[package]]
2945name = "utf8_iter"
2946version = "1.0.4"
2947source = "registry+https://github.com/rust-lang/crates.io-index"
2948checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
2949
1811[[package]] 2950[[package]]
1812name = "v_frame" 2951name = "v_frame"
1813version = "0.3.8" 2952version = "0.3.8"
@@ -1831,6 +2970,12 @@ version = "0.2.0"
1831source = "registry+https://github.com/rust-lang/crates.io-index" 2970source = "registry+https://github.com/rust-lang/crates.io-index"
1832checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" 2971checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
1833 2972
2973[[package]]
2974name = "version_check"
2975version = "0.9.5"
2976source = "registry+https://github.com/rust-lang/crates.io-index"
2977checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
2978
1834[[package]] 2979[[package]]
1835name = "viuer" 2980name = "viuer"
1836version = "0.9.1" 2981version = "0.9.1"
@@ -1848,6 +2993,15 @@ dependencies = [
1848 "termcolor", 2993 "termcolor",
1849] 2994]
1850 2995
2996[[package]]
2997name = "want"
2998version = "0.3.1"
2999source = "registry+https://github.com/rust-lang/crates.io-index"
3000checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
3001dependencies = [
3002 "try-lock",
3003]
3004
1851[[package]] 3005[[package]]
1852name = "wasi" 3006name = "wasi"
1853version = "0.11.0+wasi-snapshot-preview1" 3007version = "0.11.0+wasi-snapshot-preview1"
@@ -1889,6 +3043,19 @@ dependencies = [
1889 "wasm-bindgen-shared", 3043 "wasm-bindgen-shared",
1890] 3044]
1891 3045
3046[[package]]
3047name = "wasm-bindgen-futures"
3048version = "0.4.50"
3049source = "registry+https://github.com/rust-lang/crates.io-index"
3050checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
3051dependencies = [
3052 "cfg-if",
3053 "js-sys",
3054 "once_cell",
3055 "wasm-bindgen",
3056 "web-sys",
3057]
3058
1892[[package]] 3059[[package]]
1893name = "wasm-bindgen-macro" 3060name = "wasm-bindgen-macro"
1894version = "0.2.100" 3061version = "0.2.100"
@@ -1921,6 +3088,16 @@ dependencies = [
1921 "unicode-ident", 3088 "unicode-ident",
1922] 3089]
1923 3090
3091[[package]]
3092name = "web-sys"
3093version = "0.3.77"
3094source = "registry+https://github.com/rust-lang/crates.io-index"
3095checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
3096dependencies = [
3097 "js-sys",
3098 "wasm-bindgen",
3099]
3100
1924[[package]] 3101[[package]]
1925name = "weezl" 3102name = "weezl"
1926version = "0.1.8" 3103version = "0.1.8"
@@ -1958,6 +3135,26 @@ version = "0.4.0"
1958source = "registry+https://github.com/rust-lang/crates.io-index" 3135source = "registry+https://github.com/rust-lang/crates.io-index"
1959checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3136checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1960 3137
3138[[package]]
3139name = "windows"
3140version = "0.54.0"
3141source = "registry+https://github.com/rust-lang/crates.io-index"
3142checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49"
3143dependencies = [
3144 "windows-core 0.54.0",
3145 "windows-targets",
3146]
3147
3148[[package]]
3149name = "windows-core"
3150version = "0.54.0"
3151source = "registry+https://github.com/rust-lang/crates.io-index"
3152checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65"
3153dependencies = [
3154 "windows-result 0.1.2",
3155 "windows-targets",
3156]
3157
1961[[package]] 3158[[package]]
1962name = "windows-core" 3159name = "windows-core"
1963version = "0.61.0" 3160version = "0.61.0"
@@ -1967,7 +3164,7 @@ dependencies = [
1967 "windows-implement", 3164 "windows-implement",
1968 "windows-interface", 3165 "windows-interface",
1969 "windows-link", 3166 "windows-link",
1970 "windows-result", 3167 "windows-result 0.3.2",
1971 "windows-strings", 3168 "windows-strings",
1972] 3169]
1973 3170
@@ -1999,6 +3196,15 @@ version = "0.1.1"
1999source = "registry+https://github.com/rust-lang/crates.io-index" 3196source = "registry+https://github.com/rust-lang/crates.io-index"
2000checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 3197checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
2001 3198
3199[[package]]
3200name = "windows-result"
3201version = "0.1.2"
3202source = "registry+https://github.com/rust-lang/crates.io-index"
3203checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8"
3204dependencies = [
3205 "windows-targets",
3206]
3207
2002[[package]] 3208[[package]]
2003name = "windows-result" 3209name = "windows-result"
2004version = "0.3.2" 3210version = "0.3.2"
@@ -2117,6 +3323,12 @@ dependencies = [
2117 "bitflags 2.9.0", 3323 "bitflags 2.9.0",
2118] 3324]
2119 3325
3326[[package]]
3327name = "writeable"
3328version = "0.6.1"
3329source = "registry+https://github.com/rust-lang/crates.io-index"
3330checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
3331
2120[[package]] 3332[[package]]
2121name = "x11-clipboard" 3333name = "x11-clipboard"
2122version = "0.3.3" 3334version = "0.3.3"
@@ -2136,21 +3348,48 @@ dependencies = [
2136 "log", 3348 "log",
2137] 3349]
2138 3350
3351[[package]]
3352name = "yoke"
3353version = "0.8.0"
3354source = "registry+https://github.com/rust-lang/crates.io-index"
3355checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc"
3356dependencies = [
3357 "serde",
3358 "stable_deref_trait",
3359 "yoke-derive",
3360 "zerofrom",
3361]
3362
3363[[package]]
3364name = "yoke-derive"
3365version = "0.8.0"
3366source = "registry+https://github.com/rust-lang/crates.io-index"
3367checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"
3368dependencies = [
3369 "proc-macro2",
3370 "quote",
3371 "syn",
3372 "synstructure",
3373]
3374
2139[[package]] 3375[[package]]
2140name = "youtube-tui" 3376name = "youtube-tui"
2141version = "0.8.3" 3377version = "0.9.0"
2142dependencies = [ 3378dependencies = [
2143 "chrono", 3379 "chrono",
2144 "clipboard", 3380 "clipboard",
2145 "crossterm 0.29.0", 3381 "crossterm 0.29.0",
2146 "dyn-clone", 3382 "dyn-clone",
3383 "futures",
2147 "home", 3384 "home",
2148 "invidious", 3385 "invidious",
2149 "libmpv-sirno", 3386 "libmpv-sirno",
2150 "ratatui", 3387 "ratatui",
3388 "rustypipe",
2151 "serde", 3389 "serde",
2152 "serde_json", 3390 "serde_json",
2153 "serde_yaml_ng", 3391 "serde_yaml_ng",
3392 "tokio",
2154 "tui-additions", 3393 "tui-additions",
2155 "typemap", 3394 "typemap",
2156 "unicode-segmentation", 3395 "unicode-segmentation",
@@ -2178,6 +3417,66 @@ dependencies = [
2178 "syn", 3417 "syn",
2179] 3418]
2180 3419
3420[[package]]
3421name = "zerofrom"
3422version = "0.1.6"
3423source = "registry+https://github.com/rust-lang/crates.io-index"
3424checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
3425dependencies = [
3426 "zerofrom-derive",
3427]
3428
3429[[package]]
3430name = "zerofrom-derive"
3431version = "0.1.6"
3432source = "registry+https://github.com/rust-lang/crates.io-index"
3433checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
3434dependencies = [
3435 "proc-macro2",
3436 "quote",
3437 "syn",
3438 "synstructure",
3439]
3440
3441[[package]]
3442name = "zeroize"
3443version = "1.8.1"
3444source = "registry+https://github.com/rust-lang/crates.io-index"
3445checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
3446
3447[[package]]
3448name = "zerotrie"
3449version = "0.2.2"
3450source = "registry+https://github.com/rust-lang/crates.io-index"
3451checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595"
3452dependencies = [
3453 "displaydoc",
3454 "yoke",
3455 "zerofrom",
3456]
3457
3458[[package]]
3459name = "zerovec"
3460version = "0.11.2"
3461source = "registry+https://github.com/rust-lang/crates.io-index"
3462checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428"
3463dependencies = [
3464 "yoke",
3465 "zerofrom",
3466 "zerovec-derive",
3467]
3468
3469[[package]]
3470name = "zerovec-derive"
3471version = "0.11.1"
3472source = "registry+https://github.com/rust-lang/crates.io-index"
3473checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"
3474dependencies = [
3475 "proc-macro2",
3476 "quote",
3477 "syn",
3478]
3479
2181[[package]] 3480[[package]]
2182name = "zune-core" 3481name = "zune-core"
2183version = "0.4.12" 3482version = "0.4.12"
Cargo.toml +5 −1
@@ -1,6 +1,6 @@
1[package] 1[package]
2name = "youtube-tui" 2name = "youtube-tui"
3version = "0.8.3" 3version = "0.9.0"
4authors = ["Siriusmart <siriusmart@tuta.io>"] 4authors = ["Siriusmart <siriusmart@tuta.io>"]
5edition = "2021" 5edition = "2021"
6description = "An aesthetically pleasing YouTube TUI written in Rust" 6description = "An aesthetically pleasing YouTube TUI written in Rust"
@@ -40,6 +40,10 @@ ratatui = {version = "0.29", default-features = false, features = ["serde"]}
40unicode-segmentation = "1" 40unicode-segmentation = "1"
41libmpv-sirno = { version = "2.0.2-fork.1", optional = true } 41libmpv-sirno = { version = "2.0.2-fork.1", optional = true }
42 42
43rustypipe = "0.11"
44futures = { version = "0.3", features = [ "executor" ] }
45tokio = { version = "1", features = [ "rt" ]}
46
43# libmpv = { path = "libmpv-rs", optional = true, version = "2" } 47# libmpv = { path = "libmpv-rs", optional = true, version = "2" }
44# tui-additions = {path = "../Rust/tui-additions", default-features = false, features = ["framework", "widgets"]} 48# tui-additions = {path = "../Rust/tui-additions", default-features = false, features = ["framework", "widgets"]}
45# invidious = {path = "../Rust/invidious-rs"} 49# invidious = {path = "../Rust/invidious-rs"}
src/config/main.rs +50 −1
@@ -1,4 +1,10 @@
1use crate::global::traits::ConfigTrait; 1use crate::{
2 global::{
3 structs::{InvidiousClient, RustyPipeWrapper},
4 traits::{ConfigTrait, SearchProviderTrait},
5 },
6 MAIN_CONFIG,
7};
2use serde::{Deserialize, Serialize}; 8use serde::{Deserialize, Serialize};
3use std::collections::HashMap; 9use std::collections::HashMap;
4use typemap::Key; 10use typemap::Key;
@@ -31,6 +37,10 @@ pub struct MainConfig {
31 pub image_index: usize, 37 pub image_index: usize,
32 #[serde(default = "provider_default")] 38 #[serde(default = "provider_default")]
33 pub provider: Provider, 39 pub provider: Provider,
40 #[serde(default = "search_provider_default")]
41 pub search_provider: SearchProvider,
42 #[serde(default = "api_key_default")]
43 pub api_key: String,
34 #[serde(default = "shell_default")] 44 #[serde(default = "shell_default")]
35 pub shell: String, 45 pub shell: String,
36 #[serde(default = "legacy_input_handling_default")] 46 #[serde(default = "legacy_input_handling_default")]
@@ -58,6 +68,8 @@ impl Default for MainConfig {
58 limits: Limits::default(), 68 limits: Limits::default(),
59 syncing: sync_config_default(), 69 syncing: sync_config_default(),
60 provider: provider_default(), 70 provider: provider_default(),
71 search_provider: search_provider_default(),
72 api_key: api_key_default(),
61 shell: shell_default(), 73 shell: shell_default(),
62 legacy_input_handling: legacy_input_handling_default(), 74 legacy_input_handling: legacy_input_handling_default(),
63 75
@@ -135,6 +147,35 @@ pub enum Provider {
135 Invidious, 147 Invidious,
136} 148}
137 149
150#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Hash)]
151pub enum SearchProvider {
152 Invidious,
153 RustyPipe,
154}
155
156impl SearchProvider {
157 pub fn create(&self) -> Box<dyn SearchProviderTrait> {
158 match self {
159 Self::Invidious => Box::new(InvidiousClient::new(
160 unsafe { MAIN_CONFIG.get() }
161 .unwrap()
162 .invidious_instance
163 .clone(),
164 )),
165 Self::RustyPipe => Box::new(RustyPipeWrapper::default()),
166 }
167 }
168}
169
170impl SearchProvider {
171 pub fn as_str(&self) -> &str {
172 match self {
173 Self::Invidious => "Invidious",
174 Self::RustyPipe => "RustyPipe",
175 }
176 }
177}
178
138#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] 179#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
139pub enum WriteConfig { 180pub enum WriteConfig {
140 Must, 181 Must,
@@ -188,6 +229,10 @@ const fn provider_default() -> Provider {
188 Provider::YouTube 229 Provider::YouTube
189} 230}
190 231
232const fn search_provider_default() -> SearchProvider {
233 SearchProvider::RustyPipe
234}
235
191const fn search_history_default() -> usize { 236const fn search_history_default() -> usize {
192 75 237 75
193} 238}
@@ -232,6 +277,10 @@ fn shell_default() -> String {
232 String::from("sh") 277 String::from("sh")
233} 278}
234 279
280fn api_key_default() -> String {
281 String::from("YOUR API KEY HERE")
282}
283
235const fn download_images_default() -> bool { 284const fn download_images_default() -> bool {
236 true 285 true
237} 286}
src/global/functions/run_command.rs +6 −24
@@ -328,13 +328,6 @@ pub fn run_single_command(
328 } 328 }
329 }; 329 };
330 330
331 let client = framework
332 .data
333 .global
334 .get::<InvidiousClient>()
335 .unwrap()
336 .clone();
337
338 *framework.data.global.get_mut::<Message>().unwrap() = 331 *framework.data.global.get_mut::<Message>().unwrap() =
339 Message::Message(String::from("Syncing...")); 332 Message::Message(String::from("Syncing..."));
340 terminal.draw(|frame| framework.render(frame)).unwrap(); 333 terminal.draw(|frame| framework.render(frame)).unwrap();
@@ -346,16 +339,11 @@ pub fn run_single_command(
346 339
347 let subscriptions = framework.data.global.get_mut::<Subscriptions>().unwrap(); 340 let subscriptions = framework.data.global.get_mut::<Subscriptions>().unwrap();
348 341
349 let message = match subscriptions.sync_one( 342 let message =
350 &id, 343 match subscriptions.sync_one(&id, image_index, download_thumbnails, &syncing) {
351 &client, 344 Ok(()) => Message::Success(String::from("Channel synced")),
352 image_index, 345 Err(e) => Message::Error(format!("Sync failed: {e}")),
353 download_thumbnails, 346 };
354 &syncing,
355 ) {
356 Ok(()) => Message::Success(String::from("Channel synced")),
357 Err(e) => Message::Error(format!("Sync failed: {e}")),
358 };
359 347
360 if framework.data.state.get::<Page>().unwrap() == &Page::Feed { 348 if framework.data.state.get::<Page>().unwrap() == &Page::Feed {
361 let tasks = framework.data.state.get_mut::<Tasks>().unwrap(); 349 let tasks = framework.data.state.get_mut::<Tasks>().unwrap();
@@ -434,12 +422,6 @@ pub fn run_single_command(
434 Message::Message(String::from("Syncing...")); 422 Message::Message(String::from("Syncing..."));
435 terminal.draw(|frame| framework.render(frame)).unwrap(); 423 terminal.draw(|frame| framework.render(frame)).unwrap();
436 424
437 let client = framework
438 .data
439 .global
440 .get::<InvidiousClient>()
441 .unwrap()
442 .clone();
443 let mainconfig = framework.data.global.get::<MainConfig>().unwrap(); 425 let mainconfig = framework.data.global.get::<MainConfig>().unwrap();
444 let image_index = mainconfig.image_index; 426 let image_index = mainconfig.image_index;
445 let download_thumbnails = mainconfig.images.display(); 427 let download_thumbnails = mainconfig.images.display();
@@ -450,7 +432,7 @@ pub fn run_single_command(
450 .global 432 .global
451 .get_mut::<Subscriptions>() 433 .get_mut::<Subscriptions>()
452 .unwrap() 434 .unwrap()
453 .sync(&client, image_index, download_thumbnails, syncing); 435 .sync(image_index, download_thumbnails, syncing);
454 436
455 let message = Message::Success(format!( 437 let message = Message::Success(format!(
456 "Subscriptions synced: {success} success{} | {failed} fail | {cached} cached", 438 "Subscriptions synced: {success} success{} | {failed} fail | {cached} cached",
src/global/functions/singleitem_load.rs +9 −14
@@ -1,13 +1,12 @@
1use crate::{config::MainConfig, global::functions::download_all_images, global::structs::Item}; 1use crate::{
2use invidious::{ClientSync, ClientSyncTrait}; 2 config::MainConfig,
3 global::{functions::download_all_images, structs::Item, traits::SearchProviderWrapper},
4};
3use std::error::Error; 5use std::error::Error;
4 6
5pub fn load_playlist( 7pub fn load_playlist(id: &str, mainconfig: &MainConfig) -> Result<Item, Box<dyn Error>> {
6 client: &ClientSync, 8 let playlist =
7 id: &str, 9 Item::from_full_playlist(SearchProviderWrapper::playlist(id)?, mainconfig.image_index);
8 mainconfig: &MainConfig,
9) -> Result<Item, Box<dyn Error>> {
10 let playlist = Item::from_full_playlist(client.playlist(id, None)?, mainconfig.image_index);
11 let videos = &playlist.fullplaylist()?.videos; 10 let videos = &playlist.fullplaylist()?.videos;
12 11
13 if mainconfig.images.display() { 12 if mainconfig.images.display() {
@@ -21,12 +20,8 @@ pub fn load_playlist(
21 Ok(playlist) 20 Ok(playlist)
22} 21}
23 22
24pub fn load_video( 23pub fn load_video(id: &str, mainconfig: &MainConfig) -> Result<Item, Box<dyn Error>> {
25 client: &ClientSync, 24 let video = Item::from_full_video(SearchProviderWrapper::video(id)?, mainconfig.image_index);
26 id: &str,
27 mainconfig: &MainConfig,
28) -> Result<Item, Box<dyn Error>> {
29 let video = Item::from_full_video(client.video(id, None)?, mainconfig.image_index);
30 if mainconfig.images.display() { 25 if mainconfig.images.display() {
31 download_all_images(vec![(&video).into()]); 26 download_all_images(vec![(&video).into()]);
32 } 27 }
src/global/structs/invidiousclient.rs +94 −4
@@ -1,5 +1,6 @@
1use invidious::ClientSync; 1use invidious::{ClientSync, ClientSyncTrait};
2use typemap::Key; 2
3use crate::global::traits::SearchProviderTrait;
3 4
4// used in `data.global` 5// used in `data.global`
5/// Holds the invidious client 6/// Holds the invidious client
@@ -12,6 +13,95 @@ impl InvidiousClient {
12 } 13 }
13} 14}
14 15
15impl Key for InvidiousClient { 16impl SearchProviderTrait for InvidiousClient {
16 type Value = Self; 17 fn supports_video(&self) -> bool {
18 true
19 }
20
21 fn video(&self, id: &str) -> Result<invidious::video::Video, Box<dyn std::error::Error>> {
22 self.0.video(id, None).map_err(|e| e.into())
23 }
24
25 fn supports_search(&self) -> bool {
26 true
27 }
28
29 fn search(
30 &self,
31 filters: &crate::config::Search,
32 ) -> Result<Vec<invidious::hidden::SearchItem>, Box<dyn std::error::Error>> {
33 self.0
34 .search(Some(&filters.to_string()))
35 .map(|res| res.items)
36 .map_err(|e| e.into())
37 }
38
39 fn supports_channel(&self) -> bool {
40 true
41 }
42
43 fn channel(&self, id: &str) -> Result<invidious::channel::Channel, Box<dyn std::error::Error>> {
44 self.0.channel(id, None).map_err(|e| e.into())
45 }
46
47 fn supports_popular(&self) -> bool {
48 true
49 }
50
51 fn popular(&self) -> Result<Vec<invidious::hidden::PopularItem>, Box<dyn std::error::Error>> {
52 self.0
53 .popular(None)
54 .map(|res| res.items)
55 .map_err(|e| e.into())
56 }
57
58 fn supports_trending(&self) -> bool {
59 true
60 }
61
62 fn trending(&self) -> Result<Vec<invidious::CommonVideo>, Box<dyn std::error::Error>> {
63 self.0
64 .trending(None)
65 .map(|res| res.videos)
66 .map_err(|e| e.into())
67 }
68
69 fn supports_playlist(&self) -> bool {
70 true
71 }
72
73 fn playlist(
74 &self,
75 id: &str,
76 ) -> Result<invidious::universal::Playlist, Box<dyn std::error::Error>> {
77 self.0.playlist(id, None).map_err(|e| e.into())
78 }
79
80 fn supports_channel_videos(&self) -> bool {
81 true
82 }
83
84 fn channel_videos(
85 &self,
86 id: &str,
87 ) -> Result<Vec<invidious::CommonVideo>, Box<dyn std::error::Error>> {
88 self.0
89 .channel_videos(id, None)
90 .map(|res| res.videos)
91 .map_err(|e| e.into())
92 }
93
94 fn supports_channel_playlists(&self) -> bool {
95 true
96 }
97
98 fn channel_playlists(
99 &self,
100 id: &str,
101 ) -> Result<Vec<invidious::CommonPlaylist>, Box<dyn std::error::Error>> {
102 self.0
103 .channel_playlists(id, None)
104 .map(|res| res.playlists)
105 .map_err(|e| e.into())
106 }
17} 107}
src/global/structs/item.rs +47 −6
@@ -299,7 +299,13 @@ impl Item {
299 Self::MiniVideo(MiniVideoItem { 299 Self::MiniVideo(MiniVideoItem {
300 title: original.title, 300 title: original.title,
301 id: original.id, 301 id: original.id,
302 thumbnail_url: original.thumbnails[image_index].url.clone(), 302 thumbnail_url: if original.thumbnails.is_empty() {
303 String::new()
304 } else {
305 original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
306 .url
307 .clone()
308 },
303 length: secs_display_string(original.length), 309 length: secs_display_string(original.length),
304 views: Some(viewcount_text(original.views)), 310 views: Some(viewcount_text(original.views)),
305 channel: original.author, 311 channel: original.author,
@@ -331,7 +337,18 @@ impl Item {
331 Self::MiniChannel(MiniChannelItem { 337 Self::MiniChannel(MiniChannelItem {
332 name: original.name, 338 name: original.name,
333 id: original.id, 339 id: original.id,
334 thumbnail_url: format!("https://{}", original.thumbnails[image_index].url), 340 thumbnail_url: if !original.thumbnails.is_empty() {
341 let url = original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
342 .url
343 .clone();
344 if url.starts_with("https://") {
345 url
346 } else {
347 format!("https://{url}")
348 }
349 } else {
350 "".to_string()
351 },
335 video_count: original.video_count, 352 video_count: original.video_count,
336 sub_count: original.subscribers, 353 sub_count: original.subscribers,
337 sub_count_text: viewcount_text(original.subscribers as u64), 354 sub_count_text: viewcount_text(original.subscribers as u64),
@@ -344,7 +361,13 @@ impl Item {
344 Self::MiniVideo(MiniVideoItem { 361 Self::MiniVideo(MiniVideoItem {
345 title: original.title, 362 title: original.title,
346 id: original.id, 363 id: original.id,
347 thumbnail_url: original.thumbnails[image_index].url.clone(), 364 thumbnail_url: if !original.thumbnails.is_empty() {
365 original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
366 .url
367 .clone()
368 } else {
369 "".to_string()
370 },
348 length: secs_display_string(original.length), 371 length: secs_display_string(original.length),
349 views: Some(viewcount_text(original.views)), 372 views: Some(viewcount_text(original.views)),
350 channel: original.author, 373 channel: original.author,
@@ -373,7 +396,13 @@ impl Item {
373 Self::FullVideo(FullVideoItem { 396 Self::FullVideo(FullVideoItem {
374 title: original.title, 397 title: original.title,
375 id: original.id, 398 id: original.id,
376 thumbnail_url: original.thumbnails[image_index].url.clone(), 399 thumbnail_url: if !original.thumbnails.is_empty() {
400 original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
401 .url
402 .clone()
403 } else {
404 "".to_string()
405 },
377 length: secs_display_string(original.length), 406 length: secs_display_string(original.length),
378 views: viewcount_text(original.views), 407 views: viewcount_text(original.views),
379 channel: original.author, 408 channel: original.author,
@@ -414,7 +443,13 @@ impl Item {
414 Self::MiniVideo(MiniVideoItem { 443 Self::MiniVideo(MiniVideoItem {
415 title: original.title, 444 title: original.title,
416 id: original.id, 445 id: original.id,
417 thumbnail_url: original.thumbnails[image_index].url.clone(), 446 thumbnail_url: if !original.thumbnails.is_empty() {
447 original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
448 .url
449 .clone()
450 } else {
451 "".to_string()
452 },
418 length: secs_display_string(original.length), 453 length: secs_display_string(original.length),
419 views: None, 454 views: None,
420 channel: original.author, 455 channel: original.author,
@@ -430,7 +465,13 @@ impl Item {
430 Self::FullChannel(FullChannelItem { 465 Self::FullChannel(FullChannelItem {
431 name: original.name, 466 name: original.name,
432 id: original.id, 467 id: original.id,
433 thumbnail_url: original.thumbnails[image_index].url.clone(), 468 thumbnail_url: if !original.thumbnails.is_empty() {
469 original.thumbnails[image_index.min(original.thumbnails.len() - 1)]
470 .url
471 .clone()
472 } else {
473 "".to_string()
474 },
434 sub_count: original.subscribers, 475 sub_count: original.subscribers,
435 sub_count_text: viewcount_text(original.subscribers as u64), 476 sub_count_text: viewcount_text(original.subscribers as u64),
436 total_views: viewcount_text(original.total_views), 477 total_views: viewcount_text(original.total_views),
src/global/structs/mod.rs +2
@@ -9,6 +9,7 @@ mod message;
9#[cfg(feature = "mpv")] 9#[cfg(feature = "mpv")]
10mod mpv; 10mod mpv;
11mod page; 11mod page;
12mod rustypipe;
12mod state_env; 13mod state_env;
13mod status; 14mod status;
14mod subscriptions; 15mod subscriptions;
@@ -24,6 +25,7 @@ pub use message::*;
24#[cfg(feature = "mpv")] 25#[cfg(feature = "mpv")]
25pub use mpv::*; 26pub use mpv::*;
26pub use page::*; 27pub use page::*;
28pub use rustypipe::*;
27pub use state_env::*; 29pub use state_env::*;
28pub use status::*; 30pub use status::*;
29pub use subscriptions::*; 31pub use subscriptions::*;
src/global/structs/rustypipe.rs added +432
@@ -0,0 +1,432 @@
1use invidious::{
2 channel::Channel, hidden::SearchItem, universal::Playlist, video::Video, CommonChannel,
3 CommonImage, CommonPlaylist, CommonThumbnail, CommonVideo,
4};
5use rustypipe::{
6 client::RustyPipe,
7 model::{
8 richtext::{ToHtml, ToPlaintext},
9 ChannelItem, PlaylistItem, Thumbnail, VideoItem, YouTubeItem,
10 },
11 param::search_filter::{ItemType, Length, Order, SearchFilter, UploadDate},
12};
13
14use crate::{
15 config::{SearchFilterDate, SearchFilterDuration, SearchFilterSort, SearchFilterType},
16 global::{functions::viewcount_text, traits::SearchProviderTrait},
17 RUNTIME,
18};
19
20#[derive(Clone)]
21pub struct RustyPipeWrapper(RustyPipe);
22
23impl Default for RustyPipeWrapper {
24 fn default() -> Self {
25 Self(
26 RustyPipe::builder()
27 .storage_dir(home::home_dir().unwrap().join(".local/share/rustypipe"))
28 .build()
29 .unwrap(),
30 )
31 }
32}
33
34fn thumbnail_convert(thumb: Thumbnail) -> CommonThumbnail {
35 CommonThumbnail {
36 quality: "unknown".to_string(),
37 url: thumb.url,
38 width: thumb.width,
39 height: thumb.height,
40 }
41}
42
43fn image_convert(thumb: Thumbnail) -> CommonImage {
44 CommonImage {
45 url: thumb.url,
46 width: thumb.width,
47 height: thumb.height,
48 }
49}
50
51fn video_item_convert(video: VideoItem) -> CommonVideo {
52 invidious::CommonVideo {
53 title: video.name,
54 id: video.id,
55 author: video
56 .channel
57 .clone()
58 .map(|c| c.name)
59 .unwrap_or("Unknown channel".to_string()),
60 author_id: video
61 .channel
62 .clone()
63 .map(|c| c.id)
64 .unwrap_or("Unknown channel id".to_string()),
65 author_url: video
66 .channel
67 .map(|c| format!("https://www.youtube.com/channel/{}", c.id))
68 .unwrap_or("Unknown channel id".to_string()),
69 thumbnails: video.thumbnail.into_iter().map(thumbnail_convert).collect(),
70 description: video.short_description.clone().unwrap_or_default(),
71 description_html: video.short_description.unwrap_or_default(),
72 views: video.view_count.unwrap_or_default(),
73 length: video.duration.unwrap_or_default(),
74 published: video
75 .publish_date
76 .map(|t| t.unix_timestamp() as u64)
77 .unwrap_or_default(),
78 published_text: video
79 .publish_date_txt
80 .unwrap_or("Unknown publish date".to_string()),
81 premiere_timestamp: 0,
82 live: video.is_live,
83 premium: false,
84 upcoming: video.is_upcoming,
85 }
86}
87
88fn playlist_item_convert(playlist: PlaylistItem) -> CommonPlaylist {
89 invidious::CommonPlaylist {
90 title: playlist.name,
91 id: playlist.id,
92 thumbnail: playlist
93 .thumbnail
94 .into_iter()
95 .map(|item| item.url)
96 .collect(),
97 author: playlist
98 .channel
99 .clone()
100 .map(|c| c.name)
101 .unwrap_or("Unknown channel".to_string()),
102 author_id: playlist
103 .channel
104 .clone()
105 .map(|c| c.id)
106 .unwrap_or("Unknown channel id".to_string()),
107 author_verified: playlist
108 .channel
109 .map(|c| c.verification.verified())
110 .unwrap_or_default(),
111 video_count: playlist.video_count.unwrap_or_default() as i32,
112 videos: Vec::new(),
113 }
114}
115
116fn channel_item_convert(channel: ChannelItem) -> CommonChannel {
117 invidious::CommonChannel {
118 name: channel.name,
119 url: format!("https://www.youtube.com/channel/{}", channel.id),
120 id: channel.id,
121 verified: channel.verification.verified(),
122 thumbnails: channel.avatar.into_iter().map(image_convert).collect(),
123 auto_generated: false,
124 subscribers: channel.subscriber_count.unwrap_or_default() as u32,
125 video_count: 0,
126 description: channel.short_description.clone(),
127 description_html: channel.short_description,
128 }
129}
130
131impl SearchProviderTrait for RustyPipeWrapper {
132 fn supports_video(&self) -> bool {
133 true
134 }
135
136 fn video(&self, id: &str) -> Result<invidious::video::Video, Box<dyn std::error::Error>> {
137 let query = self.0.query();
138 let (player, details) = RUNTIME
139 .get()
140 .unwrap()
141 .block_on(async { futures::join!(query.player(id), query.video_details(id)) });
142
143 let player = player?;
144 let details = details?;
145
146 Ok(Video {
147 r#type: "video".to_string(),
148 title: player
149 .details
150 .name
151 .unwrap_or("<Unable to fetch video name>".to_string()),
152 id: player.details.id,
153 thumbnails: player
154 .details
155 .thumbnail
156 .iter()
157 .cloned()
158 .map(thumbnail_convert)
159 .collect(),
160 storyboards: Vec::new(),
161 description: details.description.to_plaintext(),
162 description_html: details.description.to_html(),
163 published: details
164 .publish_date
165 .map(|time| time.to_utc().unix_timestamp() as u64)
166 .unwrap_or_default(),
167 published_text: details
168 .publish_date_txt
169 .unwrap_or("Unknown publish date".to_string()),
170 keywords: player.details.keywords,
171 views: details.view_count,
172 likes: details.like_count.unwrap_or_default(),
173 dislikes: 0, // TODO
174 paid: false,
175 premium: false,
176 family_friendly: false,
177 allowed_regions: Vec::new(),
178 genre: String::from("Unknown genre"),
179 genre_url: None,
180 author: details.channel.name,
181 author_id: details.channel.id.clone(),
182 author_url: format!("https://www.youtube.com/channel/{}", details.channel.id),
183 author_thumbnails: details
184 .channel
185 .avatar
186 .iter()
187 .cloned()
188 .map(image_convert)
189 .collect(),
190 sub_count_text: viewcount_text(details.channel.subscriber_count.unwrap_or(0)),
191 length: player.details.duration,
192 allow_ratings: true,
193 rating: 0_f32,
194 listed: true,
195 live: player.details.is_live,
196 upcoming: false,
197 premiere_timestamp: 0,
198 dash: "No dash".to_string(),
199 adaptive_formats: Vec::new(), // TODO
200 format_streams: Vec::new(), // TODO
201 captions: Vec::new(), // TODO
202 recommended_videos: Vec::new(), // TODO
203 })
204 }
205
206 fn supports_search(&self) -> bool {
207 true
208 }
209
210 fn search(
211 &self,
212 filters: &crate::config::Search,
213 ) -> Result<Vec<invidious::hidden::SearchItem>, Box<dyn std::error::Error>> {
214 let date = match filters.filters.date {
215 SearchFilterDate::None => None,
216 SearchFilterDate::Hour => Some(UploadDate::Hour),
217 SearchFilterDate::Day => Some(UploadDate::Day),
218 SearchFilterDate::Week => Some(UploadDate::Week),
219 SearchFilterDate::Month => Some(UploadDate::Month),
220 SearchFilterDate::Year => Some(UploadDate::Year),
221 };
222
223 let sort = match filters.filters.sort {
224 SearchFilterSort::Relevance => None,
225 SearchFilterSort::Date => Some(Order::Date),
226 SearchFilterSort::Views => Some(Order::Views),
227 SearchFilterSort::Rating => Some(Order::Rating),
228 };
229
230 let duration = match filters.filters.duration {
231 SearchFilterDuration::None => None,
232 SearchFilterDuration::Long => Some(Length::Long),
233 SearchFilterDuration::Short => Some(Length::Short),
234 SearchFilterDuration::Medium => Some(Length::Medium),
235 };
236
237 let r#type = match filters.filters.r#type {
238 SearchFilterType::All => None,
239 SearchFilterType::Video => Some(ItemType::Video),
240 SearchFilterType::Playlist => Some(ItemType::Playlist),
241 SearchFilterType::Channel => Some(ItemType::Channel),
242 };
243
244 let res = RUNTIME.get().unwrap().block_on(
245 self.0.query().search_filter(
246 filters.query.clone(),
247 &SearchFilter::new()
248 .date_opt(date)
249 .sort_opt(sort)
250 .length_opt(duration)
251 .item_type_opt(r#type),
252 ),
253 )?;
254
255 Ok(res
256 .items
257 .items
258 .into_iter()
259 .map(|item: YouTubeItem| match item {
260 YouTubeItem::Video(video) => SearchItem::Video(video_item_convert(video)),
261 YouTubeItem::Playlist(playlist) => {
262 SearchItem::Playlist(playlist_item_convert(playlist))
263 }
264 YouTubeItem::Channel(channel) => SearchItem::Channel(channel_item_convert(channel)),
265 })
266 .collect())
267 }
268
269 fn supports_channel(&self) -> bool {
270 true
271 }
272
273 fn channel(&self, id: &str) -> Result<invidious::channel::Channel, Box<dyn std::error::Error>> {
274 let q = self.0.query();
275 let (info, artist) = RUNTIME
276 .get()
277 .unwrap()
278 .block_on(async { futures::join!(q.channel_info(id), q.music_artist(id, false)) });
279
280 let info = info?;
281 let artist = artist?;
282
283 Ok(Channel {
284 name: artist.name,
285 id: info.id,
286 url: info.url,
287 banners: Vec::new(), // TODO?
288 thumbnails: artist.header_image.into_iter().map(image_convert).collect(),
289 subscribers: info.subscriber_count.unwrap_or_default() as u32,
290 total_views: info.view_count.unwrap_or_default(),
291 joined: info
292 .create_date
293 .map(|d| d.with_hms(0, 0, 0).unwrap().as_utc().unix_timestamp())
294 .unwrap_or_default() as u64,
295 auto_generated: false,
296 family_friendly: false,
297 description: info.description.clone(),
298 description_html: info.description,
299 allowed_regions: Vec::new(), // TODO
300 lastest_videos: Vec::new(),
301 related_channels: Vec::new(),
302 })
303 }
304
305 fn supports_popular(&self) -> bool {
306 false
307 }
308
309 fn popular(&self) -> Result<Vec<invidious::hidden::PopularItem>, Box<dyn std::error::Error>> {
310 unimplemented!("not supported")
311 }
312
313 fn supports_trending(&self) -> bool {
314 true
315 }
316
317 fn trending(&self) -> Result<Vec<invidious::CommonVideo>, Box<dyn std::error::Error>> {
318 let res = RUNTIME.get().unwrap().block_on(self.0.query().trending())?;
319
320 Ok(res.into_iter().map(video_item_convert).collect())
321 }
322
323 fn supports_playlist(&self) -> bool {
324 true
325 }
326
327 fn playlist(
328 &self,
329 id: &str,
330 ) -> Result<invidious::universal::Playlist, Box<dyn std::error::Error>> {
331 let res = RUNTIME
332 .get()
333 .unwrap()
334 .block_on(self.0.query().playlist(id))?;
335
336 Ok(Playlist {
337 title: res.name,
338 id: res.id,
339 thumbnail: res.thumbnail.into_iter().map(|t| t.url).collect(),
340 author: res
341 .channel
342 .clone()
343 .map(|c| c.name)
344 .unwrap_or("Unknown channel".to_string()),
345 author_id: res
346 .channel
347 .clone()
348 .map(|c| c.id)
349 .unwrap_or("Unknown channel".to_string()),
350 author_thumbnails: Vec::new(), // TODO why?
351 description: res
352 .description
353 .clone()
354 .map(|t| t.to_plaintext())
355 .unwrap_or_default(),
356 description_html: res.description.map(|t| t.to_html()).unwrap_or_default(),
357 video_count: res.video_count as u32,
358 views: 0,
359 updated: res
360 .last_update
361 .map(|d| d.with_hms(0, 0, 0).unwrap().as_utc().unix_timestamp())
362 .unwrap_or_default() as u64,
363 listed: true,
364 videos: res
365 .videos
366 .items
367 .into_iter()
368 .map(|item| invidious::hidden::PlaylistItem {
369 title: item.name,
370 id: item.id,
371 author: res
372 .channel
373 .clone()
374 .map(|c| c.name)
375 .unwrap_or("Unknown channel".to_string()),
376 author_id: res
377 .channel
378 .clone()
379 .map(|c| c.id)
380 .unwrap_or("Unknown channel id".to_string()),
381 author_url: res
382 .channel
383 .clone()
384 .map(|c| format!("https://www.youtube.com/channel/{}", c.id))
385 .unwrap_or("Unknown channel id".to_string()),
386 thumbnails: item.thumbnail.into_iter().map(thumbnail_convert).collect(),
387 index: 0,
388 length: res.video_count as u32,
389 })
390 .collect(),
391 })
392 }
393
394 fn supports_channel_videos(&self) -> bool {
395 true
396 }
397
398 fn channel_videos(&self, id: &str) -> Result<Vec<CommonVideo>, Box<dyn std::error::Error>> {
399 let res = RUNTIME
400 .get()
401 .unwrap()
402 .block_on(self.0.query().channel_videos(id))?;
403
404 Ok(res
405 .content
406 .items
407 .into_iter()
408 .map(video_item_convert)
409 .collect())
410 }
411
412 fn supports_channel_playlists(&self) -> bool {
413 true
414 }
415
416 fn channel_playlists(
417 &self,
418 id: &str,
419 ) -> Result<Vec<CommonPlaylist>, Box<dyn std::error::Error>> {
420 let res = RUNTIME
421 .get()
422 .unwrap()
423 .block_on(self.0.query().channel_playlists(id))?;
424
425 Ok(res
426 .content
427 .items
428 .into_iter()
429 .map(playlist_item_convert)
430 .collect())
431 }
432}
src/global/structs/subscriptions.rs +4 −18
@@ -3,12 +3,11 @@ use crate::{
3 config::SyncConfig, 3 config::SyncConfig,
4 global::{ 4 global::{
5 functions::{download_all_images, DownloadRequest}, 5 functions::{download_all_images, DownloadRequest},
6 traits::{Collection, CollectionItem}, 6 traits::{Collection, CollectionItem, SearchProviderWrapper},
7 }, 7 },
8}; 8};
9use chrono::Utc; 9use chrono::Utc;
10use home::home_dir; 10use home::home_dir;
11use invidious::ClientSyncTrait;
12use serde::*; 11use serde::*;
13use std::{ 12use std::{
14 error::Error, 13 error::Error,
@@ -32,7 +31,6 @@ impl Subscriptions {
32 /// Res<(success, failed)> 31 /// Res<(success, failed)>
33 pub fn sync( 32 pub fn sync(
34 &mut self, 33 &mut self,
35 client: &InvidiousClient,
36 image_index: usize, 34 image_index: usize,
37 download_thumbnails: bool, 35 download_thumbnails: bool,
38 syncconfig: SyncConfig, 36 syncconfig: SyncConfig,
@@ -55,14 +53,12 @@ impl Subscriptions {
55 return; 53 return;
56 } 54 }
57 let tx = tx.clone(); 55 let tx = tx.clone();
58 let client = client.clone();
59 let success = success.clone(); 56 let success = success.clone();
60 let failed = failed.clone(); 57 let failed = failed.clone();
61 let empty = empty.clone(); 58 let empty = empty.clone();
62 thread::spawn(move || { 59 thread::spawn(move || {
63 let res = sync_one( 60 let res = sync_one(
64 &item.channel.id, 61 &item.channel.id,
65 &client,
66 image_index, 62 image_index,
67 download_thumbnails, 63 download_thumbnails,
68 syncconfig.sync_channel_info 64 syncconfig.sync_channel_info
@@ -114,7 +110,6 @@ impl Subscriptions {
114 pub fn sync_one( 110 pub fn sync_one(
115 &mut self, 111 &mut self,
116 id: &str, 112 id: &str,
117 client: &InvidiousClient,
118 image_index: usize, 113 image_index: usize,
119 download_thumbnails: bool, 114 download_thumbnails: bool,
120 syncconfig: &SyncConfig, 115 syncconfig: &SyncConfig,
@@ -124,7 +119,6 @@ impl Subscriptions {
124 Some(item) => { 119 Some(item) => {
125 let (videos, channel) = sync_one( 120 let (videos, channel) = sync_one(
126 id, 121 id,
127 client,
128 image_index, 122 image_index,
129 download_thumbnails, 123 download_thumbnails,
130 syncconfig.sync_channel_info 124 syncconfig.sync_channel_info
@@ -141,8 +135,7 @@ impl Subscriptions {
141 } 135 }
142 } 136 }
143 None => { 137 None => {
144 let (videos, channel) = 138 let (videos, channel) = sync_one(id, image_index, download_thumbnails, true)?;
145 sync_one(id, client, image_index, download_thumbnails, true)?;
146 self.0.push(SubItem { 139 self.0.push(SubItem {
147 channel: channel.unwrap(), 140 channel: channel.unwrap(),
148 videos, 141 videos,
@@ -186,7 +179,6 @@ impl Subscriptions {
186 179
187fn sync_one( 180fn sync_one(
188 id: &str, 181 id: &str,
189 client: &InvidiousClient,
190 image_index: usize, 182 image_index: usize,
191 download_thumbnails: bool, 183 download_thumbnails: bool,
192 sync_channel_info: bool, 184 sync_channel_info: bool,
@@ -194,22 +186,16 @@ fn sync_one(
194 let (tx, rx) = mpsc::channel(); 186 let (tx, rx) = mpsc::channel();
195 187
196 if sync_channel_info { 188 if sync_channel_info {
197 let client2 = client.clone();
198 let id2 = id.to_string(); 189 let id2 = id.to_string();
199 thread::spawn(move || { 190 thread::spawn(move || {
200 tx.send( 191 tx.send(
201 client2 192 SearchProviderWrapper::channel(&id2)
202 .0
203 .channel(&id2, None)
204 .map(|channel| Item::from_full_channel(channel, image_index).into_fullchannel()) 193 .map(|channel| Item::from_full_channel(channel, image_index).into_fullchannel())
205 .ok(), 194 .ok(),
206 ) 195 )
207 }); 196 });
208 } 197 }
209 let mut videos = client 198 let mut videos = SearchProviderWrapper::channel_videos(id)?
210 .0
211 .channel_videos(id, None)?
212 .videos
213 .into_iter() 199 .into_iter()
214 .map(|video| { 200 .map(|video| {
215 Item::from_common_video(video, image_index) 201 Item::from_common_video(video, image_index)
src/global/traits/mod.rs +2
@@ -2,9 +2,11 @@
2mod asurlstring; 2mod asurlstring;
3mod collection; 3mod collection;
4mod configtrait; 4mod configtrait;
5mod search_provider;
5mod searchfilteritem; 6mod searchfilteritem;
6 7
7pub use asurlstring::*; 8pub use asurlstring::*;
8pub use collection::*; 9pub use collection::*;
9pub use configtrait::*; 10pub use configtrait::*;
11pub use search_provider::*;
10pub use searchfilteritem::*; 12pub use searchfilteritem::*;
src/global/traits/search_provider.rs added +161
@@ -0,0 +1,161 @@
1use std::{
2 collections::HashMap,
3 error::Error,
4 fmt::{Debug, Display},
5 sync::OnceLock,
6};
7
8use dyn_clone::DynClone;
9use invidious::{
10 channel::Channel,
11 hidden::{PopularItem, SearchItem},
12 universal::Playlist,
13 video::Video,
14 CommonPlaylist, CommonVideo,
15};
16
17use crate::{
18 config::{Search, SearchProvider},
19 MAIN_CONFIG,
20};
21
22pub trait SearchProviderTrait: DynClone + Send {
23 fn supports_channel(&self) -> bool;
24 fn channel(&self, id: &str) -> Result<Channel, Box<dyn Error>>;
25
26 fn supports_channel_videos(&self) -> bool;
27 fn channel_videos(&self, id: &str) -> Result<Vec<CommonVideo>, Box<dyn Error>>;
28
29 fn supports_channel_playlists(&self) -> bool;
30 fn channel_playlists(&self, id: &str) -> Result<Vec<CommonPlaylist>, Box<dyn Error>>;
31
32 fn supports_trending(&self) -> bool;
33 fn trending(&self) -> Result<Vec<CommonVideo>, Box<dyn Error>>;
34
35 fn supports_popular(&self) -> bool;
36 fn popular(&self) -> Result<Vec<PopularItem>, Box<dyn Error>>;
37
38 fn supports_search(&self) -> bool;
39 fn search(&self, filters: &Search) -> Result<Vec<SearchItem>, Box<dyn Error>>;
40
41 fn supports_video(&self) -> bool;
42 fn video(&self, id: &str) -> Result<Video, Box<dyn Error>>;
43
44 fn supports_playlist(&self) -> bool;
45 fn playlist(&self, id: &str) -> Result<Playlist, Box<dyn Error>>;
46}
47
48dyn_clone::clone_trait_object!(SearchProviderTrait);
49
50#[derive(Default, Clone)]
51pub struct SearchProviderWrapper(HashMap<SearchProvider, Box<dyn SearchProviderTrait>>);
52
53struct UnsupportedError(pub &'static str);
54
55impl Display for UnsupportedError {
56 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
57 f.write_fmt(format_args!(
58 "Operation `{}` is not supported by {}",
59 self.0,
60 unsafe { MAIN_CONFIG.get().unwrap() }
61 .search_provider
62 .as_str()
63 ))
64 }
65}
66
67impl Debug for UnsupportedError {
68 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
69 f.write_fmt(format_args!("{self}"))
70 }
71}
72
73impl Error for UnsupportedError {}
74
75static mut SEARCH_PROVIDER: OnceLock<SearchProviderWrapper> = OnceLock::new();
76
77impl SearchProviderWrapper {
78 pub fn init() {
79 unsafe {
80 if SEARCH_PROVIDER.get().is_some() {
81 *SEARCH_PROVIDER.get_mut().unwrap() = Self::default()
82 } else {
83 let _ = SEARCH_PROVIDER.set(Self::default());
84 }
85 }
86 }
87
88 #[allow(clippy::borrowed_box)]
89 fn get() -> &'static Box<dyn SearchProviderTrait> {
90 let provider = &unsafe { MAIN_CONFIG.get() }.unwrap().search_provider;
91 unsafe { SEARCH_PROVIDER.get_mut() }
92 .unwrap()
93 .0
94 .entry(*provider)
95 .or_insert(provider.create())
96 }
97
98 pub fn channel(id: &str) -> Result<Channel, Box<dyn Error>> {
99 let provider = Self::get();
100 if !provider.supports_channel() {
101 return Err(UnsupportedError("channel").into());
102 }
103 provider.channel(id)
104 }
105
106 pub fn channel_videos(id: &str) -> Result<Vec<CommonVideo>, Box<dyn Error>> {
107 let provider = Self::get();
108 if !provider.supports_channel_videos() {
109 return Err(UnsupportedError("channel_videos").into());
110 }
111 provider.channel_videos(id)
112 }
113
114 pub fn channel_playlists(id: &str) -> Result<Vec<CommonPlaylist>, Box<dyn Error>> {
115 let provider = Self::get();
116 if !provider.supports_channel_playlists() {
117 return Err(UnsupportedError("channel_playlists").into());
118 }
119 provider.channel_playlists(id)
120 }
121
122 pub fn trending() -> Result<Vec<CommonVideo>, Box<dyn Error>> {
123 let provider = Self::get();
124 if !provider.supports_trending() {
125 return Err(UnsupportedError("trending").into());
126 }
127 provider.trending()
128 }
129
130 pub fn popular() -> Result<Vec<PopularItem>, Box<dyn Error>> {
131 let provider = Self::get();
132 if !provider.supports_popular() {
133 return Err(UnsupportedError("popular").into());
134 }
135 provider.popular()
136 }
137
138 pub fn search(filters: &Search) -> Result<Vec<SearchItem>, Box<dyn Error>> {
139 let provider = Self::get();
140 if !provider.supports_search() {
141 return Err(UnsupportedError("search").into());
142 }
143 provider.search(filters)
144 }
145
146 pub fn video(id: &str) -> Result<Video, Box<dyn Error>> {
147 let provider = Self::get();
148 if !provider.supports_video() {
149 return Err(UnsupportedError("video").into());
150 }
151 provider.video(id)
152 }
153
154 pub fn playlist(id: &str) -> Result<Playlist, Box<dyn Error>> {
155 let provider = Self::get();
156 if !provider.supports_playlist() {
157 return Err(UnsupportedError("playlist").into());
158 }
159 provider.playlist(id)
160 }
161}
src/init.rs +20 −4
@@ -8,9 +8,14 @@ use std::{
8 error::Error, 8 error::Error,
9 fs::{self}, 9 fs::{self},
10 io::Stdout, 10 io::Stdout,
11 sync::OnceLock,
11}; 12};
13use tokio::runtime::{Builder, Runtime};
12use tui_additions::framework::{Framework, FrameworkClean}; 14use tui_additions::framework::{Framework, FrameworkClean};
13 15
16pub static mut MAIN_CONFIG: OnceLock<MainConfig> = OnceLock::new();
17pub static RUNTIME: OnceLock<Runtime> = OnceLock::new();
18
14/// app to run before the app starts 19/// app to run before the app starts
15// init tasks: 20// init tasks:
16// - create folders like `~/.config/youtube-tui/` and `~/.cache/youtube-tui/thumbnails/` 21// - create folders like `~/.config/youtube-tui/` and `~/.cache/youtube-tui/thumbnails/`
@@ -22,6 +27,9 @@ pub fn init(
22 command: Option<&str>, 27 command: Option<&str>,
23) -> Result<(), Box<dyn Error>> { 28) -> Result<(), Box<dyn Error>> {
24 let home_dir = home_dir().unwrap(); 29 let home_dir = home_dir().unwrap();
30 RUNTIME
31 .set(Builder::new_current_thread().enable_all().build().unwrap())
32 .unwrap();
25 33
26 // creating files 34 // creating files
27 [ 35 [
@@ -112,10 +120,18 @@ pub fn load_configs(framework: &mut FrameworkClean) -> Result<(), Box<dyn Error>
112 // inserting data 120 // inserting data
113 let main_config = *MainConfig::load(WriteConfig::Try)?; 121 let main_config = *MainConfig::load(WriteConfig::Try)?;
114 122
115 framework 123 SearchProviderWrapper::init();
116 .data 124
117 .global 125 unsafe {
118 .insert::<InvidiousClient>(InvidiousClient::new(main_config.invidious_instance.clone())); 126 if MAIN_CONFIG.get().is_some() {
127 *MAIN_CONFIG.get_mut().unwrap() = main_config.clone()
128 } else {
129 let _ = MAIN_CONFIG.set(main_config.clone());
130 }
131 }
132
133 SearchProviderWrapper::init();
134
119 framework 135 framework
120 .data 136 .data
121 .global 137 .global
src/items/channeldisplay.rs +4 −25
@@ -1,9 +1,8 @@
1use super::ItemInfo; 1use super::ItemInfo;
2use crate::{ 2use crate::{
3 config::*, 3 config::*,
4 global::{functions::*, structs::*}, 4 global::{functions::*, structs::*, traits::SearchProviderWrapper},
5}; 5};
6use invidious::ClientSyncTrait;
7use ratatui::{ 6use ratatui::{
8 layout::{Constraint, Rect}, 7 layout::{Constraint, Rect},
9 style::Style, 8 style::Style,
@@ -504,13 +503,7 @@ impl FrameworkItem for ChannelDisplay {
504 match page.r#type { 503 match page.r#type {
505 ChannelDisplayPageType::Main => { 504 ChannelDisplayPageType::Main => {
506 let channel = Item::from_full_channel( 505 let channel = Item::from_full_channel(
507 framework 506 SearchProviderWrapper::channel(&page.id)?,
508 .data
509 .global
510 .get::<InvidiousClient>()
511 .unwrap()
512 .0
513 .channel(&page.id, None)?,
514 mainconfig.image_index, 507 mainconfig.image_index,
515 ); 508 );
516 if mainconfig.images.display() { 509 if mainconfig.images.display() {
@@ -536,14 +529,7 @@ impl FrameworkItem for ChannelDisplay {
536 } 529 }
537 } 530 }
538 ChannelDisplayPageType::Videos => { 531 ChannelDisplayPageType::Videos => {
539 let videos = framework 532 let videos = SearchProviderWrapper::channel_videos(&page.id)?
540 .data
541 .global
542 .get::<InvidiousClient>()
543 .unwrap()
544 .0
545 .channel_videos(&page.id, None)?
546 .videos
547 .into_iter() 533 .into_iter()
548 .map(|video| Item::from_common_video(video, mainconfig.image_index)) 534 .map(|video| Item::from_common_video(video, mainconfig.image_index))
549 .collect::<Vec<_>>(); 535 .collect::<Vec<_>>();
@@ -566,14 +552,7 @@ impl FrameworkItem for ChannelDisplay {
566 }; 552 };
567 } 553 }
568 ChannelDisplayPageType::Playlists => { 554 ChannelDisplayPageType::Playlists => {
569 let playlists = framework 555 let playlists = SearchProviderWrapper::channel_playlists(&page.id)?
570 .data
571 .global
572 .get::<InvidiousClient>()
573 .unwrap()
574 .0
575 .channel_playlists(&page.id, None)?
576 .playlists
577 .into_iter() 556 .into_iter()
578 .map(Item::from_common_playlist) 557 .map(Item::from_common_playlist)
579 .collect::<Vec<_>>(); 558 .collect::<Vec<_>>();
src/items/itemlist.rs +11 −14
@@ -2,11 +2,10 @@ use std::error::Error;
2 2
3use crate::{ 3use crate::{
4 config::*, 4 config::*,
5 global::{functions::*, structs::*}, 5 global::{functions::*, structs::*, traits::SearchProviderWrapper},
6 items::ItemInfo, 6 items::ItemInfo,
7}; 7};
8use home::home_dir; 8use home::home_dir;
9use invidious::ClientSyncTrait;
10use ratatui::{ 9use ratatui::{
11 layout::{Constraint, Rect}, 10 layout::{Constraint, Rect},
12 style::Style, 11 style::Style,
@@ -180,8 +179,13 @@ impl ItemList {
180 | Item::FullPlaylist(FullPlaylistItem { id, .. }) => { 179 | Item::FullPlaylist(FullPlaylistItem { id, .. }) => {
181 Some(Page::SingleItem(SingleItemPage::Playlist(id.clone()))) 180 Some(Page::SingleItem(SingleItemPage::Playlist(id.clone())))
182 } 181 }
183 Item::MiniChannel(MiniChannelItem { id: _id, .. }) 182 Item::MiniChannel(MiniChannelItem { id, .. })
184 | Item::FullChannel(FullChannelItem { id: _id, .. }) => todo!(), 183 | Item::FullChannel(FullChannelItem { id, .. }) => {
184 Some(Page::ChannelDisplay(ChannelDisplayPage {
185 id: id.to_string(),
186 r#type: ChannelDisplayPageType::Main,
187 }))
188 }
185 // Item::Unknown(_) => { 189 // Item::Unknown(_) => {
186 // *framework.data.global.get_mut::<Message>().unwrap() = 190 // *framework.data.global.get_mut::<Message>().unwrap() =
187 // Message::Message(String::from("Unknown item")); 191 // Message::Message(String::from("Unknown item"));
@@ -335,22 +339,17 @@ impl FrameworkItem for ItemList {
335 .get::<MainConfig>() 339 .get::<MainConfig>()
336 .unwrap() 340 .unwrap()
337 .image_index; 341 .image_index;
338 let client = &framework.data.global.get::<InvidiousClient>().unwrap().0;
339 342
340 // fetch the items using the invidious api 343 // fetch the items using the invidious api
341 match page { 344 match page {
342 Page::MainMenu(MainMenuPage::Trending) => { 345 Page::MainMenu(MainMenuPage::Trending) => {
343 self.items = client 346 self.items = SearchProviderWrapper::trending()?
344 .trending(None)?
345 .videos
346 .into_iter() 347 .into_iter()
347 .map(|item| Item::from_common_video(item, image_index)) 348 .map(|item| Item::from_common_video(item, image_index))
348 .collect(); 349 .collect();
349 } 350 }
350 Page::MainMenu(MainMenuPage::Popular) => { 351 Page::MainMenu(MainMenuPage::Popular) => {
351 self.items = client 352 self.items = SearchProviderWrapper::popular()?
352 .popular(None)?
353 .items
354 .into_iter() 353 .into_iter()
355 .map(|item| Item::from_popular_item(item, image_index)) 354 .map(|item| Item::from_popular_item(item, image_index))
356 .collect(); 355 .collect();
@@ -366,9 +365,7 @@ impl FrameworkItem for ItemList {
366 self.items = history.0.clone().into_iter().rev().collect(); 365 self.items = history.0.clone().into_iter().rev().collect();
367 } 366 }
368 Page::Search(search) => { 367 Page::Search(search) => {
369 self.items = client 368 self.items = SearchProviderWrapper::search(search)?
370 .search(Some(&search.to_string()))?
371 .items
372 .into_iter() 369 .into_iter()
373 .map(|item| Item::from_search_item(item, image_index)) 370 .map(|item| Item::from_search_item(item, image_index))
374 .collect(); 371 .collect();
src/items/singleitem.rs +2 −10
@@ -666,11 +666,7 @@ impl FrameworkItem for SingleItem {
666 let video = if path.exists() { 666 let video = if path.exists() {
667 serde_json::from_str(&fs::read_to_string(path)?)? 667 serde_json::from_str(&fs::read_to_string(path)?)?
668 } else { 668 } else {
669 load_video( 669 load_video(id, mainconfig)?
670 &framework.data.global.get::<InvidiousClient>().unwrap().0,
671 id,
672 mainconfig,
673 )?
674 }; 670 };
675 ( 671 (
676 video, 672 video,
@@ -689,11 +685,7 @@ impl FrameworkItem for SingleItem {
689 let playlist = if path.exists() { 685 let playlist = if path.exists() {
690 serde_json::from_str(&fs::read_to_string(path)?)? 686 serde_json::from_str(&fs::read_to_string(path)?)?
691 } else { 687 } else {
692 load_playlist( 688 load_playlist(id, mainconfig)?
693 &framework.data.global.get::<InvidiousClient>().unwrap().0,
694 id,
695 mainconfig,
696 )?
697 }; 689 };
698 let r#type = SingleItemType::Playlist( 690 let r#type = SingleItemType::Playlist(
699 SinglePlaylistItem::new( 691 SinglePlaylistItem::new(
src/lib.rs +1
@@ -1,3 +1,4 @@
1#![allow(static_mut_refs)]
1pub mod config; 2pub mod config;
2pub mod global; 3pub mod global;
3pub mod items; 4pub mod items;