[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Log crash messages instead of showing popup

The popup did not work in production, at least on macOS

Kasper (Sep 17, 2025, 7:12 AM +0200) 405ed20c 8e1e1525

+64 -888
+8 -853
Cargo.lock
··· 39 39 checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" 40 40 41 41 [[package]] 42 - name = "ashpd" 43 - version = "0.11.0" 44 - source = "registry+https://github.com/rust-lang/crates.io-index" 45 - checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" 46 - dependencies = [ 47 - "async-fs", 48 - "async-net", 49 - "enumflags2", 50 - "futures-channel", 51 - "futures-util", 52 - "rand 0.9.2", 53 - "raw-window-handle", 54 - "serde", 55 - "serde_repr", 56 - "url", 57 - "wayland-backend", 58 - "wayland-client", 59 - "wayland-protocols", 60 - "zbus", 61 - ] 62 - 63 - [[package]] 64 - name = "async-broadcast" 65 - version = "0.7.2" 66 - source = "registry+https://github.com/rust-lang/crates.io-index" 67 - checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" 68 - dependencies = [ 69 - "event-listener", 70 - "event-listener-strategy", 71 - "futures-core", 72 - "pin-project-lite", 73 - ] 74 - 75 - [[package]] 76 - name = "async-channel" 77 - version = "2.5.0" 78 - source = "registry+https://github.com/rust-lang/crates.io-index" 79 - checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" 80 - dependencies = [ 81 - "concurrent-queue", 82 - "event-listener-strategy", 83 - "futures-core", 84 - "pin-project-lite", 85 - ] 86 - 87 - [[package]] 88 - name = "async-executor" 89 - version = "1.13.3" 90 - source = "registry+https://github.com/rust-lang/crates.io-index" 91 - checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" 92 - dependencies = [ 93 - "async-task", 94 - "concurrent-queue", 95 - "fastrand", 96 - "futures-lite", 97 - "pin-project-lite", 98 - "slab", 99 - ] 100 - 101 - [[package]] 102 - name = "async-fs" 103 - version = "2.1.3" 104 - source = "registry+https://github.com/rust-lang/crates.io-index" 105 - checksum = "09f7e37c0ed80b2a977691c47dae8625cfb21e205827106c64f7c588766b2e50" 106 - dependencies = [ 107 - "async-lock", 108 - "blocking", 109 - "futures-lite", 110 - ] 111 - 112 - [[package]] 113 - name = "async-io" 114 - version = "2.5.0" 115 - source = "registry+https://github.com/rust-lang/crates.io-index" 116 - checksum = "19634d6336019ef220f09fd31168ce5c184b295cbf80345437cc36094ef223ca" 117 - dependencies = [ 118 - "async-lock", 119 - "cfg-if", 120 - "concurrent-queue", 121 - "futures-io", 122 - "futures-lite", 123 - "parking", 124 - "polling", 125 - "rustix 1.1.2", 126 - "slab", 127 - "windows-sys 0.60.2", 128 - ] 129 - 130 - [[package]] 131 - name = "async-lock" 132 - version = "3.4.1" 133 - source = "registry+https://github.com/rust-lang/crates.io-index" 134 - checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" 135 - dependencies = [ 136 - "event-listener", 137 - "event-listener-strategy", 138 - "pin-project-lite", 139 - ] 140 - 141 - [[package]] 142 - name = "async-net" 143 - version = "2.0.0" 144 - source = "registry+https://github.com/rust-lang/crates.io-index" 145 - checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" 146 - dependencies = [ 147 - "async-io", 148 - "blocking", 149 - "futures-lite", 150 - ] 151 - 152 - [[package]] 153 - name = "async-process" 154 - version = "2.4.0" 155 - source = "registry+https://github.com/rust-lang/crates.io-index" 156 - checksum = "65daa13722ad51e6ab1a1b9c01299142bc75135b337923cfa10e79bbbd669f00" 157 - dependencies = [ 158 - "async-channel", 159 - "async-io", 160 - "async-lock", 161 - "async-signal", 162 - "async-task", 163 - "blocking", 164 - "cfg-if", 165 - "event-listener", 166 - "futures-lite", 167 - "rustix 1.1.2", 168 - ] 169 - 170 - [[package]] 171 - name = "async-recursion" 172 - version = "1.1.1" 173 - source = "registry+https://github.com/rust-lang/crates.io-index" 174 - checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" 175 - dependencies = [ 176 - "proc-macro2", 177 - "quote", 178 - "syn", 179 - ] 180 - 181 - [[package]] 182 - name = "async-signal" 183 - version = "0.2.12" 184 - source = "registry+https://github.com/rust-lang/crates.io-index" 185 - checksum = "f567af260ef69e1d52c2b560ce0ea230763e6fbb9214a85d768760a920e3e3c1" 186 - dependencies = [ 187 - "async-io", 188 - "async-lock", 189 - "atomic-waker", 190 - "cfg-if", 191 - "futures-core", 192 - "futures-io", 193 - "rustix 1.1.2", 194 - "signal-hook-registry", 195 - "slab", 196 - "windows-sys 0.60.2", 197 - ] 198 - 199 - [[package]] 200 - name = "async-task" 201 - version = "4.7.1" 202 - source = "registry+https://github.com/rust-lang/crates.io-index" 203 - checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" 204 - 205 - [[package]] 206 - name = "async-trait" 207 - version = "0.1.89" 208 - source = "registry+https://github.com/rust-lang/crates.io-index" 209 - checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" 210 - dependencies = [ 211 - "proc-macro2", 212 - "quote", 213 - "syn", 214 - ] 215 - 216 - [[package]] 217 - name = "atomic-waker" 218 - version = "1.1.2" 219 - source = "registry+https://github.com/rust-lang/crates.io-index" 220 - checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 221 - 222 - [[package]] 223 42 name = "atomicwrites" 224 43 version = "0.4.4" 225 44 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 264 83 checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" 265 84 266 85 [[package]] 267 - name = "block2" 268 - version = "0.6.1" 269 - source = "registry+https://github.com/rust-lang/crates.io-index" 270 - checksum = "340d2f0bdb2a43c1d3cd40513185b2bd7def0aa1052f956455114bc98f82dcf2" 271 - dependencies = [ 272 - "objc2", 273 - ] 274 - 275 - [[package]] 276 - name = "blocking" 277 - version = "1.6.2" 278 - source = "registry+https://github.com/rust-lang/crates.io-index" 279 - checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" 280 - dependencies = [ 281 - "async-channel", 282 - "async-task", 283 - "futures-io", 284 - "futures-lite", 285 - "piper", 286 - ] 287 - 288 - [[package]] 289 86 name = "bumpalo" 290 87 version = "3.19.0" 291 88 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 326 123 checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" 327 124 328 125 [[package]] 329 - name = "cfg_aliases" 330 - version = "0.2.1" 331 - source = "registry+https://github.com/rust-lang/crates.io-index" 332 - checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 333 - 334 - [[package]] 335 126 name = "chrono" 336 127 version = "0.4.42" 337 128 source = "registry+https://github.com/rust-lang/crates.io-index" 338 129 checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" 339 130 dependencies = [ 340 131 "iana-time-zone", 132 + "js-sys", 341 133 "num-traits", 134 + "wasm-bindgen", 342 135 "windows-link 0.2.0", 343 136 ] 344 137 345 138 [[package]] 346 - name = "concurrent-queue" 347 - version = "2.5.0" 348 - source = "registry+https://github.com/rust-lang/crates.io-index" 349 - checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 350 - dependencies = [ 351 - "crossbeam-utils", 352 - ] 353 - 354 - [[package]] 355 139 name = "convert_case" 356 140 version = "0.8.0" 357 141 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 454 238 ] 455 239 456 240 [[package]] 457 - name = "dispatch2" 458 - version = "0.3.0" 459 - source = "registry+https://github.com/rust-lang/crates.io-index" 460 - checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" 461 - dependencies = [ 462 - "bitflags", 463 - "block2", 464 - "libc", 465 - "objc2", 466 - ] 467 - 468 - [[package]] 469 241 name = "displaydoc" 470 242 version = "0.2.5" 471 243 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 477 249 ] 478 250 479 251 [[package]] 480 - name = "dlib" 481 - version = "0.5.2" 482 - source = "registry+https://github.com/rust-lang/crates.io-index" 483 - checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" 484 - dependencies = [ 485 - "libloading", 486 - ] 487 - 488 - [[package]] 489 252 name = "document-features" 490 253 version = "0.2.11" 491 254 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 495 258 ] 496 259 497 260 [[package]] 498 - name = "downcast-rs" 499 - version = "1.2.1" 500 - source = "registry+https://github.com/rust-lang/crates.io-index" 501 - checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" 502 - 503 - [[package]] 504 261 name = "dtor" 505 262 version = "0.1.0" 506 263 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 522 279 checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 523 280 524 281 [[package]] 525 - name = "endi" 526 - version = "1.1.0" 527 - source = "registry+https://github.com/rust-lang/crates.io-index" 528 - checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" 529 - 530 - [[package]] 531 - name = "enumflags2" 532 - version = "0.7.12" 533 - source = "registry+https://github.com/rust-lang/crates.io-index" 534 - checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" 535 - dependencies = [ 536 - "enumflags2_derive", 537 - "serde", 538 - ] 539 - 540 - [[package]] 541 - name = "enumflags2_derive" 542 - version = "0.7.12" 543 - source = "registry+https://github.com/rust-lang/crates.io-index" 544 - checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" 545 - dependencies = [ 546 - "proc-macro2", 547 - "quote", 548 - "syn", 549 - ] 550 - 551 - [[package]] 552 282 name = "equivalent" 553 283 version = "1.0.2" 554 284 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 565 295 ] 566 296 567 297 [[package]] 568 - name = "event-listener" 569 - version = "5.4.1" 570 - source = "registry+https://github.com/rust-lang/crates.io-index" 571 - checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" 572 - dependencies = [ 573 - "concurrent-queue", 574 - "parking", 575 - "pin-project-lite", 576 - ] 577 - 578 - [[package]] 579 - name = "event-listener-strategy" 580 - version = "0.5.4" 581 - source = "registry+https://github.com/rust-lang/crates.io-index" 582 - checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" 583 - dependencies = [ 584 - "event-listener", 585 - "pin-project-lite", 586 - ] 587 - 588 - [[package]] 589 298 name = "fast_image_resize" 590 299 version = "5.3.0" 591 300 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 621 330 "alphanumeric-sort", 622 331 "anyhow", 623 332 "atomicwrites", 333 + "chrono", 624 334 "dirs-next", 625 335 "fast_image_resize", 626 336 "image", ··· 634 344 "plist", 635 345 "rayon", 636 346 "redb", 637 - "rfd", 638 347 "serde", 639 348 "serde_json", 640 349 "time", ··· 670 379 ] 671 380 672 381 [[package]] 673 - name = "futures-channel" 674 - version = "0.3.31" 675 - source = "registry+https://github.com/rust-lang/crates.io-index" 676 - checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 677 - dependencies = [ 678 - "futures-core", 679 - ] 680 - 681 - [[package]] 682 - name = "futures-core" 683 - version = "0.3.31" 684 - source = "registry+https://github.com/rust-lang/crates.io-index" 685 - checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 686 - 687 - [[package]] 688 - name = "futures-io" 689 - version = "0.3.31" 690 - source = "registry+https://github.com/rust-lang/crates.io-index" 691 - checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 692 - 693 - [[package]] 694 - name = "futures-lite" 695 - version = "2.6.1" 696 - source = "registry+https://github.com/rust-lang/crates.io-index" 697 - checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" 698 - dependencies = [ 699 - "fastrand", 700 - "futures-core", 701 - "futures-io", 702 - "parking", 703 - "pin-project-lite", 704 - ] 705 - 706 - [[package]] 707 - name = "futures-macro" 708 - version = "0.3.31" 709 - source = "registry+https://github.com/rust-lang/crates.io-index" 710 - checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 711 - dependencies = [ 712 - "proc-macro2", 713 - "quote", 714 - "syn", 715 - ] 716 - 717 - [[package]] 718 - name = "futures-task" 719 - version = "0.3.31" 720 - source = "registry+https://github.com/rust-lang/crates.io-index" 721 - checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 722 - 723 - [[package]] 724 - name = "futures-util" 725 - version = "0.3.31" 726 - source = "registry+https://github.com/rust-lang/crates.io-index" 727 - checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 728 - dependencies = [ 729 - "futures-core", 730 - "futures-io", 731 - "futures-macro", 732 - "futures-task", 733 - "memchr", 734 - "pin-project-lite", 735 - "pin-utils", 736 - "slab", 737 - ] 738 - 739 - [[package]] 740 382 name = "getrandom" 741 383 version = "0.2.16" 742 384 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 770 412 version = "0.15.5" 771 413 source = "registry+https://github.com/rust-lang/crates.io-index" 772 414 checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" 773 - 774 - [[package]] 775 - name = "hermit-abi" 776 - version = "0.5.2" 777 - source = "registry+https://github.com/rust-lang/crates.io-index" 778 - checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" 779 - 780 - [[package]] 781 - name = "hex" 782 - version = "0.4.3" 783 - source = "registry+https://github.com/rust-lang/crates.io-index" 784 - checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 785 415 786 416 [[package]] 787 417 name = "iana-time-zone" ··· 1070 700 checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 1071 701 1072 702 [[package]] 1073 - name = "memoffset" 1074 - version = "0.9.1" 1075 - source = "registry+https://github.com/rust-lang/crates.io-index" 1076 - checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 1077 - dependencies = [ 1078 - "autocfg", 1079 - ] 1080 - 1081 - [[package]] 1082 703 name = "miniz_oxide" 1083 704 version = "0.8.9" 1084 705 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1115 736 source = "registry+https://github.com/rust-lang/crates.io-index" 1116 737 checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" 1117 738 dependencies = [ 1118 - "rand 0.8.5", 739 + "rand", 1119 740 ] 1120 741 1121 742 [[package]] ··· 1179 800 ] 1180 801 1181 802 [[package]] 1182 - name = "nix" 1183 - version = "0.30.1" 1184 - source = "registry+https://github.com/rust-lang/crates.io-index" 1185 - checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" 1186 - dependencies = [ 1187 - "bitflags", 1188 - "cfg-if", 1189 - "cfg_aliases", 1190 - "libc", 1191 - "memoffset", 1192 - ] 1193 - 1194 - [[package]] 1195 803 name = "nohash-hasher" 1196 804 version = "0.2.0" 1197 805 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1222 830 ] 1223 831 1224 832 [[package]] 1225 - name = "objc2-app-kit" 1226 - version = "0.3.1" 1227 - source = "registry+https://github.com/rust-lang/crates.io-index" 1228 - checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" 1229 - dependencies = [ 1230 - "bitflags", 1231 - "block2", 1232 - "objc2", 1233 - "objc2-foundation", 1234 - ] 1235 - 1236 - [[package]] 1237 - name = "objc2-core-foundation" 1238 - version = "0.3.1" 1239 - source = "registry+https://github.com/rust-lang/crates.io-index" 1240 - checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" 1241 - dependencies = [ 1242 - "bitflags", 1243 - "dispatch2", 1244 - "objc2", 1245 - ] 1246 - 1247 - [[package]] 1248 833 name = "objc2-encode" 1249 834 version = "4.1.0" 1250 835 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1258 843 dependencies = [ 1259 844 "bitflags", 1260 845 "objc2", 1261 - "objc2-core-foundation", 1262 846 ] 1263 847 1264 848 [[package]] ··· 1286 870 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1287 871 1288 872 [[package]] 1289 - name = "ordered-stream" 1290 - version = "0.2.0" 1291 - source = "registry+https://github.com/rust-lang/crates.io-index" 1292 - checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" 1293 - dependencies = [ 1294 - "futures-core", 1295 - "pin-project-lite", 1296 - ] 1297 - 1298 - [[package]] 1299 - name = "parking" 1300 - version = "2.2.1" 1301 - source = "registry+https://github.com/rust-lang/crates.io-index" 1302 - checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 1303 - 1304 - [[package]] 1305 873 name = "paste" 1306 874 version = "1.0.15" 1307 875 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1320 888 checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1321 889 1322 890 [[package]] 1323 - name = "pin-utils" 1324 - version = "0.1.0" 1325 - source = "registry+https://github.com/rust-lang/crates.io-index" 1326 - checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1327 - 1328 - [[package]] 1329 - name = "piper" 1330 - version = "0.2.4" 1331 - source = "registry+https://github.com/rust-lang/crates.io-index" 1332 - checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" 1333 - dependencies = [ 1334 - "atomic-waker", 1335 - "fastrand", 1336 - "futures-io", 1337 - ] 1338 - 1339 - [[package]] 1340 - name = "pkg-config" 1341 - version = "0.3.32" 1342 - source = "registry+https://github.com/rust-lang/crates.io-index" 1343 - checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1344 - 1345 - [[package]] 1346 891 name = "plist" 1347 892 version = "1.7.4" 1348 893 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1350 895 dependencies = [ 1351 896 "base64", 1352 897 "indexmap", 1353 - "quick-xml 0.38.3", 898 + "quick-xml", 1354 899 "serde", 1355 900 "time", 1356 901 ] ··· 1367 912 "flate2", 1368 913 "miniz_oxide", 1369 914 ] 1370 - 1371 - [[package]] 1372 - name = "polling" 1373 - version = "3.10.0" 1374 - source = "registry+https://github.com/rust-lang/crates.io-index" 1375 - checksum = "b5bd19146350fe804f7cb2669c851c03d69da628803dab0d98018142aaa5d829" 1376 - dependencies = [ 1377 - "cfg-if", 1378 - "concurrent-queue", 1379 - "hermit-abi", 1380 - "pin-project-lite", 1381 - "rustix 1.1.2", 1382 - "windows-sys 0.60.2", 1383 - ] 1384 - 1385 - [[package]] 1386 - name = "pollster" 1387 - version = "0.4.0" 1388 - source = "registry+https://github.com/rust-lang/crates.io-index" 1389 - checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" 1390 915 1391 916 [[package]] 1392 917 name = "potential_utf" ··· 1413 938 ] 1414 939 1415 940 [[package]] 1416 - name = "proc-macro-crate" 1417 - version = "3.3.0" 1418 - source = "registry+https://github.com/rust-lang/crates.io-index" 1419 - checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" 1420 - dependencies = [ 1421 - "toml_edit", 1422 - ] 1423 - 1424 - [[package]] 1425 941 name = "proc-macro2" 1426 942 version = "1.0.101" 1427 943 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1441 957 1442 958 [[package]] 1443 959 name = "quick-xml" 1444 - version = "0.37.5" 1445 - source = "registry+https://github.com/rust-lang/crates.io-index" 1446 - checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" 1447 - dependencies = [ 1448 - "memchr", 1449 - ] 1450 - 1451 - [[package]] 1452 - name = "quick-xml" 1453 960 version = "0.38.3" 1454 961 source = "registry+https://github.com/rust-lang/crates.io-index" 1455 962 checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" ··· 1479 986 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1480 987 dependencies = [ 1481 988 "libc", 1482 - "rand_chacha 0.3.1", 1483 - "rand_core 0.6.4", 1484 - ] 1485 - 1486 - [[package]] 1487 - name = "rand" 1488 - version = "0.9.2" 1489 - source = "registry+https://github.com/rust-lang/crates.io-index" 1490 - checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 1491 - dependencies = [ 1492 - "rand_chacha 0.9.0", 1493 - "rand_core 0.9.3", 989 + "rand_chacha", 990 + "rand_core", 1494 991 ] 1495 992 1496 993 [[package]] ··· 1500 997 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1501 998 dependencies = [ 1502 999 "ppv-lite86", 1503 - "rand_core 0.6.4", 1504 - ] 1505 - 1506 - [[package]] 1507 - name = "rand_chacha" 1508 - version = "0.9.0" 1509 - source = "registry+https://github.com/rust-lang/crates.io-index" 1510 - checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 1511 - dependencies = [ 1512 - "ppv-lite86", 1513 - "rand_core 0.9.3", 1000 + "rand_core", 1514 1001 ] 1515 1002 1516 1003 [[package]] ··· 1523 1010 ] 1524 1011 1525 1012 [[package]] 1526 - name = "rand_core" 1527 - version = "0.9.3" 1528 - source = "registry+https://github.com/rust-lang/crates.io-index" 1529 - checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" 1530 - dependencies = [ 1531 - "getrandom 0.3.3", 1532 - ] 1533 - 1534 - [[package]] 1535 - name = "raw-window-handle" 1536 - version = "0.6.2" 1537 - source = "registry+https://github.com/rust-lang/crates.io-index" 1538 - checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" 1539 - 1540 - [[package]] 1541 1013 name = "rayon" 1542 1014 version = "1.11.0" 1543 1015 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1578 1050 ] 1579 1051 1580 1052 [[package]] 1581 - name = "rfd" 1582 - version = "0.15.4" 1583 - source = "registry+https://github.com/rust-lang/crates.io-index" 1584 - checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" 1585 - dependencies = [ 1586 - "ashpd", 1587 - "block2", 1588 - "dispatch2", 1589 - "js-sys", 1590 - "log", 1591 - "objc2", 1592 - "objc2-app-kit", 1593 - "objc2-core-foundation", 1594 - "objc2-foundation", 1595 - "pollster", 1596 - "raw-window-handle", 1597 - "urlencoding", 1598 - "wasm-bindgen", 1599 - "wasm-bindgen-futures", 1600 - "web-sys", 1601 - "windows-sys 0.59.0", 1602 - ] 1603 - 1604 - [[package]] 1605 1053 name = "rustc-demangle" 1606 1054 version = "0.1.26" 1607 1055 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1652 1100 checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 1653 1101 1654 1102 [[package]] 1655 - name = "scoped-tls" 1656 - version = "1.0.1" 1657 - source = "registry+https://github.com/rust-lang/crates.io-index" 1658 - checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 1659 - 1660 - [[package]] 1661 1103 name = "scopeguard" 1662 1104 version = "1.2.0" 1663 1105 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1712 1154 ] 1713 1155 1714 1156 [[package]] 1715 - name = "serde_repr" 1716 - version = "0.1.20" 1717 - source = "registry+https://github.com/rust-lang/crates.io-index" 1718 - checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" 1719 - dependencies = [ 1720 - "proc-macro2", 1721 - "quote", 1722 - "syn", 1723 - ] 1724 - 1725 - [[package]] 1726 1157 name = "shlex" 1727 1158 version = "1.3.0" 1728 1159 source = "registry+https://github.com/rust-lang/crates.io-index" 1729 1160 checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1730 1161 1731 1162 [[package]] 1732 - name = "signal-hook-registry" 1733 - version = "1.4.6" 1734 - source = "registry+https://github.com/rust-lang/crates.io-index" 1735 - checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" 1736 - dependencies = [ 1737 - "libc", 1738 - ] 1739 - 1740 - [[package]] 1741 1163 name = "simd-adler32" 1742 1164 version = "0.3.7" 1743 1165 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1760 1182 version = "1.2.0" 1761 1183 source = "registry+https://github.com/rust-lang/crates.io-index" 1762 1184 checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1763 - 1764 - [[package]] 1765 - name = "static_assertions" 1766 - version = "1.1.0" 1767 - source = "registry+https://github.com/rust-lang/crates.io-index" 1768 - checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1769 1185 1770 1186 [[package]] 1771 1187 name = "syn" ··· 1924 1340 ] 1925 1341 1926 1342 [[package]] 1927 - name = "toml_datetime" 1928 - version = "0.6.11" 1929 - source = "registry+https://github.com/rust-lang/crates.io-index" 1930 - checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" 1931 - 1932 - [[package]] 1933 - name = "toml_edit" 1934 - version = "0.22.27" 1935 - source = "registry+https://github.com/rust-lang/crates.io-index" 1936 - checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" 1937 - dependencies = [ 1938 - "indexmap", 1939 - "toml_datetime", 1940 - "winnow", 1941 - ] 1942 - 1943 - [[package]] 1944 - name = "tracing" 1945 - version = "0.1.41" 1946 - source = "registry+https://github.com/rust-lang/crates.io-index" 1947 - checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 1948 - dependencies = [ 1949 - "pin-project-lite", 1950 - "tracing-attributes", 1951 - "tracing-core", 1952 - ] 1953 - 1954 - [[package]] 1955 - name = "tracing-attributes" 1956 - version = "0.1.30" 1957 - source = "registry+https://github.com/rust-lang/crates.io-index" 1958 - checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" 1959 - dependencies = [ 1960 - "proc-macro2", 1961 - "quote", 1962 - "syn", 1963 - ] 1964 - 1965 - [[package]] 1966 - name = "tracing-core" 1967 - version = "0.1.34" 1968 - source = "registry+https://github.com/rust-lang/crates.io-index" 1969 - checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 1970 - dependencies = [ 1971 - "once_cell", 1972 - ] 1973 - 1974 - [[package]] 1975 1343 name = "trash" 1976 1344 version = "5.2.3" 1977 1345 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1987 1355 "scopeguard", 1988 1356 "urlencoding", 1989 1357 "windows", 1990 - ] 1991 - 1992 - [[package]] 1993 - name = "uds_windows" 1994 - version = "1.1.0" 1995 - source = "registry+https://github.com/rust-lang/crates.io-index" 1996 - checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" 1997 - dependencies = [ 1998 - "memoffset", 1999 - "tempfile", 2000 - "winapi", 2001 1358 ] 2002 1359 2003 1360 [[package]] ··· 2097 1454 ] 2098 1455 2099 1456 [[package]] 2100 - name = "wasm-bindgen-futures" 2101 - version = "0.4.51" 2102 - source = "registry+https://github.com/rust-lang/crates.io-index" 2103 - checksum = "0ca85039a9b469b38336411d6d6ced91f3fc87109a2a27b0c197663f5144dffe" 2104 - dependencies = [ 2105 - "cfg-if", 2106 - "js-sys", 2107 - "once_cell", 2108 - "wasm-bindgen", 2109 - "web-sys", 2110 - ] 2111 - 2112 - [[package]] 2113 1457 name = "wasm-bindgen-macro" 2114 1458 version = "0.2.101" 2115 1459 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2142 1486 ] 2143 1487 2144 1488 [[package]] 2145 - name = "wayland-backend" 2146 - version = "0.3.11" 2147 - source = "registry+https://github.com/rust-lang/crates.io-index" 2148 - checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" 2149 - dependencies = [ 2150 - "cc", 2151 - "downcast-rs", 2152 - "rustix 1.1.2", 2153 - "scoped-tls", 2154 - "smallvec", 2155 - "wayland-sys", 2156 - ] 2157 - 2158 - [[package]] 2159 - name = "wayland-client" 2160 - version = "0.31.11" 2161 - source = "registry+https://github.com/rust-lang/crates.io-index" 2162 - checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" 2163 - dependencies = [ 2164 - "bitflags", 2165 - "rustix 1.1.2", 2166 - "wayland-backend", 2167 - "wayland-scanner", 2168 - ] 2169 - 2170 - [[package]] 2171 - name = "wayland-protocols" 2172 - version = "0.32.9" 2173 - source = "registry+https://github.com/rust-lang/crates.io-index" 2174 - checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" 2175 - dependencies = [ 2176 - "bitflags", 2177 - "wayland-backend", 2178 - "wayland-client", 2179 - "wayland-scanner", 2180 - ] 2181 - 2182 - [[package]] 2183 - name = "wayland-scanner" 2184 - version = "0.31.7" 2185 - source = "registry+https://github.com/rust-lang/crates.io-index" 2186 - checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" 2187 - dependencies = [ 2188 - "proc-macro2", 2189 - "quick-xml 0.37.5", 2190 - "quote", 2191 - ] 2192 - 2193 - [[package]] 2194 - name = "wayland-sys" 2195 - version = "0.31.7" 2196 - source = "registry+https://github.com/rust-lang/crates.io-index" 2197 - checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" 2198 - dependencies = [ 2199 - "dlib", 2200 - "log", 2201 - "pkg-config", 2202 - ] 2203 - 2204 - [[package]] 2205 - name = "web-sys" 2206 - version = "0.3.78" 2207 - source = "registry+https://github.com/rust-lang/crates.io-index" 2208 - checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" 2209 - dependencies = [ 2210 - "js-sys", 2211 - "wasm-bindgen", 2212 - ] 2213 - 2214 - [[package]] 2215 1489 name = "winapi" 2216 1490 version = "0.3.9" 2217 1491 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2371 1645 2372 1646 [[package]] 2373 1647 name = "windows-sys" 2374 - version = "0.60.2" 2375 - source = "registry+https://github.com/rust-lang/crates.io-index" 2376 - checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 2377 - dependencies = [ 2378 - "windows-targets 0.53.3", 2379 - ] 2380 - 2381 - [[package]] 2382 - name = "windows-sys" 2383 1648 version = "0.61.0" 2384 1649 source = "registry+https://github.com/rust-lang/crates.io-index" 2385 1650 checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" ··· 2517 1782 checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" 2518 1783 2519 1784 [[package]] 2520 - name = "winnow" 2521 - version = "0.7.13" 2522 - source = "registry+https://github.com/rust-lang/crates.io-index" 2523 - checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" 2524 - dependencies = [ 2525 - "memchr", 2526 - ] 2527 - 2528 - [[package]] 2529 1785 name = "wit-bindgen" 2530 1786 version = "0.45.1" 2531 1787 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2562 1818 ] 2563 1819 2564 1820 [[package]] 2565 - name = "zbus" 2566 - version = "5.11.0" 2567 - source = "registry+https://github.com/rust-lang/crates.io-index" 2568 - checksum = "2d07e46d035fb8e375b2ce63ba4e4ff90a7f73cf2ffb0138b29e1158d2eaadf7" 2569 - dependencies = [ 2570 - "async-broadcast", 2571 - "async-executor", 2572 - "async-io", 2573 - "async-lock", 2574 - "async-process", 2575 - "async-recursion", 2576 - "async-task", 2577 - "async-trait", 2578 - "blocking", 2579 - "enumflags2", 2580 - "event-listener", 2581 - "futures-core", 2582 - "futures-lite", 2583 - "hex", 2584 - "nix", 2585 - "ordered-stream", 2586 - "serde", 2587 - "serde_repr", 2588 - "tracing", 2589 - "uds_windows", 2590 - "windows-sys 0.60.2", 2591 - "winnow", 2592 - "zbus_macros", 2593 - "zbus_names", 2594 - "zvariant", 2595 - ] 2596 - 2597 - [[package]] 2598 - name = "zbus_macros" 2599 - version = "5.11.0" 2600 - source = "registry+https://github.com/rust-lang/crates.io-index" 2601 - checksum = "57e797a9c847ed3ccc5b6254e8bcce056494b375b511b3d6edcec0aeb4defaca" 2602 - dependencies = [ 2603 - "proc-macro-crate", 2604 - "proc-macro2", 2605 - "quote", 2606 - "syn", 2607 - "zbus_names", 2608 - "zvariant", 2609 - "zvariant_utils", 2610 - ] 2611 - 2612 - [[package]] 2613 - name = "zbus_names" 2614 - version = "4.2.0" 2615 - source = "registry+https://github.com/rust-lang/crates.io-index" 2616 - checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" 2617 - dependencies = [ 2618 - "serde", 2619 - "static_assertions", 2620 - "winnow", 2621 - "zvariant", 2622 - ] 2623 - 2624 - [[package]] 2625 1821 name = "zerocopy" 2626 1822 version = "0.8.27" 2627 1823 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2709 1905 dependencies = [ 2710 1906 "zune-core", 2711 1907 ] 2712 - 2713 - [[package]] 2714 - name = "zvariant" 2715 - version = "5.7.0" 2716 - source = "registry+https://github.com/rust-lang/crates.io-index" 2717 - checksum = "999dd3be73c52b1fccd109a4a81e4fcd20fab1d3599c8121b38d04e1419498db" 2718 - dependencies = [ 2719 - "endi", 2720 - "enumflags2", 2721 - "serde", 2722 - "url", 2723 - "winnow", 2724 - "zvariant_derive", 2725 - "zvariant_utils", 2726 - ] 2727 - 2728 - [[package]] 2729 - name = "zvariant_derive" 2730 - version = "5.7.0" 2731 - source = "registry+https://github.com/rust-lang/crates.io-index" 2732 - checksum = "6643fd0b26a46d226bd90d3f07c1b5321fe9bb7f04673cb37ac6d6883885b68e" 2733 - dependencies = [ 2734 - "proc-macro-crate", 2735 - "proc-macro2", 2736 - "quote", 2737 - "syn", 2738 - "zvariant_utils", 2739 - ] 2740 - 2741 - [[package]] 2742 - name = "zvariant_utils" 2743 - version = "3.2.1" 2744 - source = "registry+https://github.com/rust-lang/crates.io-index" 2745 - checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" 2746 - dependencies = [ 2747 - "proc-macro2", 2748 - "quote", 2749 - "serde", 2750 - "syn", 2751 - "winnow", 2752 - ]
+1 -1
Cargo.toml
··· 44 44 redb = "2.1.3" 45 45 anyhow = "1.0.89" 46 46 dirs-next = "2.0.0" 47 - rfd = "0.15.4" 47 + chrono = "0.4.42"
+3
ferrum-addon/addon.d.ts
··· 50 50 51 51 export declare function get_image(index: number): JsImage | null 52 52 53 + export declare function get_logs_dir(): string 54 + 53 55 export declare function get_paths(): Paths 54 56 55 57 export declare function get_track(id: string): Track ··· 105 107 cacheDb: string 106 108 localDataDir: string 107 109 viewOptionsFile: string 110 + logsDir: string 108 111 } 109 112 110 113 export interface Playlist {
+19
src-native/data.rs
··· 24 24 pub current_tag: Option<Tag>, 25 25 } 26 26 27 + pub fn app_log_dir() -> Result<PathBuf> { 28 + #[cfg(target_os = "macos")] 29 + { 30 + use anyhow::Context; 31 + let home_dir = dirs_next::home_dir().context("Home folder not found")?; 32 + let log_dir = home_dir.join("Library/Logs").join("space.kasper.ferrum"); 33 + return Ok(log_dir); 34 + } 35 + #[cfg(not(target_os = "macos"))] 36 + { 37 + use anyhow::Context; 38 + let local_data_dir = dirs_next::data_local_dir().context("Local data folder not found")?; 39 + let log_dir = local_data_dir.join("space.kasper.ferrum").join("logs"); 40 + return Ok(log_dir); 41 + } 42 + } 43 + 27 44 impl Data { 28 45 pub fn save(&mut self) -> Result<()> { 29 46 let mut now = Instant::now(); ··· 85 102 cache_db: path_to_string(cache_dir.join("Cache.redb")), 86 103 local_data_dir: path_to_string(&local_data_dir), 87 104 view_options_file: path_to_string(local_data_dir.join("view.json")), 105 + // This makes sure we can get the logs dir, which is important for crash logs 106 + logs_dir: path_to_string(app_log_dir()?), 88 107 }; 89 108 90 109 let loaded_library = load_library(&paths)?;
+20 -28
src-native/data_js.rs
··· 1 - use crate::data::Data; 1 + use crate::data::{Data, app_log_dir, path_to_string}; 2 2 use crate::library::Paths; 3 3 use anyhow::Result; 4 4 use napi::Env; 5 - use rfd::MessageDialog; 5 + use std::fs; 6 6 7 7 pub fn get_data(env: &Env) -> &mut Data { 8 8 let data = env ··· 20 20 library_path: Option<String>, 21 21 env: Env, 22 22 ) -> Result<()> { 23 - // This does not work on macOS 24 23 std::panic::set_hook(Box::new(move |info| { 25 - let thread = std::thread::current(); 26 - let thread_name = thread.name().unwrap_or("<unnamed>"); 27 - // Get the panic message 28 - let panic_msg = if let Some(s) = info.payload().downcast_ref::<&str>() { 29 - *s 30 - } else if let Some(s) = info.payload().downcast_ref::<String>() { 31 - s.as_str() 32 - } else { 33 - "Unknown panic message" 34 - }; 24 + let log_msg = format!("{}", info); 25 + eprintln!("{}", log_msg); 35 26 36 - // file:line:column 37 - let location = if let Some(loc) = info.location() { 38 - format!("{}:{}:{}", loc.file(), loc.line(), loc.column()) 39 - } else { 40 - "Unknown location".to_string() 41 - }; 27 + let logs_dir = app_log_dir().unwrap(); 28 + fs::create_dir_all(&logs_dir).unwrap(); 42 29 43 - eprintln!( 44 - "thread '{}' panicked at '{}': {}", 45 - thread_name, panic_msg, location 30 + let filename = format!( 31 + "Crash {}.log", 32 + chrono::Local::now().format("%Y-%m-%d %H-%M-%S") 46 33 ); 34 + let file_path = logs_dir.join(filename); 47 35 48 - MessageDialog::new() 49 - .set_title(&format!("{}", panic_msg)) 50 - .set_description(&format!("{}", location)) 51 - .set_buttons(rfd::MessageButtons::Ok) 52 - .set_level(rfd::MessageLevel::Error) 53 - .show(); 36 + fs::write(&file_path, log_msg).expect("Could not save crash log"); 37 + println!("Crash message written to {}", file_path.to_string_lossy()); 54 38 })); 55 39 let data = Data::load(is_dev, local_data_path, library_path)?; 56 40 env.set_instance_data(data, 0, |_ctx| {})?; ··· 62 46 pub fn get_paths(env: Env) -> Paths { 63 47 let data: &Data = get_data(&env); 64 48 data.paths.clone() 49 + } 50 + #[napi(js_name = "get_logs_dir")] 51 + #[allow(dead_code)] 52 + pub fn get_logs_dir() -> Result<String> { 53 + match app_log_dir() { 54 + Ok(path) => Ok(path_to_string(path)), 55 + Err(err) => Err(err), 56 + } 65 57 } 66 58 67 59 #[napi(js_name = "save")]
+3 -1
src-native/library.rs
··· 20 20 pub cache_db: String, 21 21 pub local_data_dir: String, 22 22 pub view_options_file: String, 23 + pub logs_dir: String, 23 24 } 24 25 impl Paths { 25 26 fn ensure_dirs_exists(&self) -> Result<()> { 26 27 create_dir_all(&self.library_dir)?; 27 28 create_dir_all(&self.tracks_dir)?; 29 + create_dir_all(&self.cache_dir)?; 28 30 create_dir_all(&self.local_data_dir)?; 29 - create_dir_all(&self.cache_dir)?; 31 + // We do not create logs_dir, we create it lazily when a crash occurs 30 32 return Ok(()); 31 33 } 32 34 pub fn get_track_file_path(&self, file: &str) -> PathBuf {
+10 -5
src/electron/main.ts
··· 13 13 async function close_cache_db() { 14 14 await addon.close_cache_db() 15 15 } 16 + function get_logs_dir() { 17 + try { 18 + return addon.get_logs_dir() 19 + } catch (_) { 20 + return null 21 + } 22 + } 23 + const logs_dir = get_logs_dir() 16 24 17 25 let triggering_crash = false 18 26 export function trigger_crash(popup: { msg: string; error: Error | string } | null) { ··· 192 200 browser_windows.main_window = main_window 193 201 }) 194 202 main_window.webContents.on('render-process-gone', (_e, details) => { 195 - if (details.reason === 'crashed') { 196 - // we have a napi-rs panic handler message popup already 197 - trigger_crash(null) 198 - } else if ( 203 + if ( 199 204 details.reason !== 'clean-exit' && 200 205 details.reason !== 'abnormal-exit' && 201 206 details.reason !== 'killed' 202 207 ) { 203 208 trigger_crash({ 204 209 msg: `Crashed with code ${details.exitCode} (${details.reason})`, 205 - error: 'Error message was likely logged to console.', 210 + error: `Error message was logged to ${logs_dir}`, 206 211 }) 207 212 } 208 213 })