diff --git a/po/tsukimi.pot b/po/tsukimi.pot index 460e2127..a6e5455c 100644 --- a/po/tsukimi.pot +++ b/po/tsukimi.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-14 12:29+0800\n" +"POT-Creation-Date: 2024-12-07 16:33+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,7 +25,7 @@ msgstr "" msgid "General" msgstr "" -#: resources/ui/account_settings.ui:19 resources/ui/account_settings.ui:505 +#: resources/ui/account_settings.ui:19 resources/ui/account_settings.ui:510 msgid "Preferred Video Version" msgstr "" @@ -42,7 +42,7 @@ msgid "Preferred Audio Language" msgstr "" #: resources/ui/account_settings.ui:41 resources/ui/account_settings.ui:66 -#: resources/ui/account_settings.ui:220 +#: resources/ui/account_settings.ui:225 msgid "Default" msgstr "" @@ -96,198 +96,202 @@ msgid "Threads" msgstr "" #: resources/ui/account_settings.ui:194 -msgid "This only effects on getting images" +msgid "This only effects on getting images/updating cache" msgstr "" -#: resources/ui/account_settings.ui:210 resources/ui/mpv_control_sidebar.ui:378 +#: resources/ui/account_settings.ui:208 +msgid "Refresh when returning to home page" +msgstr "" + +#: resources/ui/account_settings.ui:215 resources/ui/mpv_control_sidebar.ui:378 msgid "Background" msgstr "" -#: resources/ui/account_settings.ui:217 +#: resources/ui/account_settings.ui:222 msgid "This feature may cause significant lag. Please enable it with caution." msgstr "" -#: resources/ui/account_settings.ui:243 +#: resources/ui/account_settings.ui:248 msgid "Opacity" msgstr "" -#: resources/ui/account_settings.ui:257 +#: resources/ui/account_settings.ui:262 msgid "Blur (Experimental)" msgstr "" -#: resources/ui/account_settings.ui:258 resources/ui/account_settings.ui:267 +#: resources/ui/account_settings.ui:263 resources/ui/account_settings.ui:272 msgid "Warning: High GPU usage" msgstr "" -#: resources/ui/account_settings.ui:266 +#: resources/ui/account_settings.ui:271 msgid "Blur Radius (Experimental)" msgstr "" -#: resources/ui/account_settings.ui:287 resources/ui/mpv_control_sidebar.ui:63 +#: resources/ui/account_settings.ui:292 resources/ui/mpv_control_sidebar.ui:63 msgid "Cache" msgstr "" -#: resources/ui/account_settings.ui:290 +#: resources/ui/account_settings.ui:295 msgid "Clear Cache" msgstr "" -#: resources/ui/account_settings.ui:311 +#: resources/ui/account_settings.ui:316 msgid "Account" msgstr "" -#: resources/ui/account_settings.ui:327 +#: resources/ui/account_settings.ui:332 msgid "New Password" msgstr "" -#: resources/ui/account_settings.ui:332 +#: resources/ui/account_settings.ui:337 msgid "Confirm Password" msgstr "" -#: resources/ui/account_settings.ui:344 +#: resources/ui/account_settings.ui:349 msgid "Change Password" msgstr "" -#: resources/ui/account_settings.ui:361 +#: resources/ui/account_settings.ui:366 msgid "Music" msgstr "" -#: resources/ui/account_settings.ui:366 +#: resources/ui/account_settings.ui:371 msgid "Player" msgstr "" -#: resources/ui/account_settings.ui:369 resources/ui/player_toolbar.ui:197 +#: resources/ui/account_settings.ui:374 resources/ui/player_toolbar.ui:197 msgid "Repeat Mode" msgstr "" -#: resources/ui/account_settings.ui:373 resources/ui/player_toolbar.ui:231 +#: resources/ui/account_settings.ui:378 resources/ui/player_toolbar.ui:231 msgid "Repeat One" msgstr "" -#: resources/ui/account_settings.ui:374 resources/ui/player_toolbar.ui:235 +#: resources/ui/account_settings.ui:379 resources/ui/player_toolbar.ui:235 msgid "Repeat All" msgstr "" -#: resources/ui/account_settings.ui:375 resources/ui/account_settings.ui:468 +#: resources/ui/account_settings.ui:380 resources/ui/account_settings.ui:473 #: resources/ui/player_toolbar.ui:239 msgid "None" msgstr "" -#: resources/ui/account_settings.ui:387 resources/ui/other.ui:134 +#: resources/ui/account_settings.ui:392 resources/ui/other.ui:134 #: resources/ui/mpv_control_sidebar.ui:495 resources/ui/search.ui:76 msgid "Video" msgstr "" -#: resources/ui/account_settings.ui:392 +#: resources/ui/account_settings.ui:397 msgid "Video Output" msgstr "" -#: resources/ui/account_settings.ui:393 +#: resources/ui/account_settings.ui:398 msgid "" "Warning: Do NOT use any method other than the software's own controls to " "control the window. Restart to take effect" msgstr "" -#: resources/ui/account_settings.ui:396 +#: resources/ui/account_settings.ui:401 msgid "libmpv (default)" msgstr "" -#: resources/ui/account_settings.ui:451 +#: resources/ui/account_settings.ui:456 msgid "Load external mpv config" msgstr "" -#: resources/ui/account_settings.ui:452 +#: resources/ui/account_settings.ui:457 msgid "May cause crashes, Requires restart" msgstr "" -#: resources/ui/account_settings.ui:455 +#: resources/ui/account_settings.ui:460 msgid "Enable external config" msgstr "" -#: resources/ui/account_settings.ui:460 +#: resources/ui/account_settings.ui:465 msgid "Config dir" msgstr "" -#: resources/ui/account_settings.ui:483 +#: resources/ui/account_settings.ui:488 msgid "Preferred Version" msgstr "" -#: resources/ui/account_settings.ui:506 +#: resources/ui/account_settings.ui:511 msgid "" "Weight is ordered from high to low, until a specific version is matched, or " "the highest matching version is obtained before clearing the match list" msgstr "" -#: resources/ui/account_settings.ui:521 +#: resources/ui/account_settings.ui:526 msgid "Descriptors" msgstr "" -#: resources/ui/account_settings.ui:543 +#: resources/ui/account_settings.ui:548 msgid "It is recommended to set no more than 3 lines" msgstr "" -#: resources/ui/account_settings.ui:564 +#: resources/ui/account_settings.ui:569 msgid "No Descriptors" msgstr "" -#: resources/ui/account_settings.ui:583 +#: resources/ui/account_settings.ui:588 msgid "Add a descriptor" msgstr "" -#: resources/ui/account_settings.ui:594 resources/ui/account_settings.ui:704 +#: resources/ui/account_settings.ui:599 resources/ui/account_settings.ui:709 #: resources/ui/account.ui:26 resources/ui/images_dialog.ui:26 #: resources/ui/metadata_dialog.ui:38 msgid "Cancel" msgstr "" -#: resources/ui/account_settings.ui:600 +#: resources/ui/account_settings.ui:605 msgid "Add" msgstr "" -#: resources/ui/account_settings.ui:625 resources/ui/account_settings.ui:735 +#: resources/ui/account_settings.ui:630 resources/ui/account_settings.ui:740 msgid "This will use exact matching to obtain a list" msgstr "" -#: resources/ui/account_settings.ui:628 resources/ui/account_settings.ui:738 +#: resources/ui/account_settings.ui:633 resources/ui/account_settings.ui:743 msgid "Descriptor Type" msgstr "" -#: resources/ui/account_settings.ui:633 resources/ui/account_settings.ui:743 +#: resources/ui/account_settings.ui:638 resources/ui/account_settings.ui:748 msgid "String" msgstr "" -#: resources/ui/account_settings.ui:634 resources/ui/account_settings.ui:744 +#: resources/ui/account_settings.ui:639 resources/ui/account_settings.ui:749 msgid "Regular Expression" msgstr "" -#: resources/ui/account_settings.ui:646 resources/ui/account_settings.ui:756 +#: resources/ui/account_settings.ui:651 resources/ui/account_settings.ui:761 msgid "Descriptor" msgstr "" -#: resources/ui/account_settings.ui:651 resources/ui/account_settings.ui:761 +#: resources/ui/account_settings.ui:656 resources/ui/account_settings.ui:766 msgid "Descriptor should not be too long" msgstr "" -#: resources/ui/account_settings.ui:662 resources/ui/account_settings.ui:772 +#: resources/ui/account_settings.ui:667 resources/ui/account_settings.ui:777 msgid "eg. 1080p" msgstr "" -#: resources/ui/account_settings.ui:673 resources/ui/account_settings.ui:783 +#: resources/ui/account_settings.ui:678 resources/ui/account_settings.ui:788 msgid "eg. 1080p.*WebDL" msgstr "" -#: resources/ui/account_settings.ui:693 +#: resources/ui/account_settings.ui:698 msgid "Edit descriptor" msgstr "" -#: resources/ui/account_settings.ui:710 +#: resources/ui/account_settings.ui:715 msgid "Save" msgstr "" -#: resources/ui/account_settings.ui:803 +#: resources/ui/account_settings.ui:808 msgid "Change folder" msgstr "" -#: resources/ui/account_settings.ui:805 +#: resources/ui/account_settings.ui:810 msgid "Select new mpv config folder" msgstr "" @@ -321,8 +325,8 @@ msgstr "" #: resources/ui/album_widget.ui:94 resources/ui/other.ui:76 #: resources/ui/item.ui:169 resources/ui/player_toolbar.ui:90 -#: resources/ui/mpv_menu_actions.ui:27 src/ui/mpv/page.rs:921 -#: src/ui/mpv/page.rs:923 src/ui/widgets/item.rs:614 +#: resources/ui/mpv_menu_actions.ui:27 src/ui/mpv/page.rs:905 +#: src/ui/mpv/page.rs:907 src/ui/widgets/item.rs:614 msgid "Play" msgstr "" @@ -335,8 +339,8 @@ msgstr "" msgid "Loading..." msgstr "" -#: resources/ui/mpvpage.ui:134 resources/ui/window.ui:542 -#: resources/ui/window.ui:564 resources/ui/mpv_menu.ui:35 +#: resources/ui/mpvpage.ui:134 resources/ui/window.ui:545 +#: resources/ui/window.ui:567 resources/ui/mpv_menu.ui:35 msgid "Playlist" msgstr "" @@ -344,7 +348,7 @@ msgstr "" msgid "Media info (MPV)" msgstr "" -#: resources/ui/mpvpage.ui:200 src/ui/mpv/page.rs:926 src/ui/mpv/page.rs:928 +#: resources/ui/mpvpage.ui:200 src/ui/mpv/page.rs:910 src/ui/mpv/page.rs:912 msgid "Pause" msgstr "" @@ -597,7 +601,7 @@ msgstr "" msgid "Lock The Item" msgstr "" -#: resources/ui/mpv_control_sidebar.ui:5 resources/ui/window.ui:592 +#: resources/ui/mpv_control_sidebar.ui:5 resources/ui/window.ui:595 msgid "Advanced Settings" msgstr "" @@ -1125,47 +1129,47 @@ msgstr "" msgid "Server added successfully" msgstr "" -#: src/ui/widgets/account_settings.rs:237 +#: src/ui/widgets/account_settings.rs:239 msgid "Password cannot be empty!" msgstr "" -#: src/ui/widgets/account_settings.rs:241 +#: src/ui/widgets/account_settings.rs:243 msgid "Passwords do not match!" msgstr "" -#: src/ui/widgets/account_settings.rs:248 +#: src/ui/widgets/account_settings.rs:250 msgid "Password changed successfully! Please login again." msgstr "" -#: src/ui/widgets/account_settings.rs:254 +#: src/ui/widgets/account_settings.rs:256 msgid "Failed to change password" msgstr "" -#: src/ui/widgets/account_settings.rs:313 +#: src/ui/widgets/account_settings.rs:315 msgid "Cache Cleared" msgstr "" -#: src/ui/widgets/account_settings.rs:334 +#: src/ui/widgets/account_settings.rs:336 msgid "No file selected" msgstr "" -#: src/ui/widgets/account_settings.rs:410 +#: src/ui/widgets/account_settings.rs:412 msgid "Font Cleared, Restart to take effect." msgstr "" -#: src/ui/widgets/account_settings.rs:580 -#: src/ui/widgets/account_settings.rs:589 -#: src/ui/widgets/account_settings.rs:623 -#: src/ui/widgets/account_settings.rs:632 +#: src/ui/widgets/account_settings.rs:585 +#: src/ui/widgets/account_settings.rs:594 +#: src/ui/widgets/account_settings.rs:628 +#: src/ui/widgets/account_settings.rs:637 msgid "Descriptor cannot be empty!" msgstr "" -#: src/ui/widgets/account_settings.rs:594 -#: src/ui/widgets/account_settings.rs:637 +#: src/ui/widgets/account_settings.rs:599 +#: src/ui/widgets/account_settings.rs:642 msgid "Invalid regex" msgstr "" -#: src/ui/widgets/home.rs:225 +#: src/ui/widgets/home.rs:236 msgid "Latest" msgstr "" @@ -1189,36 +1193,28 @@ msgstr "" msgid "Deband settings cleared." msgstr "" -#: src/ui/mpv/page.rs:419 +#: src/ui/mpv/page.rs:420 msgid "Loading Video..." msgstr "" -#: src/ui/mpv/page.rs:438 +#: src/ui/mpv/page.rs:439 msgid "No more videos found" msgstr "" -#: src/ui/mpv/page.rs:447 +#: src/ui/mpv/page.rs:448 msgid "Waiting for mediasource..." msgstr "" -#: src/ui/mpv/page.rs:478 src/ui/mpv/page.rs:483 +#: src/ui/mpv/page.rs:479 src/ui/mpv/page.rs:484 msgid "No media sources found" msgstr "" #: src/ui/mpv/page.rs:642 -msgid "Error" -msgstr "" - -#: src/ui/mpv/page.rs:644 msgid "" -"MPV has been shutdown, Application will exit. \n" +"MPV has been shutdown, Application will exit.\n" "Tsukimi can't restart MPV." msgstr "" -#: src/ui/mpv/page.rs:647 -msgid "Shutdown" -msgstr "" - #: src/ui/widgets/image_infocard.rs:106 msgid "No image to view" msgstr "" @@ -1344,14 +1340,22 @@ msgstr "" msgid "Scanning..." msgstr "" -#: src/ui/widgets/tu_list_item.rs:843 src/ui/widgets/tu_list_item.rs:910 +#: src/ui/widgets/tu_list_item.rs:843 src/ui/widgets/tu_list_item.rs:904 msgid "Success" msgstr "" -#: src/ui/widgets/window.rs:838 +#: src/ui/widgets/window.rs:831 msgid "Server Panel" msgstr "" +#: src/ui/widgets/window.rs:1005 +msgid "Fatal Error" +msgstr "" + +#: src/ui/widgets/window.rs:1008 +msgid "Copy Error & Close" +msgstr "" + #: src/ui/widgets/server_panel.rs:118 msgid "Shut down server" msgstr "" diff --git a/src/client/emby_client.rs b/src/client/emby_client.rs index 465e5e39..df80f511 100644 --- a/src/client/emby_client.rs +++ b/src/client/emby_client.rs @@ -28,7 +28,6 @@ use serde_json::{ use tower::limit::ConcurrencyLimit; use tracing::{ debug, - info, warn, }; use url::Url; @@ -297,7 +296,12 @@ impl EmbyClient { let res_text = res.text().await?; match serde_json::from_str(&res_text) { Ok(json) => Ok(json), - Err(e) => Err(anyhow!("Request Path: {}\nFailed parsing response to json {}: {}", path, e, res_text)), + Err(e) => Err(anyhow!( + "Request Path: {}\nFailed parsing response to json {}: {}", + path, + e, + res_text + )), } } diff --git a/src/client/mod.rs b/src/client/mod.rs index ac9e2884..e4ca286d 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -1,8 +1,8 @@ pub mod account; pub mod emby_client; pub mod error; -pub mod runtime; pub mod proxy; +pub mod runtime; pub mod structs; pub use account::Account;