From 4ac7b10707834705561520f731d93b346acc8498 Mon Sep 17 00:00:00 2001 From: Luckysauce <98256161+LuckySauce@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:59:35 +0800 Subject: [PATCH 1/2] feat(recording): auto-clean old recordings when disk space is low - new utils.clean_old_recordings(): delete oldest recording files until the free-space threshold is met, protecting files modified within 10 minutes - check_free_space() now attempts auto-clean before disabling recording - new setting auto_clean_old_recordings (default off) with UI switch and zh_CN/en locales - tests for clean_old_recordings (5 cases) --- app/core/recording/record_manager.py | 8 + app/ui/views/settings_view.py | 9 + app/utils/utils.py | 40 + config/default_settings.json | 1 + locales/en.json | 1072 ++++++++++++------------- locales/zh_CN.json | 1078 +++++++++++++------------- tests/__init__.py | 1 + tests/test_disk_space.py | 85 ++ 8 files changed, 1221 insertions(+), 1073 deletions(-) create mode 100644 tests/__init__.py create mode 100644 tests/test_disk_space.py diff --git a/app/core/recording/record_manager.py b/app/core/recording/record_manager.py index b2ab7bb0..7ebad756 100644 --- a/app/core/recording/record_manager.py +++ b/app/core/recording/record_manager.py @@ -496,6 +496,14 @@ async def delete_recording_cards(self, recordings: list[Recording]): async def check_free_space(self, output_dir: str | None = None): disk_space_limit = float(self.settings.user_config.get("recording_space_threshold") or 0) output_dir = output_dir or self.settings.get_video_save_path() + + if utils.check_disk_capacity(output_dir) < disk_space_limit and self.settings.user_config.get( + "auto_clean_old_recordings" + ): + deleted = utils.clean_old_recordings(output_dir, disk_space_limit) + if deleted: + logger.info(f"Auto-cleaned {len(deleted)} old recording file(s) to free disk space") + if utils.check_disk_capacity(output_dir) < disk_space_limit: self.services.recording_enabled = False logger.error(f"Disk space remaining is below {disk_space_limit} GB. Recording function disabled") diff --git a/app/ui/views/settings_view.py b/app/ui/views/settings_view.py index 401e7179..2f636219 100644 --- a/app/ui/views/settings_view.py +++ b/app/ui/views/settings_view.py @@ -457,6 +457,15 @@ def create_recording_settings_tab(self): on_change=self.on_change, ), ), + self.create_setting_row( + self._["auto_clean_old_recordings"], + ft.Switch( + value=self.get_config_value("auto_clean_old_recordings"), + data="auto_clean_old_recordings", + on_change=self.on_change, + tooltip=self._["auto_clean_old_recordings_tip"], + ), + ), self.create_setting_row( self._["segment_time"], ft.TextField( diff --git a/app/utils/utils.py b/app/utils/utils.py index 1dae19e6..180e22f4 100644 --- a/app/utils/utils.py +++ b/app/utils/utils.py @@ -149,6 +149,46 @@ def check_disk_capacity(file_path: str | Path, show: bool = False) -> float: return free_space_gb +VIDEO_FILE_EXTENSIONS = {".mp4", ".flv", ".ts", ".mkv", ".aac", ".mp3", ".webm"} + + +def clean_old_recordings(directory: str | Path, target_free_gb: float, protect_minutes: int = 10) -> list[str]: + """Delete the oldest recording files until at least ``target_free_gb`` remains. + + Only video/audio files recorded under ``directory`` are considered. Files + modified within ``protect_minutes`` are never touched, so recordings that + are still in progress (or just finished) stay safe. Returns the list of + deleted file paths, oldest first. + """ + directory = os.path.abspath(directory) + now = datetime.now().timestamp() + candidates: list[tuple[float, str]] = [] + for root, _dirs, files in os.walk(directory): + for name in files: + if os.path.splitext(name)[1].lower() not in VIDEO_FILE_EXTENSIONS: + continue + path = os.path.join(root, name) + try: + mtime = os.path.getmtime(path) + except OSError: + continue + if now - mtime < protect_minutes * 60: + continue + candidates.append((mtime, path)) + + deleted: list[str] = [] + for _mtime, path in sorted(candidates): + if shutil.disk_usage(directory).free / (1024**3) >= target_free_gb: + break + try: + os.remove(path) + deleted.append(path) + logger.info(f"Auto-cleaned old recording file: {path}") + except OSError as e: + logger.warning(f"Failed to delete old recording file {path}: {e}") + return deleted + + def handle_proxy_addr(proxy_addr): if proxy_addr: if not proxy_addr.startswith("http"): diff --git a/config/default_settings.json b/config/default_settings.json index 053dab97..9eeaa691 100644 --- a/config/default_settings.json +++ b/config/default_settings.json @@ -20,6 +20,7 @@ "default_live_source": "FLV", "flv_use_direct_download": false, "recording_space_threshold": "2.0", + "auto_clean_old_recordings": false, "video_segment_time": "1800", "convert_to_mp4": true, "delete_original": false, diff --git a/locales/en.json b/locales/en.json index 7dccc9e5..03955ef5 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,540 +1,542 @@ { - "sidebar": { - "home": "Home", - "recordings": "Recordings", - "settings": "Settings", - "storage": "Storage", - "about": "About", - "light_theme": "Light theme", - "dark_theme": "Dark theme", - "theme_color": "Theme Color", - "toggle_day_theme": "Toggle Day Theme", - "toggle_night_theme": "Toggle Night Theme", - "colors": "Color List" - }, + "sidebar": { + "home": "Home", + "recordings": "Recordings", + "settings": "Settings", + "storage": "Storage", + "about": "About", + "light_theme": "Light theme", + "dark_theme": "Dark theme", + "theme_color": "Theme Color", + "toggle_day_theme": "Toggle Day Theme", + "toggle_night_theme": "Toggle Night Theme", + "colors": "Color List" + }, "home_page": { - "welcome": "Welcome to StreamCap", - "tagline": "Record every exciting moment of the live broadcast", - "start_recording": "Start Recording", - "recording_list": "Recording List", - "browse_recordings": "Browse Recordings", - "manage_storage": "Manage Storage", - "settings": "Settings", - "about": "About", - "main_features": "Main Features", - "feature_title_1": "Start Recording", - "feature_desc_1": "Enter the live room address, start recording immediately", - "feature_title_2": "Message Push", - "feature_desc_2": "Support for ServerChan and other channels", - "feature_title_3": "Batch Operations", - "feature_desc_3": "Batch start, stop and delete recording", - "feature_title_4": "Scheduled Monitoring", - "feature_desc_4": "Default 24h loop monitoring, support scheduled monitoring", - "version": "Version", - "announcement": "Announcement", - "stats": "Statistics", - "total_rooms": "Total Rooms", - "active_recordings": "Active Recordings", - "stop_monitoring": "Stop Monitoring", - "recent_added_recordings": "Recent Added", - "no_recordings": "No Recordings", - "greeting_morning": "Good Morning", - "greeting_afternoon": "Good Afternoon", - "greeting_evening": "Good Evening" - }, - "recordings_page": { - "recording_list": "Recording List", - "search": "Search", - "add_record": "Add Recording", - "refresh": "Refresh", - "batch_start": "Batch Start", - "batch_stop": "Batch Stop", - "batch_delete": "Batch Delete", - "refresh_success_tip": "Tip: Refresh successful", - "batch_delete_confirm_tip": "Are you sure you want to delete all selected recordings?", - "clear_all_confirm_tip": "Are you sure you want to clear all recordings?", - "edit_record": "Edit Recording", - "add_recording_success_tip": "Tip: Live room added successfully!", - "delete_recording_success_tip": "Tip: Live room deleted successfully!", - "stop_recording_success_tip": "Tip: Live room monitoring stopped successfully!", - "start_recording_success_tip": "Tip: Live room monitoring started successfully!", - "not_search_result": "Tip: No search results found", - "toggle_view": "Toggle View", - "preview_video": "Preview Video", - "status_filter": "Status Filter", - "filter_all": "All", - "filter_recording": "Recording", - "filter_living": "Living", - "filter_error": "Error", - "filter_offline": "Offline", - "filter_stopped": "Not Monitored", - "platform_filter": "Platform Filter", - "platform_sort": "Platform Sort", - "operations": "Operations", - "filter": "Filter" - }, - "recording_dialog": { - "input_live_link": "Enter Live Room URL", - "example": "Example", - "select_resolution": "Select Recording Resolution", - "custom_video_bitrate": "Custom Video Bitrate (kbps)", - "custom_video_bitrate_hint": "Leave blank to keep the source bitrate", - "custom_video_bitrate_invalid": "Enter a whole-number bitrate greater than 0", - "flv_use_direct_download": "FLV Source Use Direct Downloader", - "flv_use_direct_download_tip": "Enable lower latency, but does not support segmented recording", - "input_anchor_name": "Enter Broadcaster Name", - "default_input": "Can be left blank", - "select_record_format": "Select Recording Format - Default ts", - "input_save_path": "Enter Save Path for Recordings", - "is_segment_enabled": "Enable Segmented Recording", - "segment_record_time": "Segment Recording Time", - "input_segment_time": "Enter Segment Time (in seconds)", - "scheduled_recording": "Enable Daily Scheduled Monitoring", - "scheduled_start_time": "Daily Monitoring Start Time", - "monitor_hours": "Daily Monitoring Hours", - "enable_message_push": "Enable Message Push", - "only_notify_no_record": "Only notify without recording", - "batch_input_tip": "Batch Input (one record per line)", - "single_input": "Single Input", - "batch_input": "Batch Input", - "live_room": "Live Room", - "platform_not_supported_tip": "This platform does not support recording ⚠️", - "pick_time": "Pick time", - "pick_time_tip": "Configure scheduled time", - "time_out_of_range": "Time out of range", - "pick_time_slot": "Pick your time slot", - "hour_label_text": "Hour", - "minute_label_text": "Minute", - "select_media_type": "Select Media Type", - "video": "Video", - "audio": "Audio", - "duplicate_url_title": "Duplicate Live Room URL", - "duplicate_url_content": "The live room URL already exists, do you want to continue adding?" - }, - "search_dialog": { - "search_keyword": "Enter search keyword" - }, - "recording_manager": { - "monitor_stopped": "Stopped monitoring", - "is_live": "Live streaming in progress", - "live_room": "Live Room", - "recorded": "Recorded", - "push_content": "Live room status update: [room_name] is live, time: [time]", - "push_content_end": "Live room status update: [room_name] is live completed, time: [time]", - "status_notify": "Live room status update notification", - "STOPPED_MONITORING": "Monitoring Stopped", - "MONITORING": "Monitoring In Progress", - "RECORDING": "Recording In Progress", - "NOT_RECORDING": "Is living, not Recording", - "STATUS_CHECKING": "Live Status Checking In Progres", - "NOT_IN_SCHEDULED_CHECK": "Not in Scheduled Check Range, Stopping Live Detection", - "PREPARING_RECORDING": "Preparing to Start Recording", - "RECORDING_ERROR": "Recording the live stream has failed", - "NOT_RECORDING_SPACE": "Insufficient disk space to record", - "LIVE_STATUS_CHECK_ERROR": "Live status error, check address accessibility", - "LIVE_BROADCASTING": "Live Broadcasting", - "not_disk_space_tip": "Insufficient disk storage space, stop recording ⚠️", - "notify": "Notify", - "live_recording_stopped_message": "Live room recording has been stopped", - "live_recording_started_message": "Live room recording has been started", - "not_config_tip": "Message push channel not configured" - }, + "welcome": "Welcome to StreamCap", + "tagline": "Record every exciting moment of the live broadcast", + "start_recording": "Start Recording", + "recording_list": "Recording List", + "browse_recordings": "Browse Recordings", + "manage_storage": "Manage Storage", + "settings": "Settings", + "about": "About", + "main_features": "Main Features", + "feature_title_1": "Start Recording", + "feature_desc_1": "Enter the live room address, start recording immediately", + "feature_title_2": "Message Push", + "feature_desc_2": "Support for ServerChan and other channels", + "feature_title_3": "Batch Operations", + "feature_desc_3": "Batch start, stop and delete recording", + "feature_title_4": "Scheduled Monitoring", + "feature_desc_4": "Default 24h loop monitoring, support scheduled monitoring", + "version": "Version", + "announcement": "Announcement", + "stats": "Statistics", + "total_rooms": "Total Rooms", + "active_recordings": "Active Recordings", + "stop_monitoring": "Stop Monitoring", + "recent_added_recordings": "Recent Added", + "no_recordings": "No Recordings", + "greeting_morning": "Good Morning", + "greeting_afternoon": "Good Afternoon", + "greeting_evening": "Good Evening" + }, + "recordings_page": { + "recording_list": "Recording List", + "search": "Search", + "add_record": "Add Recording", + "refresh": "Refresh", + "batch_start": "Batch Start", + "batch_stop": "Batch Stop", + "batch_delete": "Batch Delete", + "refresh_success_tip": "Tip: Refresh successful", + "batch_delete_confirm_tip": "Are you sure you want to delete all selected recordings?", + "clear_all_confirm_tip": "Are you sure you want to clear all recordings?", + "edit_record": "Edit Recording", + "add_recording_success_tip": "Tip: Live room added successfully!", + "delete_recording_success_tip": "Tip: Live room deleted successfully!", + "stop_recording_success_tip": "Tip: Live room monitoring stopped successfully!", + "start_recording_success_tip": "Tip: Live room monitoring started successfully!", + "not_search_result": "Tip: No search results found", + "toggle_view": "Toggle View", + "preview_video": "Preview Video", + "status_filter": "Status Filter", + "filter_all": "All", + "filter_recording": "Recording", + "filter_living": "Living", + "filter_error": "Error", + "filter_offline": "Offline", + "filter_stopped": "Not Monitored", + "platform_filter": "Platform Filter", + "platform_sort": "Platform Sort", + "operations": "Operations", + "filter": "Filter" + }, + "recording_dialog": { + "input_live_link": "Enter Live Room URL", + "example": "Example", + "select_resolution": "Select Recording Resolution", + "custom_video_bitrate": "Custom Video Bitrate (kbps)", + "custom_video_bitrate_hint": "Leave blank to keep the source bitrate", + "custom_video_bitrate_invalid": "Enter a whole-number bitrate greater than 0", + "flv_use_direct_download": "FLV Source Use Direct Downloader", + "flv_use_direct_download_tip": "Enable lower latency, but does not support segmented recording", + "input_anchor_name": "Enter Broadcaster Name", + "default_input": "Can be left blank", + "select_record_format": "Select Recording Format - Default ts", + "input_save_path": "Enter Save Path for Recordings", + "is_segment_enabled": "Enable Segmented Recording", + "segment_record_time": "Segment Recording Time", + "input_segment_time": "Enter Segment Time (in seconds)", + "scheduled_recording": "Enable Daily Scheduled Monitoring", + "scheduled_start_time": "Daily Monitoring Start Time", + "monitor_hours": "Daily Monitoring Hours", + "enable_message_push": "Enable Message Push", + "only_notify_no_record": "Only notify without recording", + "batch_input_tip": "Batch Input (one record per line)", + "single_input": "Single Input", + "batch_input": "Batch Input", + "live_room": "Live Room", + "platform_not_supported_tip": "This platform does not support recording ⚠️", + "pick_time": "Pick time", + "pick_time_tip": "Configure scheduled time", + "time_out_of_range": "Time out of range", + "pick_time_slot": "Pick your time slot", + "hour_label_text": "Hour", + "minute_label_text": "Minute", + "select_media_type": "Select Media Type", + "video": "Video", + "audio": "Audio", + "duplicate_url_title": "Duplicate Live Room URL", + "duplicate_url_content": "The live room URL already exists, do you want to continue adding?" + }, + "search_dialog": { + "search_keyword": "Enter search keyword" + }, + "recording_manager": { + "monitor_stopped": "Stopped monitoring", + "is_live": "Live streaming in progress", + "live_room": "Live Room", + "recorded": "Recorded", + "push_content": "Live room status update: [room_name] is live, time: [time]", + "push_content_end": "Live room status update: [room_name] is live completed, time: [time]", + "status_notify": "Live room status update notification", + "STOPPED_MONITORING": "Monitoring Stopped", + "MONITORING": "Monitoring In Progress", + "RECORDING": "Recording In Progress", + "NOT_RECORDING": "Is living, not Recording", + "STATUS_CHECKING": "Live Status Checking In Progres", + "NOT_IN_SCHEDULED_CHECK": "Not in Scheduled Check Range, Stopping Live Detection", + "PREPARING_RECORDING": "Preparing to Start Recording", + "RECORDING_ERROR": "Recording the live stream has failed", + "NOT_RECORDING_SPACE": "Insufficient disk space to record", + "LIVE_STATUS_CHECK_ERROR": "Live status error, check address accessibility", + "LIVE_BROADCASTING": "Live Broadcasting", + "not_disk_space_tip": "Insufficient disk storage space, stop recording ⚠️", + "notify": "Notify", + "live_recording_stopped_message": "Live room recording has been stopped", + "live_recording_started_message": "Live room recording has been started", + "not_config_tip": "Message push channel not configured" + }, "stream_manager": { - "record_stream_error": "Live streaming source recording error", - "no_ffmpeg_tip": "FFmpeg is not installed, please install FFmpeg first ⚠️" - }, - "recording_card": { - "stop_monitor_tip": "Tip: Live monitoring has been stopped", - "start_monitor_tip": "Tip: Live monitoring has been started", - "please_stop_monitor_tip": "Tip: Please stop live monitoring first️", - "please_start_monitor_tip": "Tip: Please start live monitoring first", - "is_not_live_tip": "Tip: The live room is not broadcasting", - "pre_record_tip": "Tip: Preparing to start recording", - "stop_record_tip": "Tip: Live room recording has been stopped", - "no_folder_tip": "Tip: The live room folder does not exist", - "edit_record_config": "Edit Recording Configuration", - "delete_monitor": "Delete Monitoring", - "open_folder": "Open Folder", - "recording_info": "Recording Information", - "anchor_name": "Anchor Name", - "platform_name": "Platform Name", - "live_link": "Live Link", - "live_title": "Live Title", - "record_format": "Recording Format", - "record_quality": "Recording Quality", - "segment_record": "Segmented Recording", - "segment_time": "Segment Duration", - "monitor_status": "Monitoring Status", - "scheduled_recording": "Scheduled Detection", - "scheduled_time_range": "Scheduled Detection Range", - "save_path": "Save Path", - "recording_status": "Recording Status", - "start_record": "Start Recording", - "stop_record": "Stop Recording", - "start_monitor": "Start Monitoring", - "stop_monitor": "Stop Monitoring", - "seconds": "s", - "delete_confirm_tip": "Are you sure you want to delete this live streaming room?", - "no_recording_dir_tip": "No saved recording files", - "none": "None", - "recording_card_tip": "Click to select", - "use_proxy": "Use Proxy", - "no_support_open_dir": "Web version does not support opening folder ⚠️", - "message_push": "Message Push", - "all": "All", - "recording": "Recording", - "recording_error": "Recording Error", - "live_broadcasting": "Live Broadcasting", - "not_live": "Not Live", - "stopped": "Stopped", - "filter": "Filter", - "offline": "Offline", - "no_monitor": "Not Monitored", - "checking": "Checking", - "live_room": "Live Room" - }, - "settings_page": { - "recording_settings": "Recording Settings", - "push_settings": "Push Settings", - "basic_settings": "Basic Settings", - "cookies_settings": "Cookie Settings", - "accounts_settings": "Account Settings", - "security_settings": "Security Settings", - "select": "select", - "unsupported_select_path": "Path selection is not supported on the web 📂 Please enter manually", - "select_path_failed": "The path picker could not be opened. Please enter the save path manually.", - "program_config": "Basic configuration of the program", - "restore_defaults": "Restore Default Settings", - "program_language": "Program Language", - "filename_includes_title": "Include Title in Filename", - "custom_filename_template": "Custom Filename Template", - "live_recording_path": "Live Recording Path", - "blank_for_default_path": "Leave blank for default path", - "remove_emojis": "Remove Emoji Symbols", - "name_rules": "File/folder name rules", - "platform": "platform", - "author": "author", - "time": "time", - "title": "title", - "proxy_settings": "Proxy Settings", - "remember_window_size": "Remember Window Size", - "scheduled_shutdown": "Scheduled Shutdown Settings", - "scheduled_shutdown_time": "Daily shutdown time", - "scheduled_shutdown_pick_time": "Select daily shutdown time", - "scheduled_shutdown_more": "Open shutdown settings", - "scheduled_shutdown_tip": "Start the shutdown countdown at the selected time every day", - "scheduled_shutdown_system_message": "StreamCap scheduled shutdown started; it can be cancelled within 60 seconds", - "scheduled_shutdown_countdown": "The system will shut down in {seconds} seconds.", - "scheduled_shutdown_cancel": "Cancel this shutdown", - "scheduled_shutdown_cancelled": "This shutdown has been cancelled", - "scheduled_shutdown_failed": "Unable to start scheduled shutdown: {error}", - "scheduled_shutdown_cancel_failed": "Unable to cancel this shutdown: {error}", - "quick_shutdown": "Quick Shutdown", - "quick_shutdown_hours_suffix": "hours", - "quick_shutdown_ready": "Enter 1-{max_hours} hours, then start", - "quick_shutdown_invalid_hours": "Enter a number of hours from 1 to {max_hours}", - "quick_shutdown_start": "Start", - "quick_shutdown_start_tip": "Schedule shutdown after a number of hours", - "quick_shutdown_cancel": "Cancel quick shutdown", - "quick_shutdown_confirm_title": "Confirm Quick Shutdown", - "quick_shutdown_confirm_content": "The computer will shut down in {hours} hour(s), at {time}. Start the timer?", - "quick_shutdown_active": "Scheduled shutdown: {time}", - "quick_shutdown_started": "Shutdown scheduled for {time}", - "quick_shutdown_cancelled": "Quick shutdown cancelled", - "quick_shutdown_failed": "Unable to schedule quick shutdown: {error}", - "quick_shutdown_cancel_failed": "Unable to cancel quick shutdown: {error}", - "quick_shutdown_system_message": "StreamCap quick shutdown: {hours}-hour countdown", - "is_proxy_enabled": "Configuration for using proxy and related settings", - "enable_proxy": "Enable Proxy", - "proxy_address": "Proxy Address", - "skip_proxy_detection": "Skip Proxy Detection", - "recording_options": "Recording Options", - "advanced_config": "Advanced recording configuration", - "video_record_format": "Video/Audio Recording Format", - "recording_quality": "Recording Quality", - "loop_time": "Loop Time (Seconds)", - "is_segmented_recording_enabled": "Enable Segmented Recording", - "force_https": "Force HTTPS Recording", - "default_live_source": "Default Live Source", - "default_live_source_tip": "Prefer to record live streams using FLV sources", - "flv_use_direct_download": "FLV Source Use Direct Downloader", - "flv_use_direct_download_tip": "Enable lower latency, but does not support segmented recording", - "space_threshold": "Remaining Space Threshold (GB) for Recording", - "segment_time": "Video Segment Time (Seconds)", - "convert_mp4": "Convert to MP4 After Recording", - "delete_original": "Delete Original File After Appending Format", - "generate_timestamps_subtitle": "Generate Timestamp Subtitle", - "custom_script": "Execute Custom Script After Recording", - "script_command": "Custom Script Execution Command", - "default_platform_with_proxy": "Default Platform for Recording with Proxy", - "web_login_configuration": "Web Backend Login Configuration", - "login_required": "Enable Secure Login", - "login_required_enabled": "Secure login enabled", - "login_required_disabled": "Secure login disabled", - "current_username": "Current Username", - "old_password": "Old Password", - "default_old_password": "default: admin", - "new_password": "New Password", - "confirm_password": "Confirm Password", - "change_password": "Change Password", - "old_password_required": "Old password cannot be empty", - "new_password_required": "New password cannot be empty", - "passwords_not_match": "The two passwords do not match", - "password_changed": "Password changed successfully", - "old_password_incorrect": "Old password is incorrect", - "not_logged_in": "You are not logged in", - "push_notifications": "Push Notifications", - "stream_start_notification_enabled": "Live Status Notification", - "system_status_bar_notification_enabled": "System Bar Notification", - "open_broadcast_push_enabled": "Broadcast Start Push", - "close_broadcast_push_enabled": "Broadcast End Push", - "only_notify_no_record": "Only notify without recording", - "notify_loop_time": "Only notify loop time", - "custom_push_settings": "Custom Push Settings", - "personalized_notification_content_behavior": "Personalized notification content and behavior", - "custom_push_title": "Custom Push Title", - "custom_open_broadcast_content": "Custom Broadcast Start Notification Content", - "custom_close_broadcast_content": "Custom Broadcast End Notification Content", - "push_channels": "Push Channels", - "dingtalk": "DingTalk", - "wechat": "Wechat", - "feishu": "Feishu", - "email": "Email", - "telegram": "Telegram", - "select_and_enable_channels": "Select and enable the channels you want to use", - "channel_configuration": "Channel Configuration", - "configure_enabled_channels": "Configure your enabled notification channels", - "dingtalk_webhook_url": "DingTalk Webhook URL", - "dingtalk_at_objects": "DingTalk @ Objects", - "dingtalk_at_all": "DingTalk Notify All", - "dingtalk_webhook_hint": "Enter DingTalk group webhook URL", - "dingtalk_phone_numbers_hint": "Enter DingTalk phone numbers", - "wechat_webhook_url": "WeChat Webhook URL", - "feishu_webhook_url": "Feishu Webhook URL", - "bark_webhook_url": "Bark Webhook URL", - "bark_interrupt_level": "Bark Interrupt Level", - "bark_sound": "Bark Sound", - "ntfy_server_url": "Ntfy Server URL", - "ntfy_tags": "Ntfy Tag", - "ntfy_email": "Ntfy Email", - "ntfy_action_url": "Ntfy Action URL", - "telegram_api_token": "Telegram API Token", - "serverchan_send_key": "SCKEY/SendKey", - "serverchan_channel": "Push Channel", - "serverchan_tags": "ServerChan Tags", - "serverchan": "ServerChan", - "telegram_chat_id": "Telegram Chat ID", - "smtp_server": "Smtp Server", - "email_username": "Email Username", - "email_password": "Email Password", - "sender_email": "Sender Email", - "sender_name": "Sender Name", - "recipient_email": "Recipient Email", - "configure_platform_cookies": "Configure platform cookies", - "douyin_cookie": "Douyin Cookie", - "tiktok_cookie": "Tiktok Cookie", - "kuaishou_cookie": "Kuaishou Cookie", - "huya_cookie": "Huya Cookie", - "douyu_cookie": "Douyu Cookie", - "yy_cookie": "YY Cookie", - "bilibili_cookie": "Bilibili Cookie", - "xhs_cookie": "Xiaohongshu Cookie", - "bigo_cookie": "Bigo Cookie", - "blued_cookie": "Blued Cookie", - "soop_cookie": "Soop Cookie", - "netease_cookie": "NeteaseCC Cookie", - "qiandurebo_cookie": "Qiandu Cookie", - "pandalive_cookie": "Pandalive Cookie", - "maoerfm_cookie": "MaoerFM Cookie", - "winktv_cookie": "Winktv Cookie", - "flextv_cookie": "Flextv Cookie", - "look_cookie": "LookLive Cookie", - "popkontv_cookie": "Popkontv Cookie", - "twitcasting_cookie": "Twitcasting Cookie", - "baidu_cookie": "Baidu Cookie", - "weibo_cookie": "Weibo Cookie", - "kugou_cookie": "Kugou Cookie", - "twitch_cookie": "Twitch Cookie", - "liveme_cookie": "Liveme Cookie", - "huajiao_cookie": "Huajiao Cookie", - "liuxing_cookie": "Liuxing Cookie", - "showroom_cookie": "Showroom Cookie", - "acfun_cookie": "Acfun Cookie", - "changliao_cookie": "Changliao Cookie", - "yinbo_cookie": "Yinbo Cookie", - "inke_cookie": "Inke Cookie", - "zhihu_cookie": "Zhihu Cookie", - "chzzk_cookie": "Chzzk Cookie", - "haixiu_cookie": "Haixiu Cookie", - "vvxq_cookie": "Vvxq Cookie", - "17live_cookie": "17Live Cookie", - "lang_cookie": "Lang Cookie", - "piaopiao_cookie": "Piaopiao Cookie", - "6room_cookie": "SixroomCookie", - "lehai_cookie": "Lehai Cookie", - "catshow_cookie": "Catshow Cookie", - "shopee_cookie": "Shopee Cookie", - "youtube_cookie": "Youtube Cookie", - "taobao_cookie": "Taobao Cookie", - "jd_cookie": "Jingdong Cookie", - "configure_platform_accounts": "Configure Platform Accounts", - "sooplive_username": "Soop Username", - "sooplive_password": "Soop Password", - "flextv_username": "FlexTV Username", - "flextv_password": "FlexTV Password", - "popkontv_username": "PopkonTV Username", - "popkontv_password": "PopkonTV Password", - "twitcasting_account_type": "Twitcasting Account Type", - "twitcasting_username": "Twitcasting Username", - "twitcasting_password": "Twitcasting Password", - "success_restore_tip": "Tip: Default configuration has been restored", - "query_restore_config_tip": "Are you sure you want to restore the default configuration?", - "success_save_config_tip": "Tip: Configuration has been saved", - "Chinese": "Simplified Chinese", - "English": "English", - "select_btn_tip": "Select the save path", - "switch_language": "Switch language", - "switch_video_format": "Switch video recording format", - "switch_recording_quality": "Switch video recording quality", - "switch_account_type": "Switch account type", - "switch_language_tip": "Tip: It is recommended to restart the program after switching languages", - "platform_max_concurrent_requests": "Max concurrent recordings per platform", - "platform_max_concurrent_requests_tip": "The maximum number of concurrent requests allowed per platform. Default is 3.", - "check_live_on_browser_refresh": "Check live status when refreshing the web", - "check_live_on_browser_refresh_tip": "Check live status when refreshing the web" - }, - "about_page": { - "about_project": "About This Application", - "ui_version": "UI Version", - "kernel_version": "Kernel Version", - "license": "Open Source License", - "introduction": "Software Introduction", - "feature": "Feature Highlights", - "support_platforms": "Supported Platforms", - "customize_recording": "Custom Params", - "open_source": "Open Source", - "automatic_transcoding": "Auto Transcode", - "status_push": "Live Status", - "developer": "Developer", - "author": "Author", - "view_update": "View Updates", - "view_docs": "View Documentation", - "update": "Version Update" - }, + "record_stream_error": "Live streaming source recording error", + "no_ffmpeg_tip": "FFmpeg is not installed, please install FFmpeg first ⚠️" + }, + "recording_card": { + "stop_monitor_tip": "Tip: Live monitoring has been stopped", + "start_monitor_tip": "Tip: Live monitoring has been started", + "please_stop_monitor_tip": "Tip: Please stop live monitoring first️", + "please_start_monitor_tip": "Tip: Please start live monitoring first", + "is_not_live_tip": "Tip: The live room is not broadcasting", + "pre_record_tip": "Tip: Preparing to start recording", + "stop_record_tip": "Tip: Live room recording has been stopped", + "no_folder_tip": "Tip: The live room folder does not exist", + "edit_record_config": "Edit Recording Configuration", + "delete_monitor": "Delete Monitoring", + "open_folder": "Open Folder", + "recording_info": "Recording Information", + "anchor_name": "Anchor Name", + "platform_name": "Platform Name", + "live_link": "Live Link", + "live_title": "Live Title", + "record_format": "Recording Format", + "record_quality": "Recording Quality", + "segment_record": "Segmented Recording", + "segment_time": "Segment Duration", + "monitor_status": "Monitoring Status", + "scheduled_recording": "Scheduled Detection", + "scheduled_time_range": "Scheduled Detection Range", + "save_path": "Save Path", + "recording_status": "Recording Status", + "start_record": "Start Recording", + "stop_record": "Stop Recording", + "start_monitor": "Start Monitoring", + "stop_monitor": "Stop Monitoring", + "seconds": "s", + "delete_confirm_tip": "Are you sure you want to delete this live streaming room?", + "no_recording_dir_tip": "No saved recording files", + "none": "None", + "recording_card_tip": "Click to select", + "use_proxy": "Use Proxy", + "no_support_open_dir": "Web version does not support opening folder ⚠️", + "message_push": "Message Push", + "all": "All", + "recording": "Recording", + "recording_error": "Recording Error", + "live_broadcasting": "Live Broadcasting", + "not_live": "Not Live", + "stopped": "Stopped", + "filter": "Filter", + "offline": "Offline", + "no_monitor": "Not Monitored", + "checking": "Checking", + "live_room": "Live Room" + }, + "settings_page": { + "recording_settings": "Recording Settings", + "push_settings": "Push Settings", + "basic_settings": "Basic Settings", + "cookies_settings": "Cookie Settings", + "accounts_settings": "Account Settings", + "security_settings": "Security Settings", + "select": "select", + "unsupported_select_path": "Path selection is not supported on the web 📂 Please enter manually", + "select_path_failed": "The path picker could not be opened. Please enter the save path manually.", + "program_config": "Basic configuration of the program", + "restore_defaults": "Restore Default Settings", + "program_language": "Program Language", + "filename_includes_title": "Include Title in Filename", + "custom_filename_template": "Custom Filename Template", + "live_recording_path": "Live Recording Path", + "blank_for_default_path": "Leave blank for default path", + "remove_emojis": "Remove Emoji Symbols", + "name_rules": "File/folder name rules", + "platform": "platform", + "author": "author", + "time": "time", + "title": "title", + "proxy_settings": "Proxy Settings", + "remember_window_size": "Remember Window Size", + "scheduled_shutdown": "Scheduled Shutdown Settings", + "scheduled_shutdown_time": "Daily shutdown time", + "scheduled_shutdown_pick_time": "Select daily shutdown time", + "scheduled_shutdown_more": "Open shutdown settings", + "scheduled_shutdown_tip": "Start the shutdown countdown at the selected time every day", + "scheduled_shutdown_system_message": "StreamCap scheduled shutdown started; it can be cancelled within 60 seconds", + "scheduled_shutdown_countdown": "The system will shut down in {seconds} seconds.", + "scheduled_shutdown_cancel": "Cancel this shutdown", + "scheduled_shutdown_cancelled": "This shutdown has been cancelled", + "scheduled_shutdown_failed": "Unable to start scheduled shutdown: {error}", + "scheduled_shutdown_cancel_failed": "Unable to cancel this shutdown: {error}", + "quick_shutdown": "Quick Shutdown", + "quick_shutdown_hours_suffix": "hours", + "quick_shutdown_ready": "Enter 1-{max_hours} hours, then start", + "quick_shutdown_invalid_hours": "Enter a number of hours from 1 to {max_hours}", + "quick_shutdown_start": "Start", + "quick_shutdown_start_tip": "Schedule shutdown after a number of hours", + "quick_shutdown_cancel": "Cancel quick shutdown", + "quick_shutdown_confirm_title": "Confirm Quick Shutdown", + "quick_shutdown_confirm_content": "The computer will shut down in {hours} hour(s), at {time}. Start the timer?", + "quick_shutdown_active": "Scheduled shutdown: {time}", + "quick_shutdown_started": "Shutdown scheduled for {time}", + "quick_shutdown_cancelled": "Quick shutdown cancelled", + "quick_shutdown_failed": "Unable to schedule quick shutdown: {error}", + "quick_shutdown_cancel_failed": "Unable to cancel quick shutdown: {error}", + "quick_shutdown_system_message": "StreamCap quick shutdown: {hours}-hour countdown", + "is_proxy_enabled": "Configuration for using proxy and related settings", + "enable_proxy": "Enable Proxy", + "proxy_address": "Proxy Address", + "skip_proxy_detection": "Skip Proxy Detection", + "recording_options": "Recording Options", + "advanced_config": "Advanced recording configuration", + "video_record_format": "Video/Audio Recording Format", + "recording_quality": "Recording Quality", + "loop_time": "Loop Time (Seconds)", + "is_segmented_recording_enabled": "Enable Segmented Recording", + "force_https": "Force HTTPS Recording", + "default_live_source": "Default Live Source", + "default_live_source_tip": "Prefer to record live streams using FLV sources", + "flv_use_direct_download": "FLV Source Use Direct Downloader", + "flv_use_direct_download_tip": "Enable lower latency, but does not support segmented recording", + "space_threshold": "Remaining Space Threshold (GB) for Recording", + "auto_clean_old_recordings_tip": "Automatically delete the oldest recording files when disk space is low, until free space recovers above the threshold", + "auto_clean_old_recordings": "Auto-clean old recordings when disk is low", + "segment_time": "Video Segment Time (Seconds)", + "convert_mp4": "Convert to MP4 After Recording", + "delete_original": "Delete Original File After Appending Format", + "generate_timestamps_subtitle": "Generate Timestamp Subtitle", + "custom_script": "Execute Custom Script After Recording", + "script_command": "Custom Script Execution Command", + "default_platform_with_proxy": "Default Platform for Recording with Proxy", + "web_login_configuration": "Web Backend Login Configuration", + "login_required": "Enable Secure Login", + "login_required_enabled": "Secure login enabled", + "login_required_disabled": "Secure login disabled", + "current_username": "Current Username", + "old_password": "Old Password", + "default_old_password": "default: admin", + "new_password": "New Password", + "confirm_password": "Confirm Password", + "change_password": "Change Password", + "old_password_required": "Old password cannot be empty", + "new_password_required": "New password cannot be empty", + "passwords_not_match": "The two passwords do not match", + "password_changed": "Password changed successfully", + "old_password_incorrect": "Old password is incorrect", + "not_logged_in": "You are not logged in", + "push_notifications": "Push Notifications", + "stream_start_notification_enabled": "Live Status Notification", + "system_status_bar_notification_enabled": "System Bar Notification", + "open_broadcast_push_enabled": "Broadcast Start Push", + "close_broadcast_push_enabled": "Broadcast End Push", + "only_notify_no_record": "Only notify without recording", + "notify_loop_time": "Only notify loop time", + "custom_push_settings": "Custom Push Settings", + "personalized_notification_content_behavior": "Personalized notification content and behavior", + "custom_push_title": "Custom Push Title", + "custom_open_broadcast_content": "Custom Broadcast Start Notification Content", + "custom_close_broadcast_content": "Custom Broadcast End Notification Content", + "push_channels": "Push Channels", + "dingtalk": "DingTalk", + "wechat": "Wechat", + "feishu": "Feishu", + "email": "Email", + "telegram": "Telegram", + "select_and_enable_channels": "Select and enable the channels you want to use", + "channel_configuration": "Channel Configuration", + "configure_enabled_channels": "Configure your enabled notification channels", + "dingtalk_webhook_url": "DingTalk Webhook URL", + "dingtalk_at_objects": "DingTalk @ Objects", + "dingtalk_at_all": "DingTalk Notify All", + "dingtalk_webhook_hint": "Enter DingTalk group webhook URL", + "dingtalk_phone_numbers_hint": "Enter DingTalk phone numbers", + "wechat_webhook_url": "WeChat Webhook URL", + "feishu_webhook_url": "Feishu Webhook URL", + "bark_webhook_url": "Bark Webhook URL", + "bark_interrupt_level": "Bark Interrupt Level", + "bark_sound": "Bark Sound", + "ntfy_server_url": "Ntfy Server URL", + "ntfy_tags": "Ntfy Tag", + "ntfy_email": "Ntfy Email", + "ntfy_action_url": "Ntfy Action URL", + "telegram_api_token": "Telegram API Token", + "serverchan_send_key": "SCKEY/SendKey", + "serverchan_channel": "Push Channel", + "serverchan_tags": "ServerChan Tags", + "serverchan": "ServerChan", + "telegram_chat_id": "Telegram Chat ID", + "smtp_server": "Smtp Server", + "email_username": "Email Username", + "email_password": "Email Password", + "sender_email": "Sender Email", + "sender_name": "Sender Name", + "recipient_email": "Recipient Email", + "configure_platform_cookies": "Configure platform cookies", + "douyin_cookie": "Douyin Cookie", + "tiktok_cookie": "Tiktok Cookie", + "kuaishou_cookie": "Kuaishou Cookie", + "huya_cookie": "Huya Cookie", + "douyu_cookie": "Douyu Cookie", + "yy_cookie": "YY Cookie", + "bilibili_cookie": "Bilibili Cookie", + "xhs_cookie": "Xiaohongshu Cookie", + "bigo_cookie": "Bigo Cookie", + "blued_cookie": "Blued Cookie", + "soop_cookie": "Soop Cookie", + "netease_cookie": "NeteaseCC Cookie", + "qiandurebo_cookie": "Qiandu Cookie", + "pandalive_cookie": "Pandalive Cookie", + "maoerfm_cookie": "MaoerFM Cookie", + "winktv_cookie": "Winktv Cookie", + "flextv_cookie": "Flextv Cookie", + "look_cookie": "LookLive Cookie", + "popkontv_cookie": "Popkontv Cookie", + "twitcasting_cookie": "Twitcasting Cookie", + "baidu_cookie": "Baidu Cookie", + "weibo_cookie": "Weibo Cookie", + "kugou_cookie": "Kugou Cookie", + "twitch_cookie": "Twitch Cookie", + "liveme_cookie": "Liveme Cookie", + "huajiao_cookie": "Huajiao Cookie", + "liuxing_cookie": "Liuxing Cookie", + "showroom_cookie": "Showroom Cookie", + "acfun_cookie": "Acfun Cookie", + "changliao_cookie": "Changliao Cookie", + "yinbo_cookie": "Yinbo Cookie", + "inke_cookie": "Inke Cookie", + "zhihu_cookie": "Zhihu Cookie", + "chzzk_cookie": "Chzzk Cookie", + "haixiu_cookie": "Haixiu Cookie", + "vvxq_cookie": "Vvxq Cookie", + "17live_cookie": "17Live Cookie", + "lang_cookie": "Lang Cookie", + "piaopiao_cookie": "Piaopiao Cookie", + "6room_cookie": "SixroomCookie", + "lehai_cookie": "Lehai Cookie", + "catshow_cookie": "Catshow Cookie", + "shopee_cookie": "Shopee Cookie", + "youtube_cookie": "Youtube Cookie", + "taobao_cookie": "Taobao Cookie", + "jd_cookie": "Jingdong Cookie", + "configure_platform_accounts": "Configure Platform Accounts", + "sooplive_username": "Soop Username", + "sooplive_password": "Soop Password", + "flextv_username": "FlexTV Username", + "flextv_password": "FlexTV Password", + "popkontv_username": "PopkonTV Username", + "popkontv_password": "PopkonTV Password", + "twitcasting_account_type": "Twitcasting Account Type", + "twitcasting_username": "Twitcasting Username", + "twitcasting_password": "Twitcasting Password", + "success_restore_tip": "Tip: Default configuration has been restored", + "query_restore_config_tip": "Are you sure you want to restore the default configuration?", + "success_save_config_tip": "Tip: Configuration has been saved", + "Chinese": "Simplified Chinese", + "English": "English", + "select_btn_tip": "Select the save path", + "switch_language": "Switch language", + "switch_video_format": "Switch video recording format", + "switch_recording_quality": "Switch video recording quality", + "switch_account_type": "Switch account type", + "switch_language_tip": "Tip: It is recommended to restart the program after switching languages", + "platform_max_concurrent_requests": "Max concurrent recordings per platform", + "platform_max_concurrent_requests_tip": "The maximum number of concurrent requests allowed per platform. Default is 3.", + "check_live_on_browser_refresh": "Check live status when refreshing the web", + "check_live_on_browser_refresh_tip": "Check live status when refreshing the web" + }, + "about_page": { + "about_project": "About This Application", + "ui_version": "UI Version", + "kernel_version": "Kernel Version", + "license": "Open Source License", + "introduction": "Software Introduction", + "feature": "Feature Highlights", + "support_platforms": "Supported Platforms", + "customize_recording": "Custom Params", + "open_source": "Open Source", + "automatic_transcoding": "Auto Transcode", + "status_push": "Live Status", + "developer": "Developer", + "author": "Author", + "view_update": "View Updates", + "view_docs": "View Documentation", + "update": "Version Update" + }, "base": { - "confirm": "Confirm", - "sure": "OK", - "cancel": "Cancel", - "yes": "Yes", - "no": "No", - "open": "Open", - "close": "Close", - "enabled": "Enabled", - "disabled": "Disabled" - }, - "video_quality": { - "OD": "Original", - "UHD": "Ultra HD", - "HD": "High Definition", - "SD": "Standard Definition", - "LD": "Low Definition" - }, - "help_dialog": { - "shortcut_key_help": "Shortcut Key Help", - "description": "Here are the supported shortcut keys:", - "main_page": "Main Page", - "search_recording": "Search Recording: Ctrl + F - Open the search dialog to find specific live streams.", - "refresh_list": "Refresh List: Ctrl + R - Refresh the current list of live streams.", - "add_new_recording": "Add Recording: Alt + N - Open the new live stream creation panel.", - "start_all": "Batch Start: Alt + B - Start monitoring all or selected live streams in the list.", - "stop_all": "Batch Stop: Alt + P - Stop monitoring all or selected live streams in the list.", - "delete_all": "Batch Delete: Alt + D - Delete all or selected live streams from the list.", - "settings_page": "Settings Page", - "save_configuration": "Save Configuration: Ctrl + S - Save the current configuration settings.", - "view_help": "View Help: Alt + H - Open this help dialog." - }, - "install_manager": { - "complete": "Completed", - "error": "Error", - "installing": "Installing", - "reinstall": "Reinstall", - "installed": "Installed", - "wait_install": "Waiting for installation", - "install_now": "Install Now", - "later_on": "Later", - "install_guide": "Component Installation Guide", - "install_tip": "This program requires the following components to function properly.", - "lack_components": "Missing Required Components", - "dont_show_again": "Don't Show Again" - }, - "storage_page": { - "storage_path": "Storage Path", - "current_path": "Current Path", - "empty_recording_folder": "Empty Recording Folder", - "go_back": "Go Back", - "previewing": "Previewing", - "unsupported_file_type":"Unsupported file type ⚠️", - "no_video_file":"No video file found ⚠️", - "no_recording_folder":"No recording folder found ⚠️", - "copy_stream_url": "Copy Stream URL", - "copy_video_url": "Copy Video URL", - "copy_success": "Copy Success", - "video_api_server_not_set": "Video play server address not set ⚠️" - }, - "video_player": { - "open_live_room_page": "Open Live Room Page", - "stream_source": "Stream Source", - "previewing": "Previewing", - "view_stream_source_now": "Accessing live stream source", - "unsupported_play_on_web": "Only MP4 files can be previewed on the web ⚠️ ", - "screenshot": "Screenshot", - "screenshot_success": "Screenshot saved", - "screenshot_failed": "Screenshot failed ⚠️" - }, - "update": { - "new_version": "New Version {version} Available", - "current_version": "Current Version: {version}", - "latest_version": "Latest Version: {version}", - "update_source": "Update Source: {source}", - "release_notes": "Release Notes:", - "no_details": "No details available", - "later": "Later", - "download": "Download Update", - "check_update": "Check for Updates", - "checking_update": "Checking for updates...", - "update_check_failed": "Update check failed", - "no_update_available": "You are using the latest version", - "unknown": "Unknown" - }, - "save_progress_overlay": { - "force_close": "Force Close", - "force_close_tooltip": "Force close the program (may result in video corruption)", - "force_close_warning": "This action may result in video corruption. Please proceed with caution.", - "force_closing": "Force closing...", - "saving_recording": "Saving recording..." - }, - "app_close_handler": { - "saving_recordings": "Saving {active_recordings_count} recordings, please wait...", - "confirm_exit": "Confirm Exit", - "confirm_exit_content": "Are you sure you want to exit the application?", - "minimize_to_tray": "Minimize to Tray", - "exit_program": "Exit Program", - "minimize_to_tray_tip": "Clicking \"Minimize to Tray\" will hide the program to system tray where it continues running" - }, - "tray_manager": { - "restore": "Restore Window", - "exit": "Exit Program" - }, - "login_page": { - "login_title": "StreamCap Login", - "login_subtitle": "Please login to your account", - "username": "Username", - "password": "Password", - "login_button": "Login", - "login_in_progress": "Logging in...", - "default_account_tip": "Default account: admin / Password: admin", - "input_required": "Please enter username and password", - "login_failed": "Username or password is incorrect", - "login_success": "Login successful" - } + "confirm": "Confirm", + "sure": "OK", + "cancel": "Cancel", + "yes": "Yes", + "no": "No", + "open": "Open", + "close": "Close", + "enabled": "Enabled", + "disabled": "Disabled" + }, + "video_quality": { + "OD": "Original", + "UHD": "Ultra HD", + "HD": "High Definition", + "SD": "Standard Definition", + "LD": "Low Definition" + }, + "help_dialog": { + "shortcut_key_help": "Shortcut Key Help", + "description": "Here are the supported shortcut keys:", + "main_page": "Main Page", + "search_recording": "Search Recording: Ctrl + F - Open the search dialog to find specific live streams.", + "refresh_list": "Refresh List: Ctrl + R - Refresh the current list of live streams.", + "add_new_recording": "Add Recording: Alt + N - Open the new live stream creation panel.", + "start_all": "Batch Start: Alt + B - Start monitoring all or selected live streams in the list.", + "stop_all": "Batch Stop: Alt + P - Stop monitoring all or selected live streams in the list.", + "delete_all": "Batch Delete: Alt + D - Delete all or selected live streams from the list.", + "settings_page": "Settings Page", + "save_configuration": "Save Configuration: Ctrl + S - Save the current configuration settings.", + "view_help": "View Help: Alt + H - Open this help dialog." + }, + "install_manager": { + "complete": "Completed", + "error": "Error", + "installing": "Installing", + "reinstall": "Reinstall", + "installed": "Installed", + "wait_install": "Waiting for installation", + "install_now": "Install Now", + "later_on": "Later", + "install_guide": "Component Installation Guide", + "install_tip": "This program requires the following components to function properly.", + "lack_components": "Missing Required Components", + "dont_show_again": "Don't Show Again" + }, + "storage_page": { + "storage_path": "Storage Path", + "current_path": "Current Path", + "empty_recording_folder": "Empty Recording Folder", + "go_back": "Go Back", + "previewing": "Previewing", + "unsupported_file_type": "Unsupported file type ⚠️", + "no_video_file": "No video file found ⚠️", + "no_recording_folder": "No recording folder found ⚠️", + "copy_stream_url": "Copy Stream URL", + "copy_video_url": "Copy Video URL", + "copy_success": "Copy Success", + "video_api_server_not_set": "Video play server address not set ⚠️" + }, + "video_player": { + "open_live_room_page": "Open Live Room Page", + "stream_source": "Stream Source", + "previewing": "Previewing", + "view_stream_source_now": "Accessing live stream source", + "unsupported_play_on_web": "Only MP4 files can be previewed on the web ⚠️ ", + "screenshot": "Screenshot", + "screenshot_success": "Screenshot saved", + "screenshot_failed": "Screenshot failed ⚠️" + }, + "update": { + "new_version": "New Version {version} Available", + "current_version": "Current Version: {version}", + "latest_version": "Latest Version: {version}", + "update_source": "Update Source: {source}", + "release_notes": "Release Notes:", + "no_details": "No details available", + "later": "Later", + "download": "Download Update", + "check_update": "Check for Updates", + "checking_update": "Checking for updates...", + "update_check_failed": "Update check failed", + "no_update_available": "You are using the latest version", + "unknown": "Unknown" + }, + "save_progress_overlay": { + "force_close": "Force Close", + "force_close_tooltip": "Force close the program (may result in video corruption)", + "force_close_warning": "This action may result in video corruption. Please proceed with caution.", + "force_closing": "Force closing...", + "saving_recording": "Saving recording..." + }, + "app_close_handler": { + "saving_recordings": "Saving {active_recordings_count} recordings, please wait...", + "confirm_exit": "Confirm Exit", + "confirm_exit_content": "Are you sure you want to exit the application?", + "minimize_to_tray": "Minimize to Tray", + "exit_program": "Exit Program", + "minimize_to_tray_tip": "Clicking \"Minimize to Tray\" will hide the program to system tray where it continues running" + }, + "tray_manager": { + "restore": "Restore Window", + "exit": "Exit Program" + }, + "login_page": { + "login_title": "StreamCap Login", + "login_subtitle": "Please login to your account", + "username": "Username", + "password": "Password", + "login_button": "Login", + "login_in_progress": "Logging in...", + "default_account_tip": "Default account: admin / Password: admin", + "input_required": "Please enter username and password", + "login_failed": "Username or password is incorrect", + "login_success": "Login successful" + } } \ No newline at end of file diff --git a/locales/zh_CN.json b/locales/zh_CN.json index 7e7eefe2..85f50bbe 100644 --- a/locales/zh_CN.json +++ b/locales/zh_CN.json @@ -1,540 +1,542 @@ { - "sidebar": { - "home": "主页", - "recordings": "录制", - "settings": "设置", - "storage": "存储", - "about": "说明", - "light_theme": "白天模式", - "dark_theme": "黑夜模式", - "theme_color": "主题颜色", - "toggle_day_theme": "切换为白天模式", - "toggle_night_theme": "切换为黑夜模式", - "colors": "颜色列表" - }, - "home_page": { - "welcome": "欢迎使用 StreamCap", - "tagline": "记录直播的每一个精彩瞬间", - "start_recording": "开始录制", - "recording_list": "录制列表", - "browse_recordings": "浏览录制", - "manage_storage": "管理存储", - "settings": "设置", - "about": "关于", - "main_features": "主要功能", - "feature_title_1": "开播即录", - "feature_desc_1": "输入直播间地址,开播即录", - "feature_title_2": "消息推送", - "feature_desc_2": "支持Server酱等多种渠道推送", - "feature_title_3": "批量操作", - "feature_desc_3": "批量启动、停止和删除录制", - "feature_title_4": "定时监控", - "feature_desc_4": "默认24h循环监控,支持自定义", - "version": "版本", - "announcement": "公告", - "stats": "统计信息", - "total_rooms": "总房间数", - "active_recordings": "正在录制", - "stop_monitoring": "停止监控", - "recent_added_recordings": "最近添加", - "no_recordings": "暂无录制记录", - "greeting_morning": "早上好", - "greeting_afternoon": "下午好", - "greeting_evening": "晚上好" - }, - "recordings_page": { - "recording_list": "录制列表", - "search": "搜索", - "add_record": "新增录制", - "refresh": "刷新", - "batch_start": "批量开始", - "batch_stop": "批量停止", - "batch_delete": "批量删除", - "refresh_success_tip": "提示:刷新成功", - "batch_delete_confirm_tip": "您确定要删除所有全部已选中的录制列表吗?", - "clear_all_confirm_tip": "您确定要清空录制列表吗?", - "edit_record": "编辑录制", - "add_recording_success_tip": "提示:直播间添加成功!", - "delete_recording_success_tip": "提示:直播间删除成功!", - "stop_recording_success_tip": "提示:直播间停止监控成功!", - "start_recording_success_tip": "提示:直播间开始监控成功!", - "not_search_result": "提示:未搜索到任何结果", - "toggle_view": "切换视图", - "preview_video": "预览视频", - "status_filter": "状态筛选", - "filter_all": "全部", - "filter_recording": "录制中", - "filter_living": "直播中", - "filter_error": "录制错误", - "filter_offline": "未开播", - "filter_stopped": "未监控", - "platform_filter": "平台筛选", - "platform_sort": "平台排序", - "operations": "操作", - "filter": "筛选" - }, - "recording_dialog": { - "input_live_link": "输入直播间地址", - "example": "例如", - "select_resolution": "选择录制清晰度", - "custom_video_bitrate": "自定义视频码率(kbps)", - "custom_video_bitrate_hint": "留空则保持原始码率(推荐默认不填)", - "custom_video_bitrate_invalid": "请输入大于 0 的整数码率", - "flv_use_direct_download": "FLV源直接使用下载器缓存", - "flv_use_direct_download_tip": "开启后延迟更低,但不支持分段录制", - "input_anchor_name": "输入主播名称", - "default_input": "可默认不填", - "select_record_format": "选择录制格式-默认TS", - "input_save_path": "输入录制保存路径", - "is_segment_enabled": "分段录制是否开启", - "segment_record_time": "录制分段时间", - "input_segment_time": "请输入分段时间(单位秒)", - "scheduled_recording": "每日定时监听是否开启", - "scheduled_start_time": "每日监听开始时间", - "monitor_hours": "每日监听小时数", - "enable_message_push": "是否开启消息推送", - "only_notify_no_record": "仅通知不录制", - "batch_input_tip": "批量录入(每行一条记录)", - "single_input": "单个录入", - "batch_input": "批量录入", - "live_room": "直播间", - "platform_not_supported_tip": "暂不支持该平台录制 ⚠️", - "pick_time": "选择时间", - "pick_time_tip": "配置定时时间", - "time_out_of_range": "选择时间超出范围", - "pick_time_slot": "选择您的时间段", - "hour_label_text": "时", - "minute_label_text": "分", - "select_media_type": "选择媒体类型", - "video": "视频", - "audio": "音频", - "duplicate_url_title": "重复的直播间地址", - "duplicate_url_content": "该直播间已存在,是否继续添加?" - }, - "search_dialog": { - "search_keyword": "输入搜索关键词" - }, - "recording_manager": { - "monitor_stopped": "停止监控中", - "is_live": "直播中", - "live_room": "直播间", - "recorded": "已录制", - "push_content": "直播间状态更新:[room_name] 正在直播中,时间:[time]", - "push_content_end": "直播间状态更新:[room_name] 直播已结束,时间:[time]", - "status_notify": "直播间状态更新通知", - "STOPPED_MONITORING": "直播间已停止监控", - "MONITORING": "当前该直播间未开播, 持续监控中", - "RECORDING": "直播间正在录制中", - "NOT_RECORDING": "直播间正在直播, 未在录制中", - "STATUS_CHECKING": "直播状态正在检测中", - "NOT_IN_SCHEDULED_CHECK": "当前未在定时检测范围内, 停止直播检测中", - "PREPARING_RECORDING": "主播正在直播中, 准备开始录制", - "RECORDING_ERROR": "直播录制失败, 等待重试", - "NOT_RECORDING_SPACE": "磁盘空间不足, 无法录制", - "LIVE_STATUS_CHECK_ERROR": "直播状态检测错误, 请检查地址是否可正常访问", - "LIVE_BROADCASTING": "正在直播中", - "not_disk_space_tip": "磁盘存储空间不足, 停止录制 ⚠️", - "notify": "通知", - "live_recording_stopped_message": "直播录制已结束!", - "live_recording_started_message": "直播正在进行中", - "not_config_tip": "未配置消息推送渠道" - }, - "stream_manager": { - "record_stream_error": "直播源录制出错", - "no_ffmpeg_tip": "未安装FFmpeg,请先安装FFmpeg ⚠️" - }, - "recording_card": { - "stop_monitor_tip": "提示:已停止直播监控👁️", - "start_monitor_tip": "提示:已开启直播监控👁️", - "please_stop_monitor_tip": "提示:请先停止直播监控👁️‍🗨️", - "please_start_monitor_tip": "提示:请先开启直播监控👁️‍🗨️", - "is_not_live_tip": "提示:该直播间未开播", - "pre_record_tip": "提示:准备开始录制", - "stop_record_tip": "提示:已停止直播间录制️", - "no_folder_tip": "提示:该直播间文件夹不存在", - "edit_record_config": "编辑录制配置", - "delete_monitor": "删除监控", - "open_folder": "打开文件夹", - "recording_info": "录制信息", - "anchor_name": "主播名称", - "platform_name": "平台名称", - "live_link": "直播链接", - "live_title": "直播标题", - "record_format": "录制格式", - "record_quality": "录制画质", - "segment_record": "分段录制", - "segment_time": "分段时长", - "monitor_status": "监控状态", - "scheduled_recording": "定时检测", - "scheduled_time_range": "定时检测范围", - "save_path": "保存路径", - "recording_status": "录制状态", - "start_record": "开始录制", - "stop_record": "停止录制", - "start_monitor": "开始监控", - "stop_monitor": "停止监控", - "seconds": "秒", - "delete_confirm_tip": "确定要删除该直播间吗?", - "no_recording_dir_tip": "该直播间暂无保存的录制文件", - "none": "无", - "recording_card_tip": "点击选中", - "use_proxy": "使用代理", - "no_support_open_dir": "Web端不支持打开文件夹 ⚠️", - "message_push": "消息推送", - "all": "全部", - "recording": "录制中", - "recording_error": "录制错误", - "live_broadcasting": "正在直播中", - "not_live": "未开播", - "stopped": "已停止", - "filter": "筛选", - "offline": "未开播", - "no_monitor": "未监控", - "checking": "检测中", - "live_room": "直播间" - }, - "settings_page": { - "recording_settings": "录制设置", - "push_settings": "推送设置", - "basic_settings": "基础设置", - "cookies_settings": "Cookie设置", - "accounts_settings": "账号设置", - "security_settings": "安全设置", - "select": "选择", - "unsupported_select_path": "Web端不支持选择路径📂请手动输入", - "select_path_failed": "路径选择器无法打开,请手动输入保存路径", - "program_config": "程序的基本设置", - "restore_defaults": "恢复默认设置", - "program_language": "程序语言", - "filename_includes_title": "文件名包含标题", - "custom_filename_template": "自定义文件名模板", - "live_recording_path": "直播录制保存路径", - "blank_for_default_path": "不填则默认", - "remove_emojis": "去除emoji符号", - "name_rules": "文件(夹)命名规则", - "platform": "平台", - "author": "作者", - "time": "时间", - "title": "标题", - "remember_window_size": "退出时记住窗口大小", - "scheduled_shutdown": "定时关机设置", - "scheduled_shutdown_time": "每日关机时间", - "scheduled_shutdown_pick_time": "选择每日关机时间", - "scheduled_shutdown_more": "打开关机设置", - "scheduled_shutdown_tip": "启用后,程序将在每天指定时间启动关机倒计时", - "scheduled_shutdown_system_message": "StreamCap 定时关机任务已触发,可在 60 秒内取消", - "scheduled_shutdown_countdown": "系统将在 {seconds} 秒后关机。", - "scheduled_shutdown_cancel": "取消本次关机", - "scheduled_shutdown_cancelled": "已取消本次关机", - "scheduled_shutdown_failed": "无法启动定时关机:{error}", - "scheduled_shutdown_cancel_failed": "无法取消本次关机:{error}", - "quick_shutdown": "快捷关机", - "quick_shutdown_hours_suffix": "小时后", - "quick_shutdown_ready": "输入 1–{max_hours} 小时后开始", - "quick_shutdown_invalid_hours": "请输入 1 到 {max_hours} 之间的小时数", - "quick_shutdown_start": "开始", - "quick_shutdown_start_tip": "设置小时倒计时关机", - "quick_shutdown_cancel": "取消快捷关机", - "quick_shutdown_confirm_title": "确认快捷关机", - "quick_shutdown_confirm_content": "电脑将在 {hours} 小时后({time})关机,是否开始?", - "quick_shutdown_active": "计划关机时间:{time}", - "quick_shutdown_started": "已设置在 {time} 关机", - "quick_shutdown_cancelled": "已取消快捷关机", - "quick_shutdown_failed": "无法设置快捷关机:{error}", - "quick_shutdown_cancel_failed": "无法取消快捷关机:{error}", - "quick_shutdown_system_message": "StreamCap 快捷关机:{hours} 小时倒计时", - "proxy_settings": "代理设置", - "is_proxy_enabled": "设置是否使用代理及相关配置", - "enable_proxy": "开启代理", - "proxy_address": "代理地址", - "skip_proxy_detection": "跳过代理检测", - "recording_options": "录制选项", - "advanced_config": "配置录制高级选项", - "video_record_format": "视频/音频录制格式", - "recording_quality": "录制清晰度", - "loop_time": "循环时间(秒)", - "is_segmented_recording_enabled": "分段录制是否开启", - "force_https": "强制启用https录制", - "default_live_source": "默认选择直播源", - "default_live_source_tip": "优先选择FLV源进行录制直播", - "flv_use_direct_download": "FLV源使用下载器缓存", - "flv_use_direct_download_tip": "开启后延迟更低,但不支持分段录制", - "space_threshold": "录制空间剩余阈值(gb)", - "segment_time": "视频分段时间(秒)", - "convert_mp4": "录制完成后转为mp4格式", - "delete_original": "追加格式后删除原文件", - "generate_timestamps_subtitle": "生成时间字幕文件", - "custom_script": "录制完成后执行自定义脚本", - "script_command": "自定义脚本执行命令", - "default_platform_with_proxy": "默认使用代理录制的平台", - "web_login_configuration": "Web后台登录配置", - "login_required": "启用安全登录", - "login_required_enabled": "已启用安全登录", - "login_required_disabled": "已禁用安全登录", - "current_username": "当前用户名", - "old_password": "旧密码", - "default_old_password": "默认: admin", - "new_password": "新密码", - "confirm_password": "确认密码", - "change_password": "修改密码", - "old_password_required": "旧密码不能为空", - "new_password_required": "新密码不能为空", - "passwords_not_match": "两次输入的密码不一致", - "password_changed": "密码修改成功", - "old_password_incorrect": "旧密码不正确", - "not_logged_in": "您尚未登录", - "push_notifications": "推送通知", - "stream_start_notification_enabled": "直播状态推送开关", - "system_status_bar_notification_enabled": "系统栏通知开启", - "open_broadcast_push_enabled": "开播推送开启", - "close_broadcast_push_enabled": "关播推送开启", - "only_notify_no_record": "仅通知不录制", - "notify_loop_time": "只推送循环时间", - "custom_push_settings": "自定义推送设置", - "personalized_notification_content_behavior": "个性化通知内容及行为", - "custom_push_title": "自定义推送标题", - "custom_open_broadcast_content": "自定义开播推送内容", - "custom_close_broadcast_content": "自定义关播推送内容", - "push_channels": "推送渠道", - "dingtalk": "钉钉", - "wechat": "微信", - "feishu": "飞书", - "email": "邮箱", - "telegram": "电报", - "select_and_enable_channels": "选择并启用您希望使用的推送渠道", - "channel_configuration": "渠道配置", - "configure_enabled_channels": "配置您已启用的通知渠道", - "dingtalk_webhook_url": "钉钉推送接口地址", - "dingtalk_at_objects": "钉钉通知@对象", - "dingtalk_at_all": "钉钉通知@全体", - "dingtalk_webhook_hint": "填写钉钉群Webhook连接", - "dingtalk_phone_numbers_hint": "填写钉钉手机号", - "wechat_webhook_url": "微信推送接口地址", - "feishu_webhook_url": "飞书推送接口地址", - "bark_webhook_url": "Bark推送接口地址", - "bark_interrupt_level": "Bark推送中断级别", - "bark_sound": "Bark推送铃声", - "ntfy_server_url": "Ntfy推送地址", - "ntfy_tags": "Ntfy推送标签", - "ntfy_email": "Ntfy推送邮箱", - "ntfy_action_url": "Ntfy动作地址", - "serverchan_send_key": "SCKEY/SendKey", - "serverchan_channel": "推送通道", - "serverchan_tags": "Server酱标签", - "serverchan": "Server酱", - "telegram_api_token": "Telegram API令牌", - "telegram_chat_id": "Telegram 聊天ID", - "smtp_server": "Smtp服务器", - "email_username": "邮箱登录账号", - "email_password": "发件人密码(授权码)", - "sender_email": "发件人邮箱", - "sender_name": "发件人显示昵称", - "recipient_email": "收件人邮箱", - "configure_platform_cookies": "配置各平台Cookie参数", - "douyin_cookie": "抖音Cookie", - "tiktok_cookie": "TikTok Cookie", - "kuaishou_cookie": "快手Cookie", - "huya_cookie": "虎牙Cookie", - "douyu_cookie": "斗鱼Cookie", - "yy_cookie": "YY Cookie", - "bilibili_cookie": "哔哩哔哩Cookie", - "xhs_cookie": "小红书Cookie", - "bigo_cookie": "Bigo Cookie", - "blued_cookie": "Blued Cookie", - "soop_cookie": "Soop Cookie", - "netease_cookie": "网易CC Cookie", - "qiandurebo_cookie": "千度热播Cookie", - "pandalive_cookie": "Pandalive Cookie", - "maoerfm_cookie": "猫耳FM Cookie", - "winktv_cookie": "Winktv Cookie", - "flextv_cookie": "Flextv Cookie", - "look_cookie": "LookLive Cookie", - "popkontv_cookie": "Popkontv Cookie", - "twitcasting_cookie": "Twitcasting Cookie", - "baidu_cookie": "百度Cookie", - "weibo_cookie": "微博Cookie", - "kugou_cookie": "酷狗Cookie", - "twitch_cookie": "Twitch Cookie", - "liveme_cookie": "Liveme Cookie", - "huajiao_cookie": "花椒Cookie", - "liuxing_cookie": "流星Cookie", - "showroom_cookie": "Showroom Cookie", - "acfun_cookie": "Acfun Cookie", - "changliao_cookie": "畅聊Cookie", - "yinbo_cookie": "音播Cookie", - "inke_cookie": "映客Cookie", - "zhihu_cookie": "知乎Cookie", - "chzzk_cookie": "Chzzk Cookie", - "haixiu_cookie": "嗨秀Cookie", - "vvxq_cookie": "VV星球Cookie", - "17live_cookie": "17Live Cookie", - "lang_cookie": "浪Cookie", - "piaopiao_cookie": "飘飘Cookie", - "6room_cookie": "六间房Cookie", - "lehai_cookie": "乐嗨 Cookie", - "catshow_cookie": "Catshow Cookie", - "shopee_cookie": "Shopee Cookie", - "youtube_cookie": "Youtube Cookie", - "taobao_cookie": "淘宝Cookie", - "jd_cookie": "京东Cookie", - "configure_platform_accounts": "配置各平台账号密码", - "sooplive_username": "Soop账号", - "sooplive_password": "Soop密码", - "flextv_username": "FlexTV账号", - "flextv_password": "FlexTV密码", - "popkontv_username": "PopkonTV账号", - "popkontv_password": "PopkonTV密码", - "twitcasting_account_type": "Twitcasting账号类型", - "twitcasting_username": "Twitcasting账号", - "twitcasting_password": "Twitcasting密码", - "success_restore_tip": "提示:已恢复默认配置", - "query_restore_config_tip": "您确定要恢复默认配置吗?", - "success_save_config_tip": "提示:当前配置已保存", - "Chinese": "简体中文", - "English": "English", - "select_btn_tip": "手动选择保存路径", - "switch_language": "切换语言", - "switch_video_format": "切换视频录制格式", - "switch_recording_quality": "切换视频录制质量", - "switch_account_type": "切换账号类型", - "switch_language_tip": "提示: 建议切换语言后重启程序", - "platform_max_concurrent_requests": "平台最大并发录制数", - "platform_max_concurrent_requests_tip": "每个平台允许同时发起请求的最大并发数,默认3", - "check_live_on_browser_refresh": "刷新网页时检查直播状态", - "check_live_on_browser_refresh_tip": "针对web端运行,开启后每次刷新网页都会重复检测直播间状态" - }, - "about_page": { - "about_project": "关于本程序", - "ui_version": "UI版本", - "kernel_version": "内核版本", - "license": "开源许可证", - "introduction": "软件简介", - "feature": "功能亮点", - "support_platforms": "支持主流平台", - "customize_recording": "自定义录制参数", - "open_source": "开源 & 高效", - "automatic_transcoding": "自动转码", - "status_push": "直播状态推送", - "developer": "开发者", - "author": "作者", - "view_update": "查看更新", - "view_docs": "查看文档", - "update": "版本更新" - }, - "base": { - "confirm": "确认", - "sure": "确定", - "cancel": "取消", - "yes": "是", - "no": "否", - "open": "打开", - "close": "关闭", - "enabled": "已开启", - "disabled": "未开启" - }, - "video_quality": { - "OD": "原画", - "UHD": "超清", - "HD": "高清", - "SD": "标清", - "LD": "流畅" - }, - "help_dialog": { - "shortcut_key_help": "快捷键帮助", - "description": "以下是程序支持的快捷键说明:", - "main_page": "主界面", - "search_recording": "搜索录制: Ctrl + F - 打开搜索框以查找特定的录制直播间", - "refresh_list": "刷新列表: Ctrl + R - 刷新当前直播间列表", - "add_new_recording": "新增录制: Alt + N - 打开新建录制直播间面板", - "start_all": "批量开始: Alt + B - 开始监控列表所有或已选定的直播间", - "stop_all": "批量停止: Alt + P - 停止监控列表所有或已选定的直播间", - "delete_all": "批量删除: Alt + D - 删除列表所有或已选定的直播间", - "settings_page": "设置界面", - "save_configuration": "保存配置: Ctrl + S - 保存当前配置设置", - "view_help": "查看帮助: Alt + H - 打开此帮助对话框" - }, - "install_manager": { - "complete": "完成", - "error": "错误", - "installing": "正在安装", - "reinstall": "重新安装", - "installed": "已安装", - "wait_install": "等待安装", - "install_now": "立即安装", - "later_on": "稍后再说", - "install_guide": "组件安装向导", - "install_tip": "本程序需要以下组件来完成特定功能,请保持网络连接并耐心等待安装完成。", - "lack_components": "缺少必要组件", - "dont_show_again": "下次不再提示" - }, - "storage_page": { - "storage_path": "存储路径", - "current_path": "当前路径", - "empty_recording_folder": "录制文件夹为空,暂无录制的直播视频", - "go_back": "返回上一级", - "previewing": "正在预览", - "unsupported_file_type":"未找到视频文件 ⚠️", - "no_video_file":"未找到视频文件 ⚠️", - "no_recording_folder":"录制目录不存在 ⚠️", - "copy_stream_url": "复制直播源地址", - "copy_video_url": "复制视频地址", - "copy_success": "复制成功", - "video_api_server_not_set": "未设置视频播放服务器地址 ⚠️" - }, - "video_player": { - "open_live_room_page": "打开直播间页面", - "stream_source": "直播源", - "previewing":"正在预览", - "view_stream_source_now": "正在访问直播源", - "unsupported_play_on_web": "Web端只支持预览MP4文件 ⚠️", - "screenshot": "截图", - "screenshot_success": "截图已保存", - "screenshot_failed": "截图失败 ⚠️" - }, - "update": { - "new_version": "发现新版本 {version}", - "current_version": "当前版本: {version}", - "latest_version": "最新版本: {version}", - "update_source": "更新源: {source}", - "release_notes": "更新内容:", - "no_details": "无详细说明", - "later": "稍后再说", - "download": "下载更新", - "check_update": "检查更新", - "checking_update": "正在检查更新...", - "update_check_failed": "检查更新失败", - "no_update_available": "当前已是最新版本", - "unknown": "未知" - }, - "save_progress_overlay": { - "force_close": "强制关闭", - "force_close_tooltip": "立即关闭程序(可能导致视频损坏)", - "force_close_warning": "请谨慎操作,强制关闭程序可能导致视频文件损坏。", - "force_closing": "正在强制关闭...", - "saving_recording": "正在保存录制文件..." - }, - "app_close_handler": { - "saving_recordings": "正在保存 {active_recordings_count} 个录制内容,请稍候...", - "confirm_exit": "确认退出", - "confirm_exit_content": "您确定要退出程序吗?", - "minimize_to_tray": "最小化至托盘", - "exit_program": "退出程序", - "minimize_to_tray_tip": "点击\"最小化至托盘\"后,程序将隐藏到系统托盘继续运行" - }, - "tray_manager": { - "restore": "恢复窗口", - "exit": "退出程序" - }, - "login_page": { - "login_title": "StreamCap 登录", - "login_subtitle": "请登录您的账号", - "username": "用户名", - "password": "密码", - "login_button": "登录", - "login_in_progress": "登录中...", - "default_account_tip": "默认账号: admin / 密码: admin", - "input_required": "请输入用户名和密码", - "login_failed": "用户名或密码错误", - "login_success": "登录成功" - } + "sidebar": { + "home": "主页", + "recordings": "录制", + "settings": "设置", + "storage": "存储", + "about": "说明", + "light_theme": "白天模式", + "dark_theme": "黑夜模式", + "theme_color": "主题颜色", + "toggle_day_theme": "切换为白天模式", + "toggle_night_theme": "切换为黑夜模式", + "colors": "颜色列表" + }, + "home_page": { + "welcome": "欢迎使用 StreamCap", + "tagline": "记录直播的每一个精彩瞬间", + "start_recording": "开始录制", + "recording_list": "录制列表", + "browse_recordings": "浏览录制", + "manage_storage": "管理存储", + "settings": "设置", + "about": "关于", + "main_features": "主要功能", + "feature_title_1": "开播即录", + "feature_desc_1": "输入直播间地址,开播即录", + "feature_title_2": "消息推送", + "feature_desc_2": "支持Server酱等多种渠道推送", + "feature_title_3": "批量操作", + "feature_desc_3": "批量启动、停止和删除录制", + "feature_title_4": "定时监控", + "feature_desc_4": "默认24h循环监控,支持自定义", + "version": "版本", + "announcement": "公告", + "stats": "统计信息", + "total_rooms": "总房间数", + "active_recordings": "正在录制", + "stop_monitoring": "停止监控", + "recent_added_recordings": "最近添加", + "no_recordings": "暂无录制记录", + "greeting_morning": "早上好", + "greeting_afternoon": "下午好", + "greeting_evening": "晚上好" + }, + "recordings_page": { + "recording_list": "录制列表", + "search": "搜索", + "add_record": "新增录制", + "refresh": "刷新", + "batch_start": "批量开始", + "batch_stop": "批量停止", + "batch_delete": "批量删除", + "refresh_success_tip": "提示:刷新成功", + "batch_delete_confirm_tip": "您确定要删除所有全部已选中的录制列表吗?", + "clear_all_confirm_tip": "您确定要清空录制列表吗?", + "edit_record": "编辑录制", + "add_recording_success_tip": "提示:直播间添加成功!", + "delete_recording_success_tip": "提示:直播间删除成功!", + "stop_recording_success_tip": "提示:直播间停止监控成功!", + "start_recording_success_tip": "提示:直播间开始监控成功!", + "not_search_result": "提示:未搜索到任何结果", + "toggle_view": "切换视图", + "preview_video": "预览视频", + "status_filter": "状态筛选", + "filter_all": "全部", + "filter_recording": "录制中", + "filter_living": "直播中", + "filter_error": "录制错误", + "filter_offline": "未开播", + "filter_stopped": "未监控", + "platform_filter": "平台筛选", + "platform_sort": "平台排序", + "operations": "操作", + "filter": "筛选" + }, + "recording_dialog": { + "input_live_link": "输入直播间地址", + "example": "例如", + "select_resolution": "选择录制清晰度", + "custom_video_bitrate": "自定义视频码率(kbps)", + "custom_video_bitrate_hint": "留空则保持原始码率(推荐默认不填)", + "custom_video_bitrate_invalid": "请输入大于 0 的整数码率", + "flv_use_direct_download": "FLV源直接使用下载器缓存", + "flv_use_direct_download_tip": "开启后延迟更低,但不支持分段录制", + "input_anchor_name": "输入主播名称", + "default_input": "可默认不填", + "select_record_format": "选择录制格式-默认TS", + "input_save_path": "输入录制保存路径", + "is_segment_enabled": "分段录制是否开启", + "segment_record_time": "录制分段时间", + "input_segment_time": "请输入分段时间(单位秒)", + "scheduled_recording": "每日定时监听是否开启", + "scheduled_start_time": "每日监听开始时间", + "monitor_hours": "每日监听小时数", + "enable_message_push": "是否开启消息推送", + "only_notify_no_record": "仅通知不录制", + "batch_input_tip": "批量录入(每行一条记录)", + "single_input": "单个录入", + "batch_input": "批量录入", + "live_room": "直播间", + "platform_not_supported_tip": "暂不支持该平台录制 ⚠️", + "pick_time": "选择时间", + "pick_time_tip": "配置定时时间", + "time_out_of_range": "选择时间超出范围", + "pick_time_slot": "选择您的时间段", + "hour_label_text": "时", + "minute_label_text": "分", + "select_media_type": "选择媒体类型", + "video": "视频", + "audio": "音频", + "duplicate_url_title": "重复的直播间地址", + "duplicate_url_content": "该直播间已存在,是否继续添加?" + }, + "search_dialog": { + "search_keyword": "输入搜索关键词" + }, + "recording_manager": { + "monitor_stopped": "停止监控中", + "is_live": "直播中", + "live_room": "直播间", + "recorded": "已录制", + "push_content": "直播间状态更新:[room_name] 正在直播中,时间:[time]", + "push_content_end": "直播间状态更新:[room_name] 直播已结束,时间:[time]", + "status_notify": "直播间状态更新通知", + "STOPPED_MONITORING": "直播间已停止监控", + "MONITORING": "当前该直播间未开播, 持续监控中", + "RECORDING": "直播间正在录制中", + "NOT_RECORDING": "直播间正在直播, 未在录制中", + "STATUS_CHECKING": "直播状态正在检测中", + "NOT_IN_SCHEDULED_CHECK": "当前未在定时检测范围内, 停止直播检测中", + "PREPARING_RECORDING": "主播正在直播中, 准备开始录制", + "RECORDING_ERROR": "直播录制失败, 等待重试", + "NOT_RECORDING_SPACE": "磁盘空间不足, 无法录制", + "LIVE_STATUS_CHECK_ERROR": "直播状态检测错误, 请检查地址是否可正常访问", + "LIVE_BROADCASTING": "正在直播中", + "not_disk_space_tip": "磁盘存储空间不足, 停止录制 ⚠️", + "notify": "通知", + "live_recording_stopped_message": "直播录制已结束!", + "live_recording_started_message": "直播正在进行中", + "not_config_tip": "未配置消息推送渠道" + }, + "stream_manager": { + "record_stream_error": "直播源录制出错", + "no_ffmpeg_tip": "未安装FFmpeg,请先安装FFmpeg ⚠️" + }, + "recording_card": { + "stop_monitor_tip": "提示:已停止直播监控👁️", + "start_monitor_tip": "提示:已开启直播监控👁️", + "please_stop_monitor_tip": "提示:请先停止直播监控👁️‍🗨️", + "please_start_monitor_tip": "提示:请先开启直播监控👁️‍🗨️", + "is_not_live_tip": "提示:该直播间未开播", + "pre_record_tip": "提示:准备开始录制", + "stop_record_tip": "提示:已停止直播间录制️", + "no_folder_tip": "提示:该直播间文件夹不存在", + "edit_record_config": "编辑录制配置", + "delete_monitor": "删除监控", + "open_folder": "打开文件夹", + "recording_info": "录制信息", + "anchor_name": "主播名称", + "platform_name": "平台名称", + "live_link": "直播链接", + "live_title": "直播标题", + "record_format": "录制格式", + "record_quality": "录制画质", + "segment_record": "分段录制", + "segment_time": "分段时长", + "monitor_status": "监控状态", + "scheduled_recording": "定时检测", + "scheduled_time_range": "定时检测范围", + "save_path": "保存路径", + "recording_status": "录制状态", + "start_record": "开始录制", + "stop_record": "停止录制", + "start_monitor": "开始监控", + "stop_monitor": "停止监控", + "seconds": "秒", + "delete_confirm_tip": "确定要删除该直播间吗?", + "no_recording_dir_tip": "该直播间暂无保存的录制文件", + "none": "无", + "recording_card_tip": "点击选中", + "use_proxy": "使用代理", + "no_support_open_dir": "Web端不支持打开文件夹 ⚠️", + "message_push": "消息推送", + "all": "全部", + "recording": "录制中", + "recording_error": "录制错误", + "live_broadcasting": "正在直播中", + "not_live": "未开播", + "stopped": "已停止", + "filter": "筛选", + "offline": "未开播", + "no_monitor": "未监控", + "checking": "检测中", + "live_room": "直播间" + }, + "settings_page": { + "recording_settings": "录制设置", + "push_settings": "推送设置", + "basic_settings": "基础设置", + "cookies_settings": "Cookie设置", + "accounts_settings": "账号设置", + "security_settings": "安全设置", + "select": "选择", + "unsupported_select_path": "Web端不支持选择路径📂请手动输入", + "select_path_failed": "路径选择器无法打开,请手动输入保存路径", + "program_config": "程序的基本设置", + "restore_defaults": "恢复默认设置", + "program_language": "程序语言", + "filename_includes_title": "文件名包含标题", + "custom_filename_template": "自定义文件名模板", + "live_recording_path": "直播录制保存路径", + "blank_for_default_path": "不填则默认", + "remove_emojis": "去除emoji符号", + "name_rules": "文件(夹)命名规则", + "platform": "平台", + "author": "作者", + "time": "时间", + "title": "标题", + "remember_window_size": "退出时记住窗口大小", + "scheduled_shutdown": "定时关机设置", + "scheduled_shutdown_time": "每日关机时间", + "scheduled_shutdown_pick_time": "选择每日关机时间", + "scheduled_shutdown_more": "打开关机设置", + "scheduled_shutdown_tip": "启用后,程序将在每天指定时间启动关机倒计时", + "scheduled_shutdown_system_message": "StreamCap 定时关机任务已触发,可在 60 秒内取消", + "scheduled_shutdown_countdown": "系统将在 {seconds} 秒后关机。", + "scheduled_shutdown_cancel": "取消本次关机", + "scheduled_shutdown_cancelled": "已取消本次关机", + "scheduled_shutdown_failed": "无法启动定时关机:{error}", + "scheduled_shutdown_cancel_failed": "无法取消本次关机:{error}", + "quick_shutdown": "快捷关机", + "quick_shutdown_hours_suffix": "小时后", + "quick_shutdown_ready": "输入 1–{max_hours} 小时后开始", + "quick_shutdown_invalid_hours": "请输入 1 到 {max_hours} 之间的小时数", + "quick_shutdown_start": "开始", + "quick_shutdown_start_tip": "设置小时倒计时关机", + "quick_shutdown_cancel": "取消快捷关机", + "quick_shutdown_confirm_title": "确认快捷关机", + "quick_shutdown_confirm_content": "电脑将在 {hours} 小时后({time})关机,是否开始?", + "quick_shutdown_active": "计划关机时间:{time}", + "quick_shutdown_started": "已设置在 {time} 关机", + "quick_shutdown_cancelled": "已取消快捷关机", + "quick_shutdown_failed": "无法设置快捷关机:{error}", + "quick_shutdown_cancel_failed": "无法取消快捷关机:{error}", + "quick_shutdown_system_message": "StreamCap 快捷关机:{hours} 小时倒计时", + "proxy_settings": "代理设置", + "is_proxy_enabled": "设置是否使用代理及相关配置", + "enable_proxy": "开启代理", + "proxy_address": "代理地址", + "skip_proxy_detection": "跳过代理检测", + "recording_options": "录制选项", + "advanced_config": "配置录制高级选项", + "video_record_format": "视频/音频录制格式", + "recording_quality": "录制清晰度", + "loop_time": "循环时间(秒)", + "is_segmented_recording_enabled": "分段录制是否开启", + "force_https": "强制启用https录制", + "default_live_source": "默认选择直播源", + "default_live_source_tip": "优先选择FLV源进行录制直播", + "flv_use_direct_download": "FLV源使用下载器缓存", + "flv_use_direct_download_tip": "开启后延迟更低,但不支持分段录制", + "space_threshold": "录制空间剩余阈值(gb)", + "auto_clean_old_recordings_tip": "空间不足时自动删除最旧的录制文件,直到剩余空间恢复到阈值", + "auto_clean_old_recordings": "空间不足时自动清理旧录制", + "segment_time": "视频分段时间(秒)", + "convert_mp4": "录制完成后转为mp4格式", + "delete_original": "追加格式后删除原文件", + "generate_timestamps_subtitle": "生成时间字幕文件", + "custom_script": "录制完成后执行自定义脚本", + "script_command": "自定义脚本执行命令", + "default_platform_with_proxy": "默认使用代理录制的平台", + "web_login_configuration": "Web后台登录配置", + "login_required": "启用安全登录", + "login_required_enabled": "已启用安全登录", + "login_required_disabled": "已禁用安全登录", + "current_username": "当前用户名", + "old_password": "旧密码", + "default_old_password": "默认: admin", + "new_password": "新密码", + "confirm_password": "确认密码", + "change_password": "修改密码", + "old_password_required": "旧密码不能为空", + "new_password_required": "新密码不能为空", + "passwords_not_match": "两次输入的密码不一致", + "password_changed": "密码修改成功", + "old_password_incorrect": "旧密码不正确", + "not_logged_in": "您尚未登录", + "push_notifications": "推送通知", + "stream_start_notification_enabled": "直播状态推送开关", + "system_status_bar_notification_enabled": "系统栏通知开启", + "open_broadcast_push_enabled": "开播推送开启", + "close_broadcast_push_enabled": "关播推送开启", + "only_notify_no_record": "仅通知不录制", + "notify_loop_time": "只推送循环时间", + "custom_push_settings": "自定义推送设置", + "personalized_notification_content_behavior": "个性化通知内容及行为", + "custom_push_title": "自定义推送标题", + "custom_open_broadcast_content": "自定义开播推送内容", + "custom_close_broadcast_content": "自定义关播推送内容", + "push_channels": "推送渠道", + "dingtalk": "钉钉", + "wechat": "微信", + "feishu": "飞书", + "email": "邮箱", + "telegram": "电报", + "select_and_enable_channels": "选择并启用您希望使用的推送渠道", + "channel_configuration": "渠道配置", + "configure_enabled_channels": "配置您已启用的通知渠道", + "dingtalk_webhook_url": "钉钉推送接口地址", + "dingtalk_at_objects": "钉钉通知@对象", + "dingtalk_at_all": "钉钉通知@全体", + "dingtalk_webhook_hint": "填写钉钉群Webhook连接", + "dingtalk_phone_numbers_hint": "填写钉钉手机号", + "wechat_webhook_url": "微信推送接口地址", + "feishu_webhook_url": "飞书推送接口地址", + "bark_webhook_url": "Bark推送接口地址", + "bark_interrupt_level": "Bark推送中断级别", + "bark_sound": "Bark推送铃声", + "ntfy_server_url": "Ntfy推送地址", + "ntfy_tags": "Ntfy推送标签", + "ntfy_email": "Ntfy推送邮箱", + "ntfy_action_url": "Ntfy动作地址", + "serverchan_send_key": "SCKEY/SendKey", + "serverchan_channel": "推送通道", + "serverchan_tags": "Server酱标签", + "serverchan": "Server酱", + "telegram_api_token": "Telegram API令牌", + "telegram_chat_id": "Telegram 聊天ID", + "smtp_server": "Smtp服务器", + "email_username": "邮箱登录账号", + "email_password": "发件人密码(授权码)", + "sender_email": "发件人邮箱", + "sender_name": "发件人显示昵称", + "recipient_email": "收件人邮箱", + "configure_platform_cookies": "配置各平台Cookie参数", + "douyin_cookie": "抖音Cookie", + "tiktok_cookie": "TikTok Cookie", + "kuaishou_cookie": "快手Cookie", + "huya_cookie": "虎牙Cookie", + "douyu_cookie": "斗鱼Cookie", + "yy_cookie": "YY Cookie", + "bilibili_cookie": "哔哩哔哩Cookie", + "xhs_cookie": "小红书Cookie", + "bigo_cookie": "Bigo Cookie", + "blued_cookie": "Blued Cookie", + "soop_cookie": "Soop Cookie", + "netease_cookie": "网易CC Cookie", + "qiandurebo_cookie": "千度热播Cookie", + "pandalive_cookie": "Pandalive Cookie", + "maoerfm_cookie": "猫耳FM Cookie", + "winktv_cookie": "Winktv Cookie", + "flextv_cookie": "Flextv Cookie", + "look_cookie": "LookLive Cookie", + "popkontv_cookie": "Popkontv Cookie", + "twitcasting_cookie": "Twitcasting Cookie", + "baidu_cookie": "百度Cookie", + "weibo_cookie": "微博Cookie", + "kugou_cookie": "酷狗Cookie", + "twitch_cookie": "Twitch Cookie", + "liveme_cookie": "Liveme Cookie", + "huajiao_cookie": "花椒Cookie", + "liuxing_cookie": "流星Cookie", + "showroom_cookie": "Showroom Cookie", + "acfun_cookie": "Acfun Cookie", + "changliao_cookie": "畅聊Cookie", + "yinbo_cookie": "音播Cookie", + "inke_cookie": "映客Cookie", + "zhihu_cookie": "知乎Cookie", + "chzzk_cookie": "Chzzk Cookie", + "haixiu_cookie": "嗨秀Cookie", + "vvxq_cookie": "VV星球Cookie", + "17live_cookie": "17Live Cookie", + "lang_cookie": "浪Cookie", + "piaopiao_cookie": "飘飘Cookie", + "6room_cookie": "六间房Cookie", + "lehai_cookie": "乐嗨 Cookie", + "catshow_cookie": "Catshow Cookie", + "shopee_cookie": "Shopee Cookie", + "youtube_cookie": "Youtube Cookie", + "taobao_cookie": "淘宝Cookie", + "jd_cookie": "京东Cookie", + "configure_platform_accounts": "配置各平台账号密码", + "sooplive_username": "Soop账号", + "sooplive_password": "Soop密码", + "flextv_username": "FlexTV账号", + "flextv_password": "FlexTV密码", + "popkontv_username": "PopkonTV账号", + "popkontv_password": "PopkonTV密码", + "twitcasting_account_type": "Twitcasting账号类型", + "twitcasting_username": "Twitcasting账号", + "twitcasting_password": "Twitcasting密码", + "success_restore_tip": "提示:已恢复默认配置", + "query_restore_config_tip": "您确定要恢复默认配置吗?", + "success_save_config_tip": "提示:当前配置已保存", + "Chinese": "简体中文", + "English": "English", + "select_btn_tip": "手动选择保存路径", + "switch_language": "切换语言", + "switch_video_format": "切换视频录制格式", + "switch_recording_quality": "切换视频录制质量", + "switch_account_type": "切换账号类型", + "switch_language_tip": "提示: 建议切换语言后重启程序", + "platform_max_concurrent_requests": "平台最大并发录制数", + "platform_max_concurrent_requests_tip": "每个平台允许同时发起请求的最大并发数,默认3", + "check_live_on_browser_refresh": "刷新网页时检查直播状态", + "check_live_on_browser_refresh_tip": "针对web端运行,开启后每次刷新网页都会重复检测直播间状态" + }, + "about_page": { + "about_project": "关于本程序", + "ui_version": "UI版本", + "kernel_version": "内核版本", + "license": "开源许可证", + "introduction": "软件简介", + "feature": "功能亮点", + "support_platforms": "支持主流平台", + "customize_recording": "自定义录制参数", + "open_source": "开源 & 高效", + "automatic_transcoding": "自动转码", + "status_push": "直播状态推送", + "developer": "开发者", + "author": "作者", + "view_update": "查看更新", + "view_docs": "查看文档", + "update": "版本更新" + }, + "base": { + "confirm": "确认", + "sure": "确定", + "cancel": "取消", + "yes": "是", + "no": "否", + "open": "打开", + "close": "关闭", + "enabled": "已开启", + "disabled": "未开启" + }, + "video_quality": { + "OD": "原画", + "UHD": "超清", + "HD": "高清", + "SD": "标清", + "LD": "流畅" + }, + "help_dialog": { + "shortcut_key_help": "快捷键帮助", + "description": "以下是程序支持的快捷键说明:", + "main_page": "主界面", + "search_recording": "搜索录制: Ctrl + F - 打开搜索框以查找特定的录制直播间", + "refresh_list": "刷新列表: Ctrl + R - 刷新当前直播间列表", + "add_new_recording": "新增录制: Alt + N - 打开新建录制直播间面板", + "start_all": "批量开始: Alt + B - 开始监控列表所有或已选定的直播间", + "stop_all": "批量停止: Alt + P - 停止监控列表所有或已选定的直播间", + "delete_all": "批量删除: Alt + D - 删除列表所有或已选定的直播间", + "settings_page": "设置界面", + "save_configuration": "保存配置: Ctrl + S - 保存当前配置设置", + "view_help": "查看帮助: Alt + H - 打开此帮助对话框" + }, + "install_manager": { + "complete": "完成", + "error": "错误", + "installing": "正在安装", + "reinstall": "重新安装", + "installed": "已安装", + "wait_install": "等待安装", + "install_now": "立即安装", + "later_on": "稍后再说", + "install_guide": "组件安装向导", + "install_tip": "本程序需要以下组件来完成特定功能,请保持网络连接并耐心等待安装完成。", + "lack_components": "缺少必要组件", + "dont_show_again": "下次不再提示" + }, + "storage_page": { + "storage_path": "存储路径", + "current_path": "当前路径", + "empty_recording_folder": "录制文件夹为空,暂无录制的直播视频", + "go_back": "返回上一级", + "previewing": "正在预览", + "unsupported_file_type": "未找到视频文件 ⚠️", + "no_video_file": "未找到视频文件 ⚠️", + "no_recording_folder": "录制目录不存在 ⚠️", + "copy_stream_url": "复制直播源地址", + "copy_video_url": "复制视频地址", + "copy_success": "复制成功", + "video_api_server_not_set": "未设置视频播放服务器地址 ⚠️" + }, + "video_player": { + "open_live_room_page": "打开直播间页面", + "stream_source": "直播源", + "previewing": "正在预览", + "view_stream_source_now": "正在访问直播源", + "unsupported_play_on_web": "Web端只支持预览MP4文件 ⚠️", + "screenshot": "截图", + "screenshot_success": "截图已保存", + "screenshot_failed": "截图失败 ⚠️" + }, + "update": { + "new_version": "发现新版本 {version}", + "current_version": "当前版本: {version}", + "latest_version": "最新版本: {version}", + "update_source": "更新源: {source}", + "release_notes": "更新内容:", + "no_details": "无详细说明", + "later": "稍后再说", + "download": "下载更新", + "check_update": "检查更新", + "checking_update": "正在检查更新...", + "update_check_failed": "检查更新失败", + "no_update_available": "当前已是最新版本", + "unknown": "未知" + }, + "save_progress_overlay": { + "force_close": "强制关闭", + "force_close_tooltip": "立即关闭程序(可能导致视频损坏)", + "force_close_warning": "请谨慎操作,强制关闭程序可能导致视频文件损坏。", + "force_closing": "正在强制关闭...", + "saving_recording": "正在保存录制文件..." + }, + "app_close_handler": { + "saving_recordings": "正在保存 {active_recordings_count} 个录制内容,请稍候...", + "confirm_exit": "确认退出", + "confirm_exit_content": "您确定要退出程序吗?", + "minimize_to_tray": "最小化至托盘", + "exit_program": "退出程序", + "minimize_to_tray_tip": "点击\"最小化至托盘\"后,程序将隐藏到系统托盘继续运行" + }, + "tray_manager": { + "restore": "恢复窗口", + "exit": "退出程序" + }, + "login_page": { + "login_title": "StreamCap 登录", + "login_subtitle": "请登录您的账号", + "username": "用户名", + "password": "密码", + "login_button": "登录", + "login_in_progress": "登录中...", + "default_account_tip": "默认账号: admin / 密码: admin", + "input_required": "请输入用户名和密码", + "login_failed": "用户名或密码错误", + "login_success": "登录成功" + } } \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..b11b9d95 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ +# StreamCap test package diff --git a/tests/test_disk_space.py b/tests/test_disk_space.py new file mode 100644 index 00000000..3c165876 --- /dev/null +++ b/tests/test_disk_space.py @@ -0,0 +1,85 @@ +import os +import shutil +import tempfile +import time +import unittest +from unittest import mock + +from app.utils import utils + + +def _make_file(path: str, age_seconds: float = 3600) -> str: + os.makedirs(os.path.dirname(path), exist_ok=True) + with open(path, "wb") as f: + f.write(b"x" * 1024) + old = time.time() - age_seconds + os.utime(path, (old, old)) + return path + + +class TestCleanOldRecordings(unittest.TestCase): + def setUp(self): + self.tmp = tempfile.mkdtemp() + + def tearDown(self): + shutil.rmtree(self.tmp, ignore_errors=True) + + def _set_free_gb(self, free_gb: float): + def fake_disk_usage(path): + total = 100 * 1024**3 + used = (100 - free_gb) * 1024**3 + return shutil._ntuple_diskusage(total=total, used=used, free=free_gb * 1024**3) + + return mock.patch.object(utils.shutil, "disk_usage", side_effect=fake_disk_usage) + + def test_no_deletion_when_space_sufficient(self): + path = _make_file(os.path.join(self.tmp, "a", "old.mp4")) + with self._set_free_gb(10.0): + deleted = utils.clean_old_recordings(self.tmp, target_free_gb=2.0) + self.assertEqual(deleted, []) + self.assertTrue(os.path.exists(path)) + + def test_deletes_oldest_first_until_target(self): + old1 = _make_file(os.path.join(self.tmp, "a", "1.mp4"), age_seconds=9000) + old2 = _make_file(os.path.join(self.tmp, "b", "2.flv"), age_seconds=8000) + old3 = _make_file(os.path.join(self.tmp, "c", "3.ts"), age_seconds=7000) + # free space rises with each deletion: 0.5 -> 1.5 -> 2.5 GB + frees = iter([0.5, 1.5, 2.5, 2.5]) + with ( + self._set_free_gb(0), + mock.patch.object( + utils.shutil, + "disk_usage", + side_effect=lambda p: shutil._ntuple_diskusage(total=100 * 1024**3, used=0, free=next(frees) * 1024**3), + ), + ): + deleted = utils.clean_old_recordings(self.tmp, target_free_gb=2.0) + self.assertEqual(deleted, [old1, old2]) + self.assertFalse(os.path.exists(old1)) + self.assertFalse(os.path.exists(old2)) + self.assertTrue(os.path.exists(old3)) + + def test_protects_recent_files(self): + fresh = _make_file(os.path.join(self.tmp, "new.mp4"), age_seconds=60) + old = _make_file(os.path.join(self.tmp, "old.mp4"), age_seconds=9000) + with self._set_free_gb(0.1): + deleted = utils.clean_old_recordings(self.tmp, target_free_gb=2.0) + self.assertEqual(deleted, [old]) + self.assertTrue(os.path.exists(fresh)) + + def test_ignores_non_video_files(self): + doc = _make_file(os.path.join(self.tmp, "notes.txt")) + with self._set_free_gb(0.1): + deleted = utils.clean_old_recordings(self.tmp, target_free_gb=2.0) + self.assertEqual(deleted, []) + self.assertTrue(os.path.exists(doc)) + + def test_covers_nested_directories(self): + nested = _make_file(os.path.join(self.tmp, "p", "q", "deep.mkv"), age_seconds=9000) + with self._set_free_gb(0.1): + deleted = utils.clean_old_recordings(self.tmp, target_free_gb=2.0) + self.assertEqual(deleted, [nested]) + + +if __name__ == "__main__": + unittest.main() From 0601263a26cc0882747d029832e0abec4cfb34bc Mon Sep 17 00:00:00 2001 From: Luckysauce <98256161+LuckySauce@users.noreply.github.com> Date: Fri, 6 Nov 2026 14:05:59 +0800 Subject: [PATCH 2/2] style: replace asyncio.TimeoutError with builtin TimeoutError (ruff UP041) Same fix as #512, needed here so this branch lints clean against main. --- app/core/media/direct_downloader.py | 2 +- app/core/recording/stream_manager.py | 2 +- app/core/runtime/process_manager.py | 2 +- app/messages/notification_service.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/core/media/direct_downloader.py b/app/core/media/direct_downloader.py index 127cc58c..915e082c 100644 --- a/app/core/media/direct_downloader.py +++ b/app/core/media/direct_downloader.py @@ -44,7 +44,7 @@ async def stop_download(self) -> None: if self.download_task: try: await asyncio.wait_for(self.download_task, timeout=10.0) - except asyncio.TimeoutError: + except TimeoutError: logger.warning(f"Download Timeout: {self.record_url}") except Exception as e: logger.error(f"Download Error: {e}") diff --git a/app/core/recording/stream_manager.py b/app/core/recording/stream_manager.py index 21a816d7..dc5ddc30 100644 --- a/app/core/recording/stream_manager.py +++ b/app/core/recording/stream_manager.py @@ -424,7 +424,7 @@ async def start_ffmpeg( process.stdin.close() await asyncio.wait_for(process.wait(), timeout=15.0) - except asyncio.TimeoutError: + except TimeoutError: logger.warning(f"FFmpeg process did not exit gracefully, forcing termination: {live_url}") process.kill() await process.wait() diff --git a/app/core/runtime/process_manager.py b/app/core/runtime/process_manager.py index 2aa2d60c..9fee3f53 100644 --- a/app/core/runtime/process_manager.py +++ b/app/core/runtime/process_manager.py @@ -70,7 +70,7 @@ async def cleanup(self): try: await asyncio.wait_for(process.wait(), timeout=5.0) - except asyncio.TimeoutError: + except TimeoutError: logger.warning(f"Process {process.pid} did not terminate, killing it") process.kill() await process.wait() diff --git a/app/messages/notification_service.py b/app/messages/notification_service.py index e8ee402a..0c7e35f2 100644 --- a/app/messages/notification_service.py +++ b/app/messages/notification_service.py @@ -98,7 +98,7 @@ def send_sync() -> dict[str, list[str]]: try: overall_timeout = max(timeout * 4, timeout + 5) return await asyncio.wait_for(asyncio.to_thread(send_sync), timeout=overall_timeout) - except asyncio.TimeoutError: + except TimeoutError: logger.error(f"Email push timed out, SMTP server: {email_host}") except (smtplib.SMTPException, OSError, ValueError) as e: logger.error(f"Email push failed, SMTP server: {email_host}, Error message: {e}")