Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
Feat/plugin hot load (#147)
antonio2b8e4ffe81d5
diff --git a/.gitattributes b/.gitattributesnew file mode 100644index 00000000..e45ea08f--- /dev/null+++ b/.gitattributes@@ -0,0 +1 @@+*.svelte linguist-detectable=falsediff --git a/README.md b/README.mdindex 083e2e69..50d77b0a 100644--- a/README.md+++ b/README.md@@ -1,15 +1,23 @@+<!--+SEO / discovery: OmniGet is a free open source downloader for Windows, macOS and Linux.+Suggested GitHub topics (set these in repo Settings > Topics):+video-downloader, youtube-downloader, media-downloader, course-downloader, udemy-downloader,+music-downloader, ebook-reader, yt-dlp, yt-dlp-gui, tauri, svelte, rust, desktop-app,+cross-platform, open-source, instagram-downloader, tiktok-downloader, bilibili, torrent, p2p+-->+<p align="center"><img src="static/loop.png" alt="Loop, the OmniGet mascot" width="120" /></p><h1 align="center">OmniGet</h1>-<h3 align="center">Download Udemy courses, YouTube, and 1,800+ sites in one app. No terminal.</h3>+<h3 align="center">Download Udemy courses, YouTube, music, books, and 1,800+ sites in one app. No terminal.</h3><p align="center">-<b>English</b>-| <a href="README_zh_CN.md">中文</a>-| <a href="README.ru.md">Русский</a>+ <b>English</b>+ | <a href="README_zh_CN.md">中文</a>+ | <a href="README.ru.md">Русский</a></p><p align="center">@@ -21,43 +29,111 @@</p><p align="center">- <b>OmniGet</b> is a free, open source desktop app for Windows, macOS, and Linux that downloads online courses (Udemy, Hotmart, Kiwify, Skool, Teachable, and more), videos and audio from YouTube, TikTok, Instagram, Twitter/X, Reddit, and over 1,800 other sites, plus music and books. Everything plays inside the app. No command line, no setup, your files stay on your computer.+ <b>OmniGet</b> is a free, open source desktop app for Windows, macOS, and Linux. It downloads online courses (Udemy, Hotmart, Kiwify, Skool, Teachable, and more), video and audio from YouTube, TikTok, Instagram, Twitter/X, Reddit, and 1,800+ other sites, plus music and books. Everything plays inside the app. No command line, no Python, no setup, and your files stay on your computer.</p><p align="center">- <a href="#get-omniget"><b>Download for Windows, macOS, or Linux</b></a>+ <a href="#download-and-install"><b>Download for Windows, macOS, or Linux</b></a>+ · + <a href="#one-keypress-and-it-is-downloading"><b>See the one-click hotkey</b></a></p><p align="center">- <img src="assets/screenshot.png" alt="OmniGet desktop app home screen, a free downloader for courses, videos, music and books" width="820" />+ <img src="assets/readme/en/home-hero.png" alt="OmniGet home screen, a free downloader for courses, videos, music and books on Windows, macOS and Linux" width="880" /></p>---+## Download and install++Pick your system, download the latest release, and open it. There is no installer to click through and no admin rights are needed.++<table>+ <tr>+ <th>Platform</th>+ <th>How to install</th>+ </tr>+ <tr>+ <td><strong>Windows</strong></td>+ <td>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for Windows" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="38"></a>+ <br/>+ <sub>Download the <code>.exe</code> from Releases and double click it. It is portable, so it runs from anywhere.</sub>+ </td>+ </tr>+ <tr>+ <td><strong>macOS</strong></td>+ <td>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for macOS" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="38"></a>+ <br/>+ <sub>Open the <code>.dmg</code> and drag OmniGet into your Applications folder. Read the first launch note below.</sub>+ </td>+ </tr>+ <tr>+ <td><strong>Linux</strong></td>+ <td>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for Linux" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="38"></a>+ <br/>+ <sub>Run <code>flatpak install wtf.tonho.omniget</code>, or grab the bundle from Releases.</sub>+ </td>+ </tr>+</table>++### ⚠️ Please read this before the first launch++OmniGet is open source and is not signed with a paid certificate, so the first time you open it your system may warn you. This is expected, and the steps below clear it for good. Your files stay local either way.++**macOS (this is the big one, the app will not open on the first try).** macOS Gatekeeper blocks unsigned apps. After you move OmniGet to Applications, open Terminal and run these two lines:++```bash+xattr -cr /Applications/omniget.app+codesign --force --deep --sign - /Applications/omniget.app+```++Then open OmniGet normally. You only do this once.++**Windows.** SmartScreen may show a blue warning on the first run. Click **More info**, then **Run anyway**. This is standard for open source apps without a paid code signing certificate.++Free and open source under GPL-3.0. Updates run quietly in the background. The bundled tools (yt-dlp and FFmpeg) install themselves, and yt-dlp is verified by SHA256 before it runs. Plugins install on first launch and update themselves too, with nothing for you to configure.++---++## One keypress, and it is downloading++This is the part people fall in love with. Copy any link, a YouTube video, a tweet, a Discord message, a track, a magnet, then press the global hotkey **`Ctrl+Shift+D`** (**`Cmd+Shift+D`** on macOS). OmniGet reads your clipboard and downloads it in the background. You do not even open the window.++<p align="center">+ <img src="assets/readme/hotkey-illustration.png" alt="OmniGet global download hotkey, press the shortcut and the link in your clipboard downloads into your folder" width="760" />+</p>++It works from anywhere on your system. Browsing, chatting, reading, it does not matter which app is in front. Copy, press, done. The file lands in your folder and the queue handles the rest. If you would rather see a preview first, just paste the link into the omnibox on the home screen, glance at the quality options, and click download.++---+## The problem this solves-You already have yt-dlp open in a terminal. You found a Udemy downloader script that keeps breaking on every site update. You have a separate thing for music, and none of them talk to each other. Every download is three tools and a copy paste.+You already have yt-dlp open in a terminal. You found a course downloader script that breaks on every site update. You have a separate app for music, and none of them talk to each other. Every download becomes three tools and a copy paste.-OmniGet does all three in one window. Paste a course link, a YouTube link, a TikTok, a magnet, a podcast, and it figures out the rest. No terminal, no Python, no setup. The file lands in your folder, and it plays right there in the app.+OmniGet does all of it in one window. Paste a course link, a YouTube link, a TikTok, a magnet, a podcast, and it figures out the rest. The file lands in your folder, and it plays right there in the app.-It is the only open source app that downloads a full Udemy or Hotmart course, video and audio from 1,800+ sites, and your music library, in one place, without the command line. Thousands of GitHub stars in its first months, and it grew because that combination did not exist anywhere else.+It is the only open source app that downloads a full Udemy or Hotmart course, video and audio from 1,800+ sites, and your music library, in one place, without the command line. It earned thousands of GitHub stars in its first months because that combination did not exist anywhere else.---## What OmniGet downloads-You paste a link. OmniGet detects the site, shows a preview with quality options, and downloads. If [yt-dlp](https://github.com/yt-dlp/yt-dlp) supports a site, OmniGet downloads from it, which is roughly a thousand more than the table below.+Paste a link. OmniGet detects the site, shows a preview with quality options, and downloads. If [yt-dlp](https://github.com/yt-dlp/yt-dlp) supports a site, OmniGet downloads from it, which is roughly a thousand more than the table below.| Category | Platforms ||----------|-----------|| Online courses | Hotmart, Udemy, Kiwify, Gumroad, Teachable, Kajabi, Skool, Wondrium, Thinkific, Rocketseat |-| Video and audio | YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, **Bilibili** ✨ |-| Bilibili (deep) | Sign in for 4K / HDR / Dolby Vision / Hi-Res lossless / Dolby Atmos · danmaku (XML/ASS/JSON) · NFO for Kodi/Jellyfin · 11 URL types (UGC / 番剧 / 课程 / 收藏夹 / UP主 / 每周必看 / 稍后再看 / 历史记录 / b23.tv) |+| Video and audio | YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, Bilibili |+| Bilibili (deep) | Sign in for 4K, HDR, Dolby Vision, Hi-Res lossless, Dolby Atmos. Danmaku (XML/ASS/JSON), NFO for Kodi and Jellyfin, 11 URL types (UGC, 番剧, 课程, 收藏夹, UP主, 每周必看, 稍后再看, 历史记录, b23.tv) || Asian platforms | Douyin (抖音), Xiaohongshu (小红书), Kuaishou (快手), Youku (优酷), iQiyi (爱奇艺), Tencent Video, Mango TV || Image galleries | DeviantArt, Pixiv, ArtStation, Flickr, Tumblr, Imgur albums, Kemono, Newgrounds, image boards || Files and transfer | `.torrent` and magnet links, plus direct P2P transfer between two computers with a short code |-Things people search for and OmniGet does:+Things people search for, and OmniGet does:- **Download a full online course**, every lesson and attached PDF, then watch it inside the app and resume where you stopped.- **Download a YouTube video or whole playlist**, pick the quality, or grab audio only as MP3, M4A, Opus, FLAC, or WAV.@@ -67,46 +143,9 @@ Things people search for and OmniGet does:- **Download subtitles** in any language, embed them, or generate them with Whisper when none exist.- **Skip sponsors** with SponsorBlock, and auto embed metadata and thumbnails.- **Follow a channel** and auto download new uploads, with a tray notification.-- **Download Bilibili at maximum quality**: sign in once and unlock 4K, HDR, Hi-Res lossless audio and Dolby Atmos. Anime and courses are organized like Plex expects (Season / Episode folders with `tvshow.nfo`).--Downloads are reliable, not a guessing game. Speed and ETA come straight from the downloader instead of being faked from a percentage, so they stay correct even when the file size is unknown or the stream is live. A stall is shown as a stall, not a frozen "3 seconds left". The queue resumes interrupted downloads, retries with backoff, and does not argue with you.-------## Get OmniGet--<table>- <tr>- <th>Platform</th>- <th>Download</th>- </tr>- <tr>- <td><strong>Windows</strong></td>- <td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for Windows" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="40"></a>- <br/>- <sub>Download the <code>.exe</code> and double-click. No installer, no admin needed.</sub>- </td>- </tr>- <tr>- <td><strong>macOS</strong></td>- <td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for macOS" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="40"></a>- <br/>- <sub>Open the <code>.dmg</code> and drag OmniGet to Applications.</sub>- </td>- </tr>- <tr>- <td><strong>Linux</strong></td>- <td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Download OmniGet for Linux" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="40"></a>- <br/>- <sub><code>flatpak install wtf.tonho.omniget</code>, or grab the bundle from Releases.</sub>- </td>- </tr>-</table>+- **Download Bilibili at maximum quality**, sign in once and unlock 4K, HDR, Hi-Res lossless audio and Dolby Atmos.-Free and open source under GPL-3.0. Updates run quietly in the background. Bundled tools (yt-dlp, FFmpeg) install themselves and yt-dlp is verified by SHA256 before it runs. Your files never leave your computer.+Downloads are reliable, not a guessing game. Speed and ETA come straight from the downloader instead of being faked from a percentage, so they stay correct even when the file size is unknown or the stream is live. A stall is shown as a stall, not a frozen "3 seconds left". The queue resumes interrupted downloads and retries with backoff.---@@ -119,29 +158,29 @@ This is the part people do not expect. OmniGet is not just where you download. IDownload the whole course (Hotmart, Udemy, Kiwify, Skool, Teachable, Kajabi, Wondrium, Thinkific) and watch it without leaving the app. Resume at the second you stopped. Take notes that jump to that moment when you click them. Read the attached PDFs side by side.<p align="center">- <img src="assets/screenshot-courses.png" alt="OmniGet course player with timestamped notes and PDF attachments" width="720" />+ <img src="assets/screenshot-courses.png" alt="OmniGet course player with timestamped notes and PDF attachments" width="760" /><br/><em>Course player, notes pinned to timestamps, attachments in the same window.</em></p>### Read books, real ones-Drop a folder of PDFs and EPUBs. OmniGet pulls covers from them, fetches titles and authors, and opens each one in a built-in reader with highlights, bookmarks, a focus mode and a paper-feel theme for the eyes. CBZ comics and TXT/HTML too.+Drop a folder of PDFs and EPUBs. OmniGet pulls covers from them, fetches titles and authors, and opens each one in a built-in reader with highlights, bookmarks, a focus mode, and a paper feel theme for the eyes. CBZ comics and TXT or HTML too.<p align="center">- <img src="assets/screenshot-reader.png" alt="OmniGet built-in EPUB and PDF reader with highlights and focus mode" width="720" />+ <img src="assets/screenshot-reader.png" alt="OmniGet built-in EPUB and PDF reader with highlights and focus mode" width="760" /><br/>- <em>Reader with highlights, notes panel and focus mode.</em>+ <em>Reader with highlights, notes panel, and focus mode.</em></p>### Music, the way you remember it-Point OmniGet to your music folder and it shows your tracks the way iTunes used to: albums with covers, artists with discographies, a queue that doesn't argue with you.+Point OmniGet at your music folder and it shows your tracks the way iTunes used to: albums with covers, artists with discographies, a queue that behaves.- Plays MP3, FLAC, M4A, OGG, Opus, anything you already have.- Pulls **synced lyrics** so they scroll along with the song.-- Connects to **Spotify, SoundCloud, YouTube Music, Qobuz and Last.fm**, so your playlists and likes show up next to your local files.-- **Equalizer** with presets, dark theme variants per album cover, an activity dashboard with your top tracks, and a Discord presence that shows what you're playing.+- Connects to **Spotify, SoundCloud, YouTube Music, Qobuz, and Last.fm**, so your playlists and likes sit next to your local files.+- **Equalizer** with presets, dark theme variants per album cover, an activity dashboard with your top tracks, and a Discord presence that shows what you are playing.<p align="center"><img src="assets/screenshot-music.png" alt="OmniGet music player with album view, synced lyrics and streaming sources" width="820" />@@ -151,37 +190,49 @@ Point OmniGet to your music folder and it shows your tracks the way iTunes used----## The small things that add up+## Settings that stay out of your way-Quietly there when you need them.+Settings are grouped and quiet. Common choices are right there, the deep options live one tap away, and a search box finds anything across every category and highlights it for you.-- **Subtitle Workshop** that opens SRT, VTT and ASS, with timing tools, two-point sync, find and replace, a one-click auto fix, AI translate and AI grammar fix, and a waveform with shot-change markers.-- **Pomodoro focus timer** that pauses your video when the session ends.-- **Notes app** with bidirectional links, daily journal and a knowledge graph.-- **Progress dashboard** with a streak counter, daily goals and a year-style heatmap.-- **FFmpeg converter** for local files, no internet required.-- **Telegram chat browser** that lets you save photos, videos and files from any chat.-- **Browser extension** (Chrome and Firefox) that hands the current page to OmniGet with one click.-- **Global hotkey** (`Ctrl+Shift+D`) that downloads whatever URL is in your clipboard.-- **9 languages**, **14 themes** including Catppuccin, Dracula, One Dark Pro and three e-ink variants.+<p align="center">+ <img src="assets/readme/en/settings-drill.png" alt="OmniGet settings with a grouped sidebar and clean drill down sections" width="820" />+ <br/>+ <em>Grouped sidebar, one clear list, each section opens its own page.</em>+</p>++<p align="center">+ <img src="assets/readme/en/settings-output.png" alt="OmniGet download settings, output folder, organize by platform, filename template, skip existing files" width="820" />+ <br/>+ <em>Output, quality, subtitles, and the rest, with a short hint under every control.</em>+</p>----## How it feels day-to-day+## Plugins that install themselves++OmniGet ships with its full set of plugins (courses, study, Telegram, convert, and more) and they set themselves up on first launch. They also update on their own when a new version is released, so you never chase a download. Turn any of them on or off from the sidebar, and uninstall the ones you do not want. What you remove stays removed.<p align="center">- <img src="assets/screenshot-flow.png" alt="Typical OmniGet workflow, paste a link and it downloads in the background" width="720" />+ <img src="assets/readme/en/plugins.png" alt="OmniGet plugins and dependencies, browser extension pairing and managed tools as a table" width="820" />+ <br/>+ <em>Plugins and bundled tools, managed for you, shown as a clear table.</em></p>-Copy a link anywhere, a tweet, a Discord message, an open tab. Press `Ctrl+Shift+D`. OmniGet downloads in the background. You don't even open the window.--Or paste in the omnibox, glance at the preview, click download.+----For a course: log in once on the platform, browse your library, pick what you want, walk away. Every lesson and attachment lands in the folder you chose.+## The small things that add up-For books: drop the files in a folder you already use, scan once, and they appear with covers.+Quietly there when you need them.-For music: point at a folder, and the library is yours.+- **Subtitle Workshop** that opens SRT, VTT, and ASS, with timing tools, two point sync, find and replace, a one click auto fix, AI translate and AI grammar fix, and a waveform with shot change markers.+- **Pomodoro focus timer** that pauses your video when the session ends.+- **Notes app** with bidirectional links, a daily journal, and a knowledge graph.+- **Progress dashboard** with a streak counter, daily goals, and a year style heatmap.+- **FFmpeg converter** for local files, no internet required.+- **Telegram chat browser** that lets you save photos, videos, and files from any chat.+- **Browser extension** (Chrome and Firefox) that hands the current page to OmniGet with one click.+- **Global hotkey** (`Ctrl+Shift+D`, or `Cmd+Shift+D` on macOS) that downloads whatever URL is in your clipboard.+- **9 languages** and **14 themes**, including Catppuccin, Dracula, One Dark Pro, and three e-ink variants.---@@ -191,10 +242,13 @@ For music: point at a folder, and the library is yours.Yes. Free and open source under GPL-3.0, with no account, no ads, and no paid tier.**Do I need the terminal or Python?**-No. OmniGet is a normal desktop app. Download it, double-click, paste a link. yt-dlp and FFmpeg are bundled and update themselves.+No. OmniGet is a normal desktop app. Download it, open it, paste a link. yt-dlp and FFmpeg are bundled and update themselves. The only time you may touch Terminal is the one time macOS first launch step above.-**Is this a yt-dlp GUI?**-It uses yt-dlp under the hood for the 1,800+ generic sites, with native extractors for the big platforms and a real interface, a queue, a library, and built-in players on top. So yes, and a lot more than a GUI.+**The app will not open on macOS, what do I do?**+Run the two Terminal commands in the [first launch note](#️-please-read-this-before-the-first-launch). Gatekeeper blocks unsigned open source apps, and those lines clear the flag. You do it once.++**Is this just a yt-dlp GUI?**+It uses yt-dlp under the hood for the 1,800+ generic sites, with native extractors for the big platforms, plus a real interface, a queue, a library, and built-in players on top. So yes, and a lot more than a GUI.**Can it download a full Udemy or Hotmart course?**Yes. You log in once on the platform, pick the course, and OmniGet downloads every lesson and attachment, then plays them back with timestamped notes.@@ -211,17 +265,14 @@ Yes. Extract audio as MP3, M4A, Opus, FLAC, or WAV, or set a start and end time**Are my downloads private?**Yes. Everything runs locally and your files never leave your computer. There is no telemetry on what you download.-**Can it download Bilibili in 4K, HDR or Hi-Res lossless?**-Yes, with a Bilibili account signed in. OmniGet talks to the official Bilibili API and respects exactly what your 大会员 (premium) subscription unlocks. Without signing in, downloads still work via yt-dlp at standard quality. You can also save danmaku (弹幕) as XML, ASS or JSON, and generate Kodi/Jellyfin NFO metadata for your anime collection.--**Can it follow a channel and grab new videos automatically?**-Yes. Follow a channel and OmniGet polls for new uploads and can auto download them, with a system tray notification.+**Can it download Bilibili in 4K, HDR, or Hi-Res lossless?**+Yes, with a Bilibili account signed in. OmniGet talks to the official Bilibili API and respects exactly what your 大会员 (premium) subscription unlocks. Without signing in, downloads still work through yt-dlp at standard quality.---## Build from source-For developers. If you just want to use OmniGet, [grab a release](#get-omniget).+For developers. If you just want to use OmniGet, [grab a release](#download-and-install).```bashgit clone https://github.com/tonhowtf/omniget.git@@ -230,7 +281,7 @@ pnpm installpnpm tauri dev```-Requires [Rust](https://rustup.rs/), [Node.js](https://nodejs.org/) 18+, [pnpm](https://pnpm.io/).+Requires [Rust](https://rustup.rs/), [Node.js](https://nodejs.org/) 18+, and [pnpm](https://pnpm.io/).<details><summary>Linux build dependencies</summary>@@ -241,27 +292,13 @@ sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file lib</details>-<details>-<summary>Windows SmartScreen and macOS Gatekeeper warnings</summary>--**Windows:** SmartScreen may warn you on first run. Click **More info**, then **Run anyway**. This is standard for open source apps without a paid code signing certificate.--**macOS:** If Gatekeeper blocks the app, run in Terminal:--```bash-xattr -cr /Applications/omniget.app-codesign --force --deep --sign - /Applications/omniget.app-```--</details>-Production build: `pnpm tauri build`.---## Contribute-Bug or feature idea? [Open an issue](https://github.com/tonhowtf/omniget/issues). Pull requests welcome, see [CONTRIBUTING.md](CONTRIBUTING.md).+Found a bug or have a feature idea? [Open an issue](https://github.com/tonhowtf/omniget/issues). Pull requests are welcome, see [CONTRIBUTING.md](CONTRIBUTING.md).OmniGet is translated on [Weblate](https://hosted.weblate.org/engage/omniget/). Pick a language, translate in your browser, and Weblate opens a pull request automatically.@@ -275,4 +312,4 @@ OmniGet is meant for personal use. Respect copyright and each platform's terms o## License-[GPL-3.0](LICENSE). The OmniGet name, logo and Loop mascot are project trademarks not covered by the code license.+[GPL-3.0](LICENSE). The OmniGet name, logo, and Loop mascot are project trademarks not covered by the code license.diff --git a/README.ru.md b/README.ru.mdindex 29d8f62d..49832816 100644--- a/README.ru.md+++ b/README.ru.md@@ -1,230 +1,315 @@+<!--+SEO / discovery: OmniGet - бесплатный загрузчик с открытым исходным кодом для Windows, macOS и Linux.+Рекомендуемые GitHub topics (задайте их в репозитории: Settings > Topics):+video-downloader, youtube-downloader, media-downloader, course-downloader, udemy-downloader,+music-downloader, ebook-reader, yt-dlp, yt-dlp-gui, tauri, svelte, rust, desktop-app,+cross-platform, open-source, instagram-downloader, tiktok-downloader, bilibili, torrent, p2p+-->+<p align="center"><img src="static/loop.png" alt="Loop, талисман OmniGet" width="120" /></p><h1 align="center">OmniGet</h1>-<h3 align="center">Скачивайте курсы Udemy, YouTube и с 1800+ сайтов в одном приложении. Без терминала.</h3>+<h3 align="center">Скачивайте курсы Udemy, YouTube, музыку, книги и 1800+ сайтов в одном приложении. Без терминала.</h3><p align="center">-<a href="README.md">English</a>-| <a href="README_zh_CN.md">中文</a>-| <b>Русский</b>+ <a href="README.md">English</a>+ | <a href="README_zh_CN.md">中文</a>+ | <b>Русский</b></p><p align="center">- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img src="https://img.shields.io/github/v/release/tonhowtf/omniget?style=for-the-badge&label=release" alt="Latest Release" /></a>- <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-green?style=for-the-badge" alt="License GPL-3.0" /></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img src="https://img.shields.io/github/v/release/tonhowtf/omniget?style=for-the-badge&label=release" alt="Последний релиз" /></a>+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-green?style=for-the-badge" alt="Лицензия GPL-3.0" /></a><a href="https://github.com/tonhowtf/omniget/stargazers"><img src="https://img.shields.io/github/stars/tonhowtf/omniget?style=for-the-badge" alt="GitHub stars" /></a>- <a href="https://github.com/tonhowtf/omniget/releases"><img src="https://img.shields.io/github/downloads/tonhowtf/omniget/total?style=for-the-badge&label=downloads" alt="Total downloads" /></a>- <a href="https://hosted.weblate.org/engage/omniget/"><img src="https://hosted.weblate.org/widget/omniget/frontend-json/svg-badge.svg" alt="Translation status" /></a>+ <a href="https://github.com/tonhowtf/omniget/releases"><img src="https://img.shields.io/github/downloads/tonhowtf/omniget/total?style=for-the-badge&label=downloads" alt="Всего загрузок" /></a>+ <a href="https://hosted.weblate.org/engage/omniget/"><img src="https://hosted.weblate.org/widget/omniget/frontend-json/svg-badge.svg" alt="Статус перевода" /></a></p><p align="center">- <b>OmniGet</b> — это бесплатное десктопное приложение с открытым исходным кодом для Windows, macOS и Linux, которое скачивает онлайн-курсы (Udemy, Hotmart, Kiwify, Skool, Teachable и другие), видео и аудио с YouTube, TikTok, Instagram, Twitter/X, Reddit и более 1800 других сайтов, а также музыку и книги. Всё воспроизводится прямо в приложении. Никакой командной строки, никакой настройки, ваши файлы остаются на вашем компьютере.+ <b>OmniGet</b> - это бесплатное настольное приложение с открытым исходным кодом для Windows, macOS и Linux. Оно скачивает онлайн-курсы (Udemy, Hotmart, Kiwify, Skool, Teachable и другие), видео и аудио с YouTube, TikTok, Instagram, Twitter/X, Reddit и 1800+ других сайтов, а также вашу музыку и книги. Всё воспроизводится прямо в приложении. Без командной строки, без Python, без настройки, и ваши файлы остаются на вашем компьютере.</p><p align="center">- <a href="#скачать-omniget"><b>Скачать для Windows, macOS или Linux</b></a>+ <a href="#загрузка-и-установка"><b>Скачать для Windows, macOS или Linux</b></a>+ · + <a href="#одно-нажатие-и-загрузка-пошла"><b>Глобальная горячая клавиша</b></a></p><p align="center">- <img src="assets/screenshot.png" alt="Главный экран десктопного приложения OmniGet — бесплатный загрузчик курсов, видео, музыки и книг" width="820" />+ <img src="assets/readme/en/home-hero.png" alt="Главный экран OmniGet, бесплатный загрузчик курсов, видео, музыки и книг для Windows, macOS и Linux" width="880" /></p>----## Какую проблему решает OmniGet--У вас уже открыт yt-dlp в терминале. Вы нашли скрипт для скачивания Udemy, который ломается при каждом обновлении сайта. У вас есть отдельная программа для музыки, и они не общаются друг с другом. Каждая загрузка требует трёх инструментов и копирования-вставки.--OmniGet делает всё в одном окне. Вставьте ссылку на курс, YouTube, TikTok, магнит или подкаст — и приложение само разберётся. Никакого терминала, никакого Python, никакой настройки. Файл попадает в вашу папку и воспроизводится прямо в приложении.--Это единственное приложение с открытым исходным кодом, которое скачивает полный курс Udemy или Hotmart, видео и аудио с 1800+ сайтов и вашу музыкальную библиотеку в одном месте, без командной строки. Тысячи звёзд на GitHub за первые месяцы — потому что такого сочетания больше нигде не было.-------## Что скачивает OmniGet--Вы вставляете ссылку. OmniGet определяет сайт, показывает предпросмотр с вариантами качества и скачивает. Если [yt-dlp](https://github.com/yt-dlp/yt-dlp) поддерживает сайт, OmniGet скачивает с него — это примерно на тысячу больше, чем в таблице ниже.--| Категория | Платформы |-|-----------|-----------|-| Онлайн-курсы | Hotmart, Udemy, Kiwify, Gumroad, Teachable, Kajabi, Skool, Wondrium, Thinkific, Rocketseat |-| Видео и аудио | YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, **Bilibili** ✨ |-| Bilibili (расширенно) | Вход для 4K / HDR / Dolby Vision / Hi-Res lossless / Dolby Atmos · данмаку (XML/ASS/JSON) · NFO для Kodi/Jellyfin · 11 типов URL (UGC / аниме / курсы / избранное / автор / еженедельное / посмотреть позже / история / b23.tv) |-| Азиатские платформы | Douyin (抖音), Xiaohongshu (小红书), Kuaishou (快手), Youku (优酷), iQiyi (爱奇艺), Tencent Video, Mango TV |-| Галереи изображений | DeviantArt, Pixiv, ArtStation, Flickr, Tumblr, альбомы Imgur, Kemono, Newgrounds, имиджборды |-| Файлы и передача | `.torrent` и магнет-ссылки, а также прямая P2P-передача между двумя компьютерами по короткому коду |--Что ищут люди и что умеет OmniGet:--- **Скачать полный онлайн-курс**, каждый урок и приложенный PDF, затем смотреть его внутри приложения и продолжать с того места, где остановились.-- **Скачать видео YouTube или целый плейлист**, выбрать качество или взять только аудио в MP3, M4A, Opus, FLAC или WAV.-- **Скачать посты, рилсы, сторис, карусели и галереи** из TikTok, Instagram, Twitter/X, Reddit.-- **Пакетно скачать** список ссылок из текстового файла или целый профиль автора.-- **Скачать только часть видео**, указав время начала и окончания.-- **Скачать субтитры** на любом языке, встроить их или сгенерировать с помощью Whisper, если их нет.-- **Пропускать спонсорские блоки** с помощью SponsorBlock, автоматически встраивать метаданные и миниатюры.-- **Отслеживать канал** и автоматически скачивать новые видео с уведомлением в трее.-- **Скачивать Bilibili в максимальном качестве**: войдите один раз и получите 4K, HDR, Hi-Res lossless и Dolby Atmos. Аниме и курсы будут организованы так, как ожидает Plex (папки Сезон / Эпизод с `tvshow.nfo`).+## Загрузка и установка-Загрузки надёжны, а не угадайка. Скорость и ETA берутся прямо из загрузчика, а не подделываются из процентов, поэтому они остаются правильными, даже когда размер файла неизвестен или идёт прямая трансляция. Зависание показывается как зависание, а не замёрзшие «3 секунды осталось». Очередь возобновляет прерванные загрузки, повторяет с экспоненциальной задержкой и не спорит с вами.+Выберите свою систему, скачайте последний релиз и откройте его. Никакого мастера установки и прав администратора не требуется.------## Скачать OmniGet--<table align="center">+<table><tr><th>Платформа</th>- <th>Скачать</th>+ <th>Как установить</th></tr><tr><td><strong>Windows</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для Windows" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для Windows" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="38"></a><br/>- <sub>Скачайте <code>.exe</code> и запустите двойным щелчком. Установщик не нужен, права администратора не требуются.</sub>+ <sub>Скачайте <code>.exe</code> из Releases и дважды кликните. Это портативная версия, она запускается откуда угодно.</sub></td></tr><tr><td><strong>macOS</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для macOS" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для macOS" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="38"></a><br/>- <sub>Откройте <code>.dmg</code> и перетащите OmniGet в папку Applications.</sub>+ <sub>Откройте <code>.dmg</code> и перетащите OmniGet в папку «Программы». Сначала прочитайте заметку о первом запуске ниже.</sub></td></tr><tr><td><strong>Linux</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для Linux" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="Скачать OmniGet для Linux" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="38"></a><br/>- <sub><code>flatpak install wtf.tonho.omniget</code> или скачайте пакет из Releases.</sub>+ <sub>Выполните <code>flatpak install wtf.tonho.omniget</code> или возьмите сборку из Releases.</sub></td></tr></table>-Бесплатно и с открытым исходным кодом под лицензией GPL-3.0. Обновления тихо загружаются в фоне. Встроенные инструменты (yt-dlp, FFmpeg) устанавливаются сами, и yt-dlp проверяется по SHA256 перед запуском. Ваши файлы никогда не покидают ваш компьютер.+### ⚠️ Обязательно прочитайте перед первым запуском++OmniGet имеет открытый исходный код и не подписан платным сертификатом, поэтому при первом открытии система может выдать предупреждение. Это ожидаемо, а шаги ниже убирают его навсегда. В любом случае ваши файлы остаются локально.++**macOS (это самое важное, в первый раз приложение не откроется).** Gatekeeper в macOS блокирует неподписанные приложения. После того как вы переместите OmniGet в «Программы», откройте Терминал и выполните эти две строки:++```bash+xattr -cr /Applications/omniget.app+codesign --force --deep --sign - /Applications/omniget.app+```++Затем откройте OmniGet как обычно. Это делается один раз.++**Windows.** При первом запуске SmartScreen может показать синее предупреждение. Нажмите **More info (Подробнее)**, затем **Run anyway (Выполнить в любом случае)**. Это стандартно для приложений с открытым исходным кодом без платного сертификата подписи кода.++Бесплатно и с открытым исходным кодом под лицензией GPL-3.0. Обновления идут тихо в фоне. Встроенные инструменты (yt-dlp и FFmpeg) устанавливаются сами, а yt-dlp проверяется по SHA256 перед запуском. Плагины устанавливаются при первом запуске и обновляются сами, настраивать ничего не нужно.----## Всё также воспроизводится внутри+## Одно нажатие, и загрузка пошла++Эту часть любят больше всего. Скопируйте любую ссылку, видео с YouTube, твит, сообщение в Discord, трек, магнет-ссылку, и нажмите глобальную горячую клавишу **`Ctrl+Shift+D`** (**`Cmd+Shift+D`** на macOS). OmniGet прочитает буфер обмена и скачает содержимое в фоне. Вам даже не нужно открывать окно.-Это то, чего люди не ожидают. OmniGet — это не просто место загрузки. Это место, где вы смотрите, читаете и слушаете.+<p align="center">+ <img src="assets/readme/hotkey-illustration.png" alt="Глобальная горячая клавиша загрузки OmniGet, нажмите сочетание и ссылка из буфера обмена скачается в вашу папку" width="760" />+</p>++Это работает откуда угодно в системе. Неважно, что у вас открыто: браузер, чат, читалка. Скопировал, нажал, готово. Файл попадает в вашу папку, а об остальном заботится очередь. Если вам нужен предпросмотр, просто вставьте ссылку в поле на главном экране, взгляните на варианты качества и нажмите «Скачать».++----### Откройте курс и действительно смотрите его+## Какую проблему это решает-Скачайте весь курс (Hotmart, Udemy, Kiwify, Skool, Teachable, Kajabi, Wondrium, Thinkific) и смотрите его, не выходя из приложения. Продолжайте с той секунды, на которой остановились. Делайте заметки, которые при клике переносят вас в тот момент. Читайте приложенные PDF-файлы рядом.+У вас уже открыт yt-dlp в терминале. Вы нашли скрипт для скачивания курсов, который ломается при каждом обновлении сайта. Для музыки у вас отдельное приложение, и все они не связаны друг с другом. Каждая загрузка превращается в три инструмента и копипаст.++OmniGet делает всё это в одном окне. Вставьте ссылку на курс, на YouTube, на TikTok, магнет, подкаст, и оно само разберётся. Файл попадает в вашу папку и воспроизводится прямо в приложении.++Это единственное приложение с открытым исходным кодом, которое скачивает полный курс Udemy или Hotmart, видео и аудио с 1800+ сайтов и вашу музыкальную библиотеку в одном месте без командной строки. Оно набрало тысячи звёзд на GitHub за первые месяцы, потому что такого сочетания больше нигде не было.++---++## Что скачивает OmniGet++Вставьте ссылку. OmniGet определит сайт, покажет предпросмотр с вариантами качества и скачает. Если сайт поддерживается [yt-dlp](https://github.com/yt-dlp/yt-dlp), OmniGet качает с него, а это примерно на тысячу сайтов больше, чем в таблице ниже.++| Категория | Платформы |+|----------|-----------|+| Онлайн-курсы | Hotmart, Udemy, Kiwify, Gumroad, Teachable, Kajabi, Skool, Wondrium, Thinkific, Rocketseat |+| Видео и аудио | YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, Bilibili |+| Bilibili (глубоко) | Войдите для 4K, HDR, Dolby Vision, Hi-Res lossless, Dolby Atmos. Данмаку (XML/ASS/JSON), NFO для Kodi и Jellyfin, 11 типов ссылок (UGC, 番剧, 课程, 收藏夹, UP主, 每周必看, 稍后再看, 历史记录, b23.tv) |+| Азиатские платформы | Douyin (抖音), Xiaohongshu (小红书), Kuaishou (快手), Youku (优酷), iQiyi (爱奇艺), Tencent Video, Mango TV |+| Галереи изображений | DeviantArt, Pixiv, ArtStation, Flickr, Tumblr, альбомы Imgur, Kemono, Newgrounds, имиджборды |+| Файлы и передача | `.torrent` и магнет-ссылки, а также прямая P2P-передача между двумя компьютерами по короткому коду |++То, что люди ищут, и что OmniGet умеет:++- **Скачать полный онлайн-курс**, каждый урок и приложенный PDF, затем смотреть его внутри приложения и продолжать с места остановки.+- **Скачать видео с YouTube или целый плейлист**, выбрать качество или взять только аудио в MP3, M4A, Opus, FLAC или WAV.+- **Скачать TikTok, Instagram, Twitter/X, Reddit**: посты, reels, истории, карусели и галереи.+- **Пакетная загрузка** списка ссылок из текстового файла или целого профиля автора.+- **Скачать только часть видео**, задав начало и конец.+- **Скачать субтитры** на любом языке, встроить их или сгенерировать через Whisper, если их нет.+- **Пропускать спонсорские вставки** через SponsorBlock, автоматически встраивать метаданные и обложки.+- **Подписаться на канал** и автоматически скачивать новые загрузки с уведомлением в трее.+- **Скачать Bilibili в максимальном качестве**, войдите один раз и откройте 4K, HDR, Hi-Res lossless аудио и Dolby Atmos.++Загрузки надёжны, а не угадайка. Скорость и оставшееся время берутся прямо из загрузчика, а не подделываются из процентов, поэтому они остаются точными даже когда размер файла неизвестен или это прямой эфир. Зависание показывается как зависание, а не как застывшее «осталось 3 секунды». Очередь возобновляет прерванные загрузки и повторяет попытки с задержкой.++---++## И всё это воспроизводится внутри++Этого как раз не ждут. OmniGet это не только место, куда вы качаете. Это место, где вы смотрите, читаете и слушаете.++### Откройте курс и реально посмотрите его++Скачайте весь курс (Hotmart, Udemy, Kiwify, Skool, Teachable, Kajabi, Wondrium, Thinkific) и смотрите, не выходя из приложения. Продолжайте с той секунды, где остановились. Делайте заметки, которые по клику переносят в нужный момент. Читайте приложенные PDF рядом.<p align="center">- <img src="assets/screenshot-courses.png" alt="Плеер курсов OmniGet с заметками по временным меткам и PDF-вложениями" width="720" />+ <img src="assets/screenshot-courses.png" alt="Плеер курсов OmniGet с заметками по таймкодам и PDF-вложениями" width="760" /><br/>- <em>Плеер курсов, заметки, привязанные к таймкодам, вложения в том же окне.</em>+ <em>Плеер курсов, заметки закреплены на таймкодах, вложения в том же окне.</em></p>-### Читайте книги, настоящие+### Читайте настоящие книги-Укажите папку с PDF и EPUB. OmniGet извлекает из них обложки, подбирает названия и авторов и открывает каждую во встроенном ридере с выделениями, закладками, режимом фокуса и темой «под бумагу» для глаз. Также поддерживаются CBZ-комиксы и TXT/HTML.+Бросьте папку с PDF и EPUB. OmniGet вытянет из них обложки, найдёт названия и авторов и откроет каждую во встроенной читалке с выделениями, закладками, режимом фокуса и бумажной темой для глаз. CBZ-комиксы, а также TXT и HTML тоже.<p align="center">- <img src="assets/screenshot-reader.png" alt="Встроенный ридер EPUB и PDF в OmniGet с выделениями и режимом фокуса" width="720" />+ <img src="assets/screenshot-reader.png" alt="Встроенная читалка EPUB и PDF в OmniGet с выделениями и режимом фокуса" width="760" /><br/>- <em>Ридер с выделениями, панелью заметок и режимом фокуса.</em>+ <em>Читалка с выделениями, панелью заметок и режимом фокуса.</em></p>-### Музыка, как вы её помните+### Музыка такой, какой вы её помните-Укажите OmniGet вашу музыкальную папку, и он покажет ваши треки так, как когда-то это делал iTunes: альбомы с обложками, исполнители с дискографией, очередь, которая не спорит с вами.+Укажите OmniGet на папку с музыкой, и он покажет ваши треки так, как раньше это делал iTunes: альбомы с обложками, исполнители с дискографиями, очередь, которая ведёт себя нормально.-- Воспроизводит MP3, FLAC, M4A, OGG, Opus — всё, что у вас уже есть.-- Загружает **синхронизированные тексты песен**, которые прокручиваются вместе с песней.-- Подключается к **Spotify, SoundCloud, YouTube Music, Qobuz и Last.fm**, так что ваши плейлисты и лайки появляются рядом с локальными файлами.-- **Эквалайзер** с предустановками, тёмные варианты темы под обложку альбома, панель активности с вашими лучшими треками и Discord-презенс, который показывает, что вы играете.+- Играет MP3, FLAC, M4A, OGG, Opus, всё, что у вас уже есть.+- Подтягивает **синхронизированный текст**, который прокручивается вместе с песней.+- Подключается к **Spotify, SoundCloud, YouTube Music, Qobuz и Last.fm**, чтобы плейлисты и лайки были рядом с локальными файлами.+- **Эквалайзер** с пресетами, варианты тёмной темы под обложку альбома, панель активности с топ-треками и статус в Discord с тем, что вы слушаете.<p align="center">- <img src="assets/screenshot-music.png" alt="Музыкальный плеер OmniGet с просмотром альбомов, синхронизированными текстами и стриминговыми источниками" width="820" />+ <img src="assets/screenshot-music.png" alt="Музыкальный плеер OmniGet с видом альбомов, синхронизированным текстом и стриминговыми источниками" width="820" /><br/>- <em>Локальная библиотека, синхронизированные тексты, стриминговые источники — один плеер.</em>+ <em>Локальная библиотека, синхротекст, стриминговые источники, один плеер.</em></p>----## Мелочи, которые складываются в большое+## Настройки, которые не мешают++Настройки сгруппированы и не шумят. Частые опции прямо перед вами, глубокие живут в одном касании, а поиск находит что угодно по всем категориям и подсвечивает это.-Тихо рядом, когда они вам нужны.+<p align="center">+ <img src="assets/readme/en/settings-drill.png" alt="Настройки OmniGet со сгруппированной боковой панелью и аккуратными разделами" width="820" />+ <br/>+ <em>Сгруппированная боковая панель, один понятный список, каждый раздел открывает свою страницу.</em>+</p>-- **Редактор субтитров**, который открывает SRT, VTT и ASS, с инструментами тайминга, синхронизацией по двум точкам, поиском и заменой, автоисправлением в один клик, переводом и исправлением грамматики через ИИ, а также осциллограммой с маркерами смены кадров.-- **Таймер фокуса Pomodoro**, который ставит видео на паузу по окончании сессии.-- **Приложение заметок** с двунаправленными ссылками, ежедневным дневником и графом знаний.-- **Панель прогресса** со счётчиком дней подряд, ежедневными целями и тепловой картой за год.-- **Конвертер FFmpeg** для локальных файлов, интернет не требуется.-- **Браузер чатов Telegram**, который позволяет сохранять фото, видео и файлы из любого чата.-- **Расширение для браузера** (Chrome и Firefox), которое передаёт текущую страницу в OmniGet одним кликом.-- **Глобальная горячая клавиша** (`Ctrl+Shift+D`), которая скачивает любой URL из буфера обмена.-- **9 языков**, **14 тем**, включая Catppuccin, Dracula, One Dark Pro и три варианта «электронных чернил».+<p align="center">+ <img src="assets/readme/en/settings-output.png" alt="Настройки загрузки OmniGet, папка вывода, сортировка по платформе, шаблон имени файла, пропуск существующих файлов" width="820" />+ <br/>+ <em>Вывод, качество, субтитры и остальное, с короткой подсказкой под каждым пунктом.</em>+</p>----## Как это выглядит в повседневном использовании+## Плагины, которые устанавливаются сами++OmniGet поставляется с полным набором плагинов (курсы, обучение, Telegram, конвертация и другие), и они настраиваются сами при первом запуске. Они также сами обновляются, когда выходит новая версия, так что вам не нужно ничего искать и качать. Включайте и выключайте любой из них в боковой панели и удаляйте ненужные. Что вы удалили, то и остаётся удалённым.<p align="center">- <img src="assets/screenshot-flow.png" alt="Типичный рабочий процесс OmniGet: вставьте ссылку — загрузка в фоне" width="720" />+ <img src="assets/readme/en/plugins.png" alt="Плагины и зависимости OmniGet, сопряжение браузерного расширения и управляемые инструменты в виде таблицы" width="820" />+ <br/>+ <em>Плагины и встроенные инструменты, управляются за вас, показаны понятной таблицей.</em></p>-Скопируйте ссылку где угодно: твит, сообщение в Discord, открытая вкладка. Нажмите `Ctrl+Shift+D`. OmniGet загружает в фоне. Вы даже не открываете окно.--Или вставьте в поисковую строку, взгляните на предпросмотр, нажмите «Скачать».+----Для курса: войдите один раз на платформе, просмотрите библиотеку, выберите нужное, отойдите от компьютера. Каждый урок и вложение попадут в выбранную вами папку.+## Мелочи, которые в сумме решают-Для книг: сбросьте файлы в уже используемую папку, просканируйте один раз — и они появятся с обложками.+Тихо рядом, когда нужны.-Для музыки: укажите папку, и библиотека ваша.+- **Мастерская субтитров**, открывает SRT, VTT и ASS, с инструментами тайминга, синхронизацией по двум точкам, поиском и заменой, автоисправлением в один клик, AI-переводом и AI-исправлением грамматики, и осциллограммой с метками смены кадра.+- **Таймер фокуса Pomodoro**, ставит видео на паузу в конце сессии.+- **Заметки** с двусторонними ссылками, ежедневным дневником и графом знаний.+- **Панель прогресса** со счётчиком серий, дневными целями и тепловой картой по году.+- **Конвертер FFmpeg** для локальных файлов, без интернета.+- **Браузер чатов Telegram**, сохраняет фото, видео и файлы из любого чата.+- **Браузерное расширение** (Chrome и Firefox), передаёт текущую страницу в OmniGet одним кликом.+- **Глобальная горячая клавиша** (`Ctrl+Shift+D`, или `Cmd+Shift+D` на macOS), скачивает любую ссылку из буфера обмена.+- **9 языков** и **14 тем**, включая Catppuccin, Dracula, One Dark Pro и три варианта для электронных чернил.----## Часто задаваемые вопросы+## Частые вопросы++**OmniGet бесплатный?**+Да. Бесплатно и с открытым исходным кодом под GPL-3.0, без аккаунта, без рекламы и без платных тарифов.-**OmniGet бесплатен?**-Да. Бесплатно и с открытым исходным кодом под лицензией GPL-3.0, без аккаунта, без рекламы, без платных версий.+**Нужен ли терминал или Python?**+Нет. OmniGet это обычное настольное приложение. Скачайте, откройте, вставьте ссылку. yt-dlp и FFmpeg встроены и обновляются сами. Единственный раз, когда может понадобиться Терминал, это одноразовый шаг первого запуска на macOS выше.-**Нужен ли мне терминал или Python?**-Нет. OmniGet — обычное десктопное приложение. Скачайте, запустите двойным щелчком, вставьте ссылку. yt-dlp и FFmpeg встроены и обновляются сами.+**Приложение не открывается на macOS, что делать?**+Выполните две команды в Терминале из заметки о первом запуске выше. Gatekeeper блокирует неподписанные приложения с открытым кодом, а эти строки снимают флаг. Делается один раз.-**Это GUI для yt-dlp?**-Под капотом используется yt-dlp для 1800+ общих сайтов, но для крупных платформ есть собственные извлекатели, а сверху — реальный интерфейс, очередь, библиотека и встроенные плееры. Так что да, и намного больше, чем просто GUI.+**Это просто графическая оболочка для yt-dlp?**+Для тех 1800+ обычных сайтов он использует yt-dlp под капотом, плюс нативные экстракторы для крупных платформ, а сверху настоящий интерфейс, очередь, библиотека и встроенные плееры. Так что да, и намного больше, чем оболочка.-**Можно ли скачать полный курс Udemy или Hotmart?**-Да. Вы входите один раз на платформе, выбираете курс, и OmniGet скачивает каждый урок и вложение, а затем воспроизводит их с заметками по времени.+**Может ли он скачать полный курс Udemy или Hotmart?**+Да. Вы один раз входите на платформе, выбираете курс, и OmniGet скачивает каждый урок и вложение, а затем воспроизводит их с заметками по таймкодам.**Какие сайты поддерживаются?**-Онлайн-курсы, YouTube, TikTok, Instagram, Twitter/X, Reddit, Twitch, Vimeo, Bilibili, Pinterest, Bluesky, крупные азиатские платформы, галереи изображений, торренты и магниты, плюс около 1800 других через yt-dlp.+Онлайн-курсы, YouTube, TikTok, Instagram, Twitter/X, Reddit, Twitch, Vimeo, Bilibili, Pinterest, Bluesky, крупные азиатские платформы, галереи изображений, торренты и магнеты, плюс около 1800 других через yt-dlp.**Работает ли на Windows, macOS и Linux?**-Да, на всех трёх. Windows — переносимый `.exe`, macOS — `.dmg`, Linux — Flatpak или пакет.+Да, на всех трёх. Windows это портативный `.exe`, macOS это `.dmg`, Linux это Flatpak или сборка.-**Можно ли скачать только аудио или только фрагмент?**-Да. Извлеките аудио как MP3, M4A, Opus, FLAC или WAV, либо укажите время начала и окончания, чтобы скачать только нужную часть.+**Можно скачать только аудио или только фрагмент?**+Да. Извлеките аудио в MP3, M4A, Opus, FLAC или WAV, или задайте начало и конец, чтобы скачать только нужную часть.**Мои загрузки приватны?**-Да. Всё работает локально, и ваши файлы никогда не покидают ваш компьютер. Нет телеметрии о том, что вы скачиваете.+Да. Всё работает локально, и ваши файлы не покидают компьютер. Никакой телеметрии о том, что вы скачиваете.-**Можно ли скачивать с Bilibili в 4K, HDR или Hi-Res lossless?**-Да, со входом в аккаунт Bilibili. OmniGet общается с официальным API Bilibili и учитывает то, что открывает ваша подписка 大会员 (premium). Без входа загрузки всё ещё работают через yt-dlp в стандартном качестве. Вы также можете сохранять данмаку (弹幕) в форматах XML, ASS или JSON и генерировать NFO-метаданные для Kodi/Jellyfin для вашей коллекции аниме.--**Можно ли отслеживать канал и автоматически забирать новые видео?**-Да. Подпишитесь на канал, и OmniGet будет опрашивать наличие новых видео и может автоматически скачивать их, с уведомлением в системном трее.+**Можно ли скачать Bilibili в 4K, HDR или Hi-Res lossless?**+Да, при входе в аккаунт Bilibili. OmniGet работает с официальным API Bilibili и точно соблюдает то, что открывает ваша премиум-подписка 大会员. Без входа загрузки всё равно работают через yt-dlp в стандартном качестве.---## Сборка из исходников-Для разработчиков. Если вы просто хотите пользоваться OmniGet, [скачайте готовую версию](#скачать-omniget).+Для разработчиков. Если вы просто хотите пользоваться OmniGet, [возьмите релиз](#загрузка-и-установка).```bashgit clone https://github.com/tonhowtf/omniget.gitcd omnigetpnpm installpnpm tauri dev+```++Требуются [Rust](https://rustup.rs/), [Node.js](https://nodejs.org/) 18+ и [pnpm](https://pnpm.io/).++<details>+<summary>Зависимости сборки для Linux</summary>++```bash+sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev patchelf+```++</details>++Продакшен-сборка: `pnpm tauri build`.++---++## Участие++Нашли баг или есть идея? [Откройте issue](https://github.com/tonhowtf/omniget/issues). Pull request приветствуются, см. [CONTRIBUTING.md](CONTRIBUTING.md).++OmniGet переводится на [Weblate](https://hosted.weblate.org/engage/omniget/). Выберите язык, переводите в браузере, и Weblate сам откроет pull request.++## Уведомление для владельцев платформ++Если вы представляете указанную платформу и у вас есть вопросы, напишите на **[email protected]** с корпоративного адреса. Платформа будет убрана из списка сразу же.++## Правовая информация++OmniGet предназначен для личного использования. Уважайте авторские права и условия каждой платформы. Вы отвечаете за то, что скачиваете.++## Лицензия++[GPL-3.0](LICENSE). Название OmniGet, логотип и талисман Loop являются товарными знаками проекта и не покрываются лицензией на код.diff --git a/README_zh_CN.md b/README_zh_CN.mdindex 4c9697fd..1b91b75c 100644--- a/README_zh_CN.md+++ b/README_zh_CN.md@@ -1,227 +1,278 @@+<!--+SEO / discovery: OmniGet 是适用于 Windows、macOS 和 Linux 的免费开源下载器。+建议的 GitHub topics(在仓库 Settings > Topics 中设置):+video-downloader, youtube-downloader, media-downloader, course-downloader, udemy-downloader,+music-downloader, ebook-reader, yt-dlp, yt-dlp-gui, tauri, svelte, rust, desktop-app,+cross-platform, open-source, instagram-downloader, tiktok-downloader, bilibili, torrent, p2p+-->+<p align="center">- <img src="static/loop.png" alt="Loop,OmniGet 的吉祥物" width="120" />+ <img src="static/loop.png" alt="OmniGet 吉祥物 Loop" width="120" /></p><h1 align="center">OmniGet</h1>-<h3 align="center">在一个应用里下载 Udemy 课程、YouTube 和 1800+ 网站。无需命令行。</h3>+<h3 align="center">一个应用,下载 Udemy 课程、YouTube、音乐、电子书,以及 1,800+ 网站。无需终端。</h3><p align="center">-<a href="README.md">English</a>-| <b>中文</b>-| <a href="README.ru.md">Русский</a>+ <a href="README.md">English</a>+ | <b>中文</b>+ | <a href="README.ru.md">Русский</a></p><p align="center"><a href="https://github.com/tonhowtf/omniget/releases/latest"><img src="https://img.shields.io/github/v/release/tonhowtf/omniget?style=for-the-badge&label=release" alt="最新版本" /></a>- <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-green?style=for-the-badge" alt="GPL-3.0 许可证" /></a>- <a href="https://github.com/tonhowtf/omniget/stargazers"><img src="https://img.shields.io/github/stars/tonhowtf/omniget?style=for-the-badge" alt="GitHub Stars" /></a>- <a href="https://github.com/tonhowtf/omniget/releases"><img src="https://img.shields.io/github/downloads/tonhowtf/omniget/total?style=for-the-badge&label=downloads" alt="下载量" /></a>+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-green?style=for-the-badge" alt="许可证 GPL-3.0" /></a>+ <a href="https://github.com/tonhowtf/omniget/stargazers"><img src="https://img.shields.io/github/stars/tonhowtf/omniget?style=for-the-badge" alt="GitHub stars" /></a>+ <a href="https://github.com/tonhowtf/omniget/releases"><img src="https://img.shields.io/github/downloads/tonhowtf/omniget/total?style=for-the-badge&label=downloads" alt="总下载量" /></a><a href="https://hosted.weblate.org/engage/omniget/"><img src="https://hosted.weblate.org/widget/omniget/frontend-json/svg-badge.svg" alt="翻译进度" /></a></p><p align="center">- <b>OmniGet</b> 是一款适用于 Windows、macOS 和 Linux 的免费开源桌面应用,可以下载在线课程(Udemy、Hotmart、Kiwify、Skool、Teachable 等),来自 YouTube、TikTok、Instagram、Twitter/X、Reddit 以及超过 1800 个其他网站的视频和音频,还有音乐和书籍。所有内容都在应用内播放。无需命令行,无需配置,文件全部保存在你自己的电脑上。+ <b>OmniGet</b> 是一款适用于 Windows、macOS 和 Linux 的免费开源桌面应用。它可以下载在线课程(Udemy、Hotmart、Kiwify、Skool、Teachable 等),下载来自 YouTube、TikTok、Instagram、Twitter/X、Reddit 以及 1,800+ 其他网站的视频和音频,还能管理你的音乐和电子书。所有内容都能在应用内播放。无需命令行,无需 Python,无需配置,你的文件始终留在本地电脑上。</p><p align="center">- <a href="#获取-omniget"><b>下载 Windows、macOS 或 Linux 版本</b></a>+ <a href="#下载与安装"><b>下载 Windows、macOS 或 Linux 版本</b></a>+ · + <a href="#一个快捷键就开始下载"><b>了解一键下载快捷键</b></a></p><p align="center">- <img src="assets/screenshot.png" alt="OmniGet 桌面应用主界面,一款免费的课程、视频、音乐和书籍下载器" width="820" />+ <img src="assets/readme/en/home-hero.png" alt="OmniGet 主界面,适用于 Windows、macOS 和 Linux 的免费课程、视频、音乐和电子书下载器" width="880" /></p>----## 它解决的问题--你已经在终端里开着 yt-dlp。你找到的某个 Udemy 下载脚本,每次网站更新都会失效。音乐又得用另一个工具,而它们彼此互不相通。每一次下载都是三个工具加一堆复制粘贴。--OmniGet 把这三件事放进一个窗口。粘贴课程链接、YouTube 链接、TikTok、磁力链接、播客,它会自己搞定剩下的。无需终端,无需 Python,无需配置。文件落进你的文件夹,并且就在应用里直接播放。--它是唯一一款能在一个地方、不用命令行就下载完整 Udemy 或 Hotmart 课程、1800+ 网站的视频与音频、以及你的音乐库的开源应用。上线头几个月就收获了数千个 GitHub Star,它能成长起来,是因为这个组合在别处根本不存在。-------## OmniGet 能下载什么--你粘贴一个链接。OmniGet 识别网站,显示带画质选项的预览,然后下载。只要 [yt-dlp](https://github.com/yt-dlp/yt-dlp) 支持的网站,OmniGet 就能下载,比下表多出大约一千个。+## 下载与安装-| 类别 | 平台 |-|------|------|-| 在线课程 | Hotmart、Udemy、Kiwify、Gumroad、Teachable、Kajabi、Skool、Wondrium、Thinkific、Rocketseat |-| 视频和音频 | YouTube、Instagram、TikTok、Twitter/X、Reddit、Twitch、Pinterest、Vimeo、Bluesky、**Bilibili** ✨ |-| Bilibili 深度支持 | 登录后解锁 4K / HDR / 杜比视界 / Hi-Res 无损 / 杜比全景声 · 弹幕(XML/ASS/JSON) · Kodi/Jellyfin 的 NFO · 11 种 URL 类型(投稿 / 番剧 / 课程 / 收藏夹 / UP主 / 每周必看 / 稍后再看 / 历史记录 / b23.tv) |-| 亚洲平台 | 抖音、小红书、快手、优酷、爱奇艺、腾讯视频、芒果 TV |-| 图集 | DeviantArt、Pixiv、ArtStation、Flickr、Tumblr、Imgur 相册、Kemono、Newgrounds、图站 |-| 文件与传输 | `.torrent` 和磁力链接,以及两台电脑之间用短码进行的点对点直传 |--人们常搜索、而 OmniGet 能做到的事:--- **下载完整在线课程**,包括每一节课和附带的 PDF,然后在应用内观看,并从你停下的地方继续。-- **下载 YouTube 视频或整个播放列表**,自选画质,或仅下载音频为 MP3、M4A、Opus、FLAC、WAV。-- **下载 TikTok、Instagram、Twitter/X、Reddit** 的帖子、Reels、快拍、轮播图和图集。-- **批量下载**:从文本文件读取一组链接,或下载整个创作者主页。-- **只下载视频的一段**,设定开始和结束时间即可。-- **下载字幕**:任意语言,可嵌入,没有字幕时还能用 Whisper 生成。-- **跳过广告**:内置 SponsorBlock,并可自动嵌入元数据和封面。-- **关注频道**:自动下载新视频,并有托盘通知。-- **以最高画质下载 B 站视频**:登录一次,解锁 4K、HDR、Hi-Res 无损音频和杜比全景声。番剧和课程按 Plex 期望的方式整理(Season/Episode 文件夹,带 `tvshow.nfo`)。--下载是可靠的,不是猜谜。速度和剩余时间直接来自下载器,而不是从百分比凑出来,所以即使文件大小未知或是直播流也依然准确。卡住就显示为卡住,而不是冻在“还剩 3 秒”。队列会续传中断的下载,按退避策略重试,不跟你较劲。-------## 获取 OmniGet+选择你的系统,下载最新版本,然后打开它。没有冗长的安装向导,也不需要管理员权限。<table><tr><th>平台</th>- <th>下载</th>+ <th>如何安装</th></tr><tr><td><strong>Windows</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 OmniGet Windows 版" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 Windows 版 OmniGet" src="https://img.shields.io/badge/Windows-Portable_EXE-0078D6?style=for-the-badge&logo=windows&logoColor=white" height="38"></a><br/>- <sub>下载 <code>.exe</code> 双击即可。无需安装程序,无需管理员权限。</sub>+ <sub>从 Releases 下载 <code>.exe</code> 并双击运行。它是便携版,放在哪里都能运行。</sub></td></tr><tr><td><strong>macOS</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 OmniGet macOS 版" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 macOS 版 OmniGet" src="https://img.shields.io/badge/macOS-DMG-000000?style=for-the-badge&logo=apple&logoColor=white" height="38"></a><br/>- <sub>打开 <code>.dmg</code>,把 OmniGet 拖进“应用程序”。</sub>+ <sub>打开 <code>.dmg</code>,把 OmniGet 拖进“应用程序”文件夹。请先阅读下面的首次启动说明。</sub></td></tr><tr><td><strong>Linux</strong></td><td>- <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 OmniGet Linux 版" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="40"></a>+ <a href="https://github.com/tonhowtf/omniget/releases/latest"><img alt="下载 Linux 版 OmniGet" src="https://img.shields.io/badge/Linux-Flatpak-FFAA33?style=for-the-badge&logo=linux&logoColor=white" height="38"></a><br/>- <sub><code>flatpak install wtf.tonho.omniget</code>,或从 Releases 获取打包文件。</sub>+ <sub>运行 <code>flatpak install wtf.tonho.omniget</code>,或从 Releases 下载安装包。</sub></td></tr></table>-基于 GPL-3.0 的免费开源软件。更新在后台静默进行。捆绑的工具(yt-dlp、FFmpeg)会自行安装,yt-dlp 在运行前会经过 SHA256 校验。你的文件永远不会离开你的电脑。+### ⚠️ 首次启动前请务必阅读++OmniGet 是开源软件,没有使用付费证书签名,因此第一次打开时系统可能会发出警告。这是正常现象,按下面的步骤操作即可一劳永逸地解决。无论如何,你的文件都只保存在本地。++**macOS(这一步最关键,应用第一次会打不开)。** macOS 的 Gatekeeper 会拦截未签名的应用。把 OmniGet 移到“应用程序”后,打开“终端”并运行这两行命令:++```bash+xattr -cr /Applications/omniget.app+codesign --force --deep --sign - /Applications/omniget.app+```++然后正常打开 OmniGet 即可。只需操作一次。++**Windows。** 首次运行时 SmartScreen 可能会显示蓝色警告。点击 **More info(更多信息)**,然后点击 **Run anyway(仍要运行)**。对于没有付费代码签名证书的开源应用,这是很常见的。++本软件基于 GPL-3.0 免费开源。更新会在后台静默进行。内置工具(yt-dlp 和 FFmpeg)会自行安装,yt-dlp 在运行前会通过 SHA256 校验。插件会在首次启动时安装并自动更新,无需你做任何配置。++---++## 一个快捷键,就开始下载++这是最让人着迷的部分。复制任意链接,无论是 YouTube 视频、一条推文、一条 Discord 消息、一首歌还是一个磁力链接,然后按下全局快捷键 **`Ctrl+Shift+D`**(macOS 上为 **`Cmd+Shift+D`**)。OmniGet 会读取你的剪贴板并在后台下载,你甚至不需要打开窗口。++<p align="center">+ <img src="assets/readme/hotkey-illustration.png" alt="OmniGet 全局下载快捷键,按下快捷键即可把剪贴板里的链接下载到文件夹" width="760" />+</p>++它在系统的任何地方都能用。无论你正在浏览、聊天还是阅读,当前是哪个应用都没关系。复制、按键、完成。文件会落到你的文件夹里,剩下的交给下载队列。如果你想先看预览,把链接粘贴到主界面的输入框,看一眼画质选项,再点下载即可。++---++## 它解决的问题++你的终端里已经开着 yt-dlp。你找到的课程下载脚本每次网站更新就失效。你的音乐还要用另一个软件,而它们彼此互不相通。每次下载都变成了三个工具加上反复复制粘贴。++OmniGet 在一个窗口里搞定这一切。粘贴课程链接、YouTube 链接、TikTok、磁力链接、播客,它会自动判断该怎么做。文件落到你的文件夹,并且就在应用里播放。++它是唯一一款能在同一处、无需命令行就完整下载 Udemy 或 Hotmart 课程、下载来自 1,800+ 网站的视频和音频、还能管理音乐库的开源应用。它在上线头几个月就收获了数千个 GitHub star,正是因为这种组合此前别处没有。++---++## OmniGet 能下载什么++粘贴链接。OmniGet 会识别网站,显示带画质选项的预览,然后下载。只要 [yt-dlp](https://github.com/yt-dlp/yt-dlp) 支持某个网站,OmniGet 就能从它下载,这比下面表格多出大约一千个站点。++| 类别 | 平台 |+|----------|-----------|+| 在线课程 | Hotmart、Udemy、Kiwify、Gumroad、Teachable、Kajabi、Skool、Wondrium、Thinkific、Rocketseat |+| 视频和音频 | YouTube、Instagram、TikTok、Twitter/X、Reddit、Twitch、Pinterest、Vimeo、Bluesky、哔哩哔哩 |+| 哔哩哔哩(深度支持) | 登录后可下 4K、HDR、杜比视界、Hi-Res 无损、杜比全景声。弹幕(XML/ASS/JSON)、用于 Kodi 和 Jellyfin 的 NFO、11 种链接类型(UGC、番剧、课程、收藏夹、UP主、每周必看、稍后再看、历史记录、b23.tv) |+| 亚洲平台 | 抖音、小红书、快手、优酷、爱奇艺、腾讯视频、芒果 TV |+| 图集 | DeviantArt、Pixiv、ArtStation、Flickr、Tumblr、Imgur 相册、Kemono、Newgrounds、各类图床 |+| 文件与传输 | `.torrent` 和磁力链接,以及两台电脑之间用短代码直接 P2P 传输 |++大家常搜、OmniGet 都能做到的:++- **下载完整的在线课程**,包括每节课和附带的 PDF,然后在应用内观看,并从上次停下的地方继续。+- **下载 YouTube 视频或整个播放列表**,自选画质,或只提取音频,格式可选 MP3、M4A、Opus、FLAC 或 WAV。+- **下载 TikTok、Instagram、Twitter/X、Reddit** 的帖子、短视频、快拍、轮播图和图集。+- **批量下载** 文本文件里的链接列表,或某个创作者的整个主页。+- **只下载视频的一部分**,设置开始和结束时间即可。+- **下载任意语言的字幕**,可嵌入,也可在没有字幕时用 Whisper 自动生成。+- **跳过赞助片段**(SponsorBlock),并自动嵌入元数据和缩略图。+- **关注频道**,自动下载新发布的内容,并通过托盘通知提醒。+- **以最高画质下载哔哩哔哩**,登录一次即可解锁 4K、HDR、Hi-Res 无损音频和杜比全景声。++下载是可靠的,而不是靠猜。速度和剩余时间直接来自下载器,而不是用百分比伪造出来的,所以即使文件大小未知或是直播流,它们也保持准确。卡住时会明确显示为卡住,而不是停在“还剩 3 秒”。队列会续传中断的下载,并按退避策略重试。----## 下载完,还能在应用内播放+## 它还能在应用内播放一切-这是大多数人没料到的部分。OmniGet 不只是下载的地方,也是你观看、阅读和聆听的地方。+这是大家没想到的部分。OmniGet 不只是下载的地方,也是你观看、阅读和聆听的地方。-### 打开课程,真正把它看完+### 打开课程,真正地学起来-下载整套课程(Hotmart、Udemy、Kiwify、Skool、Teachable、Kajabi、Wondrium、Thinkific),不用离开应用就能观看。从你停下的那一秒继续。做的笔记一点就跳回那个时刻。附带的 PDF 可以并排阅读。+下载整门课程(Hotmart、Udemy、Kiwify、Skool、Teachable、Kajabi、Wondrium、Thinkific),无需离开应用即可观看。从你停下的那一秒继续。记笔记,点击就能跳回那个时刻。并排阅读附带的 PDF。<p align="center">- <img src="assets/screenshot-courses.png" alt="OmniGet 课程播放器,带时间戳笔记与 PDF 附件" width="720" />+ <img src="assets/screenshot-courses.png" alt="OmniGet 课程播放器,带时间戳笔记和 PDF 附件" width="760" /><br/>- <em>课程播放器,笔记钉在时间戳上,附件就在同一个窗口里。</em>+ <em>课程播放器,笔记钉在时间戳上,附件在同一个窗口里。</em></p>-### 读书,真正的书+### 阅读真正的书-把一个装满 PDF 和 EPUB 的文件夹拖进来。OmniGet 会从中提取封面,获取书名和作者,并用内置阅读器逐本打开,支持高亮、书签、专注模式和护眼的纸张质感主题。CBZ 漫画与 TXT/HTML 同样支持。+放入一个装着 PDF 和 EPUB 的文件夹。OmniGet 会从中提取封面,获取书名和作者,并在内置阅读器中打开,支持高亮、书签、专注模式,以及护眼的纸张质感主题。CBZ 漫画以及 TXT、HTML 也支持。<p align="center">- <img src="assets/screenshot-reader.png" alt="OmniGet 内置 EPUB 与 PDF 阅读器,带高亮和专注模式" width="720" />+ <img src="assets/screenshot-reader.png" alt="OmniGet 内置 EPUB 和 PDF 阅读器,带高亮和专注模式" width="760" /><br/>- <em>带高亮、笔记面板与专注模式的阅读器。</em>+ <em>阅读器,带高亮、笔记面板和专注模式。</em></p>### 音乐,还是你记忆中的样子-把 OmniGet 指向你的音乐文件夹,它会像当年的 iTunes 那样展示你的曲目:带封面的专辑,带完整作品集的艺人,一个不跟你较劲的播放队列。+把 OmniGet 指向你的音乐文件夹,它会像当年的 iTunes 那样展示你的曲目:带封面的专辑、带作品集的歌手,还有一个听话的播放队列。-- 播放 MP3、FLAC、M4A、OGG、Opus,你已有的格式都行。-- 拉取**同步歌词**,随歌曲滚动。-- 连接 **Spotify、SoundCloud、YouTube Music、Qobuz 和 Last.fm**,你的歌单和喜欢会和本地文件并列显示。-- **均衡器**带预设,按专辑封面切换的深色主题变体,显示常听曲目的活动面板,以及展示正在播放内容的 Discord 状态。+- 播放 MP3、FLAC、M4A、OGG、Opus,凡是你已有的格式都能放。+- 拉取 **同步歌词**,让歌词随歌曲滚动。+- 连接 **Spotify、SoundCloud、YouTube Music、Qobuz 和 Last.fm**,让你的歌单和喜欢的歌曲与本地文件并排出现。+- **均衡器** 带预设、按专辑封面变化的深色主题、显示热门曲目的活动面板,还有显示你正在听什么的 Discord 状态。<p align="center">- <img src="assets/screenshot-music.png" alt="OmniGet 音乐播放器,专辑视图、同步歌词与流媒体来源" width="820" />+ <img src="assets/screenshot-music.png" alt="OmniGet 音乐播放器,带专辑视图、同步歌词和流媒体来源" width="820" /><br/>- <em>本地音乐库、同步歌词、流媒体来源,一个播放器搞定。</em>+ <em>本地音乐库、同步歌词、流媒体来源,一个播放器全搞定。</em></p>----## 那些不起眼却管用的细节+## 不打扰你的设置++设置是分组的,安静而清爽。常用选项就在眼前,深度选项只在一步之遥,搜索框能跨所有分类找到任意设置并为你高亮。-需要时它们就在那里。+<p align="center">+ <img src="assets/readme/en/settings-drill.png" alt="OmniGet 设置,带分组侧边栏和清爽的逐层进入式分区" width="820" />+ <br/>+ <em>分组侧边栏,一份清晰的列表,每个分区都打开自己的页面。</em>+</p>-- **字幕工作台**:可打开 SRT、VTT 和 ASS,带时间轴工具、双点同步、查找替换、一键自动修复、AI 翻译与 AI 语法修正,以及带镜头切换标记的波形图。-- **番茄钟专注计时器**:会话结束时会暂停你的视频。-- **笔记应用**:双向链接、每日日志和知识图谱。-- **进度面板**:连续天数计数、每日目标和年度热力图。-- **FFmpeg 转换器**:处理本地文件,无需联网。-- **Telegram 聊天浏览器**:从任意聊天保存图片、视频和文件。-- **浏览器扩展**(Chrome 和 Firefox):一键把当前页面交给 OmniGet。-- **全局快捷键**(`Ctrl+Shift+D`):下载剪贴板里的任意网址。-- **9 种语言**,**14 款主题**,包括 Catppuccin、Dracula、One Dark Pro 和三款电子墨水变体。+<p align="center">+ <img src="assets/readme/en/settings-output.png" alt="OmniGet 下载设置,输出文件夹、按平台整理、文件名模板、跳过已存在文件" width="820" />+ <br/>+ <em>输出、画质、字幕等等,每个选项下面都有一行简短说明。</em>+</p>----## 日常用起来是什么感觉+## 会自我安装的插件++OmniGet 自带完整的插件(课程、学习、Telegram、转换等等),它们会在首次启动时自行安装。当有新版本发布时,它们也会自动更新,你永远不用去手动找下载。可以在侧边栏里随时开关任意插件,也可以卸载你不需要的。你移除的,就一直保持移除状态。<p align="center">- <img src="assets/screenshot-flow.png" alt="OmniGet 典型流程,粘贴链接后在后台下载" width="720" />+ <img src="assets/readme/en/plugins.png" alt="OmniGet 插件与依赖,浏览器扩展配对以及以表格形式展示的受管理工具" width="820" />+ <br/>+ <em>插件和内置工具,已为你管理好,并以清晰的表格展示。</em></p>-在任何地方复制一个链接,一条推文、一条 Discord 消息、一个打开的标签页。按 `Ctrl+Shift+D`。OmniGet 在后台下载。你甚至不用打开窗口。--或者粘贴到 omnibox,瞄一眼预览,点击下载。+----下载课程:在平台上登录一次,浏览你的库,选好要的,走开。每一节课和附件都会落进你选的文件夹。+## 那些加起来很顶用的小功能-下载书籍:把文件丢进你本来就在用的文件夹,扫描一次,它们就带着封面出现。+需要时静静地待在那里。-下载音乐:指向一个文件夹,这个库就是你的了。+- **字幕工作室**,可打开 SRT、VTT 和 ASS,带时间轴工具、两点同步、查找替换、一键自动修复、AI 翻译和 AI 语法修复,以及带镜头切换标记的波形图。+- **番茄专注计时器**,会在专注结束时暂停你的视频。+- **笔记应用**,带双向链接、每日日记和知识图谱。+- **进度面板**,带连续打卡计数、每日目标和年度风格的热力图。+- **FFmpeg 转换器**,处理本地文件,无需联网。+- **Telegram 聊天浏览器**,可保存任意聊天中的照片、视频和文件。+- **浏览器扩展**(Chrome 和 Firefox),一键把当前页面交给 OmniGet。+- **全局快捷键**(`Ctrl+Shift+D`,macOS 上为 `Cmd+Shift+D`),下载剪贴板里的任意链接。+- **9 种语言** 和 **14 种主题**,包括 Catppuccin、Dracula、One Dark Pro 以及三种墨水屏配色。---## 常见问题-**OmniGet 收费吗?**-不收费。基于 GPL-3.0 的免费开源软件,无需账号,没有广告,也没有付费档位。+**OmniGet 免费吗?**+免费。基于 GPL-3.0 开源,无需账号,没有广告,也没有付费档位。++**我需要终端或 Python 吗?**+不需要。OmniGet 是一个普通的桌面应用。下载、打开、粘贴链接即可。yt-dlp 和 FFmpeg 已内置并会自动更新。唯一可能用到“终端”的,是上面那一次性的 macOS 首次启动步骤。-**需要终端或 Python 吗?**-不需要。OmniGet 是一个普通的桌面应用。下载、双击、粘贴链接即可。yt-dlp 和 FFmpeg 已捆绑并会自动更新。+**在 macOS 上应用打不开,怎么办?**+运行[首次启动说明](#️-首次启动前请务必阅读)里的两条终端命令。Gatekeeper 会拦截未签名的开源应用,那两行命令会清除这个标记。只需操作一次。-**这是 yt-dlp 的图形界面吗?**-底层用 yt-dlp 处理那 1800+ 通用网站,对主流平台有原生提取器,并在其上加了真正的界面、队列、媒体库和内置播放器。所以是,而且远不止一个图形界面。+**这只是 yt-dlp 的图形界面吗?**+对于那 1,800+ 个通用网站,它底层使用 yt-dlp,同时为大平台配有原生解析器,并在其上提供真正的界面、下载队列、媒体库和内置播放器。所以可以说是,但远不止一个图形界面。-**能下载完整的 Udemy 或 Hotmart 课程吗?**-能。你在平台上登录一次,选好课程,OmniGet 会下载每一节课和附件,并带时间戳笔记回放。+**它能下载完整的 Udemy 或 Hotmart 课程吗?**+可以。你在平台上登录一次,选择课程,OmniGet 就会下载每节课和每个附件,然后用带时间戳笔记的播放器回放。**支持哪些网站?**-在线课程、YouTube、TikTok、Instagram、Twitter/X、Reddit、Twitch、Vimeo、Bilibili、Pinterest、Bluesky、主流亚洲平台、图集、种子和磁力链接,再加上通过 yt-dlp 支持的约 1800 个网站。+在线课程、YouTube、TikTok、Instagram、Twitter/X、Reddit、Twitch、Vimeo、哔哩哔哩、Pinterest、Bluesky、各大亚洲平台、图集、种子和磁力,以及通过 yt-dlp 支持的约 1,800 个网站。-**支持 Windows、macOS 和 Linux 吗?**-三者都支持。Windows 是便携 `.exe`,macOS 是 `.dmg`,Linux 是 Flatpak 或打包文件。+**它能在 Windows、macOS 和 Linux 上运行吗?**+都可以。Windows 是便携版 `.exe`,macOS 是 `.dmg`,Linux 是 Flatpak 或安装包。-**能只下音频,或只下一个片段吗?**-能。把音频提取为 MP3、M4A、Opus、FLAC 或 WAV,或者设定开始和结束时间,只下载你需要的那一段。+**能只下载音频,或者只下一个片段吗?**+可以。提取音频为 MP3、M4A、Opus、FLAC 或 WAV,或者设置开始和结束时间,只下载你需要的那一段。**我的下载是私密的吗?**-是。一切都在本地运行,文件永远不会离开你的电脑。不会上报你下载了什么。+是的。一切都在本地运行,你的文件不会离开你的电脑。对于你下载了什么,没有任何遥测。-**能下载 B 站 4K、HDR 或 Hi-Res 无损吗?**-能,只要在应用内登录 B 站账号。OmniGet 直接对接 B 站官方 API,严格按你大会员订阅能解锁的内容工作。不登录时,仍可通过 yt-dlp 以标准画质下载。还能把弹幕保存为 XML、ASS 或 JSON,并为番剧库生成 Kodi/Jellyfin 兼容的 NFO 元数据。--**能关注频道并自动抓取新视频吗?**-能。关注一个频道,OmniGet 会轮询新上传并可自动下载,还有系统托盘通知。+**能以 4K、HDR 或 Hi-Res 无损下载哔哩哔哩吗?**+可以,需要登录哔哩哔哩账号。OmniGet 对接哔哩哔哩官方 API,严格遵循你的大会员订阅所解锁的权限。不登录时,仍可通过 yt-dlp 以标准画质下载。---## 从源码构建-面向开发者。如果你只想使用 OmniGet,请[获取发布版](#获取-omniget)。+面向开发者。如果你只是想使用 OmniGet,请[下载发行版](#下载与安装)。```bashgit clone https://github.com/tonhowtf/omniget.git@@ -230,7 +281,7 @@ pnpm installpnpm tauri dev```-需要 [Rust](https://rustup.rs/)、[Node.js](https://nodejs.org/) 18+、[pnpm](https://pnpm.io/)。+需要 [Rust](https://rustup.rs/)、[Node.js](https://nodejs.org/) 18+ 和 [pnpm](https://pnpm.io/)。<details><summary>Linux 构建依赖</summary>@@ -241,38 +292,24 @@ sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file lib</details>-<details>-<summary>Windows SmartScreen 与 macOS Gatekeeper 提示</summary>--**Windows:** 首次运行时 SmartScreen 可能会警告。点击**更多信息**,再点**仍要运行**。对于没有付费代码签名证书的开源应用,这很正常。--**macOS:** 如果 Gatekeeper 拦截了应用,在终端运行:--```bash-xattr -cr /Applications/omniget.app-codesign --force --deep --sign - /Applications/omniget.app-```--</details>-生产构建:`pnpm tauri build`。---## 参与贡献-发现 Bug 或有功能想法?[提交 issue](https://github.com/tonhowtf/omniget/issues)。欢迎 Pull Request,详见 [CONTRIBUTING.md](CONTRIBUTING.md)。+发现 bug 或有功能建议?[提交 issue](https://github.com/tonhowtf/omniget/issues)。欢迎提交 PR,详见 [CONTRIBUTING.md](CONTRIBUTING.md)。-OmniGet 在 [Weblate](https://hosted.weblate.org/engage/omniget/) 上翻译。选一种语言,在浏览器里翻译,Weblate 会自动开启 Pull Request。+OmniGet 在 [Weblate](https://hosted.weblate.org/engage/omniget/) 上进行翻译。选择一种语言,在浏览器里翻译,Weblate 会自动开 PR。## 致平台方-如果你代表所列平台并有顾虑,请用公司邮箱发邮件至 **[email protected]**。该平台会立即从列表中移除。+如果你代表某个被列出的平台并有顾虑,请用公司邮箱发邮件至 **[email protected]**。该平台会立即从列表中移除。## 法律声明-OmniGet 仅供个人使用。请尊重版权和各平台的服务条款。你对自己下载的内容负责。+OmniGet 仅供个人使用。请尊重版权和各平台的服务条款。你需对自己下载的内容负责。## 许可证-[GPL-3.0](LICENSE)。OmniGet 名称、Logo 和 Loop 吉祥物为项目商标,不在代码许可证覆盖范围内。+[GPL-3.0](LICENSE)。OmniGet 名称、徽标和吉祥物 Loop 是项目商标,不在代码许可证的涵盖范围内。diff --git a/assets/readme/en/home-hero.png b/assets/readme/en/home-hero.pngnew file mode 100644index 00000000..9723fac0Binary files /dev/null and b/assets/readme/en/home-hero.png differdiff --git a/assets/readme/en/plugins.png b/assets/readme/en/plugins.pngnew file mode 100644index 00000000..0255c4baBinary files /dev/null and b/assets/readme/en/plugins.png differdiff --git a/assets/readme/en/settings-drill.png b/assets/readme/en/settings-drill.pngnew file mode 100644index 00000000..f5a3ee7eBinary files /dev/null and b/assets/readme/en/settings-drill.png differdiff --git a/assets/readme/en/settings-output.png b/assets/readme/en/settings-output.pngnew file mode 100644index 00000000..da44c0a5Binary files /dev/null and b/assets/readme/en/settings-output.png differdiff --git a/assets/readme/hotkey-illustration.png b/assets/readme/hotkey-illustration.pngnew file mode 100644index 00000000..8abfd8efBinary files /dev/null and b/assets/readme/hotkey-illustration.png differdiff --git a/assets/readme/hotkey-illustration.svg b/assets/readme/hotkey-illustration.svgnew file mode 100644index 00000000..4d300187--- /dev/null+++ b/assets/readme/hotkey-illustration.svg@@ -0,0 +1,92 @@+<svg xmlns="http://www.w3.org/2000/svg" height="1024" preserveAspectRatio="none" style="display: block;" version="1.1" viewBox="0 0 2048 2048" width="1024">+<defs>+ <linearGradient gradientUnits="userSpaceOnUse" id="Gradient1" x1="1967.69" x2="1443.62" y1="1079.24" y2="1101.1">+ <stop class="stop0" offset="0" stop-color="rgb(0,0,0)" stop-opacity="1"></stop>+ <stop class="stop1" offset="1" stop-color="rgb(16,27,53)" stop-opacity="1"></stop>+ </linearGradient>+ <linearGradient gradientUnits="userSpaceOnUse" id="Gradient2" x1="1662.96" x2="1615.67" y1="1380.14" y2="678.685">+ <stop class="stop0" offset="0" stop-color="rgb(94,118,241)" stop-opacity="1"></stop>+ <stop class="stop1" offset="1" stop-color="rgb(167,185,246)" stop-opacity="1"></stop>+ </linearGradient>+</defs>+<path d="M 0 0 L 2048 0 L 2048 2048 L 0 2048 L 0 1328.77 L 0 1291.33 L 0 1255.73 L 0 1252.96 L 0 1169.3 L 0 1166.49 L 0 1152.46 L 0 1149.95 L 0 1064.59 L 0 1061.75 L 0 1043.3 L 0 1040.87 L 0 965.44 L 0 962.501 L 0 941.919 L 0 938.998 L 0 861.347 L 0 858.744 L 0 843.351 L 0 840.557 L 0 755.995 L 0 753.145 L 0 733.971 L 0 731.047 L 0 0 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 733.971 L 474.034 734.022 L 614.837 733.883 C 636.861 733.861 666.628 732.33 687.938 734.87 C 719.013 738.573 740.078 765.151 743.621 796.022 C 745.205 826.7 744.118 864.471 744.161 895.878 L 744.165 1084.89 L 744.191 1183.07 C 744.195 1199.48 744.708 1218.56 743.209 1234.71 C 742.154 1246.07 734.158 1259.45 726.729 1267.83 C 713.434 1282.83 694.806 1291.54 674.61 1291.68 C 649.517 1291.85 623.86 1291.44 598.633 1291.36 L 448.873 1291.21 L 0 1291.33 L 0 1255.73 L 0 1252.96 L 0 1169.3 L 0 1166.49 L 0 1152.46 L 0 1149.95 L 0 1064.59 L 0 1061.75 L 0 1043.3 L 0 1040.87 L 0 965.44 L 0 962.501 L 0 941.919 L 0 938.998 L 0 861.347 L 0 858.744 L 0 843.351 L 0 840.557 L 0 755.995 L 0 753.145 L 0 733.971 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 1169.3 L 78.0255 1169.31 C 130.363 1169.07 144.585 1163.19 141.182 1226.03 C 139.355 1259.76 101.001 1253.14 76.0529 1253.1 L 0 1252.96 L 0 1169.3 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 861.347 C 13.7266 855.436 24.9645 857.241 38.6794 857.409 C 79.4567 857.909 103.616 848.29 103.049 900.219 C 102.566 944.543 90.0576 944.028 49.1122 943.355 C 31.4601 943.065 16.7893 945.842 0 938.998 L 0 861.347 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 1064.59 C 20.0782 1064.6 40.4533 1064.05 60.4482 1065.36 C 65.7038 1066.53 69.7118 1068.56 73.5948 1072.42 C 77.6236 1076.42 79.474 1080.95 79.8725 1086.5 C 85.2617 1161.49 66.1811 1150.11 0 1149.95 L 0 1064.59 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 755.995 C 12.785 755.693 22.8194 753.967 32.3988 763.67 C 42.7312 774.136 39.063 793.911 39.5167 807.408 C 40.3391 831.868 29.557 841.113 6.50135 840.718 L 0 840.557 L 0 755.995 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 1166.49 L 76.6354 1166.75 C 84.3941 1166.73 92.3671 1166.58 99.9793 1166.67 C 113.956 1166.84 124.8 1164.58 135.736 1175.52 C 143.494 1182.72 144.176 1194.03 143.822 1203.97 C 143.357 1217.04 146.622 1236.97 135.714 1246.82 C 122.324 1258.9 94.0368 1255.88 76.8401 1255.86 L 0 1255.73 L 0 1252.96 L 76.0529 1253.1 C 101.001 1253.14 139.355 1259.76 141.182 1226.03 C 144.585 1163.19 130.363 1169.07 78.0255 1169.31 L 0 1169.3 L 0 1166.49 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 0 858.744 C 12.2565 852.393 30.199 854.852 43.9795 854.901 C 56.0857 854.945 73.9129 852.947 85.0737 856.613 C 92.488 858.975 98.5695 864.342 101.835 871.406 C 106.894 882.28 105.791 903.056 105.299 915.229 C 103.931 949.067 72.409 946.896 47.9141 946.056 C 30.3025 945.452 16.2357 948.662 0 941.919 L 0 938.998 C 16.7893 945.842 31.4601 943.065 49.1122 943.355 C 90.0576 944.028 102.566 944.543 103.049 900.219 C 103.616 848.29 79.4567 857.909 38.6794 857.409 C 24.9645 857.241 13.7266 855.436 0 861.347 L 0 858.744 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 0 965.44 C 7.64372 973.386 10.7551 979.069 9.99134 990.239 C 8.57699 1010.92 15.4497 1024.98 0 1040.87 L 0 965.44 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 0 1061.75 C 11.3718 1061.76 54.4479 1060.85 62.9848 1063.25 C 67.3385 1064.43 71.3189 1066.71 74.5511 1069.86 C 86.4855 1081.45 82.3047 1100.05 82.8336 1114.81 C 84.4339 1159.47 51.3485 1152.95 19.4125 1152.62 C 13.6429 1152.56 7.43587 1152.63 1.7857 1152.51 L 0 1152.46 L 0 1149.95 C 66.1811 1150.11 85.2617 1161.49 79.8725 1086.5 C 79.474 1080.95 77.6236 1076.42 73.5948 1072.42 C 69.7118 1068.56 65.7038 1066.53 60.4482 1065.36 C 40.4533 1064.05 20.0782 1064.6 0 1064.59 L 0 1061.75 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 0 753.145 C 12.5086 752.85 22.5696 751.157 32.8451 760.192 C 46.1464 771.887 40.6056 791.155 41.9903 806.256 C 43.7412 825.351 34.2126 843.59 13.0034 843.573 C 8.66845 843.53 4.33388 843.456 0 843.351 L 0 840.557 L 6.50135 840.718 C 29.557 841.113 40.3391 831.868 39.5167 807.408 C 39.063 793.911 42.7312 774.136 32.3988 763.67 C 22.8194 753.967 12.785 755.693 0 755.995 L 0 753.145 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 0 962.501 C 15.7511 974.867 12.6406 987.08 12.7338 1005.1 C 12.8304 1023.8 14.2391 1030.55 0 1043.3 L 0 1040.87 C 15.4497 1024.98 8.57699 1010.92 9.99134 990.239 C 10.7551 979.069 7.64372 973.386 0 965.44 L 0 962.501 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 418.454 1029.09 C 417.922 1027.84 417.425 1026.56 416.961 1025.28 C 413.194 1014.79 412.433 983.851 418.03 973.431 C 419.866 969.367 426.985 960.829 431.384 959.991 C 449.656 956.511 470.511 957.845 489.009 957.911 L 560.859 957.919 L 639.142 957.795 C 653.991 957.773 668.784 957.533 683.628 958.089 C 705.627 958.912 710.622 969.367 714.59 988.712 C 715.941 1001.33 715.459 1020.32 715.422 1033.65 L 715.26 1106.08 L 715.999 1188.82 C 715.997 1200.28 715.646 1212.61 715.626 1224.11 C 715.591 1243.83 703.843 1253.65 684.009 1254.85 C 666.269 1255.92 645.187 1254.19 627.02 1255 C 595.885 1256.4 577.2 1250.35 575.01 1215.68 C 574.79 1208.06 574.256 1195.89 575.495 1188.78 C 573.188 1175.93 564.556 1162.67 550.303 1161.81 C 521.3 1160.05 491.361 1160.52 462.325 1161.39 C 455.76 1162.71 449.151 1168.66 445.532 1173.83 C 429.1 1197.35 456.353 1245.83 417.132 1253.39 C 408.208 1255.01 398.61 1255.01 389.55 1254.84 C 368.058 1254.46 346.365 1255.67 324.93 1254.2 C 308.337 1253.07 301.66 1246.7 295.347 1231.84 C 291.84 1226.47 290.619 1218.55 289.418 1212.28 C 289.096 1213.12 288.816 1213.69 288.481 1214.41 C 288.351 1214.35 288.221 1214.29 288.091 1214.23 C 285.888 1209.64 287.54 1203.29 289.17 1198.74 C 298.404 1160.72 309.66 1167.97 343.865 1166.63 C 357.911 1166.07 383.706 1167.99 395.923 1164.39 C 377.003 1158.61 369.643 1156.4 362.292 1137.06 C 358.637 1129.74 356.54 1124.15 355.784 1115.98 C 349.001 1042.66 398.358 1067.06 444.27 1061.61 C 426.142 1054.03 420.688 1048.83 418.454 1029.09 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 444.27 1061.61 L 445.191 1061.7 C 459.732 1063.06 491.583 1061.99 507.473 1061.98 L 630.492 1061.86 C 685.757 1061.77 716.341 1049.43 709.855 1117.87 C 709.199 1124.78 706.998 1131.7 701.303 1136.33 C 697.347 1139.33 690.481 1143.31 685.376 1143.6 C 667.278 1144.62 648.068 1144.5 629.991 1144.62 L 516.335 1145.04 L 424.624 1144.65 C 409.645 1144.52 393.647 1144.71 378.692 1143.74 C 373.365 1143.39 366.836 1139.95 362.292 1137.06 C 358.637 1129.74 356.54 1124.15 355.784 1115.98 C 349.001 1042.66 398.358 1067.06 444.27 1061.61 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 418.454 1029.09 C 417.922 1027.84 417.425 1026.56 416.961 1025.28 C 413.194 1014.79 412.433 983.851 418.03 973.431 C 419.866 969.367 426.985 960.829 431.384 959.991 C 449.656 956.511 470.511 957.845 489.009 957.911 L 560.859 957.919 L 639.142 957.795 C 653.991 957.773 668.784 957.533 683.628 958.089 C 705.627 958.912 710.622 969.367 714.59 988.712 C 712.826 991.85 712.909 993.603 712.785 996.978 C 712.206 1012.72 715.46 1025.8 700.534 1036.34 C 695.816 1039.67 696.604 1040.06 689.998 1040.51 C 673.032 1041.66 655.933 1041.21 638.928 1041.18 L 555.031 1040.99 L 480.712 1040.94 C 465.793 1040.92 450.745 1041.21 435.846 1040.1 C 427.108 1039.44 422.705 1031.05 418.454 1029.09 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 395.923 1164.39 C 427.498 1173.4 425.582 1179.68 425.904 1211.05 C 426.426 1261.98 355.236 1237.18 323.516 1242.4 C 312.693 1244.18 303.652 1238.72 295.347 1231.84 C 291.84 1226.47 290.619 1218.55 289.418 1212.28 C 289.096 1213.12 288.816 1213.69 288.481 1214.41 C 288.351 1214.35 288.221 1214.29 288.091 1214.23 C 285.888 1209.64 287.54 1203.29 289.17 1198.74 C 298.404 1160.72 309.66 1167.97 343.865 1166.63 C 357.911 1166.07 383.706 1167.99 395.923 1164.39 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 289.17 1198.74 C 289.174 1203.25 289.257 1207.77 289.418 1212.28 C 289.096 1213.12 288.816 1213.69 288.481 1214.41 C 288.351 1214.35 288.221 1214.29 288.091 1214.23 C 285.888 1209.64 287.54 1203.29 289.17 1198.74 z" fill="rgb(252,248,235)" transform="translate(0,0)"></path>+<path d="M 331.013 1196.11 C 333.982 1198 332.83 1199.31 334.24 1201.45 C 335.328 1203.1 346.361 1202.58 347.998 1202.62 C 360.414 1202.66 373.129 1201.86 385.52 1202.01 C 390.102 1202.06 389.402 1202.43 390.557 1199.05 C 391.31 1196.85 398.511 1204.27 399.505 1205.11 C 384.661 1213.39 393.415 1206.39 385.25 1205.78 C 369.572 1205.87 350.458 1205.54 334.696 1206.45 C 333.883 1206.5 334.232 1210.38 333.025 1210.74 C 328.146 1212.2 322.775 1207.77 317.972 1207.14 C 314.885 1206.66 311.171 1205.13 308.215 1204.12 C 315.412 1201.18 323.505 1198.16 331.013 1196.11 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 575.495 1188.78 C 578.545 1180.65 581.538 1172.71 589.888 1168.68 C 602.879 1162.41 665.812 1161.81 679.362 1167.16 C 686.407 1169.95 690.696 1174.55 693.472 1181.58 C 698.235 1193.65 697.525 1215.75 692.315 1227.68 C 689.68 1233.71 685.725 1238.11 679.502 1240.48 C 671.098 1243.67 615.231 1244.11 603.814 1242.87 C 599.156 1242.37 594.589 1241.44 590.341 1239.4 C 582.814 1235.78 579.822 1230.17 577.371 1222.51 C 576.634 1220.21 576.065 1217.86 575.01 1215.68 C 574.79 1208.06 574.256 1195.89 575.495 1188.78 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 630.132 1196.09 C 632.278 1198.39 630.63 1202.29 631.373 1203.41 C 634.47 1208.08 650.505 1203.63 655.151 1205.77 C 656.324 1206.31 656.122 1207.93 655.408 1208.4 C 653.194 1210.14 648.716 1209.66 646.035 1209.54 C 641.712 1209.34 637.433 1209.13 633.06 1209.08 C 632.798 1209.88 631.604 1214.74 630.76 1214.73 C 624.739 1214.65 612.716 1210.11 607.209 1208.26 C 615.746 1204.17 622.704 1201.86 630.132 1196.09 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 473.386 753.118 C 489.373 752.187 507.074 752.951 523.264 752.928 C 575.509 752.852 627.784 752.768 680.027 752.945 C 683.665 752.957 693.437 753.678 696.358 755.103 C 708.298 760.928 714.262 775.184 714.222 787.955 C 714.084 812.646 718.419 832.457 690.946 842.661 C 672.927 843.942 652.011 843.052 633.731 843.08 C 583.4 842.949 533.176 843.59 482.836 843.258 C 459.251 843.102 449.584 829.68 449.578 806.696 C 449.572 783.552 446.98 762.597 473.386 753.118 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 476.081 755.289 C 544.636 756.324 613.532 754.598 682.1 755.676 C 709.666 756.109 712.007 776.014 711.626 798.547 C 711.291 818.366 712.004 834.312 688.675 840.244 C 620.048 841.874 550.096 839.741 481.378 840.41 C 452.934 840.687 451.712 817.673 452.207 795.605 C 452.638 776.393 453.439 760.416 476.081 755.289 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 532.372 855.232 C 554.749 853.74 584.391 855.581 607.547 855.039 C 631.574 855.391 656.279 854.577 680.241 855.384 C 709.16 856.358 714.827 872.711 714.153 898.615 C 713.564 921.264 715.904 935.975 690.653 944.9 C 675.673 946.637 533.926 946.822 526.196 943.644 C 518.985 940.682 513.361 934.813 510.709 927.483 C 508.134 920.415 508.11 912.635 508.196 905.181 C 508.478 881.044 505.703 864.66 532.372 855.232 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 531.026 858.209 C 548.221 856.457 684.853 856.515 694.363 860.206 C 700.421 862.558 706.034 867.602 708.625 873.581 C 712.43 882.361 712.685 917.999 709.06 926.75 C 705.566 935.183 698.399 939.166 690.268 942.29 C 677.611 943.858 539.432 944.244 530.18 941.709 C 523.707 939.935 517.598 935.564 514.38 929.584 C 509.273 920.093 509.067 885.613 512.81 875.33 C 516.048 866.435 522.759 861.981 531.026 858.209 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 234.49 1166.55 C 264.989 1165.04 286.219 1166.63 285.797 1204.11 C 285.987 1216.92 287.367 1238.38 276.633 1247.57 C 261.885 1260.21 219.252 1255.74 200.5 1255.62 C 174.911 1255.46 153.583 1258.98 149.808 1225.3 C 141.437 1150.62 182.293 1168.03 234.49 1166.55 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 174.325 1169.23 C 191.654 1169.34 208.984 1169.35 226.314 1169.27 C 265.846 1168.83 285.464 1164.88 282.953 1213.08 C 281.903 1233.25 284.332 1247.15 259.826 1252.68 C 244.278 1253.53 175.552 1255.25 165.874 1249.64 C 159.238 1245.79 155.02 1238.86 153.311 1231.52 C 150.422 1219.13 150.168 1190.7 157.295 1179.9 C 161.543 1173.47 166.987 1170.85 174.325 1169.23 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 256.78 1061.48 C 316.482 1061.59 359.281 1046.4 351.255 1120.91 C 349.297 1139.08 341.662 1150.67 323.25 1152.91 C 305.874 1152.83 252.109 1156.86 239.802 1147.35 C 232.562 1141.76 229.397 1132.86 228.564 1124.03 C 227.089 1108.4 225.062 1083.08 235.92 1070.75 C 241.721 1064.16 248.277 1062.09 256.78 1061.48 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 253.295 1064.28 C 274.928 1063.72 296.672 1064.6 318.49 1064.43 C 355.168 1064.13 348.925 1102.94 347.557 1128.2 C 346.959 1139.25 335.849 1147.34 325.733 1149.91 C 309.572 1150.02 252.728 1153.37 241.866 1145.81 C 236.002 1141.72 232.94 1134.62 231.602 1127.84 C 229.053 1114.9 228.715 1085.27 236.171 1074.55 C 240.507 1068.32 246.035 1065.74 253.295 1064.28 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 180.412 957.219 C 195.48 955.977 252.251 955.652 263.267 960.791 C 270.184 964.018 275.037 970.335 277.373 977.504 C 281.406 989.878 280.663 1021.41 274.737 1032.89 C 270.271 1041.53 264.39 1045.51 255.322 1048.43 C 241.338 1049.68 185.588 1050.03 172.062 1045.54 C 152.501 1039.04 154.021 993.452 158.263 977.002 C 160.944 966.607 169.401 961.03 180.412 957.219 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 179.001 960.198 C 191.091 958.757 250.993 958.462 260.453 962.294 C 266.641 964.799 271.48 970.528 273.859 976.656 C 278.243 987.951 277.846 1019.62 272.915 1030.54 C 269.23 1038.69 264.54 1042.37 256.288 1045.37 C 237.757 1047.17 192.604 1047.08 174.492 1043.43 C 155.374 1039.58 157.604 997.621 159.485 982.961 C 160.939 971.624 168.209 964.57 179.001 960.198 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 122.166 1061.37 C 138.443 1061.27 193.979 1058.1 204.479 1066.68 C 222.962 1081.8 227.894 1147.2 190.133 1152.4 C 172.335 1152.85 120.499 1156.91 107.611 1147.63 C 100.575 1142.56 96.3605 1134.21 95.1301 1125.76 C 92.9795 1110.97 92.3995 1084.28 101.998 1072.19 C 107.489 1065.27 113.609 1062.57 122.166 1061.37 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 119.236 1064.27 C 133.656 1063.42 190.633 1061.42 201.53 1067.75 C 207.633 1071.3 211.459 1077.56 213.1 1084.31 C 216.28 1097.37 216.106 1127.94 208.945 1138.91 C 204.636 1145.51 199.43 1148.08 191.905 1149.67 C 175.511 1150.14 122.332 1153.36 110.085 1146.11 C 104.069 1142.55 100.086 1135.8 98.3886 1129.17 C 95.1019 1116.33 95.3739 1086.99 102.359 1075.85 C 106.499 1069.24 111.772 1066.03 119.236 1064.27 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 476.599 1166.46 C 483.549 1166.44 491.386 1165.96 498.355 1166.39 C 526.445 1168.12 569.205 1155.45 571.121 1197.54 C 572.317 1223.8 574.718 1253.8 540.229 1255.25 C 517.584 1255.5 491.012 1256.84 468.54 1254.44 C 453.567 1251.64 446.109 1236.59 445.817 1223.08 C 445.254 1197.09 442.396 1168.46 476.599 1166.46 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 469.287 1169.25 C 486.906 1168.99 541.13 1165.93 554.424 1172.16 C 560.666 1175.08 564.788 1180.97 566.777 1187.43 C 570.676 1200.1 570.53 1228.51 564.301 1240.06 C 560.392 1247.3 555.693 1249.9 547.995 1252.2 C 532.017 1253.31 475.199 1255.66 463.207 1249.73 C 456.908 1246.61 452.506 1240.57 450.367 1234 C 446.45 1221.95 446.989 1192 453.128 1181.15 C 457.059 1174.2 461.818 1171.46 469.287 1169.25 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 465.252 1201.25 C 466.187 1202.15 466.193 1203.72 466.603 1203.91 C 469.855 1205.38 475.462 1204.72 479.296 1204.78 C 502.506 1205.11 525.772 1204.89 548.983 1204.97 C 549.761 1204.97 554.591 1204.51 553.936 1206.6 C 553.229 1208.86 542.583 1207.9 540.75 1207.91 C 516.219 1207.96 491.317 1207.89 466.984 1208.2 C 466.445 1208.21 466.808 1210.42 466.191 1211.28 C 465.238 1211.64 464.65 1211.28 463.631 1210.82 C 460.278 1209.26 456.948 1207.65 453.641 1206 C 457.792 1204.14 461.137 1202.94 465.252 1201.25 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 47.7177 957.158 C 61.4586 955.855 118.745 955.483 129.554 960.828 C 136.36 964.193 140.919 971.058 143.106 978.147 C 147.214 991.46 147.301 1021.2 140.614 1033.34 C 136.039 1041.65 129.739 1045.46 120.808 1047.93 C 106.955 1049.27 49.4707 1049.9 39.0069 1044.96 C 32.0024 1041.64 26.9012 1034.78 24.4932 1027.55 C 20.4193 1015.33 20.9802 983.037 27.1331 972.051 C 32.0083 963.347 38.5691 959.916 47.7177 957.158 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 51.8639 959.333 C 73.6337 959.425 97.237 959.604 118.84 960.293 C 142.736 961.056 142.95 988.984 142.527 1006.71 C 142.053 1026.59 140.349 1042.59 116.534 1045.63 C 70.0157 1044.7 18.2542 1059.83 24.8459 999.895 C 27.2724 977.834 24.9068 964.252 51.8639 959.333 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 403.266 855.324 C 418.231 854.373 475.585 853.129 485.799 858.591 C 492.628 862.243 497.112 869.333 499.212 876.612 C 503.285 890.731 503.083 920.099 495.422 932.579 C 491.042 939.714 485.305 943.24 477.256 945.037 C 462.489 946.346 404.678 948.351 393.695 942.892 C 386.824 939.477 382.382 932.101 380.257 924.975 C 376.272 911.615 376.024 882.618 382.893 870.414 C 387.738 861.806 394.053 858.08 403.266 855.324 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 402.299 858.202 C 415.972 857.232 472.929 855.748 483.392 860.472 C 489.676 863.309 494.109 869.062 496.287 875.498 C 500.329 887.444 500.086 917.246 494.307 928.47 C 490.191 936.465 485.284 939.557 476.948 942.354 C 463.562 943.924 405.573 945.187 395.141 940.557 C 389.55 938.077 385.6 932.545 383.451 926.985 C 378.931 915.285 378.667 885.046 383.885 873.787 C 387.864 865.2 393.588 861.284 402.299 858.202 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 313.379 957.301 C 337.096 957.055 372.482 954.235 394.443 960.924 C 413.771 966.812 412.729 1020.14 404.456 1033.72 C 399.897 1041.12 392.641 1046.45 384.222 1048.59 C 368.493 1049.44 313.971 1051.29 302.797 1045.19 C 295.86 1041.39 291.3 1034.22 289.344 1026.72 C 285.897 1013.49 286.255 982.482 293.138 971.081 C 298.116 962.836 304.289 959.609 313.379 957.301 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 312.366 960.241 C 326.014 959.216 381.047 958.031 391.493 962.403 C 397.717 965.007 402.311 970.692 404.517 976.964 C 408.643 988.696 408.469 1020.53 402.744 1031.41 C 398.844 1038.82 393.21 1042.86 385.371 1045.51 C 371.924 1046.57 315.359 1047.91 305.333 1043.46 C 299.248 1040.77 294.787 1034.72 292.637 1028.57 C 288.645 1017.14 288.934 984.808 294.419 974.177 C 298.578 966.117 303.943 962.961 312.366 960.241 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 273.688 855.17 C 289.867 854.531 341.782 852.232 354.314 858.917 C 361.735 862.875 366.972 870.261 368.946 878.361 C 372.038 891.054 371.941 921.058 364.944 932.048 C 359.917 939.943 353.266 943.671 344.363 945.851 C 327.57 945.932 275.862 949.068 263.103 942.16 C 256.159 938.4 251.591 931.471 249.539 923.979 C 245.816 910.386 245.955 881.594 253.105 869.556 C 258.155 861.054 264.46 857.682 273.688 855.17 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 273.652 858.143 C 294.187 856.988 315.959 857.891 336.45 857.591 C 360.665 857.236 368.355 873.643 367.673 895.068 C 367.003 916.16 370.138 935.276 345.38 942.943 C 323.812 943.529 302.108 943.081 280.462 943.135 C 243.967 943.226 249.951 906.287 251.416 881.096 C 252.108 869.202 262.824 860.852 273.652 858.143 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 337.398 753.214 C 352.994 752.221 407.847 750.602 419.942 755.838 C 426.276 758.579 430.574 764.774 432.997 771.034 C 437.973 783.893 438.404 814.813 432.346 827.263 C 428.074 836.043 422.044 839.803 413.19 843.07 C 396.685 845.135 347.863 845.447 330.802 840.194 C 310.895 834.066 312.994 797.059 314.498 780.237 C 315.715 766.63 323.597 757.852 337.398 753.214 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 341.087 755.352 C 400.144 754.963 442.256 739.403 433.031 814.714 C 431.164 829.949 424.098 837.332 409.858 840.882 C 392.902 840.999 345.393 844.235 328.919 836.308 C 314.109 829.182 316.18 798.23 316.709 783.762 C 317.264 768.593 324.695 758.351 341.087 755.352 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 138.265 855.211 C 152.691 854.011 207.778 852.591 219.297 857.446 C 225.747 860.164 230.512 866.35 233.075 872.698 C 237.938 884.74 238.642 917.137 233.015 929.096 C 228.846 937.955 222.587 942.021 213.715 945.328 C 195.65 947.151 151.111 947.316 132.301 943.351 C 110.706 938.799 112.971 893.937 116.301 877.576 C 118.41 867.214 127.51 859.769 138.265 855.211 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 142.84 857.412 C 158.3 857.436 210.172 854.4 221.167 861.507 C 227.195 865.404 230.892 872.29 232.41 879.153 C 235.242 891.955 235.641 921.035 228.485 931.835 C 223.944 938.69 217.923 941.669 210.026 943.143 C 194.923 943.219 137.665 945.765 129.166 939.056 C 112.969 926.271 106.401 863.497 142.84 857.412 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 208.359 753.129 C 223.476 752.076 278.566 750.561 289.844 755.979 C 296.932 759.385 301.823 766.297 304.165 773.649 C 308.375 786.862 308.263 816.124 301.553 828.3 C 296.988 836.584 291.257 840.182 282.382 842.84 C 265.784 844.522 217.202 846.056 200.709 840.434 C 181.289 833.815 183.323 793.164 185.763 776.532 C 187.358 765.663 196.785 757.231 208.359 753.129 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 296.395 764.053 C 298.111 766.482 301.627 771.38 301.885 774.331 C 306.331 829.646 305.922 843.481 247.51 841.081 C 199.029 841.331 185.446 844.234 187.341 790.419 C 184.594 759.567 206.481 753.02 232.705 755.035 C 251.16 756.453 279.136 750.508 294.676 762.129 C 295.768 762.492 295.865 762.745 296.303 763.831 L 296.395 764.053 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 60.6047 834.346 C 50.1691 822.331 52.5527 816.547 51.7492 802.929 C 48.5474 748.659 70.4387 752.092 114.574 752.871 C 142.497 753.365 172.818 746.223 173.02 789.58 C 173.01 809.307 174.915 841.047 145.362 843.051 C 124.455 844.468 102.47 843.079 81.464 843.182 C 73.7878 843.22 67.0028 840.941 61.513 835.316 C 60.889 834.785 61.0564 834.948 60.6047 834.346 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 80.2207 755.363 C 96.1434 755.495 145.491 752.103 157.299 759.028 C 163.311 762.553 167.207 768.852 168.908 775.494 C 172.353 788.948 172.129 817.17 164.713 828.836 C 159.97 836.297 154.373 839.002 145.92 840.721 C 90.5979 840.043 45.9234 857.138 54.3463 783.928 C 56.3861 766.198 62.2065 757.391 80.2207 755.363 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 746.609 794.605 C 769.154 820.223 763.13 857.923 763.039 890.295 L 763.115 1001 L 763.054 1162.25 C 763.111 1186.19 764.479 1226.68 762.991 1249.45 C 761.62 1272.39 751.035 1293.8 733.639 1308.83 C 702.435 1335.57 660.572 1328.73 622.033 1328.61 L 490.369 1328.54 L 0 1328.77 L 0 1291.33 L 448.873 1291.21 L 598.633 1291.36 C 623.86 1291.44 649.517 1291.85 674.61 1291.68 C 694.806 1291.54 713.434 1282.83 726.729 1267.83 C 734.158 1259.45 742.154 1246.07 743.209 1234.71 C 744.708 1218.56 744.195 1199.48 744.191 1183.07 L 744.165 1084.89 L 744.161 895.878 C 744.118 864.471 745.205 826.7 743.621 796.022 L 746.609 794.605 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 0 731.047 L 476.957 731.149 L 616.951 730.982 C 640.405 730.965 665.804 730.157 689.106 732.141 C 701.988 733.239 717.299 743.17 726.405 751.95 C 739.661 765.174 742.548 777.157 746.609 794.605 L 743.621 796.022 C 740.078 765.151 719.013 738.573 687.938 734.87 C 666.628 732.33 636.861 733.861 614.837 733.883 L 474.034 734.022 L 0 733.971 L 0 731.047 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1381.98 815.18 C 1403.96 779.444 1444.01 742.403 1478.69 720.8 C 1610.54 638.652 1779.88 676.829 1874.15 797.085 C 1879.02 803.304 1888.25 815.274 1891.09 822.324 C 1899.91 823.144 1909.44 823.825 1918.1 825.338 C 1917.29 830.757 1914.08 850.125 1914.16 854.696 C 1915.8 857.257 1915.87 857.38 1916.29 860.486 C 1917.76 871.271 1924.07 880.21 1929.29 889.612 C 1939.54 891.514 1952.66 892.165 1962.03 894.185 C 1963.08 896.961 1955.87 933.434 1954.98 939.637 C 1956.88 943.105 1958.12 951.924 1959.21 956.067 C 1984.78 1053.02 1971.45 1146.51 1916.21 1232.17 C 1868.22 1305.68 1793.27 1357.38 1707.51 1376.12 C 1622.98 1394.5 1534.6 1378.29 1462.09 1331.11 C 1318.08 1237.44 1271.85 1047.19 1344.69 895.327 C 1350.24 883.756 1355.97 868.335 1362.87 857.743 C 1360.91 854.198 1347.7 814.836 1345.48 808.402 C 1356.2 809.491 1371.42 812.823 1381.98 815.18 z" fill="url(#Gradient2)" transform="translate(0,0)"></path>+<path d="M 1448.13 1277.2 C 1424.71 1275.52 1409.08 1260.42 1402.77 1238.43 C 1391.67 1199.75 1381.33 1160.83 1370.02 1122.21 L 1350.01 1051.94 C 1346.29 1038.82 1341.82 1025.04 1339.26 1011.77 C 1335.52 998.304 1348.35 978.305 1362.37 976.826 C 1380.75 974.886 1404.66 976.411 1423.58 976.336 L 1612.69 976.322 L 1709.75 976.264 C 1728.81 976.108 1748.62 975.36 1767.62 976.227 C 1776.84 976.648 1785.29 981.119 1792.99 985.911 C 1814.04 1004.08 1818.98 1035.85 1826.58 1062.04 C 1836.94 1097.59 1847.05 1133.21 1856.92 1168.9 C 1860.95 1183.25 1865.06 1197.57 1869.26 1211.87 C 1872.55 1223.01 1876.63 1234.85 1878.02 1246.39 C 1878.85 1253.19 1877.33 1260.98 1872.37 1265.95 C 1862.11 1276.61 1852.37 1277.31 1838.67 1277.37 C 1801.53 1277.53 1764.43 1277.34 1727.32 1277.46 L 1448.13 1277.2 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 1737.56 802.691 C 1773.78 808.711 1810.83 812.42 1847.11 818.447 C 1869.55 822.176 1892.25 825.123 1914.88 827.414 C 1912.09 847.882 1909.94 868.87 1906.62 889.185 C 1899.09 937.23 1890.06 987.023 1884.52 1035.15 C 1862.78 1026.36 1836.49 1015.21 1814.5 1008.06 C 1808.07 998.186 1803.78 991.188 1794.25 984.112 C 1773.2 968.645 1738.72 973.151 1712.44 973.502 C 1713.56 960.272 1717.57 937.985 1719.69 923.564 C 1725.58 883.545 1730.92 842.467 1737.56 802.691 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 1742.31 923.386 C 1742.9 923.323 1743.48 923.26 1744.07 923.198 C 1787.08 927.917 1830.47 935.154 1873.34 941.604 C 1874.06 942.21 1874.78 942.816 1875.5 943.422 C 1871.69 943.898 1852.86 941.494 1849.37 940.621 C 1834.05 936.785 1749.69 929.425 1742.31 923.386 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1753.29 857.303 C 1754.65 857.366 1756.04 857.401 1757.38 857.599 C 1793.08 862.852 1828.73 868.518 1864.47 873.48 C 1870.86 874.367 1877.26 874.929 1883.45 876.711 C 1883.96 877.373 1884.47 878.035 1884.97 878.696 C 1871.49 879.896 1775.38 862.068 1755.53 859.56 C 1754 859.367 1754.33 859.027 1753.29 857.303 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1748.1 891.262 C 1752.19 890.947 1755.89 891.615 1761.56 892.47 C 1799.9 898.26 1838.66 903.546 1876.9 910.059 C 1877.58 910.974 1878.27 911.889 1878.95 912.804 C 1872.74 912.191 1849.69 909.015 1844.87 907.801 C 1831.99 904.56 1753.2 896.734 1748.1 891.262 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1910.77 886.553 C 1918.9 888.466 1921.1 888.676 1929.29 889.612 C 1939.54 891.514 1952.66 892.165 1962.03 894.185 C 1963.08 896.961 1955.87 933.434 1954.98 939.637 C 1949.84 963.296 1945.8 990.496 1941.27 1014.68 L 1913.17 1161.46 L 1904.57 1208.11 C 1900.29 1231.38 1899.47 1247.07 1880.52 1263.91 C 1864.73 1279.25 1853.2 1280.46 1832 1280.1 C 1819.72 1279.89 1806.93 1279.92 1794.6 1279.8 C 1778.99 1280.47 1752.99 1280.44 1737.42 1279.81 C 1719.47 1279.99 1701.52 1279.99 1683.57 1279.81 C 1673.53 1280.22 1659.43 1280.21 1649.44 1279.81 C 1645.74 1280 1640.4 1279.82 1636.56 1279.81 C 1631.07 1280.03 1626.98 1280.04 1621.44 1279.81 C 1605.07 1280.64 1581.5 1279.96 1564.43 1279.97 L 1458.41 1279.91 C 1455.46 1279.4 1452.69 1279.01 1449.73 1278.59 L 1448.13 1277.2 L 1727.32 1277.46 C 1764.43 1277.34 1801.53 1277.53 1838.67 1277.37 C 1852.37 1277.31 1862.11 1276.61 1872.37 1265.95 C 1877.33 1260.98 1878.85 1253.19 1878.02 1246.39 C 1876.63 1234.85 1872.55 1223.01 1869.26 1211.87 C 1865.06 1197.57 1860.95 1183.25 1856.92 1168.9 C 1847.05 1133.21 1836.94 1097.59 1826.58 1062.04 C 1818.98 1035.85 1814.04 1004.08 1792.99 985.911 L 1794.25 984.112 C 1803.78 991.188 1808.07 998.186 1814.5 1008.06 C 1836.49 1015.21 1862.78 1026.36 1884.52 1035.15 C 1890.06 987.023 1899.09 937.23 1906.62 889.185 L 1910.77 886.553 z" fill="url(#Gradient1)" transform="translate(0,0)"></path>+<path d="M 1930.41 892.58 C 1940.14 894.001 1949.99 895.308 1959.6 897.28 L 1962.03 894.185 C 1963.08 896.961 1955.87 933.434 1954.98 939.637 C 1949.84 963.296 1945.8 990.496 1941.27 1014.68 L 1913.17 1161.46 L 1904.57 1208.11 C 1900.29 1231.38 1899.47 1247.07 1880.52 1263.91 L 1880.82 1259.85 C 1884.39 1249.73 1890.33 1195.66 1892.52 1180.67 C 1906.24 1084.79 1918.87 988.75 1930.41 892.58 z" fill="rgb(246,246,244)" transform="translate(0,0)"></path>+<path d="M 1962.03 894.185 C 1963.08 896.961 1955.87 933.434 1954.98 939.637 C 1949.84 963.296 1945.8 990.496 1941.27 1014.68 L 1913.17 1161.46 L 1904.57 1208.11 C 1900.29 1231.38 1899.47 1247.07 1880.52 1263.91 L 1880.82 1259.85 C 1886.59 1256.12 1893.84 1244.66 1895.32 1237.85 C 1919.8 1125.05 1937.75 1010.57 1959.6 897.28 L 1962.03 894.185 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1737.42 1279.81 C 1744.21 1278.1 1788.1 1278.01 1794.6 1279.8 C 1778.99 1280.47 1752.99 1280.44 1737.42 1279.81 z" fill="rgb(10,21,62)" transform="translate(0,0)"></path>+<path d="M 1649.44 1279.81 C 1655.87 1278.4 1677.25 1278.35 1683.57 1279.81 C 1673.53 1280.22 1659.43 1280.21 1649.44 1279.81 z" fill="rgb(10,21,62)" transform="translate(0,0)"></path>+<path d="M 1621.44 1279.81 C 1627.29 1278.57 1630.71 1278.55 1636.56 1279.81 C 1631.07 1280.03 1626.98 1280.04 1621.44 1279.81 z" fill="rgb(10,21,62)" transform="translate(0,0)"></path>+<path d="M 1345.48 808.402 C 1356.2 809.491 1371.42 812.823 1381.98 815.18 C 1414.67 821.928 1447.4 828.498 1480.17 834.89 C 1491.31 837.08 1518.44 843.15 1528.32 843.707 C 1523.33 850.005 1517.54 855.074 1511.69 860.559 C 1478.68 891.53 1447.31 924.16 1414.13 954.981 C 1409.68 959.112 1405.03 963.464 1400.87 967.853 C 1390.52 935.559 1379.15 903.79 1367.76 871.854 C 1366.13 867.288 1364.22 862.37 1362.87 857.743 C 1360.91 854.198 1347.7 814.836 1345.48 808.402 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1350.73 811.374 C 1367.54 814.354 1385.5 819.228 1402.54 822.658 L 1522.58 846.007 C 1517.69 851.907 1507.7 860.196 1501.76 865.766 C 1488.56 878.226 1475.6 890.951 1462.91 903.933 C 1448.37 919.955 1419.22 946.287 1402.53 961.124 C 1395.99 942.496 1349.4 817.576 1350.73 811.374 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 1735.41 799.489 C 1787.02 807.723 1839.33 813.988 1891.09 822.324 C 1899.91 823.144 1909.44 823.825 1918.1 825.338 C 1917.29 830.757 1914.08 850.125 1914.16 854.696 C 1915.8 857.257 1915.87 857.38 1916.29 860.486 C 1917.76 871.271 1924.07 880.21 1929.29 889.612 C 1921.1 888.676 1918.9 888.466 1910.77 886.553 L 1906.62 889.185 C 1909.94 868.87 1912.09 847.882 1914.88 827.414 C 1892.25 825.123 1869.55 822.176 1847.11 818.447 C 1810.83 812.42 1773.78 808.711 1737.56 802.691 C 1730.92 842.467 1725.58 883.545 1719.69 923.564 C 1717.57 937.985 1713.56 960.272 1712.44 973.502 C 1738.72 973.151 1773.2 968.645 1794.25 984.112 L 1792.99 985.911 C 1785.29 981.119 1776.84 976.648 1767.62 976.227 C 1748.62 975.36 1728.81 976.108 1709.75 976.264 L 1612.69 976.322 L 1423.58 976.336 C 1404.66 976.411 1380.75 974.886 1362.37 976.826 C 1348.35 978.305 1335.52 998.304 1339.26 1011.77 C 1341.82 1025.04 1346.29 1038.82 1350.01 1051.94 L 1370.02 1122.21 C 1381.33 1160.83 1391.67 1199.75 1402.77 1238.43 C 1409.08 1260.42 1424.71 1275.52 1448.13 1277.2 L 1449.73 1278.59 C 1447.04 1278.72 1444.64 1278.91 1441.95 1279.16 C 1426.62 1277.54 1410.73 1264.6 1404.66 1250.64 C 1399.61 1239.04 1396.74 1226.31 1393.31 1214.13 L 1377.52 1158.86 L 1348.98 1058.16 C 1342.64 1035.63 1327.14 1002.98 1345.1 984.167 C 1359.9 968.67 1383.04 973.072 1402.55 973.448 C 1421.97 973.769 1441.4 973.888 1460.82 973.806 L 1709.37 973.792 C 1714.22 939.606 1719.33 905.457 1724.7 871.347 C 1728.18 847.998 1731.18 822.53 1735.41 799.489 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1914.16 854.696 C 1915.8 857.257 1915.87 857.38 1916.29 860.486 C 1917.76 871.271 1924.07 880.21 1929.29 889.612 C 1921.1 888.676 1918.9 888.466 1910.77 886.553 C 1910.45 879.25 1912.37 862.072 1914.16 854.696 z" fill="rgb(164,172,240)" transform="translate(0,0)"></path>+<path d="M 1441.95 1279.16 C 1444.64 1278.91 1447.04 1278.72 1449.73 1278.59 C 1452.69 1279.01 1455.46 1279.4 1458.41 1279.91 C 1452.42 1280.05 1447.89 1280.21 1441.95 1279.16 z" fill="rgb(10,21,62)" transform="translate(0,0)"></path>+<path d="M 1589.83 754.416 C 1611.7 746.804 1637.4 742.42 1659.82 735.6 C 1671.67 731.996 1686.9 728.284 1699.07 726.209 C 1699.4 746.678 1697.88 767.155 1697.38 787.615 C 1696.92 806.299 1698.22 871.596 1693.22 885.371 C 1690.33 893.334 1684.1 900.272 1676.31 903.709 C 1667.91 907.416 1657.31 907.582 1648.82 904.077 C 1642.2 901.349 1637.25 896.255 1634.81 889.514 C 1631.82 881.211 1632.8 871.761 1636.67 863.912 C 1640.72 855.672 1647.94 849.272 1656.79 846.663 C 1666.95 843.67 1676.18 846.287 1685.08 851.368 L 1686.31 852.085 C 1686.99 826.74 1687.19 801.384 1686.92 776.031 C 1679.15 777.198 1660.23 783.185 1651.72 785.516 C 1633.94 790.214 1616.11 794.767 1598.25 799.174 C 1598.28 818.242 1598.14 837.31 1597.81 856.375 C 1598.05 865.154 1598.24 902.037 1597.11 908.213 C 1594.93 938.705 1542.68 948.963 1535.9 916.858 C 1529.28 885.545 1558.57 865.212 1588.26 881.355 C 1588.31 840.417 1588.31 795.15 1589.83 754.416 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 1592.88 756.451 C 1603.8 753.325 1614.92 750.606 1625.97 747.968 C 1649.55 742.34 1673.12 733.96 1696.87 729.297 C 1696.27 742.357 1695.8 755.877 1694.89 768.876 C 1693.94 770.718 1694.11 770.659 1692.29 771.531 C 1682.59 772.632 1669.09 777.474 1659.32 780.13 C 1639.14 785.617 1615.41 793.448 1594.93 796.957 C 1597.44 806.254 1595.44 839.747 1595.91 850.973 C 1594.33 862.631 1596.04 880.375 1594.2 890.196 C 1590.54 883.386 1591.18 875.229 1591.44 867.605 C 1592.57 834.638 1590.97 800.649 1592.82 767.799 C 1592.7 763.68 1592.57 760.545 1592.88 756.451 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 1692.29 771.531 C 1694.11 770.659 1693.94 770.718 1694.89 768.876 C 1694.57 777.091 1693.69 857.404 1692.21 858.79 C 1689.76 859.368 1689.68 850.265 1689.78 849.479 C 1692.04 832.44 1686.64 784.88 1692.29 771.531 z" fill="rgb(9,17,215)" transform="translate(0,0)"></path>+<path d="M 1595.91 850.973 C 1596.52 855.843 1596.34 859.368 1596.48 864.205 L 1596.44 864.158 C 1597.13 861.295 1596.66 860.188 1597.81 856.375 C 1598.05 865.154 1598.24 902.037 1597.11 908.213 C 1596.67 901.552 1599.16 893.352 1594.2 890.196 C 1596.04 880.375 1594.33 862.631 1595.91 850.973 z" fill="rgb(10,21,62)" transform="translate(0,0)"></path>+<path d="M 1661.9 848.147 C 1701.56 845.431 1704.63 891.609 1669.13 903.427 C 1626.42 907.972 1624.91 857.5 1661.9 848.147 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 1565 878.114 C 1603.94 875.638 1605.9 925.385 1567.26 933.65 C 1529.09 935.616 1526.48 887.152 1565 878.114 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 1156.01 972.868 L 1214.1 1064.12 C 1229.59 1088.04 1248.14 1115.59 1262.12 1140.25 L 1247.39 1142.24 C 1252.52 1151.04 1256.92 1158.41 1261.16 1167.72 C 1253.43 1169.1 1245.79 1169.83 1238.04 1170.92 C 1171.63 1180.27 1103.55 1186 1037.34 1196.12 C 1041.15 1189.77 1050.83 1174.39 1051.69 1167.98 C 1050.69 1167.2 1051.26 1167.75 1050.31 1166.04 C 1053.97 1156.98 1064.2 1139.3 1069.18 1129.52 C 1053.16 1125.79 1035.64 1121.28 1019.28 1120.24 C 937.386 1115.02 843.577 1147.73 796.389 1218 C 791.872 1216.76 792.548 1216.67 792.321 1211.91 L 793.627 1208.79 C 798.504 1185.36 816.519 1142.67 828.901 1122.04 C 879.709 1037.39 987.996 986.298 1085.35 1009.28 C 1099.2 1012.55 1113.46 1018.99 1126.66 1024.5 C 1135.08 1007.84 1146.47 989.145 1156.01 972.868 z" fill="rgb(3,3,3)" transform="translate(0,0)"></path>+<path d="M 793.627 1208.79 C 798.956 1202.31 805.777 1188.12 811.587 1180.3 C 871.448 1099.73 992.726 1071.1 1082.7 1106.22 C 1078.14 1113.96 1073.64 1121.73 1069.18 1129.52 C 1053.16 1125.79 1035.64 1121.28 1019.28 1120.24 C 937.386 1115.02 843.577 1147.73 796.389 1218 C 791.872 1216.76 792.548 1216.67 792.321 1211.91 L 793.627 1208.79 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 1051.69 1167.98 C 1054.39 1166.56 1057.81 1165.78 1060.84 1165.47 C 1123.19 1159.25 1185.24 1149.6 1247.39 1142.24 C 1252.52 1151.04 1256.92 1158.41 1261.16 1167.72 C 1253.43 1169.1 1245.79 1169.83 1238.04 1170.92 C 1171.63 1180.27 1103.55 1186 1037.34 1196.12 C 1041.15 1189.77 1050.83 1174.39 1051.69 1167.98 z" fill="rgb(2,16,254)" transform="translate(0,0)"></path>+<path d="M 792.321 1211.91 C 792.548 1216.67 791.872 1216.76 796.389 1218 C 795.594 1219.94 787.597 1232.55 786.061 1235.03 C 788.056 1226.94 790.302 1219.72 792.321 1211.91 z" fill="rgb(9,17,215)" transform="translate(0,0)"></path>+<metadata><recraft-signature>{"signed_by": "recraft", "signature_b64": "pB7wkz8Ek5bxU3kvyDCMHuYNozF4R6a7cTFGIe36yEqZ1IzWl9KE2HeeiCgZeJyQEGYkCWwGNCEd1Q+4UYViCw==", "signing_algo": "Ed25519", "generation_timestamp": 1781473792, "identifier": "f1458661-9cf3-4ba0-8267-5888169ace51"}</recraft-signature></metadata></svg>\ No newline at end of filediff --git a/src-tauri/omniget-core/src/models/settings.rs b/src-tauri/omniget-core/src/models/settings.rsindex 035edac8..dce6c2a2 100644--- a/src-tauri/omniget-core/src/models/settings.rs+++ b/src-tauri/omniget-core/src/models/settings.rs@@ -1,533 +1,533 @@-use serde::{Deserialize, Serialize};-use std::path::PathBuf;--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct AppSettings {- pub schema_version: u32,- pub appearance: AppearanceSettings,- pub download: DownloadSettings,- pub advanced: AdvancedSettings,- #[serde(default)]- pub telegram: TelegramSettings,- #[serde(default)]- pub proxy: ProxySettings,- #[serde(default)]- pub onboarding_completed: bool,- #[serde(default, alias = "start_with_windows")]- pub start_with_system: bool,- #[serde(default)]- pub start_minimized: bool,- #[serde(default)]- pub portable_mode: bool,- #[serde(default)]- pub legal_acknowledged: bool,- #[serde(default)]- pub last_download_options: LastDownloadOptions,- #[serde(default)]- pub typography: TypographySettings,- #[serde(default)]- pub rpc: RpcSettings,- #[serde(default)]- pub bridge: BridgeSettings,-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct RpcSettings {- #[serde(default = "default_rpc_enabled")]- pub enabled: bool,- #[serde(default = "default_rpc_app_id")]- pub app_id: String,- #[serde(default = "default_rpc_image_key")]- pub large_image_key: String,-}--impl Default for RpcSettings {- fn default() -> Self {- Self {- enabled: default_rpc_enabled(),- app_id: default_rpc_app_id(),- large_image_key: default_rpc_image_key(),- }- }-}--fn default_rpc_enabled() -> bool {- true-}--fn default_rpc_app_id() -> String {- "1502867748353478656".into()-}--fn default_rpc_image_key() -> String {- "omniget_music".into()-}--#[derive(Debug, Clone, Serialize, Deserialize, Default)]-pub struct LastDownloadOptions {- #[serde(default)]- pub mode: Option<String>,- #[serde(default)]- pub quality: Option<String>,-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct AppearanceSettings {- pub theme: String,- pub language: String,-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct DownloadSettings {- pub default_output_dir: PathBuf,- pub always_ask_path: bool,- pub video_quality: String,- pub skip_existing: bool,- pub download_attachments: bool,- pub download_descriptions: bool,- #[serde(default = "default_true")]- pub embed_metadata: bool,- #[serde(default = "default_true")]- pub embed_thumbnail: bool,- #[serde(default)]- pub clipboard_detection: bool,- #[serde(default)]- pub auto_download_on_paste: bool,- #[serde(default = "default_filename_template")]- pub filename_template: String,- #[serde(default)]- pub organize_by_platform: bool,- #[serde(default)]- pub download_subtitles: bool,- #[serde(default)]- pub include_auto_subtitles: bool,- #[serde(default = "default_caption_locale")]- pub caption_locale: String,- #[serde(default)]- pub keep_vtt: bool,- #[serde(default)]- pub translate_metadata: bool,- #[serde(default)]- pub youtube_sponsorblock: bool,- #[serde(default = "default_sponsorblock_mode")]- pub sponsorblock_mode: String,- #[serde(default = "default_sponsorblock_categories")]- pub sponsorblock_categories: Vec<String>,- #[serde(default)]- pub split_by_chapters: bool,- #[serde(default)]- pub live_from_start: bool,- #[serde(default)]- pub speed_limit: String,- #[serde(default)]- pub hotkey_enabled: bool,- #[serde(default = "default_hotkey_binding")]- pub hotkey_binding: String,- #[serde(default)]- pub clip_hotkey_enabled: bool,- #[serde(default = "default_clip_hotkey_binding")]- pub clip_hotkey_binding: String,- #[serde(default)]- pub music_hotkey_enabled: bool,- #[serde(default = "default_music_hotkey_binding")]- pub music_hotkey_binding: String,- #[serde(default = "default_music_audio_format")]- pub music_audio_format: String,- #[serde(default)]- pub extra_ytdlp_flags: Vec<String>,- #[serde(default = "default_true")]- pub copy_to_clipboard_on_hotkey: bool,- #[serde(default)]- pub cookie_file: String,- #[serde(default = "default_true")]- pub always_use_managed_cookies: bool,- #[serde(default)]- pub continuous_lecture_numbers: bool,- #[serde(default)]- pub bilibili_danmaku_enabled: bool,- #[serde(default = "default_bilibili_danmaku_format")]- pub bilibili_danmaku_format: String,- #[serde(default = "default_bilibili_container")]- pub bilibili_container: String,- #[serde(default)]- pub bilibili_nfo_enabled: bool,- #[serde(default)]- pub bilibili_cover_sidecar: bool,- #[serde(default = "default_bilibili_cover_format")]- pub bilibili_cover_format: String,- #[serde(default = "default_bilibili_naming_video")]- pub bilibili_naming_video: String,- #[serde(default = "default_bilibili_naming_multi_part")]- pub bilibili_naming_multi_part: String,- #[serde(default = "default_bilibili_naming_bangumi")]- pub bilibili_naming_bangumi: String,- #[serde(default = "default_bilibili_naming_cheese")]- pub bilibili_naming_cheese: String,- #[serde(default = "default_bilibili_naming_collection")]- pub bilibili_naming_collection: String,- #[serde(default)]- pub bilibili_cdn_hosts: String,- #[serde(default)]- pub bilibili_cdn_prefer_alternatives: bool,- #[serde(default = "default_bilibili_preferred_qn")]- pub bilibili_preferred_qn: u32,- #[serde(default = "default_bilibili_preferred_codec")]- pub bilibili_preferred_codec: u32,- #[serde(default = "default_bilibili_preferred_audio_qn")]- pub bilibili_preferred_audio_qn: u32,-}--fn default_bilibili_preferred_qn() -> u32 {- 200-}--fn default_bilibili_preferred_codec() -> u32 {- 20-}--fn default_bilibili_preferred_audio_qn() -> u32 {- 30300-}--fn default_bilibili_cover_format() -> String {- "jpg".to_string()-}--fn default_bilibili_naming_video() -> String {- "{title}".to_string()-}--fn default_bilibili_naming_multi_part() -> String {- "{parent_title}/P{page} - {leaf_title}".to_string()-}--fn default_bilibili_naming_bangumi() -> String {- "{series_title}/Season {season_number}/{episode_number_pad2} - {episode_title}".to_string()-}--fn default_bilibili_naming_cheese() -> String {- "{series_title}/{section_title}/{episode_number_pad2} - {episode_title}".to_string()-}--fn default_bilibili_naming_collection() -> String {- "{collection_title}/{title}".to_string()-}--fn default_bilibili_danmaku_format() -> String {- "xml".to_string()-}--fn default_bilibili_container() -> String {- "mp4".to_string()-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct AdvancedSettings {- pub max_concurrent_segments: u32,- pub max_retries: u32,- #[serde(default = "default_max_concurrent_downloads")]- pub max_concurrent_downloads: u32,- #[serde(default = "default_concurrent_fragments")]- pub concurrent_fragments: u32,- #[serde(default = "default_stagger_delay_ms")]- pub stagger_delay_ms: u64,- #[serde(default = "default_torrent_listen_port")]- pub torrent_listen_port: u16,- #[serde(default = "default_torrent_auto_trackers")]- pub torrent_auto_trackers: bool,- #[serde(default = "default_torrent_upnp")]- pub torrent_upnp: bool,- #[serde(default = "default_prevent_sleep")]- pub prevent_sleep: bool,- #[serde(default)]- pub cookies_from_browser: String,- #[serde(default)]- pub twitter_manual_cookie: String,- #[serde(default)]- pub user_agent: String,-}--fn default_concurrent_fragments() -> u32 {- 8-}--fn default_sponsorblock_mode() -> String {- "remove".to_string()-}--fn default_sponsorblock_categories() -> Vec<String> {- vec![- "sponsor".to_string(),- "selfpromo".to_string(),- "interaction".to_string(),- ]-}--fn default_max_concurrent_downloads() -> u32 {- 2-}--fn default_stagger_delay_ms() -> u64 {- 150-}--fn default_torrent_auto_trackers() -> bool {- true-}--fn default_torrent_upnp() -> bool {- true-}--fn default_prevent_sleep() -> bool {- true-}--fn default_torrent_listen_port() -> u16 {- 6881-}--fn default_true() -> bool {- true-}--pub fn default_filename_template() -> String {- "%(title).200s [%(id)s].%(ext)s".into()-}--fn default_hotkey_binding() -> String {- "CmdOrCtrl+Shift+D".into()-}--fn default_clip_hotkey_binding() -> String {- "CmdOrCtrl+Shift+B".into()-}--fn default_music_hotkey_binding() -> String {- "CmdOrCtrl+Shift+M".into()-}--fn default_music_audio_format() -> String {- "m4a".into()-}--fn default_caption_locale() -> String {- "en".into()-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct TelegramSettings {- pub concurrent_downloads: u32,- pub fix_file_extensions: bool,-}--impl Default for TelegramSettings {- fn default() -> Self {- Self {- concurrent_downloads: 3,- fix_file_extensions: true,- }- }-}--#[derive(Debug, Clone, Serialize, Deserialize, Default)]-pub struct ProxySettings {- #[serde(default)]- pub enabled: bool,- #[serde(default = "default_proxy_type")]- pub proxy_type: String,- #[serde(default)]- pub host: String,- #[serde(default = "default_proxy_port")]- pub port: u16,- #[serde(default)]- pub username: String,- #[serde(default)]- pub password: String,-}--fn default_proxy_type() -> String {- "http".into()-}--fn default_proxy_port() -> u16 {- 8080-}--#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct TypographySettings {- #[serde(default = "default_font_display")]- pub font_display: String,- #[serde(default = "default_font_body")]- pub font_body: String,- #[serde(default = "default_font_mono")]- pub font_mono: String,- #[serde(default = "default_line_height_base")]- pub line_height_base: f32,- #[serde(default = "default_spacing_scale")]- pub spacing_scale: f32,- #[serde(default)]- pub preset_name: Option<String>,-}--fn default_font_display() -> String {- "Bricolage Grotesque Variable".into()-}--fn default_font_body() -> String {- "Inter".into()-}--fn default_font_mono() -> String {- "IBM Plex Mono".into()-}--fn default_line_height_base() -> f32 {- 1.55-}--fn default_spacing_scale() -> f32 {- 1.0-}--/// Local HTTP bridge that lets the browser extension talk to the desktop app-/// without depending on a Chrome native-messaging manifest (which would-/// otherwise force us to maintain an explicit allowlist of extension IDs).-///-/// The token is generated lazily on first launch and shown in the app-/// Settings; the user pastes it into the extension's options page once,-/// after which the extension authenticates each request with-/// `Authorization: Bearer <token>`.-#[derive(Debug, Clone, Serialize, Deserialize)]-pub struct BridgeSettings {- #[serde(default = "default_bridge_enabled")]- pub enabled: bool,- /// Bound port on `127.0.0.1`. `0` means "pick at startup, then persist".- #[serde(default)]- pub port: u16,- /// Random token used to authenticate extension requests.- /// Empty means "regenerate on next launch".- #[serde(default)]- pub token: String,-}--impl Default for BridgeSettings {- fn default() -> Self {- Self {- enabled: default_bridge_enabled(),- port: 0,- token: String::new(),- }- }-}--fn default_bridge_enabled() -> bool {- true-}--impl Default for TypographySettings {- fn default() -> Self {- Self {- font_display: default_font_display(),- font_body: default_font_body(),- font_mono: default_font_mono(),- line_height_base: default_line_height_base(),- spacing_scale: default_spacing_scale(),- preset_name: Some("omniget-default".into()),- }- }-}--impl Default for AppSettings {- fn default() -> Self {- Self {- schema_version: 1,- appearance: AppearanceSettings {- theme: "system".into(),- language: "en".into(),- },- download: DownloadSettings {- default_output_dir: dirs::download_dir().unwrap_or_else(|| PathBuf::from(".")),- always_ask_path: false,- video_quality: "720p".into(),- skip_existing: true,- download_attachments: true,- download_descriptions: true,- embed_metadata: true,- embed_thumbnail: true,- clipboard_detection: false,- auto_download_on_paste: false,- filename_template: default_filename_template(),- organize_by_platform: false,- download_subtitles: false,- include_auto_subtitles: false,- caption_locale: default_caption_locale(),- keep_vtt: false,- translate_metadata: false,- youtube_sponsorblock: false,- sponsorblock_mode: "remove".to_string(),- sponsorblock_categories: vec![- "sponsor".to_string(),- "selfpromo".to_string(),- "interaction".to_string(),- ],- split_by_chapters: false,- live_from_start: false,- speed_limit: String::new(),- hotkey_enabled: false,- hotkey_binding: default_hotkey_binding(),- clip_hotkey_enabled: false,- clip_hotkey_binding: default_clip_hotkey_binding(),- music_hotkey_enabled: false,- music_hotkey_binding: default_music_hotkey_binding(),- music_audio_format: default_music_audio_format(),- extra_ytdlp_flags: Vec::new(),- copy_to_clipboard_on_hotkey: true,- cookie_file: String::new(),- always_use_managed_cookies: true,- continuous_lecture_numbers: false,- bilibili_danmaku_enabled: false,- bilibili_danmaku_format: "xml".into(),- bilibili_container: "mp4".into(),- bilibili_nfo_enabled: false,- bilibili_cover_sidecar: false,- bilibili_cover_format: "jpg".into(),- bilibili_naming_video: default_bilibili_naming_video(),- bilibili_naming_multi_part: default_bilibili_naming_multi_part(),- bilibili_naming_bangumi: default_bilibili_naming_bangumi(),- bilibili_naming_cheese: default_bilibili_naming_cheese(),- bilibili_naming_collection: default_bilibili_naming_collection(),- bilibili_cdn_hosts: String::new(),- bilibili_cdn_prefer_alternatives: false,- bilibili_preferred_qn: default_bilibili_preferred_qn(),- bilibili_preferred_codec: default_bilibili_preferred_codec(),- bilibili_preferred_audio_qn: default_bilibili_preferred_audio_qn(),- },- advanced: AdvancedSettings {- max_concurrent_segments: 20,- max_retries: 3,- max_concurrent_downloads: 2,- concurrent_fragments: 8,- stagger_delay_ms: 150,- torrent_listen_port: 6881,- torrent_auto_trackers: true,- torrent_upnp: true,- prevent_sleep: true,- cookies_from_browser: String::new(),- twitter_manual_cookie: String::new(),- user_agent: String::new(),- },- telegram: TelegramSettings::default(),- proxy: ProxySettings::default(),- onboarding_completed: false,- start_with_system: false,- start_minimized: false,- portable_mode: false,- legal_acknowledged: false,- last_download_options: LastDownloadOptions::default(),- typography: TypographySettings::default(),- rpc: RpcSettings::default(),- bridge: BridgeSettings::default(),- }- }-}+use serde::{Deserialize, Serialize};+use std::path::PathBuf;++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct AppSettings {+ pub schema_version: u32,+ pub appearance: AppearanceSettings,+ pub download: DownloadSettings,+ pub advanced: AdvancedSettings,+ #[serde(default)]+ pub telegram: TelegramSettings,+ #[serde(default)]+ pub proxy: ProxySettings,+ #[serde(default)]+ pub onboarding_completed: bool,+ #[serde(default, alias = "start_with_windows")]+ pub start_with_system: bool,+ #[serde(default)]+ pub start_minimized: bool,+ #[serde(default)]+ pub portable_mode: bool,+ #[serde(default)]+ pub legal_acknowledged: bool,+ #[serde(default)]+ pub last_download_options: LastDownloadOptions,+ #[serde(default)]+ pub typography: TypographySettings,+ #[serde(default)]+ pub rpc: RpcSettings,+ #[serde(default)]+ pub bridge: BridgeSettings,+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct RpcSettings {+ #[serde(default = "default_rpc_enabled")]+ pub enabled: bool,+ #[serde(default = "default_rpc_app_id")]+ pub app_id: String,+ #[serde(default = "default_rpc_image_key")]+ pub large_image_key: String,+}++impl Default for RpcSettings {+ fn default() -> Self {+ Self {+ enabled: default_rpc_enabled(),+ app_id: default_rpc_app_id(),+ large_image_key: default_rpc_image_key(),+ }+ }+}++fn default_rpc_enabled() -> bool {+ true+}++fn default_rpc_app_id() -> String {+ "1502867748353478656".into()+}++fn default_rpc_image_key() -> String {+ "omniget_music".into()+}++#[derive(Debug, Clone, Serialize, Deserialize, Default)]+pub struct LastDownloadOptions {+ #[serde(default)]+ pub mode: Option<String>,+ #[serde(default)]+ pub quality: Option<String>,+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct AppearanceSettings {+ pub theme: String,+ pub language: String,+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct DownloadSettings {+ pub default_output_dir: PathBuf,+ pub always_ask_path: bool,+ pub video_quality: String,+ pub skip_existing: bool,+ pub download_attachments: bool,+ pub download_descriptions: bool,+ #[serde(default = "default_true")]+ pub embed_metadata: bool,+ #[serde(default = "default_true")]+ pub embed_thumbnail: bool,+ #[serde(default)]+ pub clipboard_detection: bool,+ #[serde(default)]+ pub auto_download_on_paste: bool,+ #[serde(default = "default_filename_template")]+ pub filename_template: String,+ #[serde(default)]+ pub organize_by_platform: bool,+ #[serde(default)]+ pub download_subtitles: bool,+ #[serde(default)]+ pub include_auto_subtitles: bool,+ #[serde(default = "default_caption_locale")]+ pub caption_locale: String,+ #[serde(default)]+ pub keep_vtt: bool,+ #[serde(default)]+ pub translate_metadata: bool,+ #[serde(default)]+ pub youtube_sponsorblock: bool,+ #[serde(default = "default_sponsorblock_mode")]+ pub sponsorblock_mode: String,+ #[serde(default = "default_sponsorblock_categories")]+ pub sponsorblock_categories: Vec<String>,+ #[serde(default)]+ pub split_by_chapters: bool,+ #[serde(default)]+ pub live_from_start: bool,+ #[serde(default)]+ pub speed_limit: String,+ #[serde(default)]+ pub hotkey_enabled: bool,+ #[serde(default = "default_hotkey_binding")]+ pub hotkey_binding: String,+ #[serde(default)]+ pub clip_hotkey_enabled: bool,+ #[serde(default = "default_clip_hotkey_binding")]+ pub clip_hotkey_binding: String,+ #[serde(default)]+ pub music_hotkey_enabled: bool,+ #[serde(default = "default_music_hotkey_binding")]+ pub music_hotkey_binding: String,+ #[serde(default = "default_music_audio_format")]+ pub music_audio_format: String,+ #[serde(default)]+ pub extra_ytdlp_flags: Vec<String>,+ #[serde(default = "default_true")]+ pub copy_to_clipboard_on_hotkey: bool,+ #[serde(default)]+ pub cookie_file: String,+ #[serde(default = "default_true")]+ pub always_use_managed_cookies: bool,+ #[serde(default)]+ pub continuous_lecture_numbers: bool,+ #[serde(default)]+ pub bilibili_danmaku_enabled: bool,+ #[serde(default = "default_bilibili_danmaku_format")]+ pub bilibili_danmaku_format: String,+ #[serde(default = "default_bilibili_container")]+ pub bilibili_container: String,+ #[serde(default)]+ pub bilibili_nfo_enabled: bool,+ #[serde(default)]+ pub bilibili_cover_sidecar: bool,+ #[serde(default = "default_bilibili_cover_format")]+ pub bilibili_cover_format: String,+ #[serde(default = "default_bilibili_naming_video")]+ pub bilibili_naming_video: String,+ #[serde(default = "default_bilibili_naming_multi_part")]+ pub bilibili_naming_multi_part: String,+ #[serde(default = "default_bilibili_naming_bangumi")]+ pub bilibili_naming_bangumi: String,+ #[serde(default = "default_bilibili_naming_cheese")]+ pub bilibili_naming_cheese: String,+ #[serde(default = "default_bilibili_naming_collection")]+ pub bilibili_naming_collection: String,+ #[serde(default)]+ pub bilibili_cdn_hosts: String,+ #[serde(default)]+ pub bilibili_cdn_prefer_alternatives: bool,+ #[serde(default = "default_bilibili_preferred_qn")]+ pub bilibili_preferred_qn: u32,+ #[serde(default = "default_bilibili_preferred_codec")]+ pub bilibili_preferred_codec: u32,+ #[serde(default = "default_bilibili_preferred_audio_qn")]+ pub bilibili_preferred_audio_qn: u32,+}++fn default_bilibili_preferred_qn() -> u32 {+ 200+}++fn default_bilibili_preferred_codec() -> u32 {+ 20+}++fn default_bilibili_preferred_audio_qn() -> u32 {+ 30300+}++fn default_bilibili_cover_format() -> String {+ "jpg".to_string()+}++fn default_bilibili_naming_video() -> String {+ "{title}".to_string()+}++fn default_bilibili_naming_multi_part() -> String {+ "{parent_title}/P{page} - {leaf_title}".to_string()+}++fn default_bilibili_naming_bangumi() -> String {+ "{series_title}/Season {season_number}/{episode_number_pad2} - {episode_title}".to_string()+}++fn default_bilibili_naming_cheese() -> String {+ "{series_title}/{section_title}/{episode_number_pad2} - {episode_title}".to_string()+}++fn default_bilibili_naming_collection() -> String {+ "{collection_title}/{title}".to_string()+}++fn default_bilibili_danmaku_format() -> String {+ "xml".to_string()+}++fn default_bilibili_container() -> String {+ "mp4".to_string()+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct AdvancedSettings {+ pub max_concurrent_segments: u32,+ pub max_retries: u32,+ #[serde(default = "default_max_concurrent_downloads")]+ pub max_concurrent_downloads: u32,+ #[serde(default = "default_concurrent_fragments")]+ pub concurrent_fragments: u32,+ #[serde(default = "default_stagger_delay_ms")]+ pub stagger_delay_ms: u64,+ #[serde(default = "default_torrent_listen_port")]+ pub torrent_listen_port: u16,+ #[serde(default = "default_torrent_auto_trackers")]+ pub torrent_auto_trackers: bool,+ #[serde(default = "default_torrent_upnp")]+ pub torrent_upnp: bool,+ #[serde(default = "default_prevent_sleep")]+ pub prevent_sleep: bool,+ #[serde(default)]+ pub cookies_from_browser: String,+ #[serde(default)]+ pub twitter_manual_cookie: String,+ #[serde(default)]+ pub user_agent: String,+}++fn default_concurrent_fragments() -> u32 {+ 8+}++fn default_sponsorblock_mode() -> String {+ "remove".to_string()+}++fn default_sponsorblock_categories() -> Vec<String> {+ vec![+ "sponsor".to_string(),+ "selfpromo".to_string(),+ "interaction".to_string(),+ ]+}++fn default_max_concurrent_downloads() -> u32 {+ 2+}++fn default_stagger_delay_ms() -> u64 {+ 150+}++fn default_torrent_auto_trackers() -> bool {+ true+}++fn default_torrent_upnp() -> bool {+ true+}++fn default_prevent_sleep() -> bool {+ true+}++fn default_torrent_listen_port() -> u16 {+ 6881+}++fn default_true() -> bool {+ true+}++pub fn default_filename_template() -> String {+ "%(title).200s [%(id)s].%(ext)s".into()+}++fn default_hotkey_binding() -> String {+ "CmdOrCtrl+Shift+D".into()+}++fn default_clip_hotkey_binding() -> String {+ "CmdOrCtrl+Shift+B".into()+}++fn default_music_hotkey_binding() -> String {+ "CmdOrCtrl+Shift+M".into()+}++fn default_music_audio_format() -> String {+ "m4a".into()+}++fn default_caption_locale() -> String {+ "en".into()+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct TelegramSettings {+ pub concurrent_downloads: u32,+ pub fix_file_extensions: bool,+}++impl Default for TelegramSettings {+ fn default() -> Self {+ Self {+ concurrent_downloads: 3,+ fix_file_extensions: true,+ }+ }+}++#[derive(Debug, Clone, Serialize, Deserialize, Default)]+pub struct ProxySettings {+ #[serde(default)]+ pub enabled: bool,+ #[serde(default = "default_proxy_type")]+ pub proxy_type: String,+ #[serde(default)]+ pub host: String,+ #[serde(default = "default_proxy_port")]+ pub port: u16,+ #[serde(default)]+ pub username: String,+ #[serde(default)]+ pub password: String,+}++fn default_proxy_type() -> String {+ "http".into()+}++fn default_proxy_port() -> u16 {+ 8080+}++#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct TypographySettings {+ #[serde(default = "default_font_display")]+ pub font_display: String,+ #[serde(default = "default_font_body")]+ pub font_body: String,+ #[serde(default = "default_font_mono")]+ pub font_mono: String,+ #[serde(default = "default_line_height_base")]+ pub line_height_base: f32,+ #[serde(default = "default_spacing_scale")]+ pub spacing_scale: f32,+ #[serde(default)]+ pub preset_name: Option<String>,+}++fn default_font_display() -> String {+ "Bricolage Grotesque Variable".into()+}++fn default_font_body() -> String {+ "Inter".into()+}++fn default_font_mono() -> String {+ "IBM Plex Mono".into()+}++fn default_line_height_base() -> f32 {+ 1.55+}++fn default_spacing_scale() -> f32 {+ 1.0+}++/// Local HTTP bridge that lets the browser extension talk to the desktop app+/// without depending on a Chrome native-messaging manifest (which would+/// otherwise force us to maintain an explicit allowlist of extension IDs).+///+/// The token is generated lazily on first launch and shown in the app+/// Settings; the user pastes it into the extension's options page once,+/// after which the extension authenticates each request with+/// `Authorization: Bearer <token>`.+#[derive(Debug, Clone, Serialize, Deserialize)]+pub struct BridgeSettings {+ #[serde(default = "default_bridge_enabled")]+ pub enabled: bool,+ /// Bound port on `127.0.0.1`. `0` means "pick at startup, then persist".+ #[serde(default)]+ pub port: u16,+ /// Random token used to authenticate extension requests.+ /// Empty means "regenerate on next launch".+ #[serde(default)]+ pub token: String,+}++impl Default for BridgeSettings {+ fn default() -> Self {+ Self {+ enabled: default_bridge_enabled(),+ port: 0,+ token: String::new(),+ }+ }+}++fn default_bridge_enabled() -> bool {+ true+}++impl Default for TypographySettings {+ fn default() -> Self {+ Self {+ font_display: default_font_display(),+ font_body: default_font_body(),+ font_mono: default_font_mono(),+ line_height_base: default_line_height_base(),+ spacing_scale: default_spacing_scale(),+ preset_name: Some("omniget-default".into()),+ }+ }+}++impl Default for AppSettings {+ fn default() -> Self {+ Self {+ schema_version: 1,+ appearance: AppearanceSettings {+ theme: "system".into(),+ language: "en".into(),+ },+ download: DownloadSettings {+ default_output_dir: dirs::download_dir().unwrap_or_else(|| PathBuf::from(".")),+ always_ask_path: false,+ video_quality: "720p".into(),+ skip_existing: true,+ download_attachments: true,+ download_descriptions: true,+ embed_metadata: true,+ embed_thumbnail: true,+ clipboard_detection: false,+ auto_download_on_paste: false,+ filename_template: default_filename_template(),+ organize_by_platform: false,+ download_subtitles: false,+ include_auto_subtitles: false,+ caption_locale: default_caption_locale(),+ keep_vtt: false,+ translate_metadata: false,+ youtube_sponsorblock: false,+ sponsorblock_mode: "remove".to_string(),+ sponsorblock_categories: vec![+ "sponsor".to_string(),+ "selfpromo".to_string(),+ "interaction".to_string(),+ ],+ split_by_chapters: false,+ live_from_start: false,+ speed_limit: String::new(),+ hotkey_enabled: false,+ hotkey_binding: default_hotkey_binding(),+ clip_hotkey_enabled: false,+ clip_hotkey_binding: default_clip_hotkey_binding(),+ music_hotkey_enabled: false,+ music_hotkey_binding: default_music_hotkey_binding(),+ music_audio_format: default_music_audio_format(),+ extra_ytdlp_flags: Vec::new(),+ copy_to_clipboard_on_hotkey: true,+ cookie_file: String::new(),+ always_use_managed_cookies: true,+ continuous_lecture_numbers: false,+ bilibili_danmaku_enabled: false,+ bilibili_danmaku_format: "xml".into(),+ bilibili_container: "mp4".into(),+ bilibili_nfo_enabled: false,+ bilibili_cover_sidecar: false,+ bilibili_cover_format: "jpg".into(),+ bilibili_naming_video: default_bilibili_naming_video(),+ bilibili_naming_multi_part: default_bilibili_naming_multi_part(),+ bilibili_naming_bangumi: default_bilibili_naming_bangumi(),+ bilibili_naming_cheese: default_bilibili_naming_cheese(),+ bilibili_naming_collection: default_bilibili_naming_collection(),+ bilibili_cdn_hosts: String::new(),+ bilibili_cdn_prefer_alternatives: false,+ bilibili_preferred_qn: default_bilibili_preferred_qn(),+ bilibili_preferred_codec: default_bilibili_preferred_codec(),+ bilibili_preferred_audio_qn: default_bilibili_preferred_audio_qn(),+ },+ advanced: AdvancedSettings {+ max_concurrent_segments: 20,+ max_retries: 3,+ max_concurrent_downloads: 2,+ concurrent_fragments: 8,+ stagger_delay_ms: 150,+ torrent_listen_port: 6881,+ torrent_auto_trackers: true,+ torrent_upnp: true,+ prevent_sleep: true,+ cookies_from_browser: String::new(),+ twitter_manual_cookie: String::new(),+ user_agent: String::new(),+ },+ telegram: TelegramSettings::default(),+ proxy: ProxySettings::default(),+ onboarding_completed: false,+ start_with_system: false,+ start_minimized: false,+ portable_mode: false,+ legal_acknowledged: false,+ last_download_options: LastDownloadOptions::default(),+ typography: TypographySettings::default(),+ rpc: RpcSettings::default(),+ bridge: BridgeSettings::default(),+ }+ }+}diff --git a/src-tauri/src/commands/plugins.rs b/src-tauri/src/commands/plugins.rsindex fe4c64ac..aa96e163 100644--- a/src-tauri/src/commands/plugins.rs+++ b/src-tauri/src/commands/plugins.rs@@ -1,10 +1,20 @@use std::sync::Arc;-use omniget_plugin_sdk::{PluginManifest, RegistryEntry};+use omniget_plugin_sdk::{PluginHost, PluginManifest, RegistryEntry};use serde::{Deserialize, Serialize};+use tauri::Emitter;+use crate::plugin_host::PluginHostImpl;use crate::plugin_loader::{PluginLoadError, PluginManager};+fn emit_plugins_changed(app: &tauri::AppHandle) {+ let _ = app.emit("plugins-changed", ());+}++fn build_plugin_host(app: &tauri::AppHandle, plugins_dir: std::path::PathBuf) -> Arc<dyn PluginHost> {+ Arc::new(PluginHostImpl::new(app.clone(), plugins_dir))+}+#[derive(Debug, Serialize)]pub struct PluginInfo {pub id: String,@@ -138,23 +148,38 @@ pub fn get_plugin_frontend_path(#[tauri::command]pub fn set_plugin_enabled(+ app: tauri::AppHandle,state: tauri::State<'_, Arc<tokio::sync::RwLock<PluginManager>>>,plugin_id: String,enabled: bool,) -> Result<(), String> {- let mut manager = state.blocking_write();- manager- .set_enabled(&plugin_id, enabled)- .map_err(|e| e.to_string())+ {+ let mut manager = state.blocking_write();+ manager+ .set_enabled(&plugin_id, enabled)+ .map_err(|e| e.to_string())?;+ if enabled && !manager.is_loaded(&plugin_id) {+ let plugins_dir = manager.plugins_dir().to_path_buf();+ let host = build_plugin_host(&app, plugins_dir);+ let _ = manager.load_one(&plugin_id, host);+ }+ }+ emit_plugins_changed(&app);+ Ok(())}#[tauri::command]pub fn uninstall_plugin(+ app: tauri::AppHandle,state: tauri::State<'_, Arc<tokio::sync::RwLock<PluginManager>>>,plugin_id: String,) -> Result<(), String> {- let mut manager = state.blocking_write();- manager.unregister(&plugin_id).map_err(|e| e.to_string())+ {+ let mut manager = state.blocking_write();+ manager.unregister(&plugin_id).map_err(|e| e.to_string())?;+ }+ emit_plugins_changed(&app);+ Ok(())}#[tauri::command]@@ -419,49 +444,129 @@ pub async fn install_plugin_zip_from_repo(#[tauri::command]pub async fn install_plugin_from_registry(+ app: tauri::AppHandle,state: tauri::State<'_, Arc<tokio::sync::RwLock<PluginManager>>>,plugin_id: String,repo: String,) -> Result<String, String> {- install_plugin_zip_from_repo(&state.inner().clone(), plugin_id, repo).await+ let version =+ install_plugin_zip_from_repo(&state.inner().clone(), plugin_id.clone(), repo).await?;+ {+ let mut manager = state.write().await;+ if !manager.is_loaded(&plugin_id) {+ let plugins_dir = manager.plugins_dir().to_path_buf();+ let host = build_plugin_host(&app, plugins_dir);+ let _ = manager.load_one(&plugin_id, host);+ }+ }+ emit_plugins_changed(&app);+ Ok(version)}-const DEFAULT_PLUGINS: &[(&str, &str)] = &[("study", "tonhowtf/omniget-study-release")];+async fn fetch_registry_entries() -> Result<Vec<RegistryEntry>, String> {+ let client = crate::core::http_client::apply_global_proxy(+ reqwest::Client::builder()+ .user_agent("OmniGet")+ .timeout(std::time::Duration::from_secs(15)),+ )+ .build()+ .map_err(|e| e.to_string())?;++ #[derive(Deserialize)]+ struct RegistryFile {+ plugins: Vec<RegistryEntry>,+ }++ let mut last_err = String::from("Failed to fetch registry");+ for url in REGISTRY_URLS {+ match client.get(*url).send().await {+ Ok(resp) => match resp.error_for_status() {+ Ok(resp) => match resp.text().await {+ Ok(body) => match serde_json::from_str::<RegistryFile>(&body) {+ Ok(parsed) => return Ok(parsed.plugins),+ Err(e) => last_err = format!("Invalid registry: {}", e),+ },+ Err(e) => last_err = format!("Failed to read registry: {}", e),+ },+ Err(e) => last_err = format!("Registry request failed: {}", e),+ },+ Err(e) => last_err = format!("Failed to fetch registry: {}", e),+ }+ }+ Err(last_err)+}pub async fn ensure_default_plugins(state: Arc<tokio::sync::RwLock<PluginManager>>) {- for (plugin_id, repo) in DEFAULT_PLUGINS {- let already_installed = {+ let entries = match fetch_registry_entries().await {+ Ok(e) => e,+ Err(e) => {+ tracing::warn!("ensure_default_plugins: registry unavailable: {}", e);+ return;+ }+ };++ for entry in entries {+ let skip = {let manager = state.read().await;- manager- .installed_plugins()- .iter()- .any(|p| p.id == *plugin_id)+ manager.installed_plugins().iter().any(|p| p.id == entry.id)+ || manager.is_user_removed(&entry.id)+ };+ if skip {+ continue;+ }+ tracing::info!("installing default plugin '{}' from {}", entry.id, entry.repo);+ match install_plugin_zip_from_repo(&state, entry.id.clone(), entry.repo.clone()).await {+ Ok(v) => tracing::info!("default plugin '{}' installed ({})", entry.id, v),+ Err(e) => tracing::warn!("failed to install default plugin '{}': {}", entry.id, e),+ }+ }+}++pub async fn auto_update_plugins(state: Arc<tokio::sync::RwLock<PluginManager>>) {+ let installed = {+ let manager = state.read().await;+ manager.installed_plugins().to_vec()+ };++ let client = match crate::core::http_client::apply_global_proxy(+ reqwest::Client::builder()+ .user_agent("OmniGet")+ .timeout(std::time::Duration::from_secs(15)),+ )+ .build()+ {+ Ok(c) => c,+ Err(e) => {+ tracing::warn!("auto_update_plugins: client build failed: {}", e);+ return;+ }+ };++ for plugin in installed {+ let repo = match plugin.repo {+ Some(r) => r,+ None => continue,};- if already_installed {- tracing::debug!("default plugin '{}' already installed, skipping", plugin_id);+ let api_url = format!("https://api.github.com/repos/{}/releases/latest", repo);+ let latest = match client.get(&api_url).send().await {+ Ok(resp) => match resp.json::<GitHubRelease>().await {+ Ok(r) => r.tag_name.trim_start_matches('v').to_string(),+ Err(_) => continue,+ },+ Err(_) => continue,+ };+ if latest.is_empty() || latest == plugin.version {continue;}tracing::info!(- "default plugin '{}' missing, installing from {}",- plugin_id,- repo+ "auto-updating plugin '{}' {} -> {}",+ plugin.id,+ plugin.version,+ latest);- match install_plugin_zip_from_repo(&state, plugin_id.to_string(), repo.to_string()).await {- Ok(version) => {- tracing::info!(- "default plugin '{}' installed (version {})",- plugin_id,- version- );- }- Err(e) => {- tracing::warn!(- "failed to install default plugin '{}' from {}: {}",- plugin_id,- repo,- e- );- }+ match install_plugin_zip_from_repo(&state, plugin.id.clone(), repo).await {+ Ok(v) => tracing::info!("plugin '{}' updated to {}", plugin.id, v),+ Err(e) => tracing::warn!("auto-update failed for '{}': {}", plugin.id, e),}}}@@ -526,9 +631,10 @@ pub async fn check_plugin_updates(#[tauri::command]pub async fn update_plugin(+ app: tauri::AppHandle,state: tauri::State<'_, Arc<tokio::sync::RwLock<PluginManager>>>,plugin_id: String,repo: String,) -> Result<String, String> {- install_plugin_from_registry(state, plugin_id, repo).await+ install_plugin_from_registry(app, state, plugin_id, repo).await}diff --git a/src-tauri/src/commands/settings.rs b/src-tauri/src/commands/settings.rsindex c2bea531..664426c5 100644--- a/src-tauri/src/commands/settings.rs+++ b/src-tauri/src/commands/settings.rs@@ -1,167 +1,167 @@-use crate::hotkey;-use crate::models::settings::AppSettings;-use crate::storage::config;--#[tauri::command]-pub fn get_settings(app: tauri::AppHandle) -> Result<AppSettings, String> {- Ok(config::load_settings(&app))-}--#[tauri::command]-pub fn update_settings(app: tauri::AppHandle, partial: String) -> Result<AppSettings, String> {- let mut current = config::load_settings(&app);- let old_hotkey_enabled = current.download.hotkey_enabled;- let old_hotkey_binding = current.download.hotkey_binding.clone();- let old_clip_hotkey_enabled = current.download.clip_hotkey_enabled;- let old_clip_hotkey_binding = current.download.clip_hotkey_binding.clone();- let old_music_hotkey_enabled = current.download.music_hotkey_enabled;- let old_music_hotkey_binding = current.download.music_hotkey_binding.clone();- let old_start_with_system = current.start_with_system;- let old_rpc = current.rpc.clone();-- let patch: serde_json::Value =- serde_json::from_str(&partial).map_err(|e| format!("Invalid JSON: {}", e))?;- let mut current_val =- serde_json::to_value(¤t).map_err(|e| format!("Serialize: {}", e))?;- merge_json(&mut current_val, &patch);- current = serde_json::from_value(current_val).map_err(|e| format!("Deserialize: {}", e))?;- config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;-- crate::core::http_client::init_proxy(current.proxy.clone());- crate::core::http_fetcher::set_global_max_concurrent_segments(- current.advanced.max_concurrent_segments as usize,- );-- if old_hotkey_enabled != current.download.hotkey_enabled- || old_hotkey_binding != current.download.hotkey_binding- || old_clip_hotkey_enabled != current.download.clip_hotkey_enabled- || old_clip_hotkey_binding != current.download.clip_hotkey_binding- || old_music_hotkey_enabled != current.download.music_hotkey_enabled- || old_music_hotkey_binding != current.download.music_hotkey_binding- {- hotkey::reregister(&app);- }-- if old_start_with_system != current.start_with_system {- crate::commands::autostart::apply_autostart(&app, current.start_with_system)?;- }-- if old_rpc.enabled != current.rpc.enabled- || old_rpc.app_id != current.rpc.app_id- || old_rpc.large_image_key != current.rpc.large_image_key- {- let new_rpc = current.rpc.clone();- let prev_app_id = old_rpc.app_id.clone();- tauri::async_runtime::spawn(async move {- crate::core::rpc::handle_settings_changed(new_rpc, prev_app_id).await;- });- }-- Ok(current)-}--#[tauri::command]-pub fn reset_settings(app: tauri::AppHandle) -> Result<AppSettings, String> {- let defaults = AppSettings::default();- config::save_settings(&app, &defaults).map_err(|e| format!("Save: {}", e))?;- hotkey::reregister(&app);- let _ = crate::commands::autostart::apply_autostart(&app, defaults.start_with_system);- Ok(defaults)-}--#[tauri::command]-pub fn mark_onboarding_complete(app: tauri::AppHandle) -> Result<(), String> {- let mut current = config::load_settings(&app);- current.onboarding_completed = true;- config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;- Ok(())-}--#[tauri::command]-pub fn mark_legal_acknowledged(app: tauri::AppHandle) -> Result<(), String> {- let mut current = config::load_settings(&app);- current.legal_acknowledged = true;- config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;- Ok(())-}--#[derive(serde::Serialize)]-pub struct BridgeInfo {- pub enabled: bool,- pub port: u16,- pub token: String,- pub url: String,-}--/// Returns the localhost bridge connection info for the Settings UI.-///-/// `port == 0` means the bridge has not finished binding yet (the user can-/// retry shortly). `token` may be empty until the first run completes.-#[tauri::command]-pub fn get_bridge_info(app: tauri::AppHandle) -> Result<BridgeInfo, String> {- let settings = config::load_settings(&app);- let url = if settings.bridge.port == 0 {- String::new()- } else {- crate::local_bridge::build_pairing_url(settings.bridge.port)- };- Ok(BridgeInfo {- enabled: settings.bridge.enabled,- port: settings.bridge.port,- token: settings.bridge.token,- url,- })-}--/// Forces a fresh token to be generated. Used by the Settings UI when the-/// user wants to revoke a previously-paired browser.-#[tauri::command]-pub fn rotate_bridge_token(app: tauri::AppHandle) -> Result<BridgeInfo, String> {- let mut current = config::load_settings(&app);- current.bridge.token = crate::local_bridge::generate_token();- config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;- get_bridge_info(app)-}--#[derive(serde::Serialize)]-pub struct BridgePairStatus {- pub ok: bool,- pub window_secs: i64,- pub port: u16,- pub enabled: bool,-}--/// Opens a short, single-use, user-consented pairing window so an installed-/// browser extension can fetch the bearer token from `GET /v1/pair` without-/// the user copy-pasting it.-#[tauri::command]-pub fn bridge_open_pairing(app: tauri::AppHandle) -> Result<BridgePairStatus, String> {- let settings = config::load_settings(&app);- if !settings.bridge.enabled {- return Ok(BridgePairStatus {- ok: false,- window_secs: 0,- port: settings.bridge.port,- enabled: false,- });- }- let window_secs = crate::local_bridge::open_pairing_window();- Ok(BridgePairStatus {- ok: true,- window_secs,- port: settings.bridge.port,- enabled: true,- })-}--fn merge_json(base: &mut serde_json::Value, patch: &serde_json::Value) {- if let (Some(base_obj), Some(patch_obj)) = (base.as_object_mut(), patch.as_object()) {- for (key, value) in patch_obj {- if value.is_object() && base_obj.get(key).is_some_and(|v| v.is_object()) {- merge_json(base_obj.get_mut(key).unwrap(), value);- } else {- base_obj.insert(key.clone(), value.clone());- }- }- }-}+use crate::hotkey;+use crate::models::settings::AppSettings;+use crate::storage::config;++#[tauri::command]+pub fn get_settings(app: tauri::AppHandle) -> Result<AppSettings, String> {+ Ok(config::load_settings(&app))+}++#[tauri::command]+pub fn update_settings(app: tauri::AppHandle, partial: String) -> Result<AppSettings, String> {+ let mut current = config::load_settings(&app);+ let old_hotkey_enabled = current.download.hotkey_enabled;+ let old_hotkey_binding = current.download.hotkey_binding.clone();+ let old_clip_hotkey_enabled = current.download.clip_hotkey_enabled;+ let old_clip_hotkey_binding = current.download.clip_hotkey_binding.clone();+ let old_music_hotkey_enabled = current.download.music_hotkey_enabled;+ let old_music_hotkey_binding = current.download.music_hotkey_binding.clone();+ let old_start_with_system = current.start_with_system;+ let old_rpc = current.rpc.clone();++ let patch: serde_json::Value =+ serde_json::from_str(&partial).map_err(|e| format!("Invalid JSON: {}", e))?;+ let mut current_val =+ serde_json::to_value(¤t).map_err(|e| format!("Serialize: {}", e))?;+ merge_json(&mut current_val, &patch);+ current = serde_json::from_value(current_val).map_err(|e| format!("Deserialize: {}", e))?;+ config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;++ crate::core::http_client::init_proxy(current.proxy.clone());+ crate::core::http_fetcher::set_global_max_concurrent_segments(+ current.advanced.max_concurrent_segments as usize,+ );++ if old_hotkey_enabled != current.download.hotkey_enabled+ || old_hotkey_binding != current.download.hotkey_binding+ || old_clip_hotkey_enabled != current.download.clip_hotkey_enabled+ || old_clip_hotkey_binding != current.download.clip_hotkey_binding+ || old_music_hotkey_enabled != current.download.music_hotkey_enabled+ || old_music_hotkey_binding != current.download.music_hotkey_binding+ {+ hotkey::reregister(&app);+ }++ if old_start_with_system != current.start_with_system {+ crate::commands::autostart::apply_autostart(&app, current.start_with_system)?;+ }++ if old_rpc.enabled != current.rpc.enabled+ || old_rpc.app_id != current.rpc.app_id+ || old_rpc.large_image_key != current.rpc.large_image_key+ {+ let new_rpc = current.rpc.clone();+ let prev_app_id = old_rpc.app_id.clone();+ tauri::async_runtime::spawn(async move {+ crate::core::rpc::handle_settings_changed(new_rpc, prev_app_id).await;+ });+ }++ Ok(current)+}++#[tauri::command]+pub fn reset_settings(app: tauri::AppHandle) -> Result<AppSettings, String> {+ let defaults = AppSettings::default();+ config::save_settings(&app, &defaults).map_err(|e| format!("Save: {}", e))?;+ hotkey::reregister(&app);+ let _ = crate::commands::autostart::apply_autostart(&app, defaults.start_with_system);+ Ok(defaults)+}++#[tauri::command]+pub fn mark_onboarding_complete(app: tauri::AppHandle) -> Result<(), String> {+ let mut current = config::load_settings(&app);+ current.onboarding_completed = true;+ config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;+ Ok(())+}++#[tauri::command]+pub fn mark_legal_acknowledged(app: tauri::AppHandle) -> Result<(), String> {+ let mut current = config::load_settings(&app);+ current.legal_acknowledged = true;+ config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;+ Ok(())+}++#[derive(serde::Serialize)]+pub struct BridgeInfo {+ pub enabled: bool,+ pub port: u16,+ pub token: String,+ pub url: String,+}++/// Returns the localhost bridge connection info for the Settings UI.+///+/// `port == 0` means the bridge has not finished binding yet (the user can+/// retry shortly). `token` may be empty until the first run completes.+#[tauri::command]+pub fn get_bridge_info(app: tauri::AppHandle) -> Result<BridgeInfo, String> {+ let settings = config::load_settings(&app);+ let url = if settings.bridge.port == 0 {+ String::new()+ } else {+ crate::local_bridge::build_pairing_url(settings.bridge.port)+ };+ Ok(BridgeInfo {+ enabled: settings.bridge.enabled,+ port: settings.bridge.port,+ token: settings.bridge.token,+ url,+ })+}++/// Forces a fresh token to be generated. Used by the Settings UI when the+/// user wants to revoke a previously-paired browser.+#[tauri::command]+pub fn rotate_bridge_token(app: tauri::AppHandle) -> Result<BridgeInfo, String> {+ let mut current = config::load_settings(&app);+ current.bridge.token = crate::local_bridge::generate_token();+ config::save_settings(&app, ¤t).map_err(|e| format!("Save: {}", e))?;+ get_bridge_info(app)+}++#[derive(serde::Serialize)]+pub struct BridgePairStatus {+ pub ok: bool,+ pub window_secs: i64,+ pub port: u16,+ pub enabled: bool,+}++/// Opens a short, single-use, user-consented pairing window so an installed+/// browser extension can fetch the bearer token from `GET /v1/pair` without+/// the user copy-pasting it.+#[tauri::command]+pub fn bridge_open_pairing(app: tauri::AppHandle) -> Result<BridgePairStatus, String> {+ let settings = config::load_settings(&app);+ if !settings.bridge.enabled {+ return Ok(BridgePairStatus {+ ok: false,+ window_secs: 0,+ port: settings.bridge.port,+ enabled: false,+ });+ }+ let window_secs = crate::local_bridge::open_pairing_window();+ Ok(BridgePairStatus {+ ok: true,+ window_secs,+ port: settings.bridge.port,+ enabled: true,+ })+}++fn merge_json(base: &mut serde_json::Value, patch: &serde_json::Value) {+ if let (Some(base_obj), Some(patch_obj)) = (base.as_object_mut(), patch.as_object()) {+ for (key, value) in patch_obj {+ if value.is_object() && base_obj.get(key).is_some_and(|v| v.is_object()) {+ merge_json(base_obj.get_mut(key).unwrap(), value);+ } else {+ base_obj.insert(key.clone(), value.clone());+ }+ }+ }+}diff --git a/src-tauri/src/core/queue.rs b/src-tauri/src/core/queue.rsindex 1465db52..4dc51a7f 100644--- a/src-tauri/src/core/queue.rs+++ b/src-tauri/src/core/queue.rs@@ -1,2082 +1,2092 @@-use std::collections::HashMap;-use std::path::PathBuf;-use std::sync::atomic::{AtomicU64, Ordering};-use std::sync::{Arc, OnceLock};--static EMIT_COUNT: AtomicU64 = AtomicU64::new(0);--pub fn now_ms() -> u64 {- std::time::SystemTime::now()- .duration_since(std::time::UNIX_EPOCH)- .map(|d| d.as_millis() as u64)- .unwrap_or(0)-}--fn append_download_log(app: &tauri::AppHandle, id: u64, line: impl AsRef<str>) {- crate::core::download_log::push_line(id, line.as_ref());- let _ = app.emit(- "download-log-update",- serde_json::json!({- "id": id,- }),- );-}--use serde::Serialize;-use tauri::{Emitter, Manager};-use tokio::sync::mpsc;-use tokio_util::sync::CancellationToken;--fn shared_http_client() -> &'static reqwest::Client {- static CLIENT: OnceLock<reqwest::Client> = OnceLock::new();- CLIENT.get_or_init(|| {- crate::core::http_client::apply_global_proxy(reqwest::Client::builder())- .build()- .unwrap_or_default()- })-}--use crate::core::ffmpeg::{self, MetadataEmbed};-use crate::models::media::MediaInfo;-use crate::platforms::traits::PlatformDownloader;-use crate::storage::config;--struct CachedInfo {- info: MediaInfo,- cached_at: std::time::Instant,-}--static INFO_CACHE: OnceLock<tokio::sync::Mutex<HashMap<String, CachedInfo>>> = OnceLock::new();--fn info_cache() -> &'static tokio::sync::Mutex<HashMap<String, CachedInfo>> {- INFO_CACHE.get_or_init(|| tokio::sync::Mutex::new(HashMap::new()))-}--const INFO_CACHE_TTL: std::time::Duration = std::time::Duration::from_secs(600);--static IN_FLIGHT_FETCHES: OnceLock<- tokio::sync::Mutex<HashMap<String, Arc<tokio::sync::Mutex<()>>>>,-> = OnceLock::new();--fn in_flight_map() -> &'static tokio::sync::Mutex<HashMap<String, Arc<tokio::sync::Mutex<()>>>> {- IN_FLIGHT_FETCHES.get_or_init(|| tokio::sync::Mutex::new(HashMap::new()))-}--#[derive(Debug, Clone, Serialize)]-pub struct MediaPreviewEvent {- pub url: String,- pub title: String,- pub author: String,- pub thumbnail_url: Option<String>,- pub duration_seconds: Option<f64>,-}--#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, serde::Deserialize)]-#[serde(rename_all = "snake_case")]-pub enum QueueKind {- Video,- Audio,- Image,- Pdf,- Book,- Webpage,- TelegramMedia,- CourseLesson,- Generic,-}--pub fn kind_from_platform(platform: &str) -> QueueKind {- let p = platform.to_ascii_lowercase();- match p.as_str() {- "youtube" | "vimeo" | "twitch" | "bilibili" | "tiktok" | "twitter" | "x" | "instagram"- | "reddit" | "bluesky" | "facebook" | "generic_ytdlp" => QueueKind::Video,- "soundcloud" | "spotify" => QueueKind::Audio,- "pinterest" => QueueKind::Image,- "magnet" | "p2p" | "torrent" => QueueKind::Generic,- "telegram" | "telegram_media" => QueueKind::TelegramMedia,- "courses" | "course_lesson" => QueueKind::CourseLesson,- "annas_archive" | "book" | "libgen" | "gutendex" => QueueKind::Book,- "pdf" => QueueKind::Pdf,- "webpage" | "embed" => QueueKind::Webpage,- _ => QueueKind::Generic,- }-}--#[derive(Debug, Clone, Serialize, PartialEq)]-#[serde(tag = "type", content = "data")]-pub enum QueueStatus {- Queued,- Active,- Paused,- Seeding,- Complete { success: bool },- Error { message: String, retryable: bool },-}--pub fn is_retryable_error_message(message: &str) -> bool {- let lower = message.to_lowercase();- if lower.contains("cancel") {- return false;- }- let (category, _) = omniget_core::core::errors::classify_download_error(message);- matches!(category, "unknown" | "rate_limited")-}--#[derive(Clone, Serialize)]-pub struct QueueItemInfo {- pub id: u64,- pub url: String,- pub platform: String,- pub title: String,- pub status: QueueStatus,- pub percent: f64,- pub speed_bytes_per_sec: f64,- pub downloaded_bytes: u64,- pub total_bytes: Option<u64>,- pub file_path: Option<String>,- pub file_size_bytes: Option<u64>,- pub file_count: Option<u32>,- pub thumbnail_url: Option<String>,- #[serde(skip_serializing_if = "Option::is_none")]- pub kind: Option<QueueKind>,- #[serde(default)]- pub external: bool,- #[serde(skip_serializing_if = "Option::is_none")]- pub eta_seconds: Option<u64>,- #[serde(skip_serializing_if = "Option::is_none")]- pub quality: Option<String>,- #[serde(skip_serializing_if = "Option::is_none")]- pub download_mode: Option<String>,-}--pub struct QueueItem {- pub id: u64,- pub url: String,- pub platform: String,- pub title: String,- pub status: QueueStatus,- pub cancel_token: CancellationToken,- pub output_dir: String,- pub download_mode: Option<String>,- pub quality: Option<String>,- pub format_id: Option<String>,- pub referer: Option<String>,- pub extra_headers: Option<std::collections::HashMap<String, String>>,- pub page_url: Option<String>,- pub user_agent: Option<String>,- pub percent: f64,- pub speed_bytes_per_sec: f64,- pub downloaded_bytes: u64,- pub total_bytes: Option<u64>,- pub file_path: Option<String>,- pub file_size_bytes: Option<u64>,- pub file_count: Option<u32>,- pub media_info: Option<MediaInfo>,- pub downloader: Arc<dyn PlatformDownloader>,- pub ytdlp_path: Option<PathBuf>,- pub from_hotkey: bool,- pub torrent_id: Option<usize>,- pub kind: Option<QueueKind>,- pub external: bool,- pub thumbnail_url_override: Option<String>,- pub retry_count: u32,- pub max_retries: u32,- pub resume_state: Option<serde_json::Value>,- pub concurrent_segments: Option<usize>,- pub segment_size_bytes: Option<u64>,- pub eta_seconds: Option<u64>,- pub cookie_slug: Option<String>,- pub custom_ytdlp_args: Option<Vec<String>>,- pub torrent_files: Option<Vec<usize>>,- pub scheduled_at_ms: Option<u64>,- pub stop_at_ms: Option<u64>,-}--impl QueueItem {- pub fn to_info(&self) -> QueueItemInfo {- QueueItemInfo {- id: self.id,- url: self.url.clone(),- platform: self.platform.clone(),- title: self.title.clone(),- status: self.status.clone(),- percent: self.percent,- speed_bytes_per_sec: self.speed_bytes_per_sec,- downloaded_bytes: self.downloaded_bytes,- total_bytes: self.total_bytes,- file_path: self.file_path.clone(),- file_size_bytes: self.file_size_bytes,- file_count: self.file_count,- thumbnail_url: self.thumbnail_url_override.clone().or_else(|| {- self.media_info- .as_ref()- .and_then(|m| m.thumbnail_url.clone())- }),- kind: self.kind,- external: self.external,- eta_seconds: self.eta_seconds,- quality: self.quality.clone(),- download_mode: self.download_mode.clone(),- }- }-}--pub struct DownloadQueue {- pub items: Vec<QueueItem>,- pub max_concurrent: u32,- pub stagger_delay_ms: u64,- pub default_max_retries: u32,-}--impl DownloadQueue {- pub fn new(max_concurrent: u32) -> Self {- Self {- items: Vec::new(),- max_concurrent,- stagger_delay_ms: 150,- default_max_retries: 3,- }- }-- #[allow(clippy::too_many_arguments)]- pub fn enqueue(- &mut self,- id: u64,- url: String,- platform: String,- title: String,- output_dir: String,- download_mode: Option<String>,- quality: Option<String>,- format_id: Option<String>,- referer: Option<String>,- extra_headers: Option<std::collections::HashMap<String, String>>,- page_url: Option<String>,- user_agent: Option<String>,- media_info: Option<MediaInfo>,- total_bytes: Option<u64>,- file_count: Option<u32>,- downloader: Arc<dyn PlatformDownloader>,- ytdlp_path: Option<PathBuf>,- from_hotkey: bool,- cookie_slug: Option<String>,- custom_ytdlp_args: Option<Vec<String>>,- torrent_files: Option<Vec<usize>>,- scheduled_at_ms: Option<u64>,- stop_at_ms: Option<u64>,- ) {- let computed_kind = Some(kind_from_platform(&platform));- let item = QueueItem {- id,- url,- platform,- title,- status: QueueStatus::Queued,- cancel_token: CancellationToken::new(),- output_dir,- download_mode,- quality,- format_id,- referer,- extra_headers,- page_url,- user_agent,- percent: 0.0,- speed_bytes_per_sec: 0.0,- downloaded_bytes: 0,- total_bytes,- file_path: None,- file_size_bytes: None,- file_count,- media_info,- downloader,- ytdlp_path,- from_hotkey,- torrent_id: None,- kind: computed_kind,- external: false,- thumbnail_url_override: None,- retry_count: 0,- max_retries: self.default_max_retries,- resume_state: None,- concurrent_segments: None,- segment_size_bytes: None,- eta_seconds: None,- cookie_slug,- custom_ytdlp_args,- torrent_files,- scheduled_at_ms,- stop_at_ms,- };- crate::core::recovery::persist(crate::core::recovery::RecoveryItem {- id: item.id,- url: item.url.clone(),- title: item.title.clone(),- platform: item.platform.clone(),- output_dir: item.output_dir.clone(),- download_mode: item.download_mode.clone(),- quality: item.quality.clone(),- format_id: item.format_id.clone(),- referer: item.referer.clone(),- });- self.items.push(item);- }-- pub fn hydrate_from_history(&mut self) {- let entries = crate::core::queue_history::list();- if entries.is_empty() {- return;- }- let placeholder: Arc<dyn PlatformDownloader> =- Arc::new(crate::platforms::noop::NoopDownloader::new());- for entry in entries.iter().rev() {- if self.items.iter().any(|i| i.id == entry.id) {- continue;- }- let status = if entry.success {- QueueStatus::Complete { success: true }- } else {- let msg = entry.error.clone().unwrap_or_default();- let retryable = is_retryable_error_message(&msg);- QueueStatus::Error {- message: msg,- retryable,- }- };- let percent = if entry.success { 100.0 } else { 0.0 };- let item = QueueItem {- id: entry.id,- url: entry.url.clone(),- platform: entry.platform.clone(),- title: entry.title.clone(),- status,- cancel_token: CancellationToken::new(),- output_dir: entry- .file_path- .as_ref()- .and_then(|p| {- std::path::Path::new(p)- .parent()- .map(|x| x.to_string_lossy().to_string())- })- .unwrap_or_default(),- download_mode: None,- quality: None,- format_id: None,- referer: None,- extra_headers: None,- page_url: None,- user_agent: None,- percent,- speed_bytes_per_sec: 0.0,- downloaded_bytes: entry.file_size_bytes.unwrap_or(0),- total_bytes: entry.total_bytes,- file_path: entry.file_path.clone(),- file_size_bytes: entry.file_size_bytes,- file_count: None,- media_info: None,- downloader: placeholder.clone(),- ytdlp_path: None,- from_hotkey: false,- torrent_id: None,- kind: entry.kind,- external: false,- thumbnail_url_override: entry.thumbnail_url.clone(),- retry_count: 0,- max_retries: 0,- resume_state: None,- concurrent_segments: None,- segment_size_bytes: None,- eta_seconds: None,- cookie_slug: None,- custom_ytdlp_args: None,- torrent_files: None,- scheduled_at_ms: None,- stop_at_ms: None,- };- self.items.push(item);- }- }-- pub fn active_count(&self) -> u32 {- self.items- .iter()- .filter(|i| i.status == QueueStatus::Active)- .count() as u32- }-- pub fn next_queued_ids(&self) -> Vec<u64> {- let slots = self.max_concurrent.saturating_sub(self.active_count()) as usize;- let now = now_ms();- self.items- .iter()- .filter(|i| i.status == QueueStatus::Queued)- .filter(|i| i.scheduled_at_ms.map(|t| now >= t).unwrap_or(true))- .take(slots)- .map(|i| i.id)- .collect()- }-- pub fn next_available_id(&self, preferred: u64) -> u64 {- let mut id = preferred;- while self.items.iter().any(|i| i.id == id) {- id = id.saturating_add(1);- }- id- }-- pub fn mark_active(&mut self, id: u64) {- if let Some(item) = self- .items- .iter_mut()- .find(|i| i.id == id && i.status == QueueStatus::Queued)- {- item.status = QueueStatus::Active;- item.cancel_token = CancellationToken::new();- }- }-- pub fn mark_complete(- &mut self,- id: u64,- success: bool,- error: Option<String>,- file_path: Option<String>,- file_size_bytes: Option<u64>,- ) {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- let error_for_history = error.clone();- if success {- item.status = QueueStatus::Complete { success: true };- item.percent = 100.0;- } else {- let msg = error.unwrap_or_default();- let retryable = is_retryable_error_message(&msg);- item.status = QueueStatus::Error {- message: msg,- retryable,- };- }- item.file_path = file_path;- item.file_size_bytes = file_size_bytes;- item.speed_bytes_per_sec = 0.0;- item.eta_seconds = None;- crate::core::recovery::remove(id);-- if !item.external {- let entry = crate::core::queue_history::HistoryEntry {- id: item.id,- url: item.url.clone(),- platform: item.platform.clone(),- title: item.title.clone(),- file_path: item.file_path.clone(),- file_size_bytes: item.file_size_bytes,- total_bytes: item.total_bytes,- success,- error: if success { None } else { error_for_history },- completed_at: crate::core::queue_history::now_unix_seconds(),- thumbnail_url: item.thumbnail_url_override.clone().or_else(|| {- item.media_info- .as_ref()- .and_then(|m| m.thumbnail_url.clone())- }),- kind: item.kind,- };- crate::core::queue_history::record(entry);- }- }- }-- pub fn mark_seeding(- &mut self,- id: u64,- file_path: Option<String>,- file_size_bytes: Option<u64>,- torrent_id: Option<usize>,- ) {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- item.status = QueueStatus::Seeding;- item.percent = 100.0;- item.file_path = file_path;- item.file_size_bytes = file_size_bytes;- item.speed_bytes_per_sec = 0.0;- item.torrent_id = torrent_id;- crate::core::recovery::remove(id);- }- }-- pub fn update_progress(- &mut self,- id: u64,- percent: f64,- speed: f64,- downloaded: u64,- total: Option<u64>,- torrent_id: Option<usize>,- eta_seconds: Option<u64>,- ) {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- if item.status != QueueStatus::Active {- if torrent_id.is_some() && item.torrent_id.is_none() {- item.torrent_id = torrent_id;- }- return;- }- item.percent = percent;- item.speed_bytes_per_sec = speed;- item.downloaded_bytes = downloaded;- if let Some(t) = total {- item.total_bytes = Some(t);- }- if torrent_id.is_some() && item.torrent_id.is_none() {- item.torrent_id = torrent_id;- }- item.eta_seconds = eta_seconds;- }- }-- pub fn pause(&mut self, id: u64) -> bool {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- if item.status == QueueStatus::Active {- if item.platform != "magnet"- && !omniget_core::core::ytdlp::pause_download_process(id)- {- return false;- }- item.status = QueueStatus::Paused;- item.speed_bytes_per_sec = 0.0;- item.eta_seconds = None;- return true;- }- }- false- }-- pub fn resume(&mut self, id: u64) -> bool {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- if item.status == QueueStatus::Paused {- if item.platform != "magnet"- && !omniget_core::core::ytdlp::resume_download_process(id)- {- return false;- }- item.status = QueueStatus::Active;- return true;- }- }- false- }-- pub fn pause_all(&mut self) -> Vec<(u64, Option<usize>)> {- let mut paused = Vec::new();- for item in self.items.iter_mut() {- if item.status == QueueStatus::Active {- if item.platform != "magnet"- && !omniget_core::core::ytdlp::pause_download_process(item.id)- {- continue;- }- item.status = QueueStatus::Paused;- item.speed_bytes_per_sec = 0.0;- item.eta_seconds = None;- paused.push((item.id, item.torrent_id));- }- }- paused- }-- pub fn resume_all(&mut self) -> Vec<(u64, Option<usize>)> {- let mut resumed = Vec::new();- for item in self.items.iter_mut() {- if item.status == QueueStatus::Paused {- let tid = item.torrent_id;- if item.platform != "magnet"- && !omniget_core::core::ytdlp::resume_download_process(item.id)- {- continue;- }- item.status = QueueStatus::Active;- resumed.push((item.id, tid));- }- }- resumed- }-- pub fn reorder(&mut self, ids_in_order: Vec<u64>) -> bool {- let mut slots: Vec<Option<QueueItem>> = self.items.drain(..).map(Some).collect();-- let queued_slot_indices: Vec<usize> = slots- .iter()- .enumerate()- .filter_map(|(idx, slot)| {- slot.as_ref()- .filter(|i| i.status == QueueStatus::Queued)- .map(|_| idx)- })- .collect();-- if queued_slot_indices.is_empty() {- self.items = slots.into_iter().flatten().collect();- return false;- }-- let queued_id_to_slot: std::collections::HashMap<u64, usize> = queued_slot_indices- .iter()- .map(|idx| (slots[*idx].as_ref().unwrap().id, *idx))- .collect();-- let mut new_queued_order: Vec<QueueItem> = Vec::with_capacity(queued_slot_indices.len());- let mut seen: std::collections::HashSet<u64> = std::collections::HashSet::new();-- for id in &ids_in_order {- if seen.contains(id) {- continue;- }- if let Some(slot_idx) = queued_id_to_slot.get(id) {- if let Some(item) = slots[*slot_idx].take() {- new_queued_order.push(item);- seen.insert(*id);- }- }- }- for idx in &queued_slot_indices {- if let Some(item) = slots[*idx].take() {- new_queued_order.push(item);- }- }-- let mut iter = new_queued_order.into_iter();- let mut rebuilt: Vec<QueueItem> = Vec::with_capacity(slots.len());- for (idx, slot) in slots.into_iter().enumerate() {- if queued_slot_indices.contains(&idx) {- if let Some(item) = iter.next() {- rebuilt.push(item);- }- } else if let Some(item) = slot {- rebuilt.push(item);- }- }- rebuilt.extend(iter);- self.items = rebuilt;- true- }-- /// Cancel an item. Returns the torrent_id if the item needs torrent cleanup (caller should delete from session).- pub fn cancel(&mut self, id: u64) -> (bool, Option<usize>) {- let result = self.cancel_inner(id);- if result.0 {- crate::core::recovery::remove(id);- }- result- }-- fn cancel_inner(&mut self, id: u64) -> (bool, Option<usize>) {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- match &item.status {- QueueStatus::Active => {- item.cancel_token.cancel();- item.status = QueueStatus::Error {- message: "Cancelled".to_string(),- retryable: false,- };- item.speed_bytes_per_sec = 0.0;- return (true, None);- }- QueueStatus::Seeding => {- let tid = item.torrent_id;- item.status = QueueStatus::Error {- message: "Cancelled".to_string(),- retryable: false,- };- item.speed_bytes_per_sec = 0.0;- return (true, tid);- }- QueueStatus::Paused => {- // For magnet downloads, the cancel_token was not cancelled during pause,- // so we must cancel it now to stop the background download loop.- // Also return the torrent_id for session cleanup.- item.cancel_token.cancel();- let tid = if item.platform == "magnet" {- item.torrent_id- } else {- None- };- item.status = QueueStatus::Error {- message: "Cancelled".to_string(),- retryable: false,- };- item.speed_bytes_per_sec = 0.0;- return (true, tid);- }- QueueStatus::Queued => {- item.status = QueueStatus::Error {- message: "Cancelled".to_string(),- retryable: false,- };- return (true, None);- }- _ => {}- }- }- (false, None)- }-- pub fn retry(&mut self, id: u64) -> bool {- if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {- if matches!(item.status, QueueStatus::Error { .. }) {- item.status = QueueStatus::Queued;- item.cancel_token = CancellationToken::new();- item.percent = 0.0;- item.speed_bytes_per_sec = 0.0;- item.downloaded_bytes = 0;- item.file_path = None;- item.file_size_bytes = None;- item.retry_count = 0;- return true;- }- }- false- }-- /// Remove an item. Returns the torrent_id if the item needs torrent cleanup (caller should delete from session).- pub fn remove(&mut self, id: u64) -> Option<Option<usize>> {- let result = self.remove_inner(id);- if result.is_some() {- crate::core::recovery::remove(id);- crate::core::queue_history::remove(id);- }- result- }-- fn remove_inner(&mut self, id: u64) -> Option<Option<usize>> {- if let Some(pos) = self.items.iter().position(|i| i.id == id) {- let item = &self.items[pos];- if item.status == QueueStatus::Active {- item.cancel_token.cancel();- }- // For paused magnet items, the cancel_token was not cancelled during pause- if item.status == QueueStatus::Paused && item.platform == "magnet" {- item.cancel_token.cancel();- }- let torrent_id = if item.status == QueueStatus::Seeding- || (item.status == QueueStatus::Paused && item.platform == "magnet")- {- item.torrent_id- } else {- None- };- self.items.remove(pos);- return Some(torrent_id);- }- None- }-- pub fn clear_finished(&mut self) {- let to_remove: Vec<u64> = self- .items- .iter()- .filter(|i| {- matches!(- i.status,- QueueStatus::Complete { .. } | QueueStatus::Error { .. }- )- })- .map(|i| i.id)- .collect();- for id in &to_remove {- crate::core::recovery::remove(*id);- crate::core::queue_history::remove(*id);- }- self.items.retain(|i| {- !matches!(- i.status,- QueueStatus::Complete { .. } | QueueStatus::Error { .. }- )- });- }-- pub fn get_state(&self) -> Vec<QueueItemInfo> {- self.items.iter().map(|i| i.to_info()).collect()- }-- pub fn has_url(&self, url: &str) -> bool {- self.items.iter().any(|i| {- i.url == url- && matches!(- i.status,- QueueStatus::Queued- | QueueStatus::Active- | QueueStatus::Paused- | QueueStatus::Seeding- )- })- }-}--pub struct ProgressThrottle {- last_emit: std::time::Instant,- min_interval: std::time::Duration,-}--impl ProgressThrottle {- pub fn new(min_interval_ms: u64) -> Self {- Self {- last_emit: std::time::Instant::now() - std::time::Duration::from_secs(10),- min_interval: std::time::Duration::from_millis(min_interval_ms),- }- }-- pub fn should_emit(&mut self) -> bool {- let now = std::time::Instant::now();- if now.duration_since(self.last_emit) >= self.min_interval {- self.last_emit = now;- true- } else {- false- }- }-}--#[derive(Clone, Serialize)]-pub struct QueueItemProgress {- pub id: u64,- pub title: String,- pub platform: String,- pub percent: f64,- pub speed_bytes_per_sec: f64,- pub downloaded_bytes: u64,- pub total_bytes: Option<u64>,- pub phase: String,- #[serde(skip_serializing_if = "Option::is_none")]- pub eta_seconds: Option<u64>,-}--pub fn emit_queue_state_from_state(app: &tauri::AppHandle, state: Vec<QueueItemInfo>) {- let n = EMIT_COUNT.fetch_add(1, Ordering::Relaxed);- if n.is_multiple_of(10) {- tracing::debug!("[perf] emit_queue_state called {} times", n);- }- let _ = app.emit("queue-state-update", &state);- let total = crate::tray::compute_total_active(app);- crate::tray::update_active_count(app, total);- crate::core::awake::sync(total > 0);-- let active_items: Vec<_> = state- .iter()- .filter(|i| i.status == QueueStatus::Active)- .collect();- let avg_percent = if !active_items.is_empty() {- let sum: f64 = active_items.iter().map(|i| i.percent).sum();- sum / active_items.len() as f64 / 100.0- } else {- 0.0- };- let total_speed: f64 = active_items.iter().map(|i| i.speed_bytes_per_sec).sum();- crate::tray::update_speed_tooltip(app, total, total_speed);- crate::tray::update_taskbar_badge(app, total, avg_percent);-- if let Some(window) = app.get_webview_window("main") {- let title = if total > 0 {- format!("({}) omniget", total)- } else {- "omniget".into()- };- let _ = window.set_title(&title);- }-}--pub fn emit_queue_state(app: &tauri::AppHandle, queue: &DownloadQueue) {- let state = queue.get_state();- emit_queue_state_from_state(app, state);-}--/// RAII guard that ensures an Active queue item never leaks a slot.-///-/// If the download future panics or is dropped before reaching `mark_complete`-/// / `mark_seeding`, the Drop impl spawns a task that transitions the item to-/// Error("Download interrupted") and calls `try_start_next`, unblocking the-/// queue.-///-/// When the download reaches a terminal state through the normal paths, the-/// guard sees the item is no longer Active and does nothing (idempotent).-struct ActiveJobSlot {- app: tauri::AppHandle,- queue: Arc<tokio::sync::Mutex<DownloadQueue>>,- item_id: u64,- armed: bool,-}--impl ActiveJobSlot {- fn new(- app: tauri::AppHandle,- queue: Arc<tokio::sync::Mutex<DownloadQueue>>,- item_id: u64,- ) -> Self {- Self {- app,- queue,- item_id,- armed: true,- }- }-- fn disarm(mut self) {- self.armed = false;- }-}--impl Drop for ActiveJobSlot {- fn drop(&mut self) {- if !self.armed {- return;- }- let app = self.app.clone();- let queue = self.queue.clone();- let item_id = self.item_id;- tokio::spawn(async move {- let state = {- let mut q = queue.lock().await;- let still_active = q- .items- .iter()- .find(|i| i.id == item_id)- .map(|i| i.status == QueueStatus::Active)- .unwrap_or(false);- if !still_active {- return;- }- tracing::warn!(- "[queue] ActiveJobSlot guard firing for {} — download ended without clean release",- item_id- );- q.mark_complete(- item_id,- false,- Some("Download interrupted".to_string()),- None,- None,- );- q.get_state()- };- emit_queue_state_from_state(&app, state);- try_start_next(app, queue).await;- });- }-}--pub fn spawn_download(- app: tauri::AppHandle,- queue: Arc<tokio::sync::Mutex<DownloadQueue>>,- item_id: u64,-) -> std::pin::Pin<Box<dyn std::future::Future<Output = ()> + Send>> {- Box::pin(async move {- let _timer_start = std::time::Instant::now();- let slot = ActiveJobSlot::new(app.clone(), queue.clone(), item_id);- spawn_download_inner(app, queue, item_id).await;- slot.disarm();- tracing::debug!(- "[perf] spawn_download {} took {:?}",- item_id,- _timer_start.elapsed()- );- })-}--async fn spawn_download_inner(- app: tauri::AppHandle,- queue: Arc<tokio::sync::Mutex<DownloadQueue>>,- item_id: u64,-) {- tracing::info!("[queue] download {} started", item_id);-- let _ = app.emit(- "queue-item-progress",- &QueueItemProgress {- id: item_id,- title: "".to_string(),- platform: "".to_string(),- percent: 0.0,- speed_bytes_per_sec: 0.0,- downloaded_bytes: 0,- total_bytes: None,- phase: "preparing".to_string(),- eta_seconds: None,- },- );-- let host_key = {- let q = queue.lock().await;- q.items- .iter()- .find(|i| i.id == item_id)- .map(|i| crate::core::host_limiter::host_key_for_url(&i.url))- };- let _host_lease = match host_key {- Some(key) => Some(crate::core::host_limiter::acquire(&key).await),- None => None,- };-- let (- url,- output_dir,- download_mode,- quality,- format_id,- referer,- extra_headers,- page_url,- user_agent,- cancel_token,- media_info,- platform_name,- downloader,- ytdlp_path,- from_hotkey,- cookie_slug,- custom_ytdlp_args,- torrent_files,- ) = {- let q = queue.lock().await;- let item = match q.items.iter().find(|i| i.id == item_id) {- Some(i) => i,- None => return,- };- (- item.url.clone(),- item.output_dir.clone(),- item.download_mode.clone(),- item.quality.clone(),- item.format_id.clone(),- item.referer.clone(),- item.extra_headers.clone(),- item.page_url.clone(),- item.user_agent.clone(),- item.cancel_token.clone(),- item.media_info.clone(),- item.platform.clone(),- item.downloader.clone(),- item.ytdlp_path.clone(),- item.from_hotkey,- item.cookie_slug.clone(),- item.custom_ytdlp_args.clone(),- item.torrent_files.clone(),- )- };-- {- let settings = crate::storage::config::load_settings(&app);- let proxy = settings.proxy.clone();- crate::core::http_client::init_proxy(proxy.clone());- let proxy_status = if !proxy.enabled {- "disabled; direct connection enforced".to_string()- } else if proxy.host.trim().is_empty() {- "enabled but host is empty; direct connection enforced".to_string()- } else {- format!("enabled; {}://{}:{}", proxy.proxy_type, proxy.host, proxy.port)- };- append_download_log(- &app,- item_id,- format!("[network] proxy setting: {}", proxy_status),- );- }-- let info_start = std::time::Instant::now();- let info = match media_info {- Some(i) if !i.available_qualities.is_empty() => {- tracing::info!(- "[queue] info for {} from cache/pre-fetched in {:?}",- item_id,- info_start.elapsed()- );- append_download_log(- &app,- item_id,- format!(- "[omniget] using cached video info: platform={} title=\"{}\"",- platform_name, i.title- ),- );- i- }- _ => {- tracing::debug!(- "[perf] spawn_download_inner {}: media_info is None, fetching info",- item_id- );- append_download_log(- &app,- item_id,- format!(- "[omniget] fetching video info: platform={} url={}",- platform_name, url- ),- );- if let Some(slug) = cookie_slug.as_deref() {- append_download_log(- &app,- item_id,- format!("[cookies] selected managed cookie account: {}", slug),- );- }- let _ = app.emit(- "queue-item-progress",- &QueueItemProgress {- id: item_id,- title: url.clone(),- platform: platform_name.clone(),- percent: 0.0,- speed_bytes_per_sec: 0.0,- downloaded_bytes: 0,- total_bytes: None,- phase: "fetching_info".to_string(),- eta_seconds: None,- },- );-- let info_future = fetch_and_cache_info(- &url,- &*downloader,- &platform_name,- ytdlp_path.as_deref(),- );- let scoped_info_future = omniget_core::core::log_hook::CURRENT_COOKIE_SLUG.scope(- cookie_slug.clone(),- omniget_core::core::log_hook::CURRENT_DOWNLOAD_ID.scope(item_id, info_future),- );- let info_timeout_secs = if platform_name == "youtube"- || url.to_ascii_lowercase().contains("youtube.com")- || url.to_ascii_lowercase().contains("youtu.be")- {- omniget_core::core::ytdlp::YOUTUBE_VIDEO_INFO_TOTAL_TIMEOUT_SECS- } else if platform_name == "douyin" {- 30- } else {- omniget_core::core::ytdlp::DEFAULT_VIDEO_INFO_TOTAL_TIMEOUT_SECS- };- let info_result = tokio::time::timeout(- std::time::Duration::from_secs(info_timeout_secs),- scoped_info_future,- )- .await;-- match info_result {- Ok(Ok(i)) => {- append_download_log(- &app,- item_id,- format!(- "[omniget] video info fetched in {:.1}s: title=\"{}\"",- info_start.elapsed().as_secs_f64(),- i.title- ),- );- i- }- Ok(Err(e)) => {- append_download_log(- &app,- item_id,- format!(- "[omniget] failed fetching video info after {:.1}s: {}",- info_start.elapsed().as_secs_f64(),- e- ),- );- let state = {- let mut q = queue.lock().await;- q.mark_complete(item_id, false, Some(e.to_string()), None, None);- q.get_state()- };- emit_queue_state_from_state(&app, state);- try_start_next(app, queue).await;- return;- }- Err(_) => {- tracing::warn!(- "[queue] info fetch timed out for {} after {}s",- item_id,- info_timeout_secs- );- append_download_log(- &app,- item_id,- format!(- "[omniget] video info timed out after {}s",- info_timeout_secs- ),- );- let state = {- let mut q = queue.lock().await;- q.mark_complete(- item_id,- false,- Some("Timed out fetching video info".to_string()),- None,- None,- );- q.get_state()- };- emit_queue_state_from_state(&app, state);- try_start_next(app, queue).await;- return;- }- }- }- };- tracing::info!(- "[queue] info fetch for {} took {:?}",- item_id,- info_start.elapsed()- );-- let mut info = info;- if is_generic_title(&info.title) {- let pokemon = omniget_core::core::pokemon_names::random_pokemon_name();- info.title = format!("video_{}", pokemon);- }-- let state = {- let mut q = queue.lock().await;- if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {- item.title = info.title.clone();- item.total_bytes = info.file_size_bytes;- let fc = if info.media_type == crate::models::media::MediaType::Carousel- || info.media_type == crate::models::media::MediaType::Playlist- {- info.available_qualities.len() as u32- } else {- 1- };- item.file_count = Some(fc);- item.media_info = Some(info.clone());- }- q.get_state()- };- emit_queue_state_from_state(&app, state);-- let _ = app.emit(- "queue-item-progress",- &QueueItemProgress {- id: item_id,- title: info.title.clone(),- platform: platform_name.clone(),- percent: 0.5,- speed_bytes_per_sec: 0.0,- downloaded_bytes: 0,- total_bytes: info.file_size_bytes,- phase: "starting".to_string(),- eta_seconds: None,- },- );-- let settings = config::load_settings(&app);- let tmpl = settings.download.filename_template.clone();- let mut final_output_dir = std::path::PathBuf::from(&output_dir);- if settings.download.organize_by_platform {- final_output_dir = final_output_dir.join(&platform_name);- }- let torrent_id_slot = Arc::new(tokio::sync::Mutex::new(None));- let audio_format = if download_mode.as_deref() == Some("audio") {- Some(settings.download.music_audio_format.clone())- } else {- None- };- let opts = crate::models::media::DownloadOptions {- quality: quality.or_else(|| Some(settings.download.video_quality.clone())),- output_dir: final_output_dir,- filename_template: Some(tmpl),- download_subtitles: settings.download.download_subtitles,- include_auto_subtitles: settings.download.include_auto_subtitles,- download_mode,- audio_format,- format_id,- referer,- extra_headers,- page_url,- user_agent,- cancel_token: cancel_token.clone(),- concurrent_fragments: settings.advanced.concurrent_fragments,- ytdlp_path,- torrent_listen_port: Some(settings.advanced.torrent_listen_port),- torrent_id_slot: Some(torrent_id_slot.clone()),- custom_ytdlp_args: custom_ytdlp_args.clone(),- torrent_files: torrent_files.clone(),- torrent_auto_trackers: settings.advanced.torrent_auto_trackers,- torrent_upnp: settings.advanced.torrent_upnp,- };-- let total_bytes = info.file_size_bytes;- let item_title = info.title.clone();- let log_title = item_title.clone();- let item_platform = platform_name.clone();- let (tx, mut rx) = mpsc::channel::<omniget_core::models::progress::ProgressUpdate>(32);-- let app_progress = app.clone();- let queue_progress = queue.clone();- let torrent_id_slot_progress = torrent_id_slot.clone();- let progress_forwarder = tokio::spawn(async move {- const STALL_AFTER: std::time::Duration = std::time::Duration::from_secs(6);-- let mut last_bytes: u64 = 0;- let mut last_time = std::time::Instant::now();- let mut throttle = ProgressThrottle::new(250);- let mut current_speed: f64 = 0.0;- let mut last_percent: f64 = 0.0;- let mut last_advance = std::time::Instant::now();- let mut stalled = false;-- loop {- let update = tokio::select! {- msg = rx.recv() => match msg {- Some(u) => u,- None => break,- },- _ = tokio::time::sleep(std::time::Duration::from_secs(2)) => {- if !stalled && last_advance.elapsed() >= STALL_AFTER {- stalled = true;- current_speed = 0.0;- {- let mut q = queue_progress.lock().await;- let tid = { *torrent_id_slot_progress.lock().await };- q.update_progress(- item_id, last_percent, 0.0, last_bytes, total_bytes, tid, None,- );- }- let _ = app_progress.emit(- "queue-item-progress",- &QueueItemProgress {- id: item_id,- title: item_title.clone(),- platform: item_platform.clone(),- percent: last_percent,- speed_bytes_per_sec: 0.0,- downloaded_bytes: last_bytes,- total_bytes,- phase: "stalled".to_string(),- eta_seconds: None,- },- );- }- continue;- }- };-- let percent = update.percent;- if !throttle.should_emit() && percent < 100.0 && !update.has_real_metrics() {- continue;- }-- let now = std::time::Instant::now();- let resolved_total = update.total_bytes.or(total_bytes);- let mut clamped = percent.clamp(0.0, 100.0);- if percent >= 0.0 && percent < 100.0 {- if clamped < last_percent {- clamped = last_percent;- }-- let metric_percent = update.downloaded_bytes.and_then(|downloaded| {- resolved_total- .filter(|total| *total > 0)- .map(|total| (downloaded as f64 / total as f64 * 100.0).clamp(0.0, 100.0))- });-- if let Some(metric) = metric_percent {- let metric_ceiling = (metric + 15.0).max(last_percent);- if clamped > metric_ceiling {- clamped = metric_ceiling;- }- } else {- let max_step = if update.has_real_metrics() { 12.0 } else { 6.0 };- let ceiling = (last_percent + max_step).min(99.0);- if clamped > ceiling {- clamped = ceiling;- }- }- }-- let mut downloaded_bytes = update.downloaded_bytes.unwrap_or_else(|| {- resolved_total- .map(|total| (clamped / 100.0 * total as f64) as u64)- .unwrap_or(last_bytes)- });- if downloaded_bytes < last_bytes && percent < 100.0 {- downloaded_bytes = last_bytes;- }-- if let Some(real) = update.speed_bps {- current_speed = real;- } else if downloaded_bytes > last_bytes {- let dt = now.duration_since(last_time).as_secs_f64();- if dt > 0.1 {- let instant_speed = (downloaded_bytes - last_bytes) as f64 / dt;- current_speed = if current_speed > 0.0 {- current_speed * 0.7 + instant_speed * 0.3- } else {- instant_speed- };- }- }-- if downloaded_bytes > last_bytes || clamped > last_percent || update.speed_bps.is_some()- {- last_advance = now;- stalled = false;- }- last_bytes = downloaded_bytes;- last_time = now;- last_percent = clamped;-- let phase_value = if percent < 0.0 { percent } else { clamped };- let phase = match phase_value {- p if p < -1.5 => "connecting",- p if p < -0.5 => "starting",- p if p > 99.5 => "finalizing",- p if p > 0.0 => "downloading",- _ => "starting",- };-- let eta_seconds = update- .eta_seconds- .or_else(|| omniget_core::core::ytdlp::get_eta(item_id))- .or_else(|| {- if current_speed > 0.0 {- resolved_total.and_then(|total| {- (total > downloaded_bytes)- .then(|| ((total - downloaded_bytes) as f64 / current_speed) as u64)- })- } else {- None- }- });-- {- let mut q = queue_progress.lock().await;- let tid = { *torrent_id_slot_progress.lock().await };- q.update_progress(- item_id,- clamped,- current_speed,- downloaded_bytes,- resolved_total,- tid,- eta_seconds,- );- }-- let _ = app_progress.emit(- "queue-item-progress",- &QueueItemProgress {- id: item_id,- title: item_title.clone(),- platform: item_platform.clone(),- percent: clamped,- speed_bytes_per_sec: current_speed,- downloaded_bytes,- total_bytes: resolved_total,- phase: phase.to_string(),- eta_seconds,- },- );- }- omniget_core::core::ytdlp::clear_eta(item_id);- });-- if let Some(ua) = opts.user_agent.clone() {- omniget_core::core::ytdlp::register_ext_user_agent(url.clone(), ua);- }- if let Some(hdrs) = opts.extra_headers.clone() {- omniget_core::core::ytdlp::register_ext_headers(url.clone(), hdrs);- }-- let dl_start = std::time::Instant::now();- append_download_log(- &app,- item_id,- format!(- "[omniget] starting download: platform={} title=\"{}\" url={}",- platform_name, log_title, url- ),- );- let dl_future = async {- tokio::select! {- r = downloader.download(&info, &opts, tx) => r,- _ = cancel_token.cancelled() => {- Err(anyhow::anyhow!("Download cancelado"))- }- }- };- let result = omniget_core::core::log_hook::CURRENT_COOKIE_SLUG- .scope(- cookie_slug.clone(),- omniget_core::core::log_hook::CURRENT_DOWNLOAD_ID.scope(item_id, dl_future),- )- .await;- omniget_core::core::ytdlp::clear_ext_user_agent(&url);- omniget_core::core::ytdlp::clear_ext_headers(&url);- tracing::info!(- "[queue] download {} completed in {:?}",- item_id,- dl_start.elapsed()- );-- let _ = progress_forwarder.await;-- let was_paused = {- let q = queue.lock().await;- q.items- .iter()- .find(|i| i.id == item_id)- .map(|i| i.status == QueueStatus::Paused)- .unwrap_or(false)- };-- if was_paused {- let state = {- let q = queue.lock().await;- q.get_state()- };- emit_queue_state_from_state(&app, state);- try_start_next(app, queue).await;- return;- }-- match result {- Ok(dl) => {- append_download_log(- &app,- item_id,- format!(- "[omniget] download finished: path={} size={} bytes",- dl.file_path.to_string_lossy(),- dl.file_size_bytes- ),- );- let is_seeding = platform_name == "magnet" && dl.torrent_id.is_some();- if !is_seeding {- if let Err(msg) = validate_download_output(&dl.file_path).await {- tracing::error!(- "[queue] download {} reported success but output is missing or empty: {:?}",- item_id,- dl.file_path- );- append_download_log(- &app,- item_id,- format!(- "[omniget] download reported success but output missing or empty: {}",- dl.file_path.to_string_lossy()- ),- );- let state = {- let mut q = queue.lock().await;- q.mark_complete(item_id, false, Some(msg), None, None);- q.get_state()- };- emit_queue_state_from_state(&app, state);- try_start_next(app, queue).await;- return;- }- }-- if settings.download.embed_metadata- && platform_name != "magnet"- && ffmpeg::is_ffmpeg_available().await- {- let metadata = MetadataEmbed {- title: Some(info.title.clone()),- artist: Some(info.author.clone()),- thumbnail_url: info.thumbnail_url.clone(),- ..Default::default()- };- if let Err(e) = ffmpeg::embed_metadata(- &dl.file_path,- &metadata,- settings.download.embed_thumbnail,- shared_http_client(),- )- .await- {- tracing::warn!("Metadata embed failed for '{}': {}", info.title, e);- }- }-- if from_hotkey && settings.download.copy_to_clipboard_on_hotkey {- #[cfg(not(target_os = "android"))]- {- match crate::core::clipboard::copy_file_to_clipboard(&dl.file_path).await {- Ok(()) => {- let _ = app.emit(- "file-copied-to-clipboard",- serde_json::json!({- "path": dl.file_path.to_string_lossy(),- }),- );- }- Err(e) => {- tracing::warn!("[clipboard] failed to copy file: {}", e);- }- }- }- }-- let state = {- let mut q = queue.lock().await;- if platform_name == "magnet" && dl.torrent_id.is_some() {- q.mark_seeding(- item_id,- Some(dl.file_path.to_string_lossy().to_string()),- Some(dl.file_size_bytes),- dl.torrent_id,- );- } else {- q.mark_complete(- item_id,- true,- None,- Some(dl.file_path.to_string_lossy().to_string()),- Some(dl.file_size_bytes),- );- }- q.get_state()- };- emit_queue_state_from_state(&app, state);- }- Err(e) => {- let raw_err = e.to_string();- append_download_log(- &app,- item_id,- format!("[omniget] download failed: {}", raw_err),- );- let (category, hint) = omniget_core::core::errors::classify_download_error(&raw_err);- let user_msg = if category != "unknown" {- format!("{} ({})", hint, raw_err)- } else {- raw_err.clone()- };- tracing::error!(- "Download error '{}' [{}]: {}",- platform_name,- category,- raw_err- );-- let retry_decision = {- let mut q = queue.lock().await;- if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {- if item.downloaded_bytes > 5 * 1024 * 1024 {- item.retry_count = 0;- }- let retryable = is_retryable_category(category);- let attempt = item.retry_count;- let max = item.max_retries;- if retryable && attempt < max {- item.retry_count = attempt + 1;- Some((attempt + 1, max))- } else {- None- }- } else {- None- }- };-- if let Some((next_attempt, max)) = retry_decision {- let delay_secs = (1u64 << (next_attempt - 1).min(5)).min(30);- tracing::warn!(- "[queue] retry {}/{} for {} in {}s (category={})",- next_attempt,- max,- item_id,- delay_secs,- category- );- let state = {- let mut q = queue.lock().await;- if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {- item.status = QueueStatus::Queued;- item.cancel_token = CancellationToken::new();- item.percent = 0.0;- item.speed_bytes_per_sec = 0.0;- item.downloaded_bytes = 0;- }- q.get_state()- };- emit_queue_state_from_state(&app, state);- let app_for_retry = app.clone();- let queue_for_retry = queue.clone();- tokio::spawn(async move {- tokio::time::sleep(std::time::Duration::from_secs(delay_secs)).await;- try_start_next(app_for_retry, queue_for_retry).await;- });- return;- }-- let state = {- let mut q = queue.lock().await;- q.mark_complete(item_id, false, Some(user_msg), None, None);- q.get_state()- };- emit_queue_state_from_state(&app, state);- }- }-- try_start_next(app, queue).await;-}--fn is_retryable_category(category: &str) -> bool {- matches!(category, "unknown" | "rate_limited")-}--const OUTPUT_MISSING_ERROR: &str =- "Download reported success but the file is missing or empty. Check disk space and antivirus exclusions, then retry.";--async fn validate_download_output(path: &std::path::Path) -> Result<(), String> {- if path.as_os_str().is_empty() {- return Err(OUTPUT_MISSING_ERROR.to_string());- }- let meta = match tokio::fs::metadata(path).await {- Ok(m) => m,- Err(_) => return Err(OUTPUT_MISSING_ERROR.to_string()),- };- if meta.is_dir() {- let mut entries = match tokio::fs::read_dir(path).await {- Ok(e) => e,- Err(_) => return Err(OUTPUT_MISSING_ERROR.to_string()),- };- match entries.next_entry().await {- Ok(Some(_)) => Ok(()),- _ => Err(OUTPUT_MISSING_ERROR.to_string()),- }- } else if meta.len() > 0 {- Ok(())- } else {- Err(OUTPUT_MISSING_ERROR.to_string())- }-}--async fn fetch_and_cache_info(- url: &str,- downloader: &dyn PlatformDownloader,- platform: &str,- ytdlp_path: Option<&std::path::Path>,-) -> anyhow::Result<MediaInfo> {- {- let cache = info_cache().lock().await;- if let Some(entry) = cache.get(url) {- if entry.cached_at.elapsed() < INFO_CACHE_TTL {- tracing::debug!("[perf] fetch_and_cache_info: cache hit for {}", platform);- return Ok(entry.info.clone());- }- }- }-- let url_lock = {- let mut map = in_flight_map().lock().await;- map.entry(url.to_string())- .or_insert_with(|| Arc::new(tokio::sync::Mutex::new(())))- .clone()- };- let _guard = url_lock.lock().await;-- {- let cache = info_cache().lock().await;- if let Some(entry) = cache.get(url) {- if entry.cached_at.elapsed() < INFO_CACHE_TTL {- tracing::debug!(- "[perf] fetch_and_cache_info: dedup cache hit for {}",- platform- );- return Ok(entry.info.clone());- }- }- }-- tracing::debug!("[perf] fetch_and_cache_info: fetching for {}", platform);- let info = if let Some(ytdlp) = ytdlp_path {- match platform {- "youtube" => {- crate::platforms::youtube::YouTubeDownloader::fetch_with_ytdlp(url, ytdlp).await?- }- "generic" => {- let json = crate::core::ytdlp::get_video_info(ytdlp, url, &[]).await?;- crate::platforms::generic_ytdlp::GenericYtdlpDownloader::parse_video_info(&json)?- }- _ => downloader.get_media_info(url).await?,- }- } else {- downloader.get_media_info(url).await?- };-- let mut cache = info_cache().lock().await;- cache.insert(- url.to_string(),- CachedInfo {- info: info.clone(),- cached_at: std::time::Instant::now(),- },- );- if cache.len() > 50 {- cache.retain(|_, v| v.cached_at.elapsed() < INFO_CACHE_TTL);- }- Ok(info)-}--pub async fn try_get_cached_info(url: &str) -> Option<MediaInfo> {- let cache = info_cache().lock().await;- cache- .get(url)- .filter(|entry| entry.cached_at.elapsed() < INFO_CACHE_TTL)- .map(|entry| entry.info.clone())-}--pub async fn prefetch_info(- url: &str,- downloader: &dyn PlatformDownloader,- platform: &str,- ytdlp_path: Option<&std::path::Path>,-) {- prefetch_info_with_emit(url, downloader, platform, ytdlp_path, None).await;-}--pub async fn prefetch_info_with_emit(- url: &str,- downloader: &dyn PlatformDownloader,- platform: &str,- ytdlp_path: Option<&std::path::Path>,- app: Option<tauri::AppHandle>,-) {- let _timer_start = std::time::Instant::now();- tracing::debug!("[perf] prefetch_info: started");- let result = tokio::time::timeout(- std::time::Duration::from_secs(15),- fetch_and_cache_info(url, downloader, platform, ytdlp_path),- )- .await;- match result {- Ok(Ok(info)) => {- tracing::debug!(- "[perf] prefetch_info: completed in {:?} — {}",- _timer_start.elapsed(),- info.title- );- if let Some(app) = app {- let preview = MediaPreviewEvent {- url: url.to_string(),- title: info.title.clone(),- author: info.author.clone(),- thumbnail_url: info.thumbnail_url.clone(),- duration_seconds: info.duration_seconds,- };- let _ = app.emit("media-info-preview", preview);- }- }- Ok(Err(e)) => tracing::warn!(- "[perf] prefetch_info: failed in {:?} — {}",- _timer_start.elapsed(),- e- ),- Err(_) => tracing::warn!(- "[perf] prefetch_info: timed out after {:?}",- _timer_start.elapsed()- ),- }-}--pub async fn try_start_next(app: tauri::AppHandle, queue: Arc<tokio::sync::Mutex<DownloadQueue>>) {- let _timer_start = std::time::Instant::now();- let (next_ids, stagger, state_to_emit) = {- let mut q = queue.lock().await;- let ids = q.next_queued_ids();- for nid in &ids {- q.mark_active(*nid);- }- let state = if !ids.is_empty() {- Some(q.get_state())- } else {- None- };- (ids, q.stagger_delay_ms, state)- };-- if let Some(state) = state_to_emit {- emit_queue_state_from_state(&app, state);- }-- let batch_size = next_ids.len();- for (i, nid) in next_ids.into_iter().enumerate() {- let _ = app.emit(- "queue-item-progress",- &QueueItemProgress {- id: nid,- title: String::new(),- platform: String::new(),- percent: 0.0,- speed_bytes_per_sec: 0.0,- downloaded_bytes: 0,- total_bytes: None,- phase: "queued_starting".to_string(),- eta_seconds: None,- },- );-- if i > 0 {- let item_platform = {- let q = queue.lock().await;- q.items- .iter()- .find(|item| item.id == nid)- .map(|item| item.platform.clone())- };- let delay_ms = if item_platform.as_deref() == Some("youtube") {- 2000- } else if batch_size > 3 {- stagger.max(1000)- } else {- stagger- };- if delay_ms > 0 {- tokio::time::sleep(std::time::Duration::from_millis(delay_ms)).await;- }- }- let app_c = app.clone();- let queue_c = queue.clone();- tokio::spawn(async move {- spawn_download(app_c, queue_c, nid).await;- });- }- tracing::debug!("[perf] try_start_next took {:?}", _timer_start.elapsed());-}--// Periodic tick so a future-scheduled download still starts when its time-// arrives even if the queue is otherwise idle, and so a download with a-// stop time is cancelled when that time passes.-pub fn start_scheduler(app: tauri::AppHandle) {- tauri::async_runtime::spawn(async move {- tokio::time::sleep(std::time::Duration::from_secs(15)).await;- loop {- let state = app.state::<crate::AppState>();- let queue = state.download_queue.clone();- let (has_due, stopped_any) = {- let q = queue.lock().await;- let now = now_ms();- let mut stopped = false;- for item in &q.items {- if item.status == QueueStatus::Active {- if let Some(stop) = item.stop_at_ms {- if now >= stop {- item.cancel_token.cancel();- stopped = true;- }- }- }- }- let due = q.items.iter().any(|i| {- i.status == QueueStatus::Queued- && i.scheduled_at_ms.map(|t| now >= t).unwrap_or(false)- });- (due, stopped)- };- if has_due || stopped_any {- try_start_next(app.clone(), queue.clone()).await;- }- tokio::time::sleep(std::time::Duration::from_secs(15)).await;- }- });-}--fn is_generic_title(title: &str) -> bool {- let t = title.to_lowercase();- let t = t.trim();- t.is_empty()- || t == "video"- || t == "media"- || t == "untitled"- || t == "unknown"- || t.starts_with("video [video]")- || t.starts_with("media [media]")-}--#[cfg(test)]-mod kind_tests {- use super::{kind_from_platform, QueueKind};-- #[test]- fn youtube_and_video_platforms_map_to_video() {- assert_eq!(kind_from_platform("youtube"), QueueKind::Video);- assert_eq!(kind_from_platform("vimeo"), QueueKind::Video);- assert_eq!(kind_from_platform("twitch"), QueueKind::Video);- assert_eq!(kind_from_platform("bilibili"), QueueKind::Video);- assert_eq!(kind_from_platform("tiktok"), QueueKind::Video);- assert_eq!(kind_from_platform("instagram"), QueueKind::Video);- assert_eq!(kind_from_platform("reddit"), QueueKind::Video);- assert_eq!(kind_from_platform("bluesky"), QueueKind::Video);- assert_eq!(kind_from_platform("generic_ytdlp"), QueueKind::Video);- }-- #[test]- fn audio_platforms() {- assert_eq!(kind_from_platform("soundcloud"), QueueKind::Audio);- assert_eq!(kind_from_platform("spotify"), QueueKind::Audio);- }-- #[test]- fn pinterest_is_image() {- assert_eq!(kind_from_platform("pinterest"), QueueKind::Image);- }-- #[test]- fn pdf_kind() {- assert_eq!(kind_from_platform("pdf"), QueueKind::Pdf);- }-- #[test]- fn book_platforms() {- assert_eq!(kind_from_platform("annas_archive"), QueueKind::Book);- assert_eq!(kind_from_platform("libgen"), QueueKind::Book);- assert_eq!(kind_from_platform("gutendex"), QueueKind::Book);- assert_eq!(kind_from_platform("book"), QueueKind::Book);- }-- #[test]- fn webpage_kind() {- assert_eq!(kind_from_platform("webpage"), QueueKind::Webpage);- assert_eq!(kind_from_platform("embed"), QueueKind::Webpage);- }-- #[test]- fn telegram_kind() {- assert_eq!(kind_from_platform("telegram"), QueueKind::TelegramMedia);- assert_eq!(- kind_from_platform("telegram_media"),- QueueKind::TelegramMedia- );- }-- #[test]- fn course_lesson_kind() {- assert_eq!(kind_from_platform("courses"), QueueKind::CourseLesson);- assert_eq!(kind_from_platform("course_lesson"), QueueKind::CourseLesson);- }-- #[test]- fn generic_for_torrents_and_p2p() {- assert_eq!(kind_from_platform("magnet"), QueueKind::Generic);- assert_eq!(kind_from_platform("p2p"), QueueKind::Generic);- assert_eq!(kind_from_platform("torrent"), QueueKind::Generic);- }-- #[test]- fn unknown_platform_falls_back_to_generic() {- assert_eq!(kind_from_platform(""), QueueKind::Generic);- assert_eq!(kind_from_platform("totally-unknown"), QueueKind::Generic);- assert_eq!(kind_from_platform("xyz123"), QueueKind::Generic);- }-- #[test]- fn case_insensitive() {- assert_eq!(kind_from_platform("YouTube"), QueueKind::Video);- assert_eq!(kind_from_platform("TELEGRAM"), QueueKind::TelegramMedia);- }-}+use std::collections::HashMap;+use std::path::PathBuf;+use std::sync::atomic::{AtomicU64, Ordering};+use std::sync::{Arc, OnceLock};++static EMIT_COUNT: AtomicU64 = AtomicU64::new(0);++pub fn now_ms() -> u64 {+ std::time::SystemTime::now()+ .duration_since(std::time::UNIX_EPOCH)+ .map(|d| d.as_millis() as u64)+ .unwrap_or(0)+}++fn append_download_log(app: &tauri::AppHandle, id: u64, line: impl AsRef<str>) {+ crate::core::download_log::push_line(id, line.as_ref());+ let _ = app.emit(+ "download-log-update",+ serde_json::json!({+ "id": id,+ }),+ );+}++use serde::Serialize;+use tauri::{Emitter, Manager};+use tokio::sync::mpsc;+use tokio_util::sync::CancellationToken;++fn shared_http_client() -> &'static reqwest::Client {+ static CLIENT: OnceLock<reqwest::Client> = OnceLock::new();+ CLIENT.get_or_init(|| {+ crate::core::http_client::apply_global_proxy(reqwest::Client::builder())+ .build()+ .unwrap_or_default()+ })+}++use crate::core::ffmpeg::{self, MetadataEmbed};+use crate::models::media::MediaInfo;+use crate::platforms::traits::PlatformDownloader;+use crate::storage::config;++struct CachedInfo {+ info: MediaInfo,+ cached_at: std::time::Instant,+}++static INFO_CACHE: OnceLock<tokio::sync::Mutex<HashMap<String, CachedInfo>>> = OnceLock::new();++fn info_cache() -> &'static tokio::sync::Mutex<HashMap<String, CachedInfo>> {+ INFO_CACHE.get_or_init(|| tokio::sync::Mutex::new(HashMap::new()))+}++const INFO_CACHE_TTL: std::time::Duration = std::time::Duration::from_secs(600);++static IN_FLIGHT_FETCHES: OnceLock<+ tokio::sync::Mutex<HashMap<String, Arc<tokio::sync::Mutex<()>>>>,+> = OnceLock::new();++fn in_flight_map() -> &'static tokio::sync::Mutex<HashMap<String, Arc<tokio::sync::Mutex<()>>>> {+ IN_FLIGHT_FETCHES.get_or_init(|| tokio::sync::Mutex::new(HashMap::new()))+}++#[derive(Debug, Clone, Serialize)]+pub struct MediaPreviewEvent {+ pub url: String,+ pub title: String,+ pub author: String,+ pub thumbnail_url: Option<String>,+ pub duration_seconds: Option<f64>,+}++#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, serde::Deserialize)]+#[serde(rename_all = "snake_case")]+pub enum QueueKind {+ Video,+ Audio,+ Image,+ Pdf,+ Book,+ Webpage,+ TelegramMedia,+ CourseLesson,+ Generic,+}++pub fn kind_from_platform(platform: &str) -> QueueKind {+ let p = platform.to_ascii_lowercase();+ match p.as_str() {+ "youtube" | "vimeo" | "twitch" | "bilibili" | "tiktok" | "twitter" | "x" | "instagram"+ | "reddit" | "bluesky" | "facebook" | "generic_ytdlp" => QueueKind::Video,+ "soundcloud" | "spotify" => QueueKind::Audio,+ "pinterest" => QueueKind::Image,+ "magnet" | "p2p" | "torrent" => QueueKind::Generic,+ "telegram" | "telegram_media" => QueueKind::TelegramMedia,+ "courses" | "course_lesson" => QueueKind::CourseLesson,+ "annas_archive" | "book" | "libgen" | "gutendex" => QueueKind::Book,+ "pdf" => QueueKind::Pdf,+ "webpage" | "embed" => QueueKind::Webpage,+ _ => QueueKind::Generic,+ }+}++#[derive(Debug, Clone, Serialize, PartialEq)]+#[serde(tag = "type", content = "data")]+pub enum QueueStatus {+ Queued,+ Active,+ Paused,+ Seeding,+ Complete { success: bool },+ Error { message: String, retryable: bool },+}++pub fn is_retryable_error_message(message: &str) -> bool {+ let lower = message.to_lowercase();+ if lower.contains("cancel") {+ return false;+ }+ let (category, _) = omniget_core::core::errors::classify_download_error(message);+ matches!(category, "unknown" | "rate_limited")+}++#[derive(Clone, Serialize)]+pub struct QueueItemInfo {+ pub id: u64,+ pub url: String,+ pub platform: String,+ pub title: String,+ pub status: QueueStatus,+ pub percent: f64,+ pub speed_bytes_per_sec: f64,+ pub downloaded_bytes: u64,+ pub total_bytes: Option<u64>,+ pub file_path: Option<String>,+ pub file_size_bytes: Option<u64>,+ pub file_count: Option<u32>,+ pub thumbnail_url: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub kind: Option<QueueKind>,+ #[serde(default)]+ pub external: bool,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub eta_seconds: Option<u64>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub quality: Option<String>,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub download_mode: Option<String>,+}++pub struct QueueItem {+ pub id: u64,+ pub url: String,+ pub platform: String,+ pub title: String,+ pub status: QueueStatus,+ pub cancel_token: CancellationToken,+ pub output_dir: String,+ pub download_mode: Option<String>,+ pub quality: Option<String>,+ pub format_id: Option<String>,+ pub referer: Option<String>,+ pub extra_headers: Option<std::collections::HashMap<String, String>>,+ pub page_url: Option<String>,+ pub user_agent: Option<String>,+ pub percent: f64,+ pub speed_bytes_per_sec: f64,+ pub downloaded_bytes: u64,+ pub total_bytes: Option<u64>,+ pub file_path: Option<String>,+ pub file_size_bytes: Option<u64>,+ pub file_count: Option<u32>,+ pub media_info: Option<MediaInfo>,+ pub downloader: Arc<dyn PlatformDownloader>,+ pub ytdlp_path: Option<PathBuf>,+ pub from_hotkey: bool,+ pub torrent_id: Option<usize>,+ pub kind: Option<QueueKind>,+ pub external: bool,+ pub thumbnail_url_override: Option<String>,+ pub retry_count: u32,+ pub max_retries: u32,+ pub resume_state: Option<serde_json::Value>,+ pub concurrent_segments: Option<usize>,+ pub segment_size_bytes: Option<u64>,+ pub eta_seconds: Option<u64>,+ pub cookie_slug: Option<String>,+ pub custom_ytdlp_args: Option<Vec<String>>,+ pub torrent_files: Option<Vec<usize>>,+ pub scheduled_at_ms: Option<u64>,+ pub stop_at_ms: Option<u64>,+}++impl QueueItem {+ pub fn to_info(&self) -> QueueItemInfo {+ QueueItemInfo {+ id: self.id,+ url: self.url.clone(),+ platform: self.platform.clone(),+ title: self.title.clone(),+ status: self.status.clone(),+ percent: self.percent,+ speed_bytes_per_sec: self.speed_bytes_per_sec,+ downloaded_bytes: self.downloaded_bytes,+ total_bytes: self.total_bytes,+ file_path: self.file_path.clone(),+ file_size_bytes: self.file_size_bytes,+ file_count: self.file_count,+ thumbnail_url: self.thumbnail_url_override.clone().or_else(|| {+ self.media_info+ .as_ref()+ .and_then(|m| m.thumbnail_url.clone())+ }),+ kind: self.kind,+ external: self.external,+ eta_seconds: self.eta_seconds,+ quality: self.quality.clone(),+ download_mode: self.download_mode.clone(),+ }+ }+}++pub struct DownloadQueue {+ pub items: Vec<QueueItem>,+ pub max_concurrent: u32,+ pub stagger_delay_ms: u64,+ pub default_max_retries: u32,+}++impl DownloadQueue {+ pub fn new(max_concurrent: u32) -> Self {+ Self {+ items: Vec::new(),+ max_concurrent,+ stagger_delay_ms: 150,+ default_max_retries: 3,+ }+ }++ #[allow(clippy::too_many_arguments)]+ pub fn enqueue(+ &mut self,+ id: u64,+ url: String,+ platform: String,+ title: String,+ output_dir: String,+ download_mode: Option<String>,+ quality: Option<String>,+ format_id: Option<String>,+ referer: Option<String>,+ extra_headers: Option<std::collections::HashMap<String, String>>,+ page_url: Option<String>,+ user_agent: Option<String>,+ media_info: Option<MediaInfo>,+ total_bytes: Option<u64>,+ file_count: Option<u32>,+ downloader: Arc<dyn PlatformDownloader>,+ ytdlp_path: Option<PathBuf>,+ from_hotkey: bool,+ cookie_slug: Option<String>,+ custom_ytdlp_args: Option<Vec<String>>,+ torrent_files: Option<Vec<usize>>,+ scheduled_at_ms: Option<u64>,+ stop_at_ms: Option<u64>,+ ) {+ let computed_kind = Some(kind_from_platform(&platform));+ let item = QueueItem {+ id,+ url,+ platform,+ title,+ status: QueueStatus::Queued,+ cancel_token: CancellationToken::new(),+ output_dir,+ download_mode,+ quality,+ format_id,+ referer,+ extra_headers,+ page_url,+ user_agent,+ percent: 0.0,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: 0,+ total_bytes,+ file_path: None,+ file_size_bytes: None,+ file_count,+ media_info,+ downloader,+ ytdlp_path,+ from_hotkey,+ torrent_id: None,+ kind: computed_kind,+ external: false,+ thumbnail_url_override: None,+ retry_count: 0,+ max_retries: self.default_max_retries,+ resume_state: None,+ concurrent_segments: None,+ segment_size_bytes: None,+ eta_seconds: None,+ cookie_slug,+ custom_ytdlp_args,+ torrent_files,+ scheduled_at_ms,+ stop_at_ms,+ };+ crate::core::recovery::persist(crate::core::recovery::RecoveryItem {+ id: item.id,+ url: item.url.clone(),+ title: item.title.clone(),+ platform: item.platform.clone(),+ output_dir: item.output_dir.clone(),+ download_mode: item.download_mode.clone(),+ quality: item.quality.clone(),+ format_id: item.format_id.clone(),+ referer: item.referer.clone(),+ });+ self.items.push(item);+ }++ pub fn hydrate_from_history(&mut self) {+ let entries = crate::core::queue_history::list();+ if entries.is_empty() {+ return;+ }+ let placeholder: Arc<dyn PlatformDownloader> =+ Arc::new(crate::platforms::noop::NoopDownloader::new());+ for entry in entries.iter().rev() {+ if self.items.iter().any(|i| i.id == entry.id) {+ continue;+ }+ let status = if entry.success {+ QueueStatus::Complete { success: true }+ } else {+ let msg = entry.error.clone().unwrap_or_default();+ let retryable = is_retryable_error_message(&msg);+ QueueStatus::Error {+ message: msg,+ retryable,+ }+ };+ let percent = if entry.success { 100.0 } else { 0.0 };+ let item = QueueItem {+ id: entry.id,+ url: entry.url.clone(),+ platform: entry.platform.clone(),+ title: entry.title.clone(),+ status,+ cancel_token: CancellationToken::new(),+ output_dir: entry+ .file_path+ .as_ref()+ .and_then(|p| {+ std::path::Path::new(p)+ .parent()+ .map(|x| x.to_string_lossy().to_string())+ })+ .unwrap_or_default(),+ download_mode: None,+ quality: None,+ format_id: None,+ referer: None,+ extra_headers: None,+ page_url: None,+ user_agent: None,+ percent,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: entry.file_size_bytes.unwrap_or(0),+ total_bytes: entry.total_bytes,+ file_path: entry.file_path.clone(),+ file_size_bytes: entry.file_size_bytes,+ file_count: None,+ media_info: None,+ downloader: placeholder.clone(),+ ytdlp_path: None,+ from_hotkey: false,+ torrent_id: None,+ kind: entry.kind,+ external: false,+ thumbnail_url_override: entry.thumbnail_url.clone(),+ retry_count: 0,+ max_retries: 0,+ resume_state: None,+ concurrent_segments: None,+ segment_size_bytes: None,+ eta_seconds: None,+ cookie_slug: None,+ custom_ytdlp_args: None,+ torrent_files: None,+ scheduled_at_ms: None,+ stop_at_ms: None,+ };+ self.items.push(item);+ }+ }++ pub fn active_count(&self) -> u32 {+ self.items+ .iter()+ .filter(|i| i.status == QueueStatus::Active)+ .count() as u32+ }++ pub fn next_queued_ids(&self) -> Vec<u64> {+ let slots = self.max_concurrent.saturating_sub(self.active_count()) as usize;+ let now = now_ms();+ self.items+ .iter()+ .filter(|i| i.status == QueueStatus::Queued)+ .filter(|i| i.scheduled_at_ms.map(|t| now >= t).unwrap_or(true))+ .take(slots)+ .map(|i| i.id)+ .collect()+ }++ pub fn next_available_id(&self, preferred: u64) -> u64 {+ let mut id = preferred;+ while self.items.iter().any(|i| i.id == id) {+ id = id.saturating_add(1);+ }+ id+ }++ pub fn mark_active(&mut self, id: u64) {+ if let Some(item) = self+ .items+ .iter_mut()+ .find(|i| i.id == id && i.status == QueueStatus::Queued)+ {+ item.status = QueueStatus::Active;+ item.cancel_token = CancellationToken::new();+ }+ }++ pub fn mark_complete(+ &mut self,+ id: u64,+ success: bool,+ error: Option<String>,+ file_path: Option<String>,+ file_size_bytes: Option<u64>,+ ) {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ let error_for_history = error.clone();+ if success {+ item.status = QueueStatus::Complete { success: true };+ item.percent = 100.0;+ } else {+ let msg = error.unwrap_or_default();+ let retryable = is_retryable_error_message(&msg);+ item.status = QueueStatus::Error {+ message: msg,+ retryable,+ };+ }+ item.file_path = file_path;+ item.file_size_bytes = file_size_bytes;+ item.speed_bytes_per_sec = 0.0;+ item.eta_seconds = None;+ crate::core::recovery::remove(id);++ if !item.external {+ let entry = crate::core::queue_history::HistoryEntry {+ id: item.id,+ url: item.url.clone(),+ platform: item.platform.clone(),+ title: item.title.clone(),+ file_path: item.file_path.clone(),+ file_size_bytes: item.file_size_bytes,+ total_bytes: item.total_bytes,+ success,+ error: if success { None } else { error_for_history },+ completed_at: crate::core::queue_history::now_unix_seconds(),+ thumbnail_url: item.thumbnail_url_override.clone().or_else(|| {+ item.media_info+ .as_ref()+ .and_then(|m| m.thumbnail_url.clone())+ }),+ kind: item.kind,+ };+ crate::core::queue_history::record(entry);+ }+ }+ }++ pub fn mark_seeding(+ &mut self,+ id: u64,+ file_path: Option<String>,+ file_size_bytes: Option<u64>,+ torrent_id: Option<usize>,+ ) {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ item.status = QueueStatus::Seeding;+ item.percent = 100.0;+ item.file_path = file_path;+ item.file_size_bytes = file_size_bytes;+ item.speed_bytes_per_sec = 0.0;+ item.torrent_id = torrent_id;+ crate::core::recovery::remove(id);+ }+ }++ pub fn update_progress(+ &mut self,+ id: u64,+ percent: f64,+ speed: f64,+ downloaded: u64,+ total: Option<u64>,+ torrent_id: Option<usize>,+ eta_seconds: Option<u64>,+ ) {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ if item.status != QueueStatus::Active {+ if torrent_id.is_some() && item.torrent_id.is_none() {+ item.torrent_id = torrent_id;+ }+ return;+ }+ item.percent = percent;+ item.speed_bytes_per_sec = speed;+ item.downloaded_bytes = downloaded;+ if let Some(t) = total {+ item.total_bytes = Some(t);+ }+ if torrent_id.is_some() && item.torrent_id.is_none() {+ item.torrent_id = torrent_id;+ }+ item.eta_seconds = eta_seconds;+ }+ }++ pub fn pause(&mut self, id: u64) -> bool {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ if item.status == QueueStatus::Active {+ if item.platform != "magnet"+ && !omniget_core::core::ytdlp::pause_download_process(id)+ {+ return false;+ }+ item.status = QueueStatus::Paused;+ item.speed_bytes_per_sec = 0.0;+ item.eta_seconds = None;+ return true;+ }+ }+ false+ }++ pub fn resume(&mut self, id: u64) -> bool {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ if item.status == QueueStatus::Paused {+ if item.platform != "magnet"+ && !omniget_core::core::ytdlp::resume_download_process(id)+ {+ return false;+ }+ item.status = QueueStatus::Active;+ return true;+ }+ }+ false+ }++ pub fn pause_all(&mut self) -> Vec<(u64, Option<usize>)> {+ let mut paused = Vec::new();+ for item in self.items.iter_mut() {+ if item.status == QueueStatus::Active {+ if item.platform != "magnet"+ && !omniget_core::core::ytdlp::pause_download_process(item.id)+ {+ continue;+ }+ item.status = QueueStatus::Paused;+ item.speed_bytes_per_sec = 0.0;+ item.eta_seconds = None;+ paused.push((item.id, item.torrent_id));+ }+ }+ paused+ }++ pub fn resume_all(&mut self) -> Vec<(u64, Option<usize>)> {+ let mut resumed = Vec::new();+ for item in self.items.iter_mut() {+ if item.status == QueueStatus::Paused {+ let tid = item.torrent_id;+ if item.platform != "magnet"+ && !omniget_core::core::ytdlp::resume_download_process(item.id)+ {+ continue;+ }+ item.status = QueueStatus::Active;+ resumed.push((item.id, tid));+ }+ }+ resumed+ }++ pub fn reorder(&mut self, ids_in_order: Vec<u64>) -> bool {+ let mut slots: Vec<Option<QueueItem>> = self.items.drain(..).map(Some).collect();++ let queued_slot_indices: Vec<usize> = slots+ .iter()+ .enumerate()+ .filter_map(|(idx, slot)| {+ slot.as_ref()+ .filter(|i| i.status == QueueStatus::Queued)+ .map(|_| idx)+ })+ .collect();++ if queued_slot_indices.is_empty() {+ self.items = slots.into_iter().flatten().collect();+ return false;+ }++ let queued_id_to_slot: std::collections::HashMap<u64, usize> = queued_slot_indices+ .iter()+ .map(|idx| (slots[*idx].as_ref().unwrap().id, *idx))+ .collect();++ let mut new_queued_order: Vec<QueueItem> = Vec::with_capacity(queued_slot_indices.len());+ let mut seen: std::collections::HashSet<u64> = std::collections::HashSet::new();++ for id in &ids_in_order {+ if seen.contains(id) {+ continue;+ }+ if let Some(slot_idx) = queued_id_to_slot.get(id) {+ if let Some(item) = slots[*slot_idx].take() {+ new_queued_order.push(item);+ seen.insert(*id);+ }+ }+ }+ for idx in &queued_slot_indices {+ if let Some(item) = slots[*idx].take() {+ new_queued_order.push(item);+ }+ }++ let mut iter = new_queued_order.into_iter();+ let mut rebuilt: Vec<QueueItem> = Vec::with_capacity(slots.len());+ for (idx, slot) in slots.into_iter().enumerate() {+ if queued_slot_indices.contains(&idx) {+ if let Some(item) = iter.next() {+ rebuilt.push(item);+ }+ } else if let Some(item) = slot {+ rebuilt.push(item);+ }+ }+ rebuilt.extend(iter);+ self.items = rebuilt;+ true+ }++ /// Cancel an item. Returns the torrent_id if the item needs torrent cleanup (caller should delete from session).+ pub fn cancel(&mut self, id: u64) -> (bool, Option<usize>) {+ let result = self.cancel_inner(id);+ if result.0 {+ crate::core::recovery::remove(id);+ }+ result+ }++ fn cancel_inner(&mut self, id: u64) -> (bool, Option<usize>) {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ match &item.status {+ QueueStatus::Active => {+ item.cancel_token.cancel();+ item.status = QueueStatus::Error {+ message: "Cancelled".to_string(),+ retryable: false,+ };+ item.speed_bytes_per_sec = 0.0;+ return (true, None);+ }+ QueueStatus::Seeding => {+ let tid = item.torrent_id;+ item.status = QueueStatus::Error {+ message: "Cancelled".to_string(),+ retryable: false,+ };+ item.speed_bytes_per_sec = 0.0;+ return (true, tid);+ }+ QueueStatus::Paused => {+ // For magnet downloads, the cancel_token was not cancelled during pause,+ // so we must cancel it now to stop the background download loop.+ // Also return the torrent_id for session cleanup.+ item.cancel_token.cancel();+ let tid = if item.platform == "magnet" {+ item.torrent_id+ } else {+ None+ };+ item.status = QueueStatus::Error {+ message: "Cancelled".to_string(),+ retryable: false,+ };+ item.speed_bytes_per_sec = 0.0;+ return (true, tid);+ }+ QueueStatus::Queued => {+ item.status = QueueStatus::Error {+ message: "Cancelled".to_string(),+ retryable: false,+ };+ return (true, None);+ }+ _ => {}+ }+ }+ (false, None)+ }++ pub fn retry(&mut self, id: u64) -> bool {+ if let Some(item) = self.items.iter_mut().find(|i| i.id == id) {+ if matches!(item.status, QueueStatus::Error { .. }) {+ item.status = QueueStatus::Queued;+ item.cancel_token = CancellationToken::new();+ item.percent = 0.0;+ item.speed_bytes_per_sec = 0.0;+ item.downloaded_bytes = 0;+ item.file_path = None;+ item.file_size_bytes = None;+ item.retry_count = 0;+ return true;+ }+ }+ false+ }++ /// Remove an item. Returns the torrent_id if the item needs torrent cleanup (caller should delete from session).+ pub fn remove(&mut self, id: u64) -> Option<Option<usize>> {+ let result = self.remove_inner(id);+ if result.is_some() {+ crate::core::recovery::remove(id);+ crate::core::queue_history::remove(id);+ }+ result+ }++ fn remove_inner(&mut self, id: u64) -> Option<Option<usize>> {+ if let Some(pos) = self.items.iter().position(|i| i.id == id) {+ let item = &self.items[pos];+ if item.status == QueueStatus::Active {+ item.cancel_token.cancel();+ }+ // For paused magnet items, the cancel_token was not cancelled during pause+ if item.status == QueueStatus::Paused && item.platform == "magnet" {+ item.cancel_token.cancel();+ }+ let torrent_id = if item.status == QueueStatus::Seeding+ || (item.status == QueueStatus::Paused && item.platform == "magnet")+ {+ item.torrent_id+ } else {+ None+ };+ self.items.remove(pos);+ return Some(torrent_id);+ }+ None+ }++ pub fn clear_finished(&mut self) {+ let to_remove: Vec<u64> = self+ .items+ .iter()+ .filter(|i| {+ matches!(+ i.status,+ QueueStatus::Complete { .. } | QueueStatus::Error { .. }+ )+ })+ .map(|i| i.id)+ .collect();+ for id in &to_remove {+ crate::core::recovery::remove(*id);+ crate::core::queue_history::remove(*id);+ }+ self.items.retain(|i| {+ !matches!(+ i.status,+ QueueStatus::Complete { .. } | QueueStatus::Error { .. }+ )+ });+ }++ pub fn get_state(&self) -> Vec<QueueItemInfo> {+ self.items.iter().map(|i| i.to_info()).collect()+ }++ pub fn has_url(&self, url: &str) -> bool {+ self.items.iter().any(|i| {+ i.url == url+ && matches!(+ i.status,+ QueueStatus::Queued+ | QueueStatus::Active+ | QueueStatus::Paused+ | QueueStatus::Seeding+ )+ })+ }+}++pub struct ProgressThrottle {+ last_emit: std::time::Instant,+ min_interval: std::time::Duration,+}++impl ProgressThrottle {+ pub fn new(min_interval_ms: u64) -> Self {+ Self {+ last_emit: std::time::Instant::now() - std::time::Duration::from_secs(10),+ min_interval: std::time::Duration::from_millis(min_interval_ms),+ }+ }++ pub fn should_emit(&mut self) -> bool {+ let now = std::time::Instant::now();+ if now.duration_since(self.last_emit) >= self.min_interval {+ self.last_emit = now;+ true+ } else {+ false+ }+ }+}++#[derive(Clone, Serialize)]+pub struct QueueItemProgress {+ pub id: u64,+ pub title: String,+ pub platform: String,+ pub percent: f64,+ pub speed_bytes_per_sec: f64,+ pub downloaded_bytes: u64,+ pub total_bytes: Option<u64>,+ pub phase: String,+ #[serde(skip_serializing_if = "Option::is_none")]+ pub eta_seconds: Option<u64>,+}++pub fn emit_queue_state_from_state(app: &tauri::AppHandle, state: Vec<QueueItemInfo>) {+ let n = EMIT_COUNT.fetch_add(1, Ordering::Relaxed);+ if n.is_multiple_of(10) {+ tracing::debug!("[perf] emit_queue_state called {} times", n);+ }+ let _ = app.emit("queue-state-update", &state);+ let total = crate::tray::compute_total_active(app);+ crate::tray::update_active_count(app, total);+ crate::core::awake::sync(total > 0);++ let active_items: Vec<_> = state+ .iter()+ .filter(|i| i.status == QueueStatus::Active)+ .collect();+ let avg_percent = if !active_items.is_empty() {+ let sum: f64 = active_items.iter().map(|i| i.percent).sum();+ sum / active_items.len() as f64 / 100.0+ } else {+ 0.0+ };+ let total_speed: f64 = active_items.iter().map(|i| i.speed_bytes_per_sec).sum();+ crate::tray::update_speed_tooltip(app, total, total_speed);+ crate::tray::update_taskbar_badge(app, total, avg_percent);++ if let Some(window) = app.get_webview_window("main") {+ let title = if total > 0 {+ format!("({}) omniget", total)+ } else {+ "omniget".into()+ };+ let _ = window.set_title(&title);+ }+}++pub fn emit_queue_state(app: &tauri::AppHandle, queue: &DownloadQueue) {+ let state = queue.get_state();+ emit_queue_state_from_state(app, state);+}++/// RAII guard that ensures an Active queue item never leaks a slot.+///+/// If the download future panics or is dropped before reaching `mark_complete`+/// / `mark_seeding`, the Drop impl spawns a task that transitions the item to+/// Error("Download interrupted") and calls `try_start_next`, unblocking the+/// queue.+///+/// When the download reaches a terminal state through the normal paths, the+/// guard sees the item is no longer Active and does nothing (idempotent).+struct ActiveJobSlot {+ app: tauri::AppHandle,+ queue: Arc<tokio::sync::Mutex<DownloadQueue>>,+ item_id: u64,+ armed: bool,+}++impl ActiveJobSlot {+ fn new(+ app: tauri::AppHandle,+ queue: Arc<tokio::sync::Mutex<DownloadQueue>>,+ item_id: u64,+ ) -> Self {+ Self {+ app,+ queue,+ item_id,+ armed: true,+ }+ }++ fn disarm(mut self) {+ self.armed = false;+ }+}++impl Drop for ActiveJobSlot {+ fn drop(&mut self) {+ if !self.armed {+ return;+ }+ let app = self.app.clone();+ let queue = self.queue.clone();+ let item_id = self.item_id;+ tokio::spawn(async move {+ let state = {+ let mut q = queue.lock().await;+ let still_active = q+ .items+ .iter()+ .find(|i| i.id == item_id)+ .map(|i| i.status == QueueStatus::Active)+ .unwrap_or(false);+ if !still_active {+ return;+ }+ tracing::warn!(+ "[queue] ActiveJobSlot guard firing for {} — download ended without clean release",+ item_id+ );+ q.mark_complete(+ item_id,+ false,+ Some("Download interrupted".to_string()),+ None,+ None,+ );+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ try_start_next(app, queue).await;+ });+ }+}++pub fn spawn_download(+ app: tauri::AppHandle,+ queue: Arc<tokio::sync::Mutex<DownloadQueue>>,+ item_id: u64,+) -> std::pin::Pin<Box<dyn std::future::Future<Output = ()> + Send>> {+ Box::pin(async move {+ let _timer_start = std::time::Instant::now();+ let slot = ActiveJobSlot::new(app.clone(), queue.clone(), item_id);+ spawn_download_inner(app, queue, item_id).await;+ slot.disarm();+ tracing::debug!(+ "[perf] spawn_download {} took {:?}",+ item_id,+ _timer_start.elapsed()+ );+ })+}++async fn spawn_download_inner(+ app: tauri::AppHandle,+ queue: Arc<tokio::sync::Mutex<DownloadQueue>>,+ item_id: u64,+) {+ tracing::info!("[queue] download {} started", item_id);++ let _ = app.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: item_id,+ title: "".to_string(),+ platform: "".to_string(),+ percent: 0.0,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: 0,+ total_bytes: None,+ phase: "preparing".to_string(),+ eta_seconds: None,+ },+ );++ let host_key = {+ let q = queue.lock().await;+ q.items+ .iter()+ .find(|i| i.id == item_id)+ .map(|i| crate::core::host_limiter::host_key_for_url(&i.url))+ };+ let _host_lease = match host_key {+ Some(key) => Some(crate::core::host_limiter::acquire(&key).await),+ None => None,+ };++ let (+ url,+ output_dir,+ download_mode,+ quality,+ format_id,+ referer,+ extra_headers,+ page_url,+ user_agent,+ cancel_token,+ media_info,+ platform_name,+ downloader,+ ytdlp_path,+ from_hotkey,+ cookie_slug,+ custom_ytdlp_args,+ torrent_files,+ ) = {+ let q = queue.lock().await;+ let item = match q.items.iter().find(|i| i.id == item_id) {+ Some(i) => i,+ None => return,+ };+ (+ item.url.clone(),+ item.output_dir.clone(),+ item.download_mode.clone(),+ item.quality.clone(),+ item.format_id.clone(),+ item.referer.clone(),+ item.extra_headers.clone(),+ item.page_url.clone(),+ item.user_agent.clone(),+ item.cancel_token.clone(),+ item.media_info.clone(),+ item.platform.clone(),+ item.downloader.clone(),+ item.ytdlp_path.clone(),+ item.from_hotkey,+ item.cookie_slug.clone(),+ item.custom_ytdlp_args.clone(),+ item.torrent_files.clone(),+ )+ };++ {+ let settings = crate::storage::config::load_settings(&app);+ let proxy = settings.proxy.clone();+ crate::core::http_client::init_proxy(proxy.clone());+ let proxy_status = if !proxy.enabled {+ "disabled; direct connection enforced".to_string()+ } else if proxy.host.trim().is_empty() {+ "enabled but host is empty; direct connection enforced".to_string()+ } else {+ format!("enabled; {}://{}:{}", proxy.proxy_type, proxy.host, proxy.port)+ };+ append_download_log(+ &app,+ item_id,+ format!("[network] proxy setting: {}", proxy_status),+ );+ }++ let info_start = std::time::Instant::now();+ let info = match media_info {+ Some(i) if !i.available_qualities.is_empty() => {+ tracing::info!(+ "[queue] info for {} from cache/pre-fetched in {:?}",+ item_id,+ info_start.elapsed()+ );+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] using cached video info: platform={} title=\"{}\"",+ platform_name, i.title+ ),+ );+ i+ }+ _ => {+ tracing::debug!(+ "[perf] spawn_download_inner {}: media_info is None, fetching info",+ item_id+ );+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] fetching video info: platform={} url={}",+ platform_name, url+ ),+ );+ if let Some(slug) = cookie_slug.as_deref() {+ append_download_log(+ &app,+ item_id,+ format!("[cookies] selected managed cookie account: {}", slug),+ );+ }+ let _ = app.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: item_id,+ title: url.clone(),+ platform: platform_name.clone(),+ percent: 0.0,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: 0,+ total_bytes: None,+ phase: "fetching_info".to_string(),+ eta_seconds: None,+ },+ );++ let info_future = fetch_and_cache_info(+ &url,+ &*downloader,+ &platform_name,+ ytdlp_path.as_deref(),+ );+ let scoped_info_future = omniget_core::core::log_hook::CURRENT_COOKIE_SLUG.scope(+ cookie_slug.clone(),+ omniget_core::core::log_hook::CURRENT_DOWNLOAD_ID.scope(item_id, info_future),+ );+ let info_timeout_secs = if platform_name == "youtube"+ || url.to_ascii_lowercase().contains("youtube.com")+ || url.to_ascii_lowercase().contains("youtu.be")+ {+ omniget_core::core::ytdlp::YOUTUBE_VIDEO_INFO_TOTAL_TIMEOUT_SECS+ } else if platform_name == "douyin" {+ 30+ } else {+ omniget_core::core::ytdlp::DEFAULT_VIDEO_INFO_TOTAL_TIMEOUT_SECS+ };+ let info_result = tokio::time::timeout(+ std::time::Duration::from_secs(info_timeout_secs),+ scoped_info_future,+ )+ .await;++ match info_result {+ Ok(Ok(i)) => {+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] video info fetched in {:.1}s: title=\"{}\"",+ info_start.elapsed().as_secs_f64(),+ i.title+ ),+ );+ i+ }+ Ok(Err(e)) => {+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] failed fetching video info after {:.1}s: {}",+ info_start.elapsed().as_secs_f64(),+ e+ ),+ );+ let state = {+ let mut q = queue.lock().await;+ q.mark_complete(item_id, false, Some(e.to_string()), None, None);+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ try_start_next(app, queue).await;+ return;+ }+ Err(_) => {+ tracing::warn!(+ "[queue] info fetch timed out for {} after {}s",+ item_id,+ info_timeout_secs+ );+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] video info timed out after {}s",+ info_timeout_secs+ ),+ );+ let state = {+ let mut q = queue.lock().await;+ q.mark_complete(+ item_id,+ false,+ Some("Timed out fetching video info".to_string()),+ None,+ None,+ );+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ try_start_next(app, queue).await;+ return;+ }+ }+ }+ };+ tracing::info!(+ "[queue] info fetch for {} took {:?}",+ item_id,+ info_start.elapsed()+ );++ let mut info = info;+ if is_generic_title(&info.title) {+ let pokemon = omniget_core::core::pokemon_names::random_pokemon_name();+ info.title = format!("video_{}", pokemon);+ }++ let state = {+ let mut q = queue.lock().await;+ if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {+ item.title = info.title.clone();+ item.total_bytes = info.file_size_bytes;+ let fc = if info.media_type == crate::models::media::MediaType::Carousel+ || info.media_type == crate::models::media::MediaType::Playlist+ {+ info.available_qualities.len() as u32+ } else {+ 1+ };+ item.file_count = Some(fc);+ item.media_info = Some(info.clone());+ }+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);++ let _ = app.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: item_id,+ title: info.title.clone(),+ platform: platform_name.clone(),+ percent: 0.5,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: 0,+ total_bytes: info.file_size_bytes,+ phase: "starting".to_string(),+ eta_seconds: None,+ },+ );++ let settings = config::load_settings(&app);+ let tmpl = settings.download.filename_template.clone();+ let mut final_output_dir = std::path::PathBuf::from(&output_dir);+ if settings.download.organize_by_platform {+ final_output_dir = final_output_dir.join(&platform_name);+ }+ let torrent_id_slot = Arc::new(tokio::sync::Mutex::new(None));+ let audio_format = if download_mode.as_deref() == Some("audio") {+ Some(settings.download.music_audio_format.clone())+ } else {+ None+ };+ let custom_ytdlp_args = {+ let mut args = custom_ytdlp_args.clone();+ if settings.download.skip_existing {+ let flags = args.get_or_insert_with(Vec::new);+ if !flags.iter().any(|f| f == "--no-overwrites") {+ flags.push("--no-overwrites".to_string());+ }+ }+ args+ };+ let opts = crate::models::media::DownloadOptions {+ quality: quality.or_else(|| Some(settings.download.video_quality.clone())),+ output_dir: final_output_dir,+ filename_template: Some(tmpl),+ download_subtitles: settings.download.download_subtitles,+ include_auto_subtitles: settings.download.include_auto_subtitles,+ download_mode,+ audio_format,+ format_id,+ referer,+ extra_headers,+ page_url,+ user_agent,+ cancel_token: cancel_token.clone(),+ concurrent_fragments: settings.advanced.concurrent_fragments,+ ytdlp_path,+ torrent_listen_port: Some(settings.advanced.torrent_listen_port),+ torrent_id_slot: Some(torrent_id_slot.clone()),+ custom_ytdlp_args: custom_ytdlp_args.clone(),+ torrent_files: torrent_files.clone(),+ torrent_auto_trackers: settings.advanced.torrent_auto_trackers,+ torrent_upnp: settings.advanced.torrent_upnp,+ };++ let total_bytes = info.file_size_bytes;+ let item_title = info.title.clone();+ let log_title = item_title.clone();+ let item_platform = platform_name.clone();+ let (tx, mut rx) = mpsc::channel::<omniget_core::models::progress::ProgressUpdate>(32);++ let app_progress = app.clone();+ let queue_progress = queue.clone();+ let torrent_id_slot_progress = torrent_id_slot.clone();+ let progress_forwarder = tokio::spawn(async move {+ const STALL_AFTER: std::time::Duration = std::time::Duration::from_secs(6);++ let mut last_bytes: u64 = 0;+ let mut last_time = std::time::Instant::now();+ let mut throttle = ProgressThrottle::new(250);+ let mut current_speed: f64 = 0.0;+ let mut last_percent: f64 = 0.0;+ let mut last_advance = std::time::Instant::now();+ let mut stalled = false;++ loop {+ let update = tokio::select! {+ msg = rx.recv() => match msg {+ Some(u) => u,+ None => break,+ },+ _ = tokio::time::sleep(std::time::Duration::from_secs(2)) => {+ if !stalled && last_advance.elapsed() >= STALL_AFTER {+ stalled = true;+ current_speed = 0.0;+ {+ let mut q = queue_progress.lock().await;+ let tid = { *torrent_id_slot_progress.lock().await };+ q.update_progress(+ item_id, last_percent, 0.0, last_bytes, total_bytes, tid, None,+ );+ }+ let _ = app_progress.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: item_id,+ title: item_title.clone(),+ platform: item_platform.clone(),+ percent: last_percent,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: last_bytes,+ total_bytes,+ phase: "stalled".to_string(),+ eta_seconds: None,+ },+ );+ }+ continue;+ }+ };++ let percent = update.percent;+ if !throttle.should_emit() && percent < 100.0 && !update.has_real_metrics() {+ continue;+ }++ let now = std::time::Instant::now();+ let resolved_total = update.total_bytes.or(total_bytes);+ let mut clamped = percent.clamp(0.0, 100.0);+ if percent >= 0.0 && percent < 100.0 {+ if clamped < last_percent {+ clamped = last_percent;+ }++ let metric_percent = update.downloaded_bytes.and_then(|downloaded| {+ resolved_total+ .filter(|total| *total > 0)+ .map(|total| (downloaded as f64 / total as f64 * 100.0).clamp(0.0, 100.0))+ });++ if let Some(metric) = metric_percent {+ let metric_ceiling = (metric + 15.0).max(last_percent);+ if clamped > metric_ceiling {+ clamped = metric_ceiling;+ }+ } else {+ let max_step = if update.has_real_metrics() { 12.0 } else { 6.0 };+ let ceiling = (last_percent + max_step).min(99.0);+ if clamped > ceiling {+ clamped = ceiling;+ }+ }+ }++ let mut downloaded_bytes = update.downloaded_bytes.unwrap_or_else(|| {+ resolved_total+ .map(|total| (clamped / 100.0 * total as f64) as u64)+ .unwrap_or(last_bytes)+ });+ if downloaded_bytes < last_bytes && percent < 100.0 {+ downloaded_bytes = last_bytes;+ }++ if let Some(real) = update.speed_bps {+ current_speed = real;+ } else if downloaded_bytes > last_bytes {+ let dt = now.duration_since(last_time).as_secs_f64();+ if dt > 0.1 {+ let instant_speed = (downloaded_bytes - last_bytes) as f64 / dt;+ current_speed = if current_speed > 0.0 {+ current_speed * 0.7 + instant_speed * 0.3+ } else {+ instant_speed+ };+ }+ }++ if downloaded_bytes > last_bytes || clamped > last_percent || update.speed_bps.is_some()+ {+ last_advance = now;+ stalled = false;+ }+ last_bytes = downloaded_bytes;+ last_time = now;+ last_percent = clamped;++ let phase_value = if percent < 0.0 { percent } else { clamped };+ let phase = match phase_value {+ p if p < -1.5 => "connecting",+ p if p < -0.5 => "starting",+ p if p > 99.5 => "finalizing",+ p if p > 0.0 => "downloading",+ _ => "starting",+ };++ let eta_seconds = update+ .eta_seconds+ .or_else(|| omniget_core::core::ytdlp::get_eta(item_id))+ .or_else(|| {+ if current_speed > 0.0 {+ resolved_total.and_then(|total| {+ (total > downloaded_bytes)+ .then(|| ((total - downloaded_bytes) as f64 / current_speed) as u64)+ })+ } else {+ None+ }+ });++ {+ let mut q = queue_progress.lock().await;+ let tid = { *torrent_id_slot_progress.lock().await };+ q.update_progress(+ item_id,+ clamped,+ current_speed,+ downloaded_bytes,+ resolved_total,+ tid,+ eta_seconds,+ );+ }++ let _ = app_progress.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: item_id,+ title: item_title.clone(),+ platform: item_platform.clone(),+ percent: clamped,+ speed_bytes_per_sec: current_speed,+ downloaded_bytes,+ total_bytes: resolved_total,+ phase: phase.to_string(),+ eta_seconds,+ },+ );+ }+ omniget_core::core::ytdlp::clear_eta(item_id);+ });++ if let Some(ua) = opts.user_agent.clone() {+ omniget_core::core::ytdlp::register_ext_user_agent(url.clone(), ua);+ }+ if let Some(hdrs) = opts.extra_headers.clone() {+ omniget_core::core::ytdlp::register_ext_headers(url.clone(), hdrs);+ }++ let dl_start = std::time::Instant::now();+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] starting download: platform={} title=\"{}\" url={}",+ platform_name, log_title, url+ ),+ );+ let dl_future = async {+ tokio::select! {+ r = downloader.download(&info, &opts, tx) => r,+ _ = cancel_token.cancelled() => {+ Err(anyhow::anyhow!("Download cancelado"))+ }+ }+ };+ let result = omniget_core::core::log_hook::CURRENT_COOKIE_SLUG+ .scope(+ cookie_slug.clone(),+ omniget_core::core::log_hook::CURRENT_DOWNLOAD_ID.scope(item_id, dl_future),+ )+ .await;+ omniget_core::core::ytdlp::clear_ext_user_agent(&url);+ omniget_core::core::ytdlp::clear_ext_headers(&url);+ tracing::info!(+ "[queue] download {} completed in {:?}",+ item_id,+ dl_start.elapsed()+ );++ let _ = progress_forwarder.await;++ let was_paused = {+ let q = queue.lock().await;+ q.items+ .iter()+ .find(|i| i.id == item_id)+ .map(|i| i.status == QueueStatus::Paused)+ .unwrap_or(false)+ };++ if was_paused {+ let state = {+ let q = queue.lock().await;+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ try_start_next(app, queue).await;+ return;+ }++ match result {+ Ok(dl) => {+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] download finished: path={} size={} bytes",+ dl.file_path.to_string_lossy(),+ dl.file_size_bytes+ ),+ );+ let is_seeding = platform_name == "magnet" && dl.torrent_id.is_some();+ if !is_seeding {+ if let Err(msg) = validate_download_output(&dl.file_path).await {+ tracing::error!(+ "[queue] download {} reported success but output is missing or empty: {:?}",+ item_id,+ dl.file_path+ );+ append_download_log(+ &app,+ item_id,+ format!(+ "[omniget] download reported success but output missing or empty: {}",+ dl.file_path.to_string_lossy()+ ),+ );+ let state = {+ let mut q = queue.lock().await;+ q.mark_complete(item_id, false, Some(msg), None, None);+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ try_start_next(app, queue).await;+ return;+ }+ }++ if settings.download.embed_metadata+ && platform_name != "magnet"+ && ffmpeg::is_ffmpeg_available().await+ {+ let metadata = MetadataEmbed {+ title: Some(info.title.clone()),+ artist: Some(info.author.clone()),+ thumbnail_url: info.thumbnail_url.clone(),+ ..Default::default()+ };+ if let Err(e) = ffmpeg::embed_metadata(+ &dl.file_path,+ &metadata,+ settings.download.embed_thumbnail,+ shared_http_client(),+ )+ .await+ {+ tracing::warn!("Metadata embed failed for '{}': {}", info.title, e);+ }+ }++ if from_hotkey && settings.download.copy_to_clipboard_on_hotkey {+ #[cfg(not(target_os = "android"))]+ {+ match crate::core::clipboard::copy_file_to_clipboard(&dl.file_path).await {+ Ok(()) => {+ let _ = app.emit(+ "file-copied-to-clipboard",+ serde_json::json!({+ "path": dl.file_path.to_string_lossy(),+ }),+ );+ }+ Err(e) => {+ tracing::warn!("[clipboard] failed to copy file: {}", e);+ }+ }+ }+ }++ let state = {+ let mut q = queue.lock().await;+ if platform_name == "magnet" && dl.torrent_id.is_some() {+ q.mark_seeding(+ item_id,+ Some(dl.file_path.to_string_lossy().to_string()),+ Some(dl.file_size_bytes),+ dl.torrent_id,+ );+ } else {+ q.mark_complete(+ item_id,+ true,+ None,+ Some(dl.file_path.to_string_lossy().to_string()),+ Some(dl.file_size_bytes),+ );+ }+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ }+ Err(e) => {+ let raw_err = e.to_string();+ append_download_log(+ &app,+ item_id,+ format!("[omniget] download failed: {}", raw_err),+ );+ let (category, hint) = omniget_core::core::errors::classify_download_error(&raw_err);+ let user_msg = if category != "unknown" {+ format!("{} ({})", hint, raw_err)+ } else {+ raw_err.clone()+ };+ tracing::error!(+ "Download error '{}' [{}]: {}",+ platform_name,+ category,+ raw_err+ );++ let retry_decision = {+ let mut q = queue.lock().await;+ if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {+ if item.downloaded_bytes > 5 * 1024 * 1024 {+ item.retry_count = 0;+ }+ let retryable = is_retryable_category(category);+ let attempt = item.retry_count;+ let max = item.max_retries;+ if retryable && attempt < max {+ item.retry_count = attempt + 1;+ Some((attempt + 1, max))+ } else {+ None+ }+ } else {+ None+ }+ };++ if let Some((next_attempt, max)) = retry_decision {+ let delay_secs = (1u64 << (next_attempt - 1).min(5)).min(30);+ tracing::warn!(+ "[queue] retry {}/{} for {} in {}s (category={})",+ next_attempt,+ max,+ item_id,+ delay_secs,+ category+ );+ let state = {+ let mut q = queue.lock().await;+ if let Some(item) = q.items.iter_mut().find(|i| i.id == item_id) {+ item.status = QueueStatus::Queued;+ item.cancel_token = CancellationToken::new();+ item.percent = 0.0;+ item.speed_bytes_per_sec = 0.0;+ item.downloaded_bytes = 0;+ }+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ let app_for_retry = app.clone();+ let queue_for_retry = queue.clone();+ tokio::spawn(async move {+ tokio::time::sleep(std::time::Duration::from_secs(delay_secs)).await;+ try_start_next(app_for_retry, queue_for_retry).await;+ });+ return;+ }++ let state = {+ let mut q = queue.lock().await;+ q.mark_complete(item_id, false, Some(user_msg), None, None);+ q.get_state()+ };+ emit_queue_state_from_state(&app, state);+ }+ }++ try_start_next(app, queue).await;+}++fn is_retryable_category(category: &str) -> bool {+ matches!(category, "unknown" | "rate_limited")+}++const OUTPUT_MISSING_ERROR: &str =+ "Download reported success but the file is missing or empty. Check disk space and antivirus exclusions, then retry.";++async fn validate_download_output(path: &std::path::Path) -> Result<(), String> {+ if path.as_os_str().is_empty() {+ return Err(OUTPUT_MISSING_ERROR.to_string());+ }+ let meta = match tokio::fs::metadata(path).await {+ Ok(m) => m,+ Err(_) => return Err(OUTPUT_MISSING_ERROR.to_string()),+ };+ if meta.is_dir() {+ let mut entries = match tokio::fs::read_dir(path).await {+ Ok(e) => e,+ Err(_) => return Err(OUTPUT_MISSING_ERROR.to_string()),+ };+ match entries.next_entry().await {+ Ok(Some(_)) => Ok(()),+ _ => Err(OUTPUT_MISSING_ERROR.to_string()),+ }+ } else if meta.len() > 0 {+ Ok(())+ } else {+ Err(OUTPUT_MISSING_ERROR.to_string())+ }+}++async fn fetch_and_cache_info(+ url: &str,+ downloader: &dyn PlatformDownloader,+ platform: &str,+ ytdlp_path: Option<&std::path::Path>,+) -> anyhow::Result<MediaInfo> {+ {+ let cache = info_cache().lock().await;+ if let Some(entry) = cache.get(url) {+ if entry.cached_at.elapsed() < INFO_CACHE_TTL {+ tracing::debug!("[perf] fetch_and_cache_info: cache hit for {}", platform);+ return Ok(entry.info.clone());+ }+ }+ }++ let url_lock = {+ let mut map = in_flight_map().lock().await;+ map.entry(url.to_string())+ .or_insert_with(|| Arc::new(tokio::sync::Mutex::new(())))+ .clone()+ };+ let _guard = url_lock.lock().await;++ {+ let cache = info_cache().lock().await;+ if let Some(entry) = cache.get(url) {+ if entry.cached_at.elapsed() < INFO_CACHE_TTL {+ tracing::debug!(+ "[perf] fetch_and_cache_info: dedup cache hit for {}",+ platform+ );+ return Ok(entry.info.clone());+ }+ }+ }++ tracing::debug!("[perf] fetch_and_cache_info: fetching for {}", platform);+ let info = if let Some(ytdlp) = ytdlp_path {+ match platform {+ "youtube" => {+ crate::platforms::youtube::YouTubeDownloader::fetch_with_ytdlp(url, ytdlp).await?+ }+ "generic" => {+ let json = crate::core::ytdlp::get_video_info(ytdlp, url, &[]).await?;+ crate::platforms::generic_ytdlp::GenericYtdlpDownloader::parse_video_info(&json)?+ }+ _ => downloader.get_media_info(url).await?,+ }+ } else {+ downloader.get_media_info(url).await?+ };++ let mut cache = info_cache().lock().await;+ cache.insert(+ url.to_string(),+ CachedInfo {+ info: info.clone(),+ cached_at: std::time::Instant::now(),+ },+ );+ if cache.len() > 50 {+ cache.retain(|_, v| v.cached_at.elapsed() < INFO_CACHE_TTL);+ }+ Ok(info)+}++pub async fn try_get_cached_info(url: &str) -> Option<MediaInfo> {+ let cache = info_cache().lock().await;+ cache+ .get(url)+ .filter(|entry| entry.cached_at.elapsed() < INFO_CACHE_TTL)+ .map(|entry| entry.info.clone())+}++pub async fn prefetch_info(+ url: &str,+ downloader: &dyn PlatformDownloader,+ platform: &str,+ ytdlp_path: Option<&std::path::Path>,+) {+ prefetch_info_with_emit(url, downloader, platform, ytdlp_path, None).await;+}++pub async fn prefetch_info_with_emit(+ url: &str,+ downloader: &dyn PlatformDownloader,+ platform: &str,+ ytdlp_path: Option<&std::path::Path>,+ app: Option<tauri::AppHandle>,+) {+ let _timer_start = std::time::Instant::now();+ tracing::debug!("[perf] prefetch_info: started");+ let result = tokio::time::timeout(+ std::time::Duration::from_secs(15),+ fetch_and_cache_info(url, downloader, platform, ytdlp_path),+ )+ .await;+ match result {+ Ok(Ok(info)) => {+ tracing::debug!(+ "[perf] prefetch_info: completed in {:?} — {}",+ _timer_start.elapsed(),+ info.title+ );+ if let Some(app) = app {+ let preview = MediaPreviewEvent {+ url: url.to_string(),+ title: info.title.clone(),+ author: info.author.clone(),+ thumbnail_url: info.thumbnail_url.clone(),+ duration_seconds: info.duration_seconds,+ };+ let _ = app.emit("media-info-preview", preview);+ }+ }+ Ok(Err(e)) => tracing::warn!(+ "[perf] prefetch_info: failed in {:?} — {}",+ _timer_start.elapsed(),+ e+ ),+ Err(_) => tracing::warn!(+ "[perf] prefetch_info: timed out after {:?}",+ _timer_start.elapsed()+ ),+ }+}++pub async fn try_start_next(app: tauri::AppHandle, queue: Arc<tokio::sync::Mutex<DownloadQueue>>) {+ let _timer_start = std::time::Instant::now();+ let (next_ids, stagger, state_to_emit) = {+ let mut q = queue.lock().await;+ let ids = q.next_queued_ids();+ for nid in &ids {+ q.mark_active(*nid);+ }+ let state = if !ids.is_empty() {+ Some(q.get_state())+ } else {+ None+ };+ (ids, q.stagger_delay_ms, state)+ };++ if let Some(state) = state_to_emit {+ emit_queue_state_from_state(&app, state);+ }++ let batch_size = next_ids.len();+ for (i, nid) in next_ids.into_iter().enumerate() {+ let _ = app.emit(+ "queue-item-progress",+ &QueueItemProgress {+ id: nid,+ title: String::new(),+ platform: String::new(),+ percent: 0.0,+ speed_bytes_per_sec: 0.0,+ downloaded_bytes: 0,+ total_bytes: None,+ phase: "queued_starting".to_string(),+ eta_seconds: None,+ },+ );++ if i > 0 {+ let item_platform = {+ let q = queue.lock().await;+ q.items+ .iter()+ .find(|item| item.id == nid)+ .map(|item| item.platform.clone())+ };+ let delay_ms = if item_platform.as_deref() == Some("youtube") {+ 2000+ } else if batch_size > 3 {+ stagger.max(1000)+ } else {+ stagger+ };+ if delay_ms > 0 {+ tokio::time::sleep(std::time::Duration::from_millis(delay_ms)).await;+ }+ }+ let app_c = app.clone();+ let queue_c = queue.clone();+ tokio::spawn(async move {+ spawn_download(app_c, queue_c, nid).await;+ });+ }+ tracing::debug!("[perf] try_start_next took {:?}", _timer_start.elapsed());+}++// Periodic tick so a future-scheduled download still starts when its time+// arrives even if the queue is otherwise idle, and so a download with a+// stop time is cancelled when that time passes.+pub fn start_scheduler(app: tauri::AppHandle) {+ tauri::async_runtime::spawn(async move {+ tokio::time::sleep(std::time::Duration::from_secs(15)).await;+ loop {+ let state = app.state::<crate::AppState>();+ let queue = state.download_queue.clone();+ let (has_due, stopped_any) = {+ let q = queue.lock().await;+ let now = now_ms();+ let mut stopped = false;+ for item in &q.items {+ if item.status == QueueStatus::Active {+ if let Some(stop) = item.stop_at_ms {+ if now >= stop {+ item.cancel_token.cancel();+ stopped = true;+ }+ }+ }+ }+ let due = q.items.iter().any(|i| {+ i.status == QueueStatus::Queued+ && i.scheduled_at_ms.map(|t| now >= t).unwrap_or(false)+ });+ (due, stopped)+ };+ if has_due || stopped_any {+ try_start_next(app.clone(), queue.clone()).await;+ }+ tokio::time::sleep(std::time::Duration::from_secs(15)).await;+ }+ });+}++fn is_generic_title(title: &str) -> bool {+ let t = title.to_lowercase();+ let t = t.trim();+ t.is_empty()+ || t == "video"+ || t == "media"+ || t == "untitled"+ || t == "unknown"+ || t.starts_with("video [video]")+ || t.starts_with("media [media]")+}++#[cfg(test)]+mod kind_tests {+ use super::{kind_from_platform, QueueKind};++ #[test]+ fn youtube_and_video_platforms_map_to_video() {+ assert_eq!(kind_from_platform("youtube"), QueueKind::Video);+ assert_eq!(kind_from_platform("vimeo"), QueueKind::Video);+ assert_eq!(kind_from_platform("twitch"), QueueKind::Video);+ assert_eq!(kind_from_platform("bilibili"), QueueKind::Video);+ assert_eq!(kind_from_platform("tiktok"), QueueKind::Video);+ assert_eq!(kind_from_platform("instagram"), QueueKind::Video);+ assert_eq!(kind_from_platform("reddit"), QueueKind::Video);+ assert_eq!(kind_from_platform("bluesky"), QueueKind::Video);+ assert_eq!(kind_from_platform("generic_ytdlp"), QueueKind::Video);+ }++ #[test]+ fn audio_platforms() {+ assert_eq!(kind_from_platform("soundcloud"), QueueKind::Audio);+ assert_eq!(kind_from_platform("spotify"), QueueKind::Audio);+ }++ #[test]+ fn pinterest_is_image() {+ assert_eq!(kind_from_platform("pinterest"), QueueKind::Image);+ }++ #[test]+ fn pdf_kind() {+ assert_eq!(kind_from_platform("pdf"), QueueKind::Pdf);+ }++ #[test]+ fn book_platforms() {+ assert_eq!(kind_from_platform("annas_archive"), QueueKind::Book);+ assert_eq!(kind_from_platform("libgen"), QueueKind::Book);+ assert_eq!(kind_from_platform("gutendex"), QueueKind::Book);+ assert_eq!(kind_from_platform("book"), QueueKind::Book);+ }++ #[test]+ fn webpage_kind() {+ assert_eq!(kind_from_platform("webpage"), QueueKind::Webpage);+ assert_eq!(kind_from_platform("embed"), QueueKind::Webpage);+ }++ #[test]+ fn telegram_kind() {+ assert_eq!(kind_from_platform("telegram"), QueueKind::TelegramMedia);+ assert_eq!(+ kind_from_platform("telegram_media"),+ QueueKind::TelegramMedia+ );+ }++ #[test]+ fn course_lesson_kind() {+ assert_eq!(kind_from_platform("courses"), QueueKind::CourseLesson);+ assert_eq!(kind_from_platform("course_lesson"), QueueKind::CourseLesson);+ }++ #[test]+ fn generic_for_torrents_and_p2p() {+ assert_eq!(kind_from_platform("magnet"), QueueKind::Generic);+ assert_eq!(kind_from_platform("p2p"), QueueKind::Generic);+ assert_eq!(kind_from_platform("torrent"), QueueKind::Generic);+ }++ #[test]+ fn unknown_platform_falls_back_to_generic() {+ assert_eq!(kind_from_platform(""), QueueKind::Generic);+ assert_eq!(kind_from_platform("totally-unknown"), QueueKind::Generic);+ assert_eq!(kind_from_platform("xyz123"), QueueKind::Generic);+ }++ #[test]+ fn case_insensitive() {+ assert_eq!(kind_from_platform("YouTube"), QueueKind::Video);+ assert_eq!(kind_from_platform("TELEGRAM"), QueueKind::TelegramMedia);+ }+}diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rsindex 61ffbc9f..66f3e895 100644--- a/src-tauri/src/lib.rs+++ b/src-tauri/src/lib.rs@@ -415,27 +415,33 @@ pub fn run() {.handle().state::<std::sync::Arc<tokio::sync::RwLock<plugin_loader::PluginManager>>>();let mgr_for_plugins = std::sync::Arc::clone(&*plugin_mgr);+ let app_emit = app.handle().clone();std::thread::Builder::new().name("plugins-bootstrap".into()).spawn(move || {- {- let mut mgr = mgr_for_plugins.blocking_write();- mgr.load_all(std::sync::Arc::clone(&host));- }-let rt = match tokio::runtime::Runtime::new() {Ok(rt) => rt,Err(e) => {tracing::warn!("plugins-bootstrap runtime failed: {}", e);+ let mut mgr = mgr_for_plugins.blocking_write();+ mgr.load_all(host);return;}};rt.block_on(commands::plugins::ensure_default_plugins(std::sync::Arc::clone(&mgr_for_plugins),));+ rt.block_on(commands::plugins::auto_update_plugins(+ std::sync::Arc::clone(&mgr_for_plugins),+ ));- let mut mgr = mgr_for_plugins.blocking_write();- mgr.load_all(host);+ {+ let mut mgr = mgr_for_plugins.blocking_write();+ mgr.load_all(host);+ }++ use tauri::Emitter;+ let _ = app_emit.emit("plugins-changed", ());}).ok();}diff --git a/src-tauri/src/plugin_loader.rs b/src-tauri/src/plugin_loader.rsindex 82efa931..012107b8 100644--- a/src-tauri/src/plugin_loader.rs+++ b/src-tauri/src/plugin_loader.rs@@ -1,4 +1,4 @@-use std::collections::HashMap;+use std::collections::{HashMap, HashSet};use std::fs;use std::path::{Path, PathBuf};use std::sync::Arc;@@ -40,16 +40,19 @@ pub struct PluginManager {loaded: HashMap<String, LoadedPlugin>,installed: Vec<InstalledPlugin>,load_errors: HashMap<String, PluginLoadError>,+ user_removed: HashSet<String>,}impl PluginManager {pub fn new(plugins_dir: PathBuf) -> Self {let installed = load_installed_list(&plugins_dir);+ let user_removed = load_removed_list(&plugins_dir);Self {plugins_dir,loaded: HashMap::new(),installed,load_errors: HashMap::new(),+ user_removed,}}@@ -86,6 +89,35 @@ impl PluginManager {}}+ pub fn is_loaded(&self, id: &str) -> bool {+ self.loaded.contains_key(id)+ }++ pub fn load_one(+ &mut self,+ id: &str,+ host: Arc<dyn PluginHost>,+ ) -> Result<(), PluginLoadError> {+ let plugin_dir = self.plugins_dir.join(id);+ match load_single_plugin(&plugin_dir, host) {+ Ok(loaded) => {+ tracing::info!(+ "Loaded plugin at runtime: {} v{}",+ loaded.manifest.id,+ loaded.manifest.version+ );+ self.loaded.insert(id.to_string(), loaded);+ self.load_errors.remove(id);+ Ok(())+ }+ Err(e) => {+ tracing::warn!("Plugin {} not loaded ({}): {}", id, e.kind, e.message);+ self.load_errors.insert(id.to_string(), e.clone());+ Err(e)+ }+ }+ }+pub fn get(&self, id: &str) -> Option<&LoadedPlugin> {self.loaded.get(id)}@@ -133,11 +165,18 @@ impl PluginManager {}pub fn register_installed(&mut self, entry: InstalledPlugin) -> anyhow::Result<()> {+ if self.user_removed.remove(&entry.id) {+ let _ = save_removed_list(&self.plugins_dir, &self.user_removed);+ }self.installed.retain(|p| p.id != entry.id);self.installed.push(entry);self.save_installed()}+ pub fn is_user_removed(&self, id: &str) -> bool {+ self.user_removed.contains(id)+ }+pub fn unregister(&mut self, plugin_id: &str) -> anyhow::Result<()> {if let Some(mut loaded) = self.loaded.remove(plugin_id) {loaded.plugin.shutdown();@@ -148,6 +187,9 @@ impl PluginManager {self.installed.retain(|p| p.id != plugin_id);self.save_installed()?;+ self.user_removed.insert(plugin_id.to_string());+ save_removed_list(&self.plugins_dir, &self.user_removed)?;+let plugin_dir = self.plugins_dir.join(plugin_id);if plugin_dir.exists() {fs::remove_dir_all(&plugin_dir)?;@@ -327,3 +369,37 @@ fn save_installed_list(plugins_dir: &Path, plugins: &[InstalledPlugin]) -> anyhofs::write(&path, content)?;Ok(())}++fn load_removed_list(plugins_dir: &Path) -> HashSet<String> {+ let path = plugins_dir.join("removed-plugins.json");+ let content = match fs::read_to_string(&path) {+ Ok(c) => c,+ Err(_) => return HashSet::new(),+ };+ #[derive(serde::Deserialize)]+ struct RemovedFile {+ #[serde(default)]+ removed: Vec<String>,+ }+ match serde_json::from_str::<RemovedFile>(&content) {+ Ok(f) => f.removed.into_iter().collect(),+ Err(e) => {+ tracing::warn!("[plugins] cannot parse removed-plugins.json: {e}");+ HashSet::new()+ }+ }+}++fn save_removed_list(plugins_dir: &Path, removed: &HashSet<String>) -> anyhow::Result<()> {+ fs::create_dir_all(plugins_dir)?;+ let path = plugins_dir.join("removed-plugins.json");+ #[derive(serde::Serialize)]+ struct RemovedFile<'a> {+ removed: Vec<&'a String>,+ }+ let mut list: Vec<&String> = removed.iter().collect();+ list.sort();+ let content = serde_json::to_string_pretty(&RemovedFile { removed: list })?;+ fs::write(&path, content)?;+ Ok(())+}diff --git a/src/app.css b/src/app.cssindex b39d2441..d32aa57e 100644--- a/src/app.css+++ b/src/app.css@@ -1,1276 +1,1270 @@-@import './lib/style/buttons.css';-@import './lib/style/settings.css';-@import '@fontsource-variable/bricolage-grotesque';-@import '@fontsource/inter/400.css';-@import '@fontsource/inter/500.css';-@import '@fontsource/inter/600.css';-@import '@fontsource/dm-sans/400.css';-@import '@fontsource/dm-sans/500.css';-@import '@fontsource/dm-sans/600.css';-@import '@fontsource/ibm-plex-mono/400.css';-@import '@fontsource/ibm-plex-mono/500.css';--/*- * OmniGet design tokens.- * Source of truth: docs/design-system.md.- *- * Spacing/type/radius/elevation/motion are global (don't change per theme).- * Colors override per [data-theme="..."] block.- * Legacy aliases (--padding, --border-radius, --button*, --primary, etc.)- * remain functional pointing at the new tokens; they go away one PR at a time.- */--:root {- --space-0: 0;- --space-1: 4px;- --space-2: 8px;- --space-3: 12px;- --space-4: 16px;- --space-5: 24px;- --space-6: 32px;- --space-7: 48px;- --space-8: 64px;- --space-9: 96px;-- --text-xs: 12px; --leading-xs: 1.45;- --text-sm: 13px; --leading-sm: 1.5;- --text-base: 14px; --leading-base: 1.55;- --text-md: 15px; --leading-md: 1.5;- --text-lg: 17px; --leading-lg: 1.4;- --text-xl: 20px; --leading-xl: 1.35;- --text-2xl: 26px; --leading-2xl: 1.25;- --text-3xl: 34px; --leading-3xl: 1.15;- --text-display: 48px; --leading-display: 1.05;-- --radius-xs: 6px;- --radius-sm: 10px;- --radius-md: 14px;- --radius-lg: 20px;- --radius-xl: 28px;- --radius-full: 9999px;-- --elev-0: none;- --elev-1:- 0 1px 2px rgba(0, 0, 0, 0.4),- 0 0 0 1px rgba(255, 255, 255, 0.04);- --elev-2:- 0 4px 12px rgba(0, 0, 0, 0.45),- 0 1px 2px rgba(0, 0, 0, 0.4),- 0 0 0 1px rgba(255, 255, 255, 0.06);- --elev-3:- 0 24px 48px rgba(0, 0, 0, 0.55),- 0 8px 16px rgba(0, 0, 0, 0.4),- 0 0 0 1px rgba(255, 255, 255, 0.08);- --elev-glow:- 0 0 0 1px var(--accent),- 0 4px 16px var(--accent-glow),- 0 0 24px var(--accent-glow);-- --duration-fast: 120ms;- --duration-base: 200ms;- --duration-slow: 320ms;- --duration-bounce: 480ms;- --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);- --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);-- --font-display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;- --font-body: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;- --font-mono: 'IBM Plex Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Noto Sans Mono', 'Ubuntu Mono', 'Courier New', monospace;- --font-system: var(--font-body);-- --padding: var(--space-3);- --border-radius: var(--radius-sm);- --sidebar-width: 80px;- --bottom-nav-height: 44px;- --mobile-nav-clearance: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + var(--padding));- --safe-area-top: env(safe-area-inset-top, 0px);- --safe-area-right: env(safe-area-inset-right, 0px);- --safe-area-bottom: env(safe-area-inset-bottom, 0px);- --safe-area-left: env(safe-area-inset-left, 0px);-- font-family: var(--font-body);- font-size: var(--text-base);- line-height: var(--leading-base);- font-weight: 400;- font-synthesis: none;- text-rendering: optimizeLegibility;- -webkit-font-smoothing: antialiased;- -moz-osx-font-smoothing: grayscale;- font-feature-settings: "ss01", "cv11";-}--[data-display],-.display {- font-family: var(--font-display);- letter-spacing: -0.01em;-}--[data-surface="notes"] {- --font-display: var(--font-body);- --leading-base: 1.65;-}-[data-surface="notes"] .tiptap {- font-family: var(--font-body);- font-size: var(--text-base);- line-height: var(--leading-base);- color: var(--text);-}-[data-surface="notes"] .tiptap > * + * {- margin-top: var(--space-2);-}-[data-surface="notes"] .tiptap h1 {- font-family: var(--font-body);- font-size: var(--text-2xl);- line-height: var(--leading-2xl);- font-weight: 700;- letter-spacing: -0.01em;- margin-top: var(--space-5);-}-[data-surface="notes"] .tiptap h2 {- font-family: var(--font-body);- font-size: var(--text-xl);- line-height: var(--leading-xl);- font-weight: 700;- letter-spacing: -0.01em;- margin-top: var(--space-4);-}-[data-surface="notes"] .tiptap h3 {- font-family: var(--font-body);- font-size: var(--text-lg);- line-height: var(--leading-lg);- font-weight: 600;- margin-top: var(--space-3);-}-[data-surface="notes"] .tiptap p {- margin: 0;-}-[data-surface="notes"] .tiptap ul,-[data-surface="notes"] .tiptap ol {- padding-left: var(--space-5);- margin: 0;-}-[data-surface="notes"] .tiptap blockquote {- border-left: 3px solid var(--accent);- padding-left: var(--space-3);- color: var(--secondary);- margin: 0;-}-[data-surface="notes"] .tiptap pre {- background: color-mix(in oklab, var(--input-border) 30%, transparent);- border-radius: var(--border-radius);- padding: var(--space-3);- font-family: var(--font-mono);- font-size: var(--text-sm);- overflow-x: auto;- margin: 0;-}-[data-surface="notes"] .tiptap code {- background: color-mix(in oklab, var(--accent) 8%, transparent);- padding: 1px 5px;- border-radius: 4px;- font-family: var(--font-mono);- font-size: 0.95em;-}-[data-surface="notes"] .tiptap pre code {- background: transparent;- padding: 0;- font-size: inherit;-}-[data-surface="notes"] .tiptap hr {- border: 0;- border-top: 1px solid var(--input-border);- margin: var(--space-4) 0;-}-[data-surface="notes"] .tiptap ul[data-type="taskList"] {- list-style: none;- padding-left: 0;-}-[data-surface="notes"] .tiptap ul[data-type="taskList"] li {- display: flex;- gap: var(--space-2);- align-items: baseline;-}-[data-surface="notes"] .tiptap ul[data-type="taskList"] li > label {- flex: 0 0 auto;-}-[data-surface="notes"] .tiptap ul[data-type="taskList"] li > div {- flex: 1 1 auto;-}-[data-surface="notes"] .tiptap:focus-visible {- outline: none;-}-[data-surface="notes"] .tiptap p.is-editor-empty:first-child::before {- content: attr(data-placeholder);- color: var(--tertiary);- pointer-events: none;- float: left;- height: 0;-}-[data-surface="notes"] .tiptap h4 {- font-family: var(--font-body);- font-size: var(--text-md);- font-weight: 600;- margin-top: var(--space-3);-}-[data-surface="notes"] .tiptap h5 {- font-family: var(--font-body);- font-size: var(--text-base);- font-weight: 600;- margin-top: var(--space-2);-}-[data-surface="notes"] .tiptap h6 {- font-family: var(--font-body);- font-size: var(--text-sm);- font-weight: 600;- text-transform: uppercase;- letter-spacing: 0.04em;- color: var(--secondary);- margin-top: var(--space-2);-}-[data-surface="notes"] .tiptap img {- max-width: 100%;- height: auto;- border-radius: var(--border-radius);- display: block;-}-[data-surface="notes"] .tiptap .tiptap-table {- border-collapse: collapse;- table-layout: fixed;- width: 100%;- overflow: hidden;- margin: 0;-}-[data-surface="notes"] .tiptap .tiptap-table th,-[data-surface="notes"] .tiptap .tiptap-table td {- border: 1px solid var(--input-border);- padding: var(--space-2);- vertical-align: top;- position: relative;- min-width: 1em;-}-[data-surface="notes"] .tiptap .tiptap-table th {- background: color-mix(in oklab, var(--input-border) 30%, transparent);- font-weight: 600;- text-align: left;-}-[data-surface="notes"] .tiptap .tiptap-callout {- display: flex;- gap: var(--space-2);- padding: var(--space-3);- border-radius: var(--border-radius);- border-left: 3px solid;- background: color-mix(in oklab, var(--accent) 6%, transparent);- margin: 0;-}-[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="note"] {- border-left-color: var(--accent);-}-[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="tip"] {- border-left-color: var(--success, #2ecc71);- background: color-mix(in oklab, var(--success, #2ecc71) 8%, transparent);-}-[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="important"] {- border-left-color: var(--accent);- background: color-mix(in oklab, var(--accent) 12%, transparent);-}-[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="warning"] {- border-left-color: var(--warning, #e67e22);- background: color-mix(in oklab, var(--warning, #e67e22) 8%, transparent);-}-[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="caution"] {- border-left-color: var(--error, #e74c3c);- background: color-mix(in oklab, var(--error, #e74c3c) 8%, transparent);-}-[data-surface="notes"] .tiptap .tiptap-callout-icon {- flex: 0 0 auto;- font-size: var(--text-lg);- user-select: none;-}-[data-surface="notes"] .tiptap .tiptap-callout-body {- flex: 1 1 auto;- display: flex;- flex-direction: column;- gap: var(--space-2);-}-[data-surface="notes"] .tiptap .tiptap-callout-body > * + * {- margin-top: var(--space-2);-}-[data-surface="notes"] .tiptap .Tiptap-mathematics-render {- display: inline-block;- padding: 0 var(--space-1);-}-[data-surface="notes"] .tiptap .Tiptap-mathematics-editor {- font-family: var(--font-mono);- font-size: var(--text-sm);- background: color-mix(in oklab, var(--input-border) 30%, transparent);- padding: 1px 4px;- border-radius: 3px;-}-[data-surface="notes"] .tiptap .tiptap-page-mention {- display: inline-block;- padding: 0 4px;- background: color-mix(in oklab, var(--accent) 14%, transparent);- color: var(--accent);- border-radius: 4px;- font-size: 0.95em;- cursor: pointer;- transition: background 120ms ease;-}-[data-surface="notes"] .tiptap .tiptap-page-mention:hover {- background: color-mix(in oklab, var(--accent) 24%, transparent);-}-[data-surface="notes"] .tiptap .tiptap-page-mention::before {- content: "[[";- opacity: 0.4;- margin-right: 2px;-}-[data-surface="notes"] .tiptap .tiptap-page-mention::after {- content: "]]";- opacity: 0.4;- margin-left: 2px;-}-[data-surface="notes"] .tiptap .tiptap-tag-mention {- display: inline-block;- padding: 0 4px;- background: color-mix(in oklab, var(--secondary) 14%, transparent);- color: var(--secondary);- border-radius: 999px;- font-size: 0.9em;- font-weight: 500;- cursor: pointer;-}-[data-surface="notes"] .tiptap .tiptap-tag-mention::before {- content: "#";- opacity: 0.6;- margin-right: 1px;-}-[data-surface="notes"] .tiptap .tiptap-query-block {- margin: var(--space-2) 0;- user-select: none;-}-[data-surface="notes"] .tiptap .tiptap-query-block.ProseMirror-selectednode {- outline: 2px solid var(--accent);- outline-offset: 2px;- border-radius: var(--border-radius);-}-[data-surface="notes"] .tiptap .tiptap-embed-block {- margin: var(--space-2) 0;- user-select: none;-}-[data-surface="notes"] .tiptap .tiptap-embed-block.ProseMirror-selectednode {- outline: 2px solid var(--accent);- outline-offset: 2px;- border-radius: var(--border-radius);-}--.page-title {- font-family: var(--font-display);- font-size: var(--text-3xl);- line-height: var(--leading-3xl);- font-weight: 600;- letter-spacing: -0.02em;- color: var(--text);- margin: 0 0 var(--space-5) 0;-}--.section-title {- font-family: var(--font-display);- font-size: var(--text-lg);- line-height: var(--leading-lg);- font-weight: 600;- letter-spacing: -0.01em;- color: var(--text);- text-transform: none;- margin: 0 0 var(--space-3) 0;-}--.eyebrow {- font-family: var(--font-body);- font-size: var(--text-xs);- font-weight: 600;- text-transform: uppercase;- letter-spacing: 0.08em;- color: var(--text-muted);- margin-bottom: var(--space-2);-}--::selection {- background: var(--accent-soft);- color: var(--text);-}--/*- * Semantic token system (18 tokens, intended path-forward).- * Each per-theme block below still defines the legacy concrete tokens- * (--primary, --secondary, --button, etc.) for backwards compatibility.- * The semantic tokens below alias them and survive theme switches.- *- * surface roles: --bg, --surface, --surface-hi- * text levels: --text, --text-muted, --text-dim- * lines: --border, --focus-ring (theme-defined)- * brand & cta: --accent, --on-accent, --cta, --on-cta- * status: --info, --success, --warning, --danger, --on-status- *- * Interaction states are computed at the call site, NOT stored:- * :hover -> color-mix(in srgb, var(--surface) 92%, var(--bg-overlay))- * :active -> color-mix(in srgb, var(--surface) 86%, var(--bg-overlay))- * --bg-overlay is white in dark themes, black in light themes.- */--:root {- --bg-overlay: white;-}--:root, [data-theme] {- --bg: var(--primary);- --surface: var(--button);- --surface-hi: var(--button-elevated);- --surface-mut: color-mix(in srgb, var(--button) 70%, var(--primary));- --text: var(--secondary);- --text-muted: color-mix(in srgb, var(--secondary) 65%, var(--tertiary));- --text-dim: var(--tertiary);- --border: var(--content-border);- --border-hi: color-mix(in srgb, var(--secondary) 14%, transparent);- --accent-hi: color-mix(in srgb, var(--accent) 88%, white);- --accent-lo: color-mix(in srgb, var(--accent) 88%, black);- --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);- --accent-glow: color-mix(in srgb, var(--accent) 25%, transparent);- --info: var(--cta);- --danger: var(--error);- --on-status: #ffffff;- --on-warning: #1a1a1a;-}--[data-theme="light"],-[data-theme="catppuccin-latte"],-[data-theme="eink-day"],-[data-theme="eink-sepia"],-[data-theme="nyxvamp-radiance"] {- --bg-overlay: black;-}--:root, [data-theme="dark"] {- color-scheme: dark;- --primary: #0a0a0a;- --secondary: #e8e8e8;- --tertiary: #999999;-- --accent: #FF7D38;- --success: #2E9B5A;- --error: #ff4757;- --warning: #f59e0b;-- --button: #1a1a1a;- --button-hover: #2a2a2a;- --button-press: #3a3a3a;- --button-text: var(--secondary);- --button-stroke: rgba(255, 255, 255, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;-- --button-elevated: #252525;- --button-elevated-hover: #323232;- --button-elevated-press: #3a3a3a;-- --sidebar-bg: #0f0f0f;- --sidebar-highlight: #1f1f1f;- --content-border: rgba(255, 255, 255, 0.08);- --input-border: #3a3a3a;- --input-bg: #1a1a1a;-- --popup-bg: #1a1a1a;- --dialog-backdrop: rgba(0, 0, 0, 0.6);-- --on-primary: var(--secondary);- --on-accent: #ffffff;- --on-success: #ffffff;- --on-error: #ffffff;- --on-button: var(--button-text);- --on-button-elevated: var(--secondary);-- --blue: var(--accent);- --red: var(--error);- --green: var(--success);- --orange: var(--warning);-- --gray: var(--tertiary);-- --cta: #2D9CDB;- --cta-hover: #2690CC;- --cta-press: #1E7FB8;- --on-cta: #ffffff;-- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;-- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="light"] {- color-scheme: light;- --primary: #fafafa;- --secondary: #1a1a1a;- --tertiary: #595959;-- --accent: #E05500;- --success: #1a7a3a;- --error: #c41e3a;- --warning: #c47a06;-- --button: #eaeaea;- --button-hover: #dfdfdf;- --button-press: #d2d2d2;- --button-text: var(--secondary);- --button-stroke: rgba(0, 0, 0, 0.10);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;-- --button-elevated: #e0e0e0;- --button-elevated-hover: #d4d4d4;- --button-elevated-press: #c8c8c8;-- --sidebar-bg: #f0f0f0;- --sidebar-highlight: #e4e4e4;- --content-border: rgba(0, 0, 0, 0.10);- --input-border: #a0a0a0;- --input-bg: #ffffff;-- --popup-bg: #ffffff;- --dialog-backdrop: rgba(0, 0, 0, 0.4);-- --on-primary: var(--secondary);- --on-accent: #ffffff;- --on-success: #ffffff;- --on-error: #ffffff;- --on-button: var(--button-text);- --on-button-elevated: var(--secondary);-- --blue: var(--accent);- --red: var(--error);- --green: var(--success);- --orange: var(--warning);-- --gray: var(--tertiary);-- --cta: #1A8AC4;- --cta-hover: #1578B0;- --cta-press: #126A9E;- --on-cta: #ffffff;-- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;-- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="catppuccin-mocha"] {- color-scheme: dark;- --primary: #1e1e2e;- --secondary: #cdd6f4;- --tertiary: #a6adc8;- --accent: #89b4fa;- --success: #a6e3a1;- --error: #f38ba8;- --warning: #f9e2af;- --button: #313244;- --button-hover: #45475a;- --button-press: #585b70;- --button-text: #cdd6f4;- --button-stroke: rgba(205, 214, 244, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #45475a;- --button-elevated-hover: #585b70;- --button-elevated-press: #6c7086;- --sidebar-bg: #181825;- --sidebar-highlight: #313244;- --content-border: rgba(205, 214, 244, 0.08);- --input-border: #585b70;- --input-bg: #313244;- --popup-bg: #313244;- --dialog-backdrop: rgba(17, 17, 27, 0.7);- --on-primary: #cdd6f4;- --on-accent: #1e1e2e;- --on-success: #1e1e2e;- --on-error: #1e1e2e;- --on-button: #cdd6f4;- --on-button-elevated: #cdd6f4;- --blue: #89b4fa;- --red: #f38ba8;- --green: #a6e3a1;- --orange: #fab387;- --gray: #a6adc8;- --cta: #89b4fa;- --cta-hover: #74c7ec;- --cta-press: #89dceb;- --on-cta: #1e1e2e;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="catppuccin-macchiato"] {- color-scheme: dark;- --primary: #24273a;- --secondary: #cad3f5;- --tertiary: #a5adcb;- --accent: #8aadf4;- --success: #a6da95;- --error: #ed8796;- --warning: #eed49f;- --button: #363a4f;- --button-hover: #494d64;- --button-press: #5b6078;- --button-text: #cad3f5;- --button-stroke: rgba(202, 211, 245, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #494d64;- --button-elevated-hover: #5b6078;- --button-elevated-press: #6e738d;- --sidebar-bg: #1e2030;- --sidebar-highlight: #363a4f;- --content-border: rgba(202, 211, 245, 0.08);- --input-border: #5b6078;- --input-bg: #363a4f;- --popup-bg: #363a4f;- --dialog-backdrop: rgba(24, 25, 38, 0.7);- --on-primary: #cad3f5;- --on-accent: #24273a;- --on-success: #24273a;- --on-error: #24273a;- --on-button: #cad3f5;- --on-button-elevated: #cad3f5;- --blue: #8aadf4;- --red: #ed8796;- --green: #a6da95;- --orange: #f5a97f;- --gray: #a5adcb;- --cta: #8aadf4;- --cta-hover: #7dc4e4;- --cta-press: #91d7e3;- --on-cta: #24273a;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="catppuccin-frappe"] {- color-scheme: dark;- --primary: #303446;- --secondary: #c6d0f5;- --tertiary: #c3cdf1;- --accent: #8caaee;- --success: #a6d189;- --error: #e78284;- --warning: #e5c890;- --button: #414559;- --button-hover: #51576d;- --button-press: #626880;- --button-text: #c6d0f5;- --button-stroke: rgba(198, 208, 245, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #51576d;- --button-elevated-hover: #626880;- --button-elevated-press: #737994;- --sidebar-bg: #292c3c;- --sidebar-highlight: #414559;- --content-border: rgba(198, 208, 245, 0.08);- --input-border: #626880;- --input-bg: #414559;- --popup-bg: #414559;- --dialog-backdrop: rgba(35, 38, 52, 0.7);- --on-primary: #c6d0f5;- --on-accent: #303446;- --on-success: #303446;- --on-error: #303446;- --on-button: #c6d0f5;- --on-button-elevated: #c6d0f5;- --blue: #8caaee;- --red: #e78284;- --green: #a6d189;- --orange: #ef9f76;- --gray: #a5adce;- --cta: #8caaee;- --cta-hover: #85c1dc;- --cta-press: #99d1db;- --on-cta: #303446;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="catppuccin-latte"] {- color-scheme: light;- --primary: #eff1f5;- --secondary: #4c4f69;- --tertiary: #3e4159;- --accent: #1e66f5;- --success: #40a02b;- --error: #d20f39;- --warning: #df8e1d;- --button: #ccd0da;- --button-hover: #bcc0cc;- --button-press: #acb0be;- --button-text: #4c4f69;- --button-stroke: rgba(76, 79, 105, 0.10);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #bcc0cc;- --button-elevated-hover: #acb0be;- --button-elevated-press: #9ca0b0;- --sidebar-bg: #e6e9ef;- --sidebar-highlight: #ccd0da;- --content-border: rgba(76, 79, 105, 0.10);- --input-border: #9ca0b0;- --input-bg: #ffffff;- --popup-bg: #ffffff;- --dialog-backdrop: rgba(220, 224, 232, 0.5);- --on-primary: #4c4f69;- --on-accent: #ffffff;- --on-success: #ffffff;- --on-error: #ffffff;- --on-button: #4c4f69;- --on-button-elevated: #4c4f69;- --blue: #1e66f5;- --red: #d20f39;- --green: #40a02b;- --orange: #fe640b;- --gray: #6c6f85;- --cta: #1e66f5;- --cta-hover: #209fb5;- --cta-press: #04a5e5;- --on-cta: #ffffff;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="one-dark-pro"] {- color-scheme: dark;- --primary: #282c34;- --secondary: #abb2bf;- --tertiary: #a9b0bd;- --accent: #61afef;- --success: #98c379;- --error: #e06c75;- --warning: #e5c07b;- --button: #2c313a;- --button-hover: #3e4452;- --button-press: #4b5263;- --button-text: #abb2bf;- --button-stroke: rgba(171, 178, 191, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #3e4452;- --button-elevated-hover: #4b5263;- --button-elevated-press: #5c6370;- --sidebar-bg: #21252b;- --sidebar-highlight: #2c313a;- --content-border: rgba(171, 178, 191, 0.08);- --input-border: #3e4452;- --input-bg: #1d1f23;- --popup-bg: #2c313a;- --dialog-backdrop: rgba(0, 0, 0, 0.6);- --on-primary: #abb2bf;- --on-accent: #282c34;- --on-success: #282c34;- --on-error: #282c34;- --on-button: #abb2bf;- --on-button-elevated: #abb2bf;- --blue: #61afef;- --red: #e06c75;- --green: #98c379;- --orange: #d19a66;- --gray: #7f849c;- --cta: #61afef;- --cta-hover: #528bcc;- --cta-press: #4678a8;- --on-cta: #282c34;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="dracula"] {- color-scheme: dark;- --primary: #22212C;- --secondary: #F8F8F2;- --tertiary: #b6b1cc;- --accent: #9580FF;- --success: #8AFF80;- --error: #FF9580;- --warning: #FFCA80;- --button: #2B2640;- --button-hover: #424450;- --button-press: #504C67;- --button-text: #F8F8F2;- --button-stroke: rgba(248, 248, 242, 0.12);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #424450;- --button-elevated-hover: #504C67;- --button-elevated-press: #5E5A76;- --sidebar-bg: #151320;- --sidebar-highlight: #2B2640;- --content-border: rgba(149, 128, 255, 0.12);- --input-border: #373252;- --input-bg: #151320;- --popup-bg: #2B2640;- --dialog-backdrop: rgba(11, 10, 16, 0.75);- --on-primary: #F8F8F2;- --on-accent: #FFFFFF;- --on-success: #151320;- --on-error: #FFFFFF;- --on-button: #F8F8F2;- --on-button-elevated: #F8F8F2;- --blue: #9580FF;- --red: #FF9580;- --green: #8AFF80;- --orange: #FFCA80;- --gray: #7970A9;- --cta: #9580FF;- --cta-hover: #AA99FF;- --cta-press: #7A6BE6;- --on-cta: #FFFFFF;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="nyxvamp-veil"] {- color-scheme: dark;- --primary: #1E1E2E;- --secondary: #D9E0EE;- --tertiary: #9594ab;- --accent: #F5C2E7;- --success: #ABE9B3;- --error: #E78284;- --warning: #F8BD96;- --button: #2E2E3E;- --button-hover: #494D64;- --button-press: #5A5E74;- --button-text: #D9E0EE;- --button-stroke: rgba(217, 224, 238, 0.10);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #302D41;- --button-elevated-hover: #494D64;- --button-elevated-press: #5A5E74;- --sidebar-bg: #181828;- --sidebar-highlight: #302D41;- --content-border: rgba(217, 224, 238, 0.06);- --input-border: #6E6A86;- --input-bg: #1E1E2E;- --popup-bg: #302D41;- --dialog-backdrop: rgba(10, 10, 20, 0.7);- --on-primary: #D9E0EE;- --on-accent: #1E1E2E;- --on-success: #1E1E2E;- --on-error: #1E1E2E;- --on-button: #D9E0EE;- --on-button-elevated: #D9E0EE;- --blue: #96CDFB;- --red: #E78284;- --green: #ABE9B3;- --orange: #F8BD96;- --gray: #6E6A86;- --cta: #F5C2E7;- --cta-hover: #F8D7ED;- --cta-press: #E8A8D4;- --on-cta: #1E1E2E;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="nyxvamp-obsidian"] {- color-scheme: dark;- --primary: #000A0F;- --secondary: #C0C0CE;- --tertiary: #87859b;- --accent: #F5C2E7;- --success: #8FBF8F;- --error: #D78284;- --warning: #D8A080;- --button: #1E1E20;- --button-hover: #2E2E30;- --button-press: #3E3E42;- --button-text: #C0C0CE;- --button-stroke: rgba(192, 192, 206, 0.08);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #1E1E20;- --button-elevated-hover: #2E2E30;- --button-elevated-press: #3E3E42;- --sidebar-bg: #050810;- --sidebar-highlight: #1E1E20;- --content-border: rgba(192, 192, 206, 0.05);- --input-border: #5E5A76;- --input-bg: #000A0F;- --popup-bg: #1E1E20;- --dialog-backdrop: rgba(0, 0, 0, 0.85);- --on-primary: #C0C0CE;- --on-accent: #000A0F;- --on-success: #000A0F;- --on-error: #000A0F;- --on-button: #C0C0CE;- --on-button-elevated: #C0C0CE;- --blue: #7FAFD7;- --red: #D78284;- --green: #8FBF8F;- --orange: #D8A080;- --gray: #5E5A76;- --cta: #F5C2E7;- --cta-hover: #F8D7ED;- --cta-press: #E0A8D0;- --on-cta: #000A0F;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="nyxvamp-radiance"] {- color-scheme: light;- --primary: #F7F7FF;- --secondary: #1E1E2E;- --tertiary: #5A5570;- --accent: #9655FF;- --success: #005F87;- --error: #9F1239;- --warning: #B8860B;- --button: #E8E8F0;- --button-hover: #DDDDE8;- --button-press: #D0D0E0;- --button-text: #1E1E2E;- --button-stroke: rgba(30, 30, 46, 0.10);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #E8D5FF;- --button-elevated-hover: #DCCAF5;- --button-elevated-press: #D0BFEB;- --sidebar-bg: #E8E8F0;- --sidebar-highlight: #E8D5FF;- --content-border: rgba(30, 30, 46, 0.08);- --input-border: #5A5570;- --input-bg: #E8E8F0;- --popup-bg: #F7F7FF;- --dialog-backdrop: rgba(90, 85, 112, 0.3);- --on-primary: #1E1E2E;- --on-accent: #F7F7FF;- --on-success: #F7F7FF;- --on-error: #F7F7FF;- --on-button: #1E1E2E;- --on-button-elevated: #1E1E2E;- --blue: #9655FF;- --red: #9F1239;- --green: #005F87;- --orange: #C2410C;- --gray: #5A5570;- --cta: #9655FF;- --cta-hover: #6B46C1;- --cta-press: #5A3AAF;- --on-cta: #F7F7FF;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="eink-day"] {- color-scheme: light;- --primary: #f5f2ea;- --secondary: #1d1d1b;- --tertiary: #5c5a56;- --accent: #2b2b28;- --success: #3d6e3d;- --error: #8a2a2a;- --warning: #8a5a1d;- --button: #ebe5d7;- --button-hover: #dfd6c2;- --button-press: #d1c8ae;- --button-text: var(--secondary);- --button-stroke: rgba(29, 29, 27, 0.15);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #ebe5d7;- --button-elevated-hover: #dfd6c2;- --button-elevated-press: #d1c8ae;- --sidebar-bg: #ebe5d7;- --sidebar-highlight: #dfd6c2;- --content-border: rgba(29, 29, 27, 0.14);- --input-border: #c8bfa7;- --input-bg: #ebe5d7;- --popup-bg: #f5f2ea;- --dialog-backdrop: rgba(29, 29, 27, 0.35);- --on-primary: var(--secondary);- --on-accent: #f5f2ea;- --on-success: #f5f2ea;- --on-error: #f5f2ea;- --on-button: var(--secondary);- --on-button-elevated: var(--secondary);- --blue: #2b2b28;- --red: #8a2a2a;- --green: #3d6e3d;- --orange: #8a5a1d;- --gray: var(--tertiary);- --cta: #2b2b28;- --cta-hover: #1d1d1b;- --cta-press: #141412;- --on-cta: #f5f2ea;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="eink-sepia"] {- color-scheme: light;- --primary: #f0e6d2;- --secondary: #3f2e20;- --tertiary: #6e5440;- --accent: #7a4a22;- --success: #3d6e3d;- --error: #8a2a2a;- --warning: #8a5a1d;- --button: #e6dcc3;- --button-hover: #dccca8;- --button-press: #c9b98d;- --button-text: var(--secondary);- --button-stroke: rgba(63, 46, 32, 0.15);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #e6dcc3;- --button-elevated-hover: #dccca8;- --button-elevated-press: #c9b98d;- --sidebar-bg: #e6dcc3;- --sidebar-highlight: #dccca8;- --content-border: rgba(63, 46, 32, 0.14);- --input-border: #c6b993;- --input-bg: #e6dcc3;- --popup-bg: #f0e6d2;- --dialog-backdrop: rgba(63, 46, 32, 0.35);- --on-primary: var(--secondary);- --on-accent: #f0e6d2;- --on-success: #f0e6d2;- --on-error: #f0e6d2;- --on-button: var(--secondary);- --on-button-elevated: var(--secondary);- --blue: #7a4a22;- --red: #8a2a2a;- --green: #3d6e3d;- --orange: #8a5a1d;- --gray: var(--tertiary);- --cta: #7a4a22;- --cta-hover: #5b3418;- --cta-press: #452710;- --on-cta: #f0e6d2;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--[data-theme="eink-night"] {- color-scheme: dark;- --primary: #0a0a0a;- --secondary: #d4d4d0;- --tertiary: #8e8e88;- --accent: #b0b0ab;- --success: #7eaa7e;- --error: #c96060;- --warning: #d0a060;- --button: #121212;- --button-hover: #1c1c1c;- --button-press: #262626;- --button-text: var(--secondary);- --button-stroke: rgba(212, 212, 208, 0.10);- --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;- --button-elevated: #121212;- --button-elevated-hover: #1c1c1c;- --button-elevated-press: #262626;- --sidebar-bg: #121212;- --sidebar-highlight: #1c1c1c;- --content-border: rgba(212, 212, 208, 0.10);- --input-border: #2c2c2c;- --input-bg: #121212;- --popup-bg: #121212;- --dialog-backdrop: rgba(0, 0, 0, 0.6);- --on-primary: var(--secondary);- --on-accent: #0a0a0a;- --on-success: #0a0a0a;- --on-error: #0a0a0a;- --on-button: var(--secondary);- --on-button-elevated: var(--secondary);- --blue: #b0b0ab;- --red: #c96060;- --green: #7eaa7e;- --orange: #d0a060;- --gray: var(--tertiary);- --cta: #d4d4d0;- --cta-hover: #c0c0bc;- --cta-press: #a8a8a4;- --on-cta: #0a0a0a;- --focus-ring: solid 2px var(--accent);- --focus-ring-offset: 2px;- color: var(--secondary);- background-color: var(--primary);-}--*,-*::before,-*::after {- margin: 0;- padding: 0;- box-sizing: border-box;- user-select: auto;- scrollbar-width: none;-}--::-webkit-scrollbar {- display: none;-}--.button, img, svg, [data-no-select] {- user-select: none;-}--body {- min-height: 100vh;- overflow: hidden;- background-color: var(--primary);-}--h1, h2, h3, h4, h5, h6 {- font-weight: 500;- margin-block: 0;-}--h1 { font-size: 24px; letter-spacing: -1px; }-h2 { font-size: 20px; letter-spacing: -1px; }-h3 { font-size: 16px; }-h4 { font-size: 14.5px; }-h5 { font-size: 12px; }-h6 { font-size: 11px; }--a {- color: inherit;- text-decoration: none;-}--button {- font-family: inherit;- cursor: pointer;- border: none;- background: none;- color: inherit;-}--input, textarea {- font-family: inherit;- border: none;- outline: none;- background: none;- color: inherit;- user-select: text;-}--select {- font-family: inherit;- color: var(--secondary);- background-color: var(--input-bg);-}--option {- color: var(--secondary);- background-color: var(--input-bg);-}--img, svg {- pointer-events: none;-}--.button {- font-size: 14.5px;- font-weight: 500;- padding: var(--padding);- border-radius: var(--border-radius);- background: var(--button);- color: var(--button-text);- box-shadow: var(--button-box-shadow);- border: none;- cursor: pointer;-}--@media (hover: hover) {- .button:hover {- background: var(--button-hover);- }-}--.button:active {- background: var(--button-press);-}--.button:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);-}--.button.elevated {- background: var(--button-elevated);- box-shadow: none;-}--@media (hover: hover) {- .button.elevated:hover {- background: var(--button-elevated-hover);- }-}--.button.elevated:active {- background: var(--button-elevated-press);-}--.button.active {- background: var(--secondary);- color: var(--primary);-}--.button:disabled {- cursor: default;-}--/* Hide WebView2 / Edge / Chromium native video controls (we use custom UI in PlayerShell). */-video::-webkit-media-controls,-video::-webkit-media-controls-enclosure,-video::-webkit-media-controls-overlay-enclosure,-video::-webkit-media-controls-panel,-video::-webkit-media-controls-loading-panel,-video::-webkit-media-controls-overlay-play-button,-video::-webkit-media-controls-overlay-cast-button,-video::-webkit-media-controls-play-button,-video::-webkit-media-controls-pause-button,-video::-webkit-media-controls-start-playback-button,-video::-webkit-media-controls-fullscreen-button,-video::-webkit-media-controls-picture-in-picture-button,-video::-webkit-media-controls-volume-slider,-video::-webkit-media-controls-mute-button,-video::-webkit-media-controls-timeline,-video::-webkit-media-controls-current-time-display,-video::-webkit-media-controls-time-remaining-display,-video::-internal-media-controls-overlay-cast-button,-video::-internal-media-controls-button-panel-spacer {- display: none !important;- visibility: hidden !important;- opacity: 0 !important;- width: 0 !important;- height: 0 !important;- -webkit-appearance: none !important;- appearance: none !important;- pointer-events: none !important;-}--video {- -webkit-tap-highlight-color: transparent;- outline: none;-}-+@import './lib/style/buttons.css';+@import './lib/style/settings.css';+@import './lib/style/macos-shell.css';+@import '@fontsource/ibm-plex-mono/400.css';+@import '@fontsource/ibm-plex-mono/500.css';++/*+ * OmniGet design tokens.+ * Source of truth: docs/design-system.md.+ *+ * Spacing/type/radius/elevation/motion are global (don't change per theme).+ * Colors override per [data-theme="..."] block.+ * Legacy aliases (--padding, --border-radius, --button*, --primary, etc.)+ * remain functional pointing at the new tokens; they go away one PR at a time.+ */++:root {+ --space-0: 0;+ --space-1: 4px;+ --space-2: 8px;+ --space-3: 12px;+ --space-4: 16px;+ --space-5: 24px;+ --space-6: 32px;+ --space-7: 48px;+ --space-8: 64px;+ --space-9: 96px;++ --text-xs: 12px; --leading-xs: 1.45;+ --text-sm: 13px; --leading-sm: 1.5;+ --text-base: 14px; --leading-base: 1.55;+ --text-md: 15px; --leading-md: 1.5;+ --text-lg: 17px; --leading-lg: 1.4;+ --text-xl: 20px; --leading-xl: 1.35;+ --text-2xl: 26px; --leading-2xl: 1.25;+ --text-3xl: 34px; --leading-3xl: 1.15;+ --text-display: 48px; --leading-display: 1.05;++ --radius-xs: 6px;+ --radius-sm: 10px;+ --radius-md: 14px;+ --radius-lg: 20px;+ --radius-xl: 28px;+ --radius-full: 9999px;++ --elev-0: none;+ --elev-1:+ 0 1px 2px rgba(0, 0, 0, 0.4),+ 0 0 0 1px rgba(255, 255, 255, 0.04);+ --elev-2:+ 0 4px 12px rgba(0, 0, 0, 0.45),+ 0 1px 2px rgba(0, 0, 0, 0.4),+ 0 0 0 1px rgba(255, 255, 255, 0.06);+ --elev-3:+ 0 24px 48px rgba(0, 0, 0, 0.55),+ 0 8px 16px rgba(0, 0, 0, 0.4),+ 0 0 0 1px rgba(255, 255, 255, 0.08);+ --elev-glow:+ 0 0 0 1px var(--accent),+ 0 4px 16px var(--accent-glow),+ 0 0 24px var(--accent-glow);++ --duration-fast: 120ms;+ --duration-base: 200ms;+ --duration-slow: 320ms;+ --duration-bounce: 480ms;+ --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);+ --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);++ --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;+ --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;+ --font-mono: 'IBM Plex Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Noto Sans Mono', 'Ubuntu Mono', 'Courier New', monospace;+ --font-system: var(--font-body);++ --padding: var(--space-3);+ --border-radius: var(--radius-sm);+ --bottom-nav-height: 44px;+ --mobile-nav-clearance: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + var(--padding));+ --safe-area-top: env(safe-area-inset-top, 0px);+ --safe-area-right: env(safe-area-inset-right, 0px);+ --safe-area-bottom: env(safe-area-inset-bottom, 0px);+ --safe-area-left: env(safe-area-inset-left, 0px);++ font-family: var(--font-body);+ font-size: var(--text-base);+ line-height: var(--leading-base);+ font-weight: 400;+ font-synthesis: none;+ text-rendering: optimizeLegibility;+ -webkit-font-smoothing: antialiased;+ -moz-osx-font-smoothing: grayscale;+ font-feature-settings: "ss01", "cv11";+}++[data-display],+.display {+ font-family: var(--font-display);+ letter-spacing: -0.01em;+}++[data-surface="notes"] {+ --font-display: var(--font-body);+ --leading-base: 1.65;+}+[data-surface="notes"] .tiptap {+ font-family: var(--font-body);+ font-size: var(--text-base);+ line-height: var(--leading-base);+ color: var(--text);+}+[data-surface="notes"] .tiptap > * + * {+ margin-top: var(--space-2);+}+[data-surface="notes"] .tiptap h1 {+ font-family: var(--font-body);+ font-size: var(--text-2xl);+ line-height: var(--leading-2xl);+ font-weight: 700;+ letter-spacing: -0.01em;+ margin-top: var(--space-5);+}+[data-surface="notes"] .tiptap h2 {+ font-family: var(--font-body);+ font-size: var(--text-xl);+ line-height: var(--leading-xl);+ font-weight: 700;+ letter-spacing: -0.01em;+ margin-top: var(--space-4);+}+[data-surface="notes"] .tiptap h3 {+ font-family: var(--font-body);+ font-size: var(--text-lg);+ line-height: var(--leading-lg);+ font-weight: 600;+ margin-top: var(--space-3);+}+[data-surface="notes"] .tiptap p {+ margin: 0;+}+[data-surface="notes"] .tiptap ul,+[data-surface="notes"] .tiptap ol {+ padding-left: var(--space-5);+ margin: 0;+}+[data-surface="notes"] .tiptap blockquote {+ border-left: 3px solid var(--accent);+ padding-left: var(--space-3);+ color: var(--secondary);+ margin: 0;+}+[data-surface="notes"] .tiptap pre {+ background: color-mix(in oklab, var(--input-border) 30%, transparent);+ border-radius: var(--border-radius);+ padding: var(--space-3);+ font-family: var(--font-mono);+ font-size: var(--text-sm);+ overflow-x: auto;+ margin: 0;+}+[data-surface="notes"] .tiptap code {+ background: color-mix(in oklab, var(--accent) 8%, transparent);+ padding: 1px 5px;+ border-radius: 4px;+ font-family: var(--font-mono);+ font-size: 0.95em;+}+[data-surface="notes"] .tiptap pre code {+ background: transparent;+ padding: 0;+ font-size: inherit;+}+[data-surface="notes"] .tiptap hr {+ border: 0;+ border-top: 1px solid var(--input-border);+ margin: var(--space-4) 0;+}+[data-surface="notes"] .tiptap ul[data-type="taskList"] {+ list-style: none;+ padding-left: 0;+}+[data-surface="notes"] .tiptap ul[data-type="taskList"] li {+ display: flex;+ gap: var(--space-2);+ align-items: baseline;+}+[data-surface="notes"] .tiptap ul[data-type="taskList"] li > label {+ flex: 0 0 auto;+}+[data-surface="notes"] .tiptap ul[data-type="taskList"] li > div {+ flex: 1 1 auto;+}+[data-surface="notes"] .tiptap:focus-visible {+ outline: none;+}+[data-surface="notes"] .tiptap p.is-editor-empty:first-child::before {+ content: attr(data-placeholder);+ color: var(--tertiary);+ pointer-events: none;+ float: left;+ height: 0;+}+[data-surface="notes"] .tiptap h4 {+ font-family: var(--font-body);+ font-size: var(--text-md);+ font-weight: 600;+ margin-top: var(--space-3);+}+[data-surface="notes"] .tiptap h5 {+ font-family: var(--font-body);+ font-size: var(--text-base);+ font-weight: 600;+ margin-top: var(--space-2);+}+[data-surface="notes"] .tiptap h6 {+ font-family: var(--font-body);+ font-size: var(--text-sm);+ font-weight: 600;+ text-transform: uppercase;+ letter-spacing: 0.04em;+ color: var(--secondary);+ margin-top: var(--space-2);+}+[data-surface="notes"] .tiptap img {+ max-width: 100%;+ height: auto;+ border-radius: var(--border-radius);+ display: block;+}+[data-surface="notes"] .tiptap .tiptap-table {+ border-collapse: collapse;+ table-layout: fixed;+ width: 100%;+ overflow: hidden;+ margin: 0;+}+[data-surface="notes"] .tiptap .tiptap-table th,+[data-surface="notes"] .tiptap .tiptap-table td {+ border: 1px solid var(--input-border);+ padding: var(--space-2);+ vertical-align: top;+ position: relative;+ min-width: 1em;+}+[data-surface="notes"] .tiptap .tiptap-table th {+ background: color-mix(in oklab, var(--input-border) 30%, transparent);+ font-weight: 600;+ text-align: left;+}+[data-surface="notes"] .tiptap .tiptap-callout {+ display: flex;+ gap: var(--space-2);+ padding: var(--space-3);+ border-radius: var(--border-radius);+ border-left: 3px solid;+ background: color-mix(in oklab, var(--accent) 6%, transparent);+ margin: 0;+}+[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="note"] {+ border-left-color: var(--accent);+}+[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="tip"] {+ border-left-color: var(--success, #2ecc71);+ background: color-mix(in oklab, var(--success, #2ecc71) 8%, transparent);+}+[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="important"] {+ border-left-color: var(--accent);+ background: color-mix(in oklab, var(--accent) 12%, transparent);+}+[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="warning"] {+ border-left-color: var(--warning, #e67e22);+ background: color-mix(in oklab, var(--warning, #e67e22) 8%, transparent);+}+[data-surface="notes"] .tiptap .tiptap-callout[data-callout-kind="caution"] {+ border-left-color: var(--error, #e74c3c);+ background: color-mix(in oklab, var(--error, #e74c3c) 8%, transparent);+}+[data-surface="notes"] .tiptap .tiptap-callout-icon {+ flex: 0 0 auto;+ font-size: var(--text-lg);+ user-select: none;+}+[data-surface="notes"] .tiptap .tiptap-callout-body {+ flex: 1 1 auto;+ display: flex;+ flex-direction: column;+ gap: var(--space-2);+}+[data-surface="notes"] .tiptap .tiptap-callout-body > * + * {+ margin-top: var(--space-2);+}+[data-surface="notes"] .tiptap .Tiptap-mathematics-render {+ display: inline-block;+ padding: 0 var(--space-1);+}+[data-surface="notes"] .tiptap .Tiptap-mathematics-editor {+ font-family: var(--font-mono);+ font-size: var(--text-sm);+ background: color-mix(in oklab, var(--input-border) 30%, transparent);+ padding: 1px 4px;+ border-radius: 3px;+}+[data-surface="notes"] .tiptap .tiptap-page-mention {+ display: inline-block;+ padding: 0 4px;+ background: color-mix(in oklab, var(--accent) 14%, transparent);+ color: var(--accent);+ border-radius: 4px;+ font-size: 0.95em;+ cursor: pointer;+ transition: background 120ms ease;+}+[data-surface="notes"] .tiptap .tiptap-page-mention:hover {+ background: color-mix(in oklab, var(--accent) 24%, transparent);+}+[data-surface="notes"] .tiptap .tiptap-page-mention::before {+ content: "[[";+ opacity: 0.4;+ margin-right: 2px;+}+[data-surface="notes"] .tiptap .tiptap-page-mention::after {+ content: "]]";+ opacity: 0.4;+ margin-left: 2px;+}+[data-surface="notes"] .tiptap .tiptap-tag-mention {+ display: inline-block;+ padding: 0 4px;+ background: color-mix(in oklab, var(--secondary) 14%, transparent);+ color: var(--secondary);+ border-radius: 999px;+ font-size: 0.9em;+ font-weight: 500;+ cursor: pointer;+}+[data-surface="notes"] .tiptap .tiptap-tag-mention::before {+ content: "#";+ opacity: 0.6;+ margin-right: 1px;+}+[data-surface="notes"] .tiptap .tiptap-query-block {+ margin: var(--space-2) 0;+ user-select: none;+}+[data-surface="notes"] .tiptap .tiptap-query-block.ProseMirror-selectednode {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ border-radius: var(--border-radius);+}+[data-surface="notes"] .tiptap .tiptap-embed-block {+ margin: var(--space-2) 0;+ user-select: none;+}+[data-surface="notes"] .tiptap .tiptap-embed-block.ProseMirror-selectednode {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ border-radius: var(--border-radius);+}++.page-title {+ font-family: var(--font-display);+ font-size: var(--text-3xl);+ line-height: var(--leading-3xl);+ font-weight: 600;+ letter-spacing: -0.02em;+ color: var(--text);+ margin: 0 0 var(--space-5) 0;+}++.section-title {+ font-family: var(--font-display);+ font-size: var(--text-lg);+ line-height: var(--leading-lg);+ font-weight: 600;+ letter-spacing: -0.01em;+ color: var(--text);+ text-transform: none;+ margin: 0 0 var(--space-3) 0;+}++.eyebrow {+ font-family: var(--font-body);+ font-size: var(--text-xs);+ font-weight: 600;+ text-transform: uppercase;+ letter-spacing: 0.08em;+ color: var(--text-muted);+ margin-bottom: var(--space-2);+}++::selection {+ background: var(--accent-soft);+ color: var(--text);+}++/*+ * Semantic token system (18 tokens, intended path-forward).+ * Each per-theme block below still defines the legacy concrete tokens+ * (--primary, --secondary, --button, etc.) for backwards compatibility.+ * The semantic tokens below alias them and survive theme switches.+ *+ * surface roles: --bg, --surface, --surface-hi+ * text levels: --text, --text-muted, --text-dim+ * lines: --border, --focus-ring (theme-defined)+ * brand & cta: --accent, --on-accent, --cta, --on-cta+ * status: --info, --success, --warning, --danger, --on-status+ *+ * Interaction states are computed at the call site, NOT stored:+ * :hover -> color-mix(in srgb, var(--surface) 92%, var(--bg-overlay))+ * :active -> color-mix(in srgb, var(--surface) 86%, var(--bg-overlay))+ * --bg-overlay is white in dark themes, black in light themes.+ */++:root {+ --bg-overlay: white;+}++:root, [data-theme] {+ --bg: var(--primary);+ --surface: var(--button);+ --surface-hi: var(--button-elevated);+ --surface-mut: color-mix(in srgb, var(--button) 70%, var(--primary));+ --text: var(--secondary);+ --text-muted: color-mix(in srgb, var(--secondary) 65%, var(--tertiary));+ --text-dim: var(--tertiary);+ --border: var(--content-border);+ --border-hi: color-mix(in srgb, var(--secondary) 14%, transparent);+ --accent-hi: color-mix(in srgb, var(--accent) 88%, white);+ --accent-lo: color-mix(in srgb, var(--accent) 88%, black);+ --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);+ --accent-glow: color-mix(in srgb, var(--accent) 25%, transparent);+ --info: var(--cta);+ --danger: var(--error);+ --on-status: #ffffff;+ --on-warning: #1a1a1a;+}++[data-theme="light"],+[data-theme="catppuccin-latte"],+[data-theme="eink-day"],+[data-theme="eink-sepia"],+[data-theme="nyxvamp-radiance"] {+ --bg-overlay: black;+ --on-warning: #5c3d00;+}++:root, [data-theme="dark"] {+ color-scheme: dark;+ --primary: #0a0a0a;+ --secondary: #e8e8e8;+ --tertiary: #999999;++ --accent: #FF7D38;+ --success: #2E9B5A;+ --error: #ff4757;+ --warning: #f59e0b;++ --button: #1a1a1a;+ --button-hover: #2a2a2a;+ --button-press: #3a3a3a;+ --button-text: var(--secondary);+ --button-stroke: rgba(255, 255, 255, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;++ --button-elevated: #252525;+ --button-elevated-hover: #323232;+ --button-elevated-press: #3a3a3a;++ --sidebar-bg: #0f0f0f;+ --sidebar-highlight: #1f1f1f;+ --content-border: rgba(255, 255, 255, 0.08);+ --input-border: #3a3a3a;+ --input-bg: #1a1a1a;++ --popup-bg: #1a1a1a;+ --dialog-backdrop: rgba(0, 0, 0, 0.6);++ --on-primary: var(--secondary);+ --on-accent: #ffffff;+ --on-success: #ffffff;+ --on-error: #ffffff;+ --on-button: var(--button-text);+ --on-button-elevated: var(--secondary);++ --blue: var(--accent);+ --red: var(--error);+ --green: var(--success);+ --orange: var(--warning);++ --gray: var(--tertiary);++ --cta: #2D9CDB;+ --cta-hover: #2690CC;+ --cta-press: #1E7FB8;+ --on-cta: #ffffff;++ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;++ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="light"] {+ color-scheme: light;+ --primary: #fafafa;+ --secondary: #1a1a1a;+ --tertiary: #595959;++ --accent: #E05500;+ --success: #1a7a3a;+ --error: #c41e3a;+ --warning: #e8940a;++ --button: #eaeaea;+ --button-hover: #dfdfdf;+ --button-press: #d2d2d2;+ --button-text: var(--secondary);+ --button-stroke: rgba(0, 0, 0, 0.10);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;++ --button-elevated: #e0e0e0;+ --button-elevated-hover: #d4d4d4;+ --button-elevated-press: #c8c8c8;++ --sidebar-bg: #f0f0f0;+ --sidebar-highlight: #e4e4e4;+ --content-border: rgba(0, 0, 0, 0.10);+ --input-border: #a0a0a0;+ --input-bg: #ffffff;++ --popup-bg: #ffffff;+ --dialog-backdrop: rgba(0, 0, 0, 0.4);++ --on-primary: var(--secondary);+ --on-accent: #ffffff;+ --on-success: #ffffff;+ --on-error: #ffffff;+ --on-button: var(--button-text);+ --on-button-elevated: var(--secondary);++ --blue: var(--accent);+ --red: var(--error);+ --green: var(--success);+ --orange: var(--warning);++ --gray: var(--tertiary);++ --cta: #1A8AC4;+ --cta-hover: #1578B0;+ --cta-press: #126A9E;+ --on-cta: #ffffff;++ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;++ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="catppuccin-mocha"] {+ color-scheme: dark;+ --primary: #1e1e2e;+ --secondary: #cdd6f4;+ --tertiary: #a6adc8;+ --accent: #89b4fa;+ --success: #a6e3a1;+ --error: #f38ba8;+ --warning: #f9e2af;+ --button: #313244;+ --button-hover: #45475a;+ --button-press: #585b70;+ --button-text: #cdd6f4;+ --button-stroke: rgba(205, 214, 244, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #45475a;+ --button-elevated-hover: #585b70;+ --button-elevated-press: #6c7086;+ --sidebar-bg: #181825;+ --sidebar-highlight: #313244;+ --content-border: rgba(205, 214, 244, 0.08);+ --input-border: #585b70;+ --input-bg: #313244;+ --popup-bg: #313244;+ --dialog-backdrop: rgba(17, 17, 27, 0.7);+ --on-primary: #cdd6f4;+ --on-accent: #1e1e2e;+ --on-success: #1e1e2e;+ --on-error: #1e1e2e;+ --on-button: #cdd6f4;+ --on-button-elevated: #cdd6f4;+ --blue: #89b4fa;+ --red: #f38ba8;+ --green: #a6e3a1;+ --orange: #fab387;+ --gray: #a6adc8;+ --cta: #89b4fa;+ --cta-hover: #74c7ec;+ --cta-press: #89dceb;+ --on-cta: #1e1e2e;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="catppuccin-macchiato"] {+ color-scheme: dark;+ --primary: #24273a;+ --secondary: #cad3f5;+ --tertiary: #a5adcb;+ --accent: #8aadf4;+ --success: #a6da95;+ --error: #ed8796;+ --warning: #eed49f;+ --button: #363a4f;+ --button-hover: #494d64;+ --button-press: #5b6078;+ --button-text: #cad3f5;+ --button-stroke: rgba(202, 211, 245, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #494d64;+ --button-elevated-hover: #5b6078;+ --button-elevated-press: #6e738d;+ --sidebar-bg: #1e2030;+ --sidebar-highlight: #363a4f;+ --content-border: rgba(202, 211, 245, 0.08);+ --input-border: #5b6078;+ --input-bg: #363a4f;+ --popup-bg: #363a4f;+ --dialog-backdrop: rgba(24, 25, 38, 0.7);+ --on-primary: #cad3f5;+ --on-accent: #24273a;+ --on-success: #24273a;+ --on-error: #24273a;+ --on-button: #cad3f5;+ --on-button-elevated: #cad3f5;+ --blue: #8aadf4;+ --red: #ed8796;+ --green: #a6da95;+ --orange: #f5a97f;+ --gray: #a5adcb;+ --cta: #8aadf4;+ --cta-hover: #7dc4e4;+ --cta-press: #91d7e3;+ --on-cta: #24273a;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="catppuccin-frappe"] {+ color-scheme: dark;+ --primary: #303446;+ --secondary: #c6d0f5;+ --tertiary: #c3cdf1;+ --accent: #8caaee;+ --success: #a6d189;+ --error: #e78284;+ --warning: #e5c890;+ --button: #414559;+ --button-hover: #51576d;+ --button-press: #626880;+ --button-text: #c6d0f5;+ --button-stroke: rgba(198, 208, 245, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #51576d;+ --button-elevated-hover: #626880;+ --button-elevated-press: #737994;+ --sidebar-bg: #292c3c;+ --sidebar-highlight: #414559;+ --content-border: rgba(198, 208, 245, 0.08);+ --input-border: #626880;+ --input-bg: #414559;+ --popup-bg: #414559;+ --dialog-backdrop: rgba(35, 38, 52, 0.7);+ --on-primary: #c6d0f5;+ --on-accent: #303446;+ --on-success: #303446;+ --on-error: #303446;+ --on-button: #c6d0f5;+ --on-button-elevated: #c6d0f5;+ --blue: #8caaee;+ --red: #e78284;+ --green: #a6d189;+ --orange: #ef9f76;+ --gray: #a5adce;+ --cta: #8caaee;+ --cta-hover: #85c1dc;+ --cta-press: #99d1db;+ --on-cta: #303446;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="catppuccin-latte"] {+ color-scheme: light;+ --primary: #eff1f5;+ --secondary: #4c4f69;+ --tertiary: #3e4159;+ --accent: #1e66f5;+ --success: #40a02b;+ --error: #d20f39;+ --warning: #df8e1d;+ --button: #ccd0da;+ --button-hover: #bcc0cc;+ --button-press: #acb0be;+ --button-text: #4c4f69;+ --button-stroke: rgba(76, 79, 105, 0.10);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #bcc0cc;+ --button-elevated-hover: #acb0be;+ --button-elevated-press: #9ca0b0;+ --sidebar-bg: #e6e9ef;+ --sidebar-highlight: #ccd0da;+ --content-border: rgba(76, 79, 105, 0.10);+ --input-border: #9ca0b0;+ --input-bg: #ffffff;+ --popup-bg: #ffffff;+ --dialog-backdrop: rgba(220, 224, 232, 0.5);+ --on-primary: #4c4f69;+ --on-accent: #ffffff;+ --on-success: #ffffff;+ --on-error: #ffffff;+ --on-button: #4c4f69;+ --on-button-elevated: #4c4f69;+ --blue: #1e66f5;+ --red: #d20f39;+ --green: #40a02b;+ --orange: #fe640b;+ --gray: #6c6f85;+ --cta: #1e66f5;+ --cta-hover: #209fb5;+ --cta-press: #04a5e5;+ --on-cta: #ffffff;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="one-dark-pro"] {+ color-scheme: dark;+ --primary: #282c34;+ --secondary: #abb2bf;+ --tertiary: #a9b0bd;+ --accent: #61afef;+ --success: #98c379;+ --error: #e06c75;+ --warning: #e5c07b;+ --button: #2c313a;+ --button-hover: #3e4452;+ --button-press: #4b5263;+ --button-text: #abb2bf;+ --button-stroke: rgba(171, 178, 191, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #3e4452;+ --button-elevated-hover: #4b5263;+ --button-elevated-press: #5c6370;+ --sidebar-bg: #21252b;+ --sidebar-highlight: #2c313a;+ --content-border: rgba(171, 178, 191, 0.08);+ --input-border: #3e4452;+ --input-bg: #1d1f23;+ --popup-bg: #2c313a;+ --dialog-backdrop: rgba(0, 0, 0, 0.6);+ --on-primary: #abb2bf;+ --on-accent: #282c34;+ --on-success: #282c34;+ --on-error: #282c34;+ --on-button: #abb2bf;+ --on-button-elevated: #abb2bf;+ --blue: #61afef;+ --red: #e06c75;+ --green: #98c379;+ --orange: #d19a66;+ --gray: #7f849c;+ --cta: #61afef;+ --cta-hover: #528bcc;+ --cta-press: #4678a8;+ --on-cta: #282c34;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="dracula"] {+ color-scheme: dark;+ --primary: #22212C;+ --secondary: #F8F8F2;+ --tertiary: #b6b1cc;+ --accent: #9580FF;+ --success: #8AFF80;+ --error: #FF9580;+ --warning: #FFCA80;+ --button: #2B2640;+ --button-hover: #424450;+ --button-press: #504C67;+ --button-text: #F8F8F2;+ --button-stroke: rgba(248, 248, 242, 0.12);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #424450;+ --button-elevated-hover: #504C67;+ --button-elevated-press: #5E5A76;+ --sidebar-bg: #151320;+ --sidebar-highlight: #2B2640;+ --content-border: rgba(149, 128, 255, 0.12);+ --input-border: #373252;+ --input-bg: #151320;+ --popup-bg: #2B2640;+ --dialog-backdrop: rgba(11, 10, 16, 0.75);+ --on-primary: #F8F8F2;+ --on-accent: #FFFFFF;+ --on-success: #151320;+ --on-error: #FFFFFF;+ --on-button: #F8F8F2;+ --on-button-elevated: #F8F8F2;+ --blue: #9580FF;+ --red: #FF9580;+ --green: #8AFF80;+ --orange: #FFCA80;+ --gray: #7970A9;+ --cta: #9580FF;+ --cta-hover: #AA99FF;+ --cta-press: #7A6BE6;+ --on-cta: #FFFFFF;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="nyxvamp-veil"] {+ color-scheme: dark;+ --primary: #1E1E2E;+ --secondary: #D9E0EE;+ --tertiary: #9594ab;+ --accent: #F5C2E7;+ --success: #ABE9B3;+ --error: #E78284;+ --warning: #F8BD96;+ --button: #2E2E3E;+ --button-hover: #494D64;+ --button-press: #5A5E74;+ --button-text: #D9E0EE;+ --button-stroke: rgba(217, 224, 238, 0.10);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #302D41;+ --button-elevated-hover: #494D64;+ --button-elevated-press: #5A5E74;+ --sidebar-bg: #181828;+ --sidebar-highlight: #302D41;+ --content-border: rgba(217, 224, 238, 0.06);+ --input-border: #6E6A86;+ --input-bg: #1E1E2E;+ --popup-bg: #302D41;+ --dialog-backdrop: rgba(10, 10, 20, 0.7);+ --on-primary: #D9E0EE;+ --on-accent: #1E1E2E;+ --on-success: #1E1E2E;+ --on-error: #1E1E2E;+ --on-button: #D9E0EE;+ --on-button-elevated: #D9E0EE;+ --blue: #96CDFB;+ --red: #E78284;+ --green: #ABE9B3;+ --orange: #F8BD96;+ --gray: #6E6A86;+ --cta: #F5C2E7;+ --cta-hover: #F8D7ED;+ --cta-press: #E8A8D4;+ --on-cta: #1E1E2E;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="nyxvamp-obsidian"] {+ color-scheme: dark;+ --primary: #000A0F;+ --secondary: #C0C0CE;+ --tertiary: #87859b;+ --accent: #F5C2E7;+ --success: #8FBF8F;+ --error: #D78284;+ --warning: #D8A080;+ --button: #1E1E20;+ --button-hover: #2E2E30;+ --button-press: #3E3E42;+ --button-text: #C0C0CE;+ --button-stroke: rgba(192, 192, 206, 0.08);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #1E1E20;+ --button-elevated-hover: #2E2E30;+ --button-elevated-press: #3E3E42;+ --sidebar-bg: #050810;+ --sidebar-highlight: #1E1E20;+ --content-border: rgba(192, 192, 206, 0.05);+ --input-border: #5E5A76;+ --input-bg: #000A0F;+ --popup-bg: #1E1E20;+ --dialog-backdrop: rgba(0, 0, 0, 0.85);+ --on-primary: #C0C0CE;+ --on-accent: #000A0F;+ --on-success: #000A0F;+ --on-error: #000A0F;+ --on-button: #C0C0CE;+ --on-button-elevated: #C0C0CE;+ --blue: #7FAFD7;+ --red: #D78284;+ --green: #8FBF8F;+ --orange: #D8A080;+ --gray: #5E5A76;+ --cta: #F5C2E7;+ --cta-hover: #F8D7ED;+ --cta-press: #E0A8D0;+ --on-cta: #000A0F;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="nyxvamp-radiance"] {+ color-scheme: light;+ --primary: #F7F7FF;+ --secondary: #1E1E2E;+ --tertiary: #5A5570;+ --accent: #9655FF;+ --success: #005F87;+ --error: #9F1239;+ --warning: #B8860B;+ --button: #E8E8F0;+ --button-hover: #DDDDE8;+ --button-press: #D0D0E0;+ --button-text: #1E1E2E;+ --button-stroke: rgba(30, 30, 46, 0.10);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #E8D5FF;+ --button-elevated-hover: #DCCAF5;+ --button-elevated-press: #D0BFEB;+ --sidebar-bg: #E8E8F0;+ --sidebar-highlight: #E8D5FF;+ --content-border: rgba(30, 30, 46, 0.08);+ --input-border: #5A5570;+ --input-bg: #E8E8F0;+ --popup-bg: #F7F7FF;+ --dialog-backdrop: rgba(90, 85, 112, 0.3);+ --on-primary: #1E1E2E;+ --on-accent: #F7F7FF;+ --on-success: #F7F7FF;+ --on-error: #F7F7FF;+ --on-button: #1E1E2E;+ --on-button-elevated: #1E1E2E;+ --blue: #9655FF;+ --red: #9F1239;+ --green: #005F87;+ --orange: #C2410C;+ --gray: #5A5570;+ --cta: #9655FF;+ --cta-hover: #6B46C1;+ --cta-press: #5A3AAF;+ --on-cta: #F7F7FF;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="eink-day"] {+ color-scheme: light;+ --primary: #f5f2ea;+ --secondary: #1d1d1b;+ --tertiary: #5c5a56;+ --accent: #2b2b28;+ --success: #3d6e3d;+ --error: #8a2a2a;+ --warning: #8a5a1d;+ --button: #ebe5d7;+ --button-hover: #dfd6c2;+ --button-press: #d1c8ae;+ --button-text: var(--secondary);+ --button-stroke: rgba(29, 29, 27, 0.15);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #ebe5d7;+ --button-elevated-hover: #dfd6c2;+ --button-elevated-press: #d1c8ae;+ --sidebar-bg: #ebe5d7;+ --sidebar-highlight: #dfd6c2;+ --content-border: rgba(29, 29, 27, 0.14);+ --input-border: #c8bfa7;+ --input-bg: #ebe5d7;+ --popup-bg: #f5f2ea;+ --dialog-backdrop: rgba(29, 29, 27, 0.35);+ --on-primary: var(--secondary);+ --on-accent: #f5f2ea;+ --on-success: #f5f2ea;+ --on-error: #f5f2ea;+ --on-button: var(--secondary);+ --on-button-elevated: var(--secondary);+ --blue: #2b2b28;+ --red: #8a2a2a;+ --green: #3d6e3d;+ --orange: #8a5a1d;+ --gray: var(--tertiary);+ --cta: #2b2b28;+ --cta-hover: #1d1d1b;+ --cta-press: #141412;+ --on-cta: #f5f2ea;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="eink-sepia"] {+ color-scheme: light;+ --primary: #f0e6d2;+ --secondary: #3f2e20;+ --tertiary: #6e5440;+ --accent: #7a4a22;+ --success: #3d6e3d;+ --error: #8a2a2a;+ --warning: #8a5a1d;+ --button: #e6dcc3;+ --button-hover: #dccca8;+ --button-press: #c9b98d;+ --button-text: var(--secondary);+ --button-stroke: rgba(63, 46, 32, 0.15);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #e6dcc3;+ --button-elevated-hover: #dccca8;+ --button-elevated-press: #c9b98d;+ --sidebar-bg: #e6dcc3;+ --sidebar-highlight: #dccca8;+ --content-border: rgba(63, 46, 32, 0.14);+ --input-border: #c6b993;+ --input-bg: #e6dcc3;+ --popup-bg: #f0e6d2;+ --dialog-backdrop: rgba(63, 46, 32, 0.35);+ --on-primary: var(--secondary);+ --on-accent: #f0e6d2;+ --on-success: #f0e6d2;+ --on-error: #f0e6d2;+ --on-button: var(--secondary);+ --on-button-elevated: var(--secondary);+ --blue: #7a4a22;+ --red: #8a2a2a;+ --green: #3d6e3d;+ --orange: #8a5a1d;+ --gray: var(--tertiary);+ --cta: #7a4a22;+ --cta-hover: #5b3418;+ --cta-press: #452710;+ --on-cta: #f0e6d2;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++[data-theme="eink-night"] {+ color-scheme: dark;+ --primary: #0a0a0a;+ --secondary: #d4d4d0;+ --tertiary: #8e8e88;+ --accent: #b0b0ab;+ --success: #7eaa7e;+ --error: #c96060;+ --warning: #d0a060;+ --button: #121212;+ --button-hover: #1c1c1c;+ --button-press: #262626;+ --button-text: var(--secondary);+ --button-stroke: rgba(212, 212, 208, 0.10);+ --button-box-shadow: 0 0 0 1px var(--button-stroke) inset;+ --button-elevated: #121212;+ --button-elevated-hover: #1c1c1c;+ --button-elevated-press: #262626;+ --sidebar-bg: #121212;+ --sidebar-highlight: #1c1c1c;+ --content-border: rgba(212, 212, 208, 0.10);+ --input-border: #2c2c2c;+ --input-bg: #121212;+ --popup-bg: #121212;+ --dialog-backdrop: rgba(0, 0, 0, 0.6);+ --on-primary: var(--secondary);+ --on-accent: #0a0a0a;+ --on-success: #0a0a0a;+ --on-error: #0a0a0a;+ --on-button: var(--secondary);+ --on-button-elevated: var(--secondary);+ --blue: #b0b0ab;+ --red: #c96060;+ --green: #7eaa7e;+ --orange: #d0a060;+ --gray: var(--tertiary);+ --cta: #d4d4d0;+ --cta-hover: #c0c0bc;+ --cta-press: #a8a8a4;+ --on-cta: #0a0a0a;+ --focus-ring: solid 2px var(--accent);+ --focus-ring-offset: 2px;+ color: var(--secondary);+ background-color: var(--primary);+}++*,+*::before,+*::after {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ user-select: auto;+ scrollbar-width: none;+}++::-webkit-scrollbar {+ display: none;+}++.button, img, svg, [data-no-select] {+ user-select: none;+}++body {+ min-height: 100vh;+ overflow: hidden;+ background-color: var(--primary);+}++h1, h2, h3, h4, h5, h6 {+ font-weight: 500;+ margin-block: 0;+}++h1 { font-size: 24px; letter-spacing: -1px; }+h2 { font-size: 20px; letter-spacing: -1px; }+h3 { font-size: 16px; }+h4 { font-size: 14.5px; }+h5 { font-size: 12px; }+h6 { font-size: 11px; }++a {+ color: inherit;+ text-decoration: none;+}++button {+ font-family: inherit;+ cursor: pointer;+ border: none;+ background: none;+ color: inherit;+}++input, textarea {+ font-family: inherit;+ border: none;+ outline: none;+ background: none;+ color: inherit;+ user-select: text;+}++select {+ font-family: inherit;+ color: var(--secondary);+ background-color: var(--input-bg);+}++option {+ color: var(--secondary);+ background-color: var(--input-bg);+}++img, svg {+ pointer-events: none;+}++.button {+ font-size: 14.5px;+ font-weight: 500;+ padding: var(--padding);+ border-radius: var(--border-radius);+ background: var(--button);+ color: var(--button-text);+ box-shadow: var(--button-box-shadow);+ border: none;+ cursor: pointer;+}++@media (hover: hover) {+ .button:hover {+ background: var(--button-hover);+ }+}++.button:active {+ background: var(--button-press);+}++.button:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+}++.button.elevated {+ background: var(--button-elevated);+ box-shadow: none;+}++@media (hover: hover) {+ .button.elevated:hover {+ background: var(--button-elevated-hover);+ }+}++.button.elevated:active {+ background: var(--button-elevated-press);+}++.button.active {+ background: var(--secondary);+ color: var(--primary);+}++.button:disabled {+ cursor: default;+}++/* Hide WebView2 / Edge / Chromium native video controls (we use custom UI in PlayerShell). */+video::-webkit-media-controls,+video::-webkit-media-controls-enclosure,+video::-webkit-media-controls-overlay-enclosure,+video::-webkit-media-controls-panel,+video::-webkit-media-controls-loading-panel,+video::-webkit-media-controls-overlay-play-button,+video::-webkit-media-controls-overlay-cast-button,+video::-webkit-media-controls-play-button,+video::-webkit-media-controls-pause-button,+video::-webkit-media-controls-start-playback-button,+video::-webkit-media-controls-fullscreen-button,+video::-webkit-media-controls-picture-in-picture-button,+video::-webkit-media-controls-volume-slider,+video::-webkit-media-controls-mute-button,+video::-webkit-media-controls-timeline,+video::-webkit-media-controls-current-time-display,+video::-webkit-media-controls-time-remaining-display,+video::-internal-media-controls-overlay-cast-button,+video::-internal-media-controls-button-panel-spacer {+ display: none !important;+ visibility: hidden !important;+ opacity: 0 !important;+ width: 0 !important;+ height: 0 !important;+ -webkit-appearance: none !important;+ appearance: none !important;+ pointer-events: none !important;+}++video {+ -webkit-tap-highlight-color: transparent;+ outline: none;+}+diff --git a/src/components/home/HomeHero.svelte b/src/components/home/HomeHero.svelteindex 28d3ece0..7bb6a017 100644--- a/src/components/home/HomeHero.svelte+++ b/src/components/home/HomeHero.svelte@@ -17,7 +17,7 @@} = $props();</script>-<div class="home-hero">+<div class="home-hero" class:compact><Mascot {emotion} {compact} {bubbleText} /><Confetti active={celebrate} /></div>@@ -28,6 +28,13 @@display: flex;flex-direction: column;align-items: center;- justify-content: center;+ justify-content: flex-start;+ width: 100%;+ max-height: none;+ overflow: visible;+ }++ .home-hero.compact {+ max-height: none;}</style>diff --git a/src/components/home/HomeInspector.svelte b/src/components/home/HomeInspector.sveltenew file mode 100644index 00000000..e0f4ccc3--- /dev/null+++ b/src/components/home/HomeInspector.svelte@@ -0,0 +1,37 @@+<script lang="ts">+ import type { Snippet } from "svelte";++ let {+ open = false,+ title,+ children,+ }: {+ open?: boolean;+ title: string;+ children: Snippet;+ } = $props();+</script>++{#if open}+ <aside class="mac-inspector home-inspector">+ <h3 class="home-inspector-title">{title}</h3>+ <div class="home-inspector-body">+ {@render children()}+ </div>+ </aside>+{/if}++<style>+ .home-inspector-title {+ margin: 0 0 var(--space-3);+ font-size: var(--text-md);+ font-weight: 600;+ color: var(--text);+ }++ .home-inspector-body {+ display: flex;+ flex-direction: column;+ gap: var(--space-3);+ }+</style>diff --git a/src/components/home/HomeUrlBar.svelte b/src/components/home/HomeUrlBar.sveltenew file mode 100644index 00000000..d53d3471--- /dev/null+++ b/src/components/home/HomeUrlBar.svelte@@ -0,0 +1,53 @@+<script lang="ts">+ import OmniboxInput from "$components/omnibox/OmniboxInput.svelte";+ import type { HomeInputMode } from "$lib/home/omnibox-controller";+ import { t } from "$lib/i18n";++ let {+ url = $bindable(""),+ mode = $bindable<HomeInputMode>("url"),+ onInput,+ onModeChange,+ }: {+ url?: string;+ mode?: HomeInputMode;+ onInput: () => void;+ onModeChange?: (mode: HomeInputMode) => void;+ } = $props();++ const modes: HomeInputMode[] = ["url", "batch", "torrent", "p2p"];++ function setMode(next: HomeInputMode) {+ mode = next;+ onModeChange?.(next);+ }+</script>++<div class="home-url-bar">+ <div class="mac-segmented" role="tablist">+ {#each modes as m}+ <button+ type="button"+ class="mac-segmented-btn"+ class:active={mode === m}+ role="tab"+ aria-selected={mode === m}+ onclick={() => setMode(m)}+ >+ {$t(`home.mode_${m}`)}+ </button>+ {/each}+ </div>+ {#if mode === "url"}+ <OmniboxInput bind:url onInput={onInput} />+ {/if}+</div>++<style>+ .home-url-bar {+ display: flex;+ flex-direction: column;+ gap: var(--space-3);+ width: 100%;+ }+</style>diff --git a/src/components/mascot/Mascot.svelte b/src/components/mascot/Mascot.svelteindex 9a5cb4ef..4100713d 100644--- a/src/components/mascot/Mascot.svelte+++ b/src/components/mascot/Mascot.svelte@@ -96,7 +96,7 @@display: flex;flex-direction: column;align-items: center;- justify-content: center;+ justify-content: flex-start;height: 100px;position: relative;transition: height 0.2s ease;diff --git a/src/components/settings/DependencyRow.svelte b/src/components/settings/DependencyRow.svelteindex eb44a063..e2d55929 100644--- a/src/components/settings/DependencyRow.svelte+++ b/src/components/settings/DependencyRow.svelte@@ -130,165 +130,179 @@let supportsCustomFile = $derived(name === "PDFium");</script>-<div class="dep-row">- <div class="dep-info">- <span class="dep-name">{name}</span>+<tr class="deps-table-row">+ <td class="deps-cell-name">+ <span class="deps-name">{name}</span>+ </td>+ <td class="deps-cell-version">{#if installed && version}- <span class="dep-version dep-ok">v{version}</span>+ <span class="deps-version">v{version}</span>{:else}- <span class="dep-version dep-missing">{$t("settings.dependencies.not_found")}</span>+ <span class="deps-version deps-version-missing">—</span>{/if}- </div>-- <div class="dep-actions">- {#if variants.length > 0}- <select- class="variant-select"- value={selectedVariant ?? ""}- onchange={(e) => (selectedVariant = (e.currentTarget as HTMLSelectElement).value)}- disabled={busy}- aria-label={$t("settings.dependencies.variant_aria") as string}- >- {#each variants as v (v.id)}- <option value={v.id}>- {v.label}{v.recommended ? " ★" : ""}- </option>- {/each}- </select>- {/if}-- {#if busy}- <span class="dep-spinner"></span>+ </td>+ <td class="deps-cell-status">+ {#if installed}+ <span class="deps-status deps-status-ok">{$t("settings.dependencies.status_installed")}</span>{:else}- <button class="button dep-btn" onclick={handleInstall}>- {#if installed}- {$t("settings.dependencies.update")}- {:else}- {$t("settings.dependencies.install")}- {/if}- </button>+ <span class="deps-status deps-status-missing">{$t("settings.dependencies.status_missing")}</span>{/if}+ </td>+ <td class="deps-cell-action">+ <div class="deps-actions">+ {#if variants.length > 0}+ <select+ class="variant-select"+ value={selectedVariant ?? ""}+ onchange={(e) => (selectedVariant = (e.currentTarget as HTMLSelectElement).value)}+ disabled={busy}+ aria-label={$t("settings.dependencies.variant_aria") as string}+ >+ {#each variants as v (v.id)}+ <option value={v.id}>+ {v.label}{v.recommended ? " ★" : ""}+ </option>+ {/each}+ </select>+ {/if}- <div class="menu-wrap">- <button- type="button"- class="menu-btn"- onclick={toggleMenu}- disabled={busy}- aria-label={$t("settings.dependencies.more_options") as string}- aria-haspopup="menu"- aria-expanded={menuOpen}- >- ⋯- </button>- {#if menuOpen}- <div class="menu" role="menu">- {#if supportsCustomFile}- <button type="button" class="menu-item" onclick={handlePickCustom} role="menuitem">- {$t("settings.dependencies.pick_custom_file")}- </button>- {/if}- <button- type="button"- class="menu-item"- onclick={handleShowFolder}- disabled={!installDir}- role="menuitem"- >- {$t("settings.dependencies.show_folder")}- </button>- {#if installDir}- <div class="menu-path" title={installDir}>- <code>{installDir}</code>- </div>+ {#if busy}+ <span class="dep-spinner" aria-hidden="true"></span>+ {:else}+ <button class="button dep-btn" onclick={handleInstall}>+ {#if installed}+ {$t("settings.dependencies.update")}+ {:else}+ {$t("settings.dependencies.install")}{/if}- </div>+ </button>{/if}++ <div class="menu-wrap">+ <button+ type="button"+ class="menu-btn"+ onclick={toggleMenu}+ disabled={busy}+ aria-label={$t("settings.dependencies.more_options") as string}+ aria-haspopup="menu"+ aria-expanded={menuOpen}+ >+ ⋯+ </button>+ {#if menuOpen}+ <div class="menu" role="menu">+ {#if supportsCustomFile}+ <button type="button" class="menu-item" onclick={handlePickCustom} role="menuitem">+ {$t("settings.dependencies.pick_custom_file")}+ </button>+ {/if}+ <button+ type="button"+ class="menu-item"+ onclick={handleShowFolder}+ disabled={!installDir}+ role="menuitem"+ >+ {$t("settings.dependencies.show_folder")}+ </button>+ {#if installDir}+ <div class="menu-path" title={installDir}>+ <code>{installDir}</code>+ </div>+ {/if}+ </div>+ {/if}+ </div></div>- </div>-</div>+ </td>+</tr><style>- .dep-row {- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- padding: 10px 0;- flex-wrap: wrap;+ .deps-name {+ font-size: 13px;+ font-weight: 600;+ color: var(--text);}- .dep-info {- display: flex;- flex-direction: column;- gap: 2px;- min-width: 120px;+ .deps-version {+ font-size: 12px;+ font-family: var(--font-mono, ui-monospace, monospace);+ color: var(--text-dim, var(--gray));}- .dep-name {- font-size: 13px;- font-weight: 500;+ .deps-version-missing {+ opacity: 0.5;}- .dep-version {+ .deps-status {+ display: inline-flex;+ padding: 2px 8px;+ border-radius: 999px;font-size: 11px;- color: color-mix(in oklab, currentColor 60%, transparent);- font-family: var(--font-mono, ui-monospace, monospace);+ font-weight: 600;}- .dep-version.dep-ok {+ .deps-status-ok {+ background: color-mix(in srgb, var(--success, #16a34a) 18%, transparent);color: var(--success, #16a34a);}- .dep-version.dep-missing {- color: color-mix(in oklab, currentColor 50%, transparent);- font-style: italic;+ .deps-status-missing {+ background: color-mix(in srgb, var(--text) 8%, transparent);+ color: var(--text-dim, var(--gray));}- .dep-actions {+ .deps-actions {display: flex;align-items: center;- gap: 8px;+ justify-content: flex-end;+ gap: 6px;flex-wrap: wrap;}.variant-select {padding: 5px 8px;- border: 1px solid color-mix(in oklab, var(--content-border) 70%, transparent);- border-radius: 6px;- background: var(--bg);- color: inherit;+ border: 1px solid var(--border);+ border-radius: var(--radius-sm, 6px);+ background: var(--surface);+ color: var(--text);font: inherit;font-size: 12px;- max-width: 220px;+ max-width: 160px;}.variant-select:disabled {opacity: 0.5;cursor: not-allowed;}.button.dep-btn {- padding: 6px 14px;- border-radius: 6px;- border: 1px solid color-mix(in oklab, var(--content-border) 70%, transparent);+ padding: 5px 12px;+ border-radius: var(--radius-sm, 6px);+ border: none;background: var(--accent);- color: var(--accent-contrast, white);+ color: var(--on-accent, white);font: inherit;font-size: 12px;font-weight: 500;cursor: pointer;+ white-space: nowrap;}- .button.dep-btn:hover {- filter: brightness(1.05);+ @media (hover: hover) {+ .button.dep-btn:hover {+ filter: brightness(1.05);+ }}.menu-wrap {position: relative;}.menu-btn {padding: 5px 10px;- border: 1px solid color-mix(in oklab, var(--content-border) 70%, transparent);- border-radius: 6px;+ border: 1px solid var(--border);+ border-radius: var(--radius-sm, 6px);background: transparent;- color: inherit;+ color: var(--text);font: inherit;font-size: 14px;line-height: 1;cursor: pointer;}- .menu-btn:hover:not(:disabled) {- background: color-mix(in oklab, currentColor 8%, transparent);+ @media (hover: hover) {+ .menu-btn:hover:not(:disabled) {+ background: color-mix(in oklab, var(--text) 8%, transparent);+ }}.menu-btn:disabled {opacity: 0.4;@@ -300,10 +314,10 @@right: 0;z-index: 50;min-width: 240px;- background: var(--surface, var(--bg));- border: 1px solid color-mix(in oklab, var(--content-border) 60%, transparent);- border-radius: 8px;- box-shadow: 0 8px 24px color-mix(in oklab, black 30%, transparent);+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: var(--radius-md, 8px);+ box-shadow: var(--elev-2, 0 8px 24px rgba(0, 0, 0, 0.2));padding: 4px;display: flex;flex-direction: column;@@ -312,15 +326,17 @@padding: 8px 12px;border: 0;background: transparent;- color: inherit;+ color: var(--text);font: inherit;font-size: 12px;text-align: left;border-radius: 4px;cursor: pointer;}- .menu-item:hover:not(:disabled) {- background: color-mix(in oklab, var(--accent) 10%, transparent);+ @media (hover: hover) {+ .menu-item:hover:not(:disabled) {+ background: color-mix(in oklab, var(--accent) 10%, transparent);+ }}.menu-item:disabled {opacity: 0.4;@@ -328,13 +344,13 @@}.menu-path {padding: 6px 12px 4px;- border-top: 1px solid color-mix(in oklab, var(--content-border) 40%, transparent);+ border-top: 1px solid var(--border);margin-top: 4px;}.menu-path code {font-family: var(--font-mono, ui-monospace, monospace);font-size: 10px;- color: color-mix(in oklab, currentColor 55%, transparent);+ color: var(--text-dim, var(--gray));word-break: break-all;display: block;line-height: 1.4;@@ -342,7 +358,7 @@.dep-spinner {width: 16px;height: 16px;- border: 2px solid color-mix(in oklab, currentColor 30%, transparent);+ border: 2px solid color-mix(in oklab, var(--text) 30%, transparent);border-top-color: var(--accent);border-radius: 50%;animation: spin 800ms linear infinite;diff --git a/src/components/settings/RichPresencePanel.svelte b/src/components/settings/RichPresencePanel.svelteindex 32a53bce..0a0b693d 100644--- a/src/components/settings/RichPresencePanel.svelte+++ b/src/components/settings/RichPresencePanel.svelte@@ -1,178 +1,174 @@-<script lang="ts">- import { t } from "$lib/i18n";- import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";- import { rpcTestConnection, rpcSyncIdleStats } from "$lib/rpc";- import { showToast } from "$lib/stores/toast-store.svelte";-- let settings = $derived(getSettings());- let busy = $state(false);- let testResult = $state<"ok" | "fail" | null>(null);- let appIdInput = $state("");- let imageKeyInput = $state("");-- $effect(() => {- if (settings) {- appIdInput = settings.rpc?.app_id ?? "";- imageKeyInput = settings.rpc?.large_image_key ?? "";- }- });-- async function toggleEnabled() {- if (!settings || busy) return;- busy = true;- try {- await updateSettings({ rpc: { enabled: !settings.rpc.enabled } });- if (!settings.rpc.enabled) {- testResult = null;- } else {- void rpcSyncIdleStats();- }- } finally {- busy = false;- }- }-- async function saveAdvanced() {- if (!settings || busy) return;- busy = true;- try {- await updateSettings({- rpc: {- app_id: appIdInput.trim(),- large_image_key: imageKeyInput.trim(),- },- });- void rpcSyncIdleStats();- showToast("success", $t("settings.rpc.saved") as string);- } catch (e) {- showToast("error", e instanceof Error ? e.message : String(e));- } finally {- busy = false;- }- }-- async function testConnection() {- if (busy) return;- busy = true;- testResult = null;- try {- const res = await rpcTestConnection();- testResult = res.ok ? "ok" : "fail";- if (!res.ok) {- showToast("error", $t("settings.rpc.test_fail") as string);- } else {- showToast("success", $t("settings.rpc.test_ok") as string);- }- } catch (e) {- testResult = "fail";- showToast("error", e instanceof Error ? e.message : String(e));- } finally {- busy = false;- }- }-</script>--{#if settings}- <section class="section">- <h5 class="section-title">{$t("settings.rpc.title")}</h5>- <p class="setting-path" style="margin: 0 0 8px 4px">{$t("settings.rpc.desc")}</p>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.rpc.enable")}</span>- <span class="setting-path">{$t("settings.rpc.privacy_note")}</span>- </div>- <button- class="toggle"- class:on={settings.rpc.enabled}- onclick={toggleEnabled}- disabled={busy}- role="switch"- aria-checked={settings.rpc.enabled}- aria-label={$t("settings.rpc.enable") as string}- ><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.rpc.test")}</span>- <span class="setting-path">{$t("settings.rpc.test_desc")}</span>- </div>- <div class="rpc-test-row">- <button- class="button"- onclick={testConnection}- disabled={busy || !settings.rpc.enabled}- type="button"- >{$t("settings.rpc.test_button")}</button>- {#if testResult === "ok"}- <span class="badge ok">✓</span>- {:else if testResult === "fail"}- <span class="badge fail">✗</span>- {/if}- </div>- </div>- </div>- </section>-- <details class="section">- <summary class="section-title">{$t("settings.rpc.advanced")}</summary>- <div class="card">- <div class="setting-row stack">- <div class="setting-col">- <span class="setting-label">{$t("settings.rpc.app_id")}</span>- <span class="setting-path">{$t("settings.rpc.app_id_hint")}</span>- </div>- <input type="text" class="rpc-input" bind:value={appIdInput} spellcheck="false" />- </div>- <div class="divider"></div>- <div class="setting-row stack">- <div class="setting-col">- <span class="setting-label">{$t("settings.rpc.large_image")}</span>- <span class="setting-path">{$t("settings.rpc.large_image_hint")}</span>- </div>- <input type="text" class="rpc-input" bind:value={imageKeyInput} spellcheck="false" />- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label"></span>- <button class="button" onclick={saveAdvanced} disabled={busy} type="button">- {$t("settings.rpc.save")}- </button>- </div>- </div>- </details>-{/if}--<style>- .rpc-test-row {- display: flex;- align-items: center;- gap: 10px;- }- .badge {- font-size: 14px;- font-weight: 700;- }- .badge.ok { color: var(--green, #4ade80); }- .badge.fail { color: var(--red, #f87171); }- .rpc-input {- width: 100%;- padding: 8px 10px;- background: var(--button-elevated);- border: 1px solid var(--input-border, var(--border));- border-radius: calc(var(--border-radius) / 2);- color: var(--text);- font-family: ui-monospace, monospace;- font-size: 12.5px;- outline: none;- }- .rpc-input:focus {- border-color: var(--accent);- }- .setting-row.stack {- flex-direction: column;- align-items: stretch;- gap: 8px;- }-</style>+<script lang="ts">+ import { t } from "$lib/i18n";+ import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";+ import { rpcTestConnection, rpcSyncIdleStats } from "$lib/rpc";+ import { showToast } from "$lib/stores/toast-store.svelte";++ let settings = $derived(getSettings());+ let busy = $state(false);+ let testResult = $state<"ok" | "fail" | null>(null);+ let appIdInput = $state("");+ let imageKeyInput = $state("");++ $effect(() => {+ if (settings) {+ appIdInput = settings.rpc?.app_id ?? "";+ imageKeyInput = settings.rpc?.large_image_key ?? "";+ }+ });++ async function toggleEnabled() {+ if (!settings || busy) return;+ busy = true;+ try {+ await updateSettings({ rpc: { enabled: !settings.rpc.enabled } });+ if (!settings.rpc.enabled) {+ testResult = null;+ } else {+ void rpcSyncIdleStats();+ }+ } finally {+ busy = false;+ }+ }++ async function saveAdvanced() {+ if (!settings || busy) return;+ busy = true;+ try {+ await updateSettings({+ rpc: {+ app_id: appIdInput.trim(),+ large_image_key: imageKeyInput.trim(),+ },+ });+ void rpcSyncIdleStats();+ showToast("success", $t("settings.rpc.saved") as string);+ } catch (e) {+ showToast("error", e instanceof Error ? e.message : String(e));+ } finally {+ busy = false;+ }+ }++ async function testConnection() {+ if (busy) return;+ busy = true;+ testResult = null;+ try {+ const res = await rpcTestConnection();+ testResult = res.ok ? "ok" : "fail";+ if (!res.ok) {+ showToast("error", $t("settings.rpc.test_fail") as string);+ } else {+ showToast("success", $t("settings.rpc.test_ok") as string);+ }+ } catch (e) {+ testResult = "fail";+ showToast("error", e instanceof Error ? e.message : String(e));+ } finally {+ busy = false;+ }+ }+</script>++{#if settings}+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.rpc.enable")}</span>+ <span class="setting-path">{$t("settings.rpc.privacy_note")}</span>+ </div>+ <button+ class="toggle"+ class:on={settings.rpc.enabled}+ onclick={toggleEnabled}+ disabled={busy}+ role="switch"+ aria-checked={settings.rpc.enabled}+ aria-label={$t("settings.rpc.enable") as string}+ ><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.rpc.test")}</span>+ <span class="setting-path">{$t("settings.rpc.test_desc")}</span>+ </div>+ <div class="rpc-test-row">+ <button+ class="button"+ onclick={testConnection}+ disabled={busy || !settings.rpc.enabled}+ type="button"+ >{$t("settings.rpc.test_button")}</button>+ {#if testResult === "ok"}+ <span class="badge ok">✓</span>+ {:else if testResult === "fail"}+ <span class="badge fail">✗</span>+ {/if}+ </div>+ </div>+ </div>++ <p class="settings-subsection-head">{$t("settings.rpc.advanced")}</p>+ <div class="card">+ <div class="setting-row stack">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.rpc.app_id")}</span>+ <span class="setting-path">{$t("settings.rpc.app_id_hint")}</span>+ </div>+ <input type="text" class="rpc-input" bind:value={appIdInput} spellcheck="false" />+ </div>+ <div class="divider"></div>+ <div class="setting-row stack">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.rpc.large_image")}</span>+ <span class="setting-path">{$t("settings.rpc.large_image_hint")}</span>+ </div>+ <input type="text" class="rpc-input" bind:value={imageKeyInput} spellcheck="false" />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <span class="setting-label"></span>+ <button class="button" onclick={saveAdvanced} disabled={busy} type="button">+ {$t("settings.rpc.save")}+ </button>+ </div>+ </div>+{/if}++<style>+ .rpc-test-row {+ display: flex;+ align-items: center;+ gap: 10px;+ }+ .badge {+ font-size: 14px;+ font-weight: 700;+ }+ .badge.ok { color: var(--green, #4ade80); }+ .badge.fail { color: var(--red, #f87171); }+ .rpc-input {+ width: 100%;+ padding: 8px 10px;+ background: var(--button-elevated);+ border: 1px solid var(--input-border, var(--border));+ border-radius: calc(var(--border-radius) / 2);+ color: var(--text);+ font-family: ui-monospace, monospace;+ font-size: 12.5px;+ outline: none;+ }+ .rpc-input:focus-visible {+ border-color: var(--accent);+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }+ .setting-row.stack {+ flex-direction: column;+ align-items: stretch;+ gap: 8px;+ }+</style>diff --git a/src/components/settings/SettingsAdvanced.svelte b/src/components/settings/SettingsAdvanced.svelteindex a1f5fa67..2212a587 100644--- a/src/components/settings/SettingsAdvanced.svelte+++ b/src/components/settings/SettingsAdvanced.svelte@@ -2,138 +2,323 @@import { t } from "$lib/i18n";import { isDebugEnabled, setDebugEnabled, setDebugPanelOpen } from "$lib/stores/debug-store.svelte";import { getSettings, updateSettings, toggleBool, changeNumber } from "./settings-helpers";+ import SettingsDrillBack from "./SettingsDrillBack.svelte";+ import SettingsDrillItem from "./SettingsDrillItem.svelte";- let { resetting = false, onReset }: {+ let {+ resetting = false,+ onReset,+ searchActive = false,+ }: {resetting?: boolean;onReset: () => void;+ searchActive?: boolean;} = $props();+ type AdvancedDrill = "performance" | "torrent" | "expert" | "debug";+ let subView = $state<AdvancedDrill | null>(null);+let settings = $derived(getSettings());++ const DRILL_ITEMS: { id: AdvancedDrill; titleKey: string; hintKey: string }[] = [+ { id: "performance", titleKey: "settings.advanced.section_performance", hintKey: "settings.advanced.section_performance_desc" },+ { id: "torrent", titleKey: "settings.advanced.section_torrent", hintKey: "settings.advanced.section_torrent_desc" },+ { id: "expert", titleKey: "settings.advanced.section_expert", hintKey: "settings.advanced.section_expert_desc" },+ { id: "debug", titleKey: "settings.advanced.section_debug", hintKey: "settings.advanced.section_debug_desc" },+ ];++ $effect(() => {+ if (searchActive) subView = null;+ });</script>{#if settings}-<section class="section">- <h5 class="section-title">{$t('settings.advanced.title')}</h5>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.max_concurrent_downloads')}</span>- <span class="setting-path">{$t('settings.advanced.max_concurrent_downloads_desc')}</span>- </div>- <input type="number" class="input-number" min="1" max="10" value={settings.advanced.max_concurrent_downloads} onchange={(e) => changeNumber("advanced", "max_concurrent_downloads", e)} />- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.advanced.max_concurrent_segments')}</span>- <input type="number" class="input-number" min="1" max="100" value={settings.advanced.max_concurrent_segments} onchange={(e) => changeNumber("advanced", "max_concurrent_segments", e)} />+ {#if searchActive}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.advanced.section_performance')}</h5>+ <p class="settings-section-hint">{$t('settings.advanced.section_performance_desc')}</p></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.concurrent_fragments')}</span>- <span class="setting-path">{$t('settings.advanced.concurrent_fragments_desc')}</span>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_concurrent_downloads')}</span>+ <span class="setting-path">{$t('settings.advanced.max_concurrent_downloads_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="10" value={settings.advanced.max_concurrent_downloads} onchange={(e) => changeNumber("advanced", "max_concurrent_downloads", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_concurrent_segments')}</span>+ <span class="setting-path">{$t('settings.advanced.max_concurrent_segments_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="100" value={settings.advanced.max_concurrent_segments} onchange={(e) => changeNumber("advanced", "max_concurrent_segments", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.concurrent_fragments')}</span>+ <span class="setting-path">{$t('settings.advanced.concurrent_fragments_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="32" value={settings.advanced.concurrent_fragments} onchange={(e) => changeNumber("advanced", "concurrent_fragments", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_retries')}</span>+ <span class="setting-path">{$t('settings.advanced.max_retries_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="20" value={settings.advanced.max_retries} onchange={(e) => changeNumber("advanced", "max_retries", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.stagger_delay')}</span>+ <span class="setting-path">{$t('settings.advanced.stagger_delay_desc')}</span>+ </div>+ <input type="number" class="input-number" min="0" max="2000" step="50" value={settings.advanced.stagger_delay_ms} onchange={(e) => changeNumber("advanced", "stagger_delay_ms", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.prevent_sleep')}</span>+ <span class="setting-path">{$t('settings.advanced.prevent_sleep_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.prevent_sleep} onclick={() => toggleBool("advanced", "prevent_sleep", settings.advanced.prevent_sleep)} role="switch" aria-checked={settings.advanced.prevent_sleep} aria-label={$t('settings.advanced.prevent_sleep') as string}><span class="toggle-knob"></span></button></div>- <input type="number" class="input-number" min="1" max="32" value={settings.advanced.concurrent_fragments} onchange={(e) => changeNumber("advanced", "concurrent_fragments", e)} /></div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.advanced.max_retries')}</span>- <input type="number" class="input-number" min="1" max="20" value={settings.advanced.max_retries} onchange={(e) => changeNumber("advanced", "max_retries", e)} />++ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.advanced.section_torrent')}</h5>+ <p class="settings-section-hint">{$t('settings.advanced.section_torrent_desc')}</p></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.stagger_delay')}</span>- <span class="setting-path">{$t('settings.advanced.stagger_delay_desc')}</span>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_listen_port')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_listen_port_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1024" max="65525" value={settings.advanced.torrent_listen_port} onchange={(e) => changeNumber("advanced", "torrent_listen_port", e)} /></div>- <input type="number" class="input-number" min="0" max="2000" step="50" value={settings.advanced.stagger_delay_ms} onchange={(e) => changeNumber("advanced", "stagger_delay_ms", e)} />- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.torrent_listen_port')}</span>- <span class="setting-path">{$t('settings.advanced.torrent_listen_port_desc')}</span>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_auto_trackers')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_auto_trackers_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.torrent_auto_trackers} onclick={() => toggleBool("advanced", "torrent_auto_trackers", settings.advanced.torrent_auto_trackers)} role="switch" aria-checked={settings.advanced.torrent_auto_trackers} aria-label={$t('settings.advanced.torrent_auto_trackers') as string}><span class="toggle-knob"></span></button></div>- <input type="number" class="input-number" min="1024" max="65525" value={settings.advanced.torrent_listen_port} onchange={(e) => changeNumber("advanced", "torrent_listen_port", e)} />- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.torrent_auto_trackers')}</span>- <span class="setting-path">{$t('settings.advanced.torrent_auto_trackers_desc')}</span>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_upnp')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_upnp_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.torrent_upnp} onclick={() => toggleBool("advanced", "torrent_upnp", settings.advanced.torrent_upnp)} role="switch" aria-checked={settings.advanced.torrent_upnp} aria-label={$t('settings.advanced.torrent_upnp') as string}><span class="toggle-knob"></span></button></div>- <button class="toggle" class:on={settings.advanced.torrent_auto_trackers} onclick={() => toggleBool("advanced", "torrent_auto_trackers", settings.advanced.torrent_auto_trackers)} role="switch" aria-checked={settings.advanced.torrent_auto_trackers} aria-label={$t('settings.advanced.torrent_auto_trackers') as string}><span class="toggle-knob"></span></button></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.torrent_upnp')}</span>- <span class="setting-path">{$t('settings.advanced.torrent_upnp_desc')}</span>- </div>- <button class="toggle" class:on={settings.advanced.torrent_upnp} onclick={() => toggleBool("advanced", "torrent_upnp", settings.advanced.torrent_upnp)} role="switch" aria-checked={settings.advanced.torrent_upnp} aria-label={$t('settings.advanced.torrent_upnp') as string}><span class="toggle-knob"></span></button>++ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.advanced.section_expert')}</h5>+ <p class="settings-section-hint">{$t('settings.advanced.section_expert_desc')}</p></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.prevent_sleep')}</span>- <span class="setting-path">{$t('settings.advanced.prevent_sleep_desc')}</span>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.cookies_from_browser')}</span>+ <span class="setting-path">{$t('settings.advanced.cookies_from_browser_desc')}</span>+ </div>+ <input type="text" class="input-text" placeholder={$t('settings.advanced.cookies_from_browser_placeholder')} value={settings.advanced?.cookies_from_browser ?? ""} onchange={(e) => updateSettings({ advanced: { cookies_from_browser: (e.target as HTMLInputElement).value.trim() } })} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.user_agent')}</span>+ <span class="setting-path">{$t('settings.advanced.user_agent_desc')}</span>+ </div>+ <input type="text" class="input-text" placeholder={$t('settings.advanced.user_agent_placeholder')} value={settings.advanced?.user_agent ?? ""} onchange={(e) => updateSettings({ advanced: { user_agent: (e.target as HTMLInputElement).value.trim() } })} /></div>- <button class="toggle" class:on={settings.advanced.prevent_sleep} onclick={() => toggleBool("advanced", "prevent_sleep", settings.advanced.prevent_sleep)} role="switch" aria-checked={settings.advanced.prevent_sleep} aria-label={$t('settings.advanced.prevent_sleep') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.cookies_from_browser')}</span>- <span class="setting-path">{$t('settings.advanced.cookies_from_browser_desc')}</span>- </div>- <input- type="text"- class="input-text"- placeholder={$t('settings.advanced.cookies_from_browser_placeholder')}- value={settings.advanced?.cookies_from_browser ?? ""}- onchange={(e) => updateSettings({ advanced: { cookies_from_browser: (e.target as HTMLInputElement).value.trim() } })}- /></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.advanced.user_agent')}</span>- <span class="setting-path">{$t('settings.advanced.user_agent_desc')}</span>- </div>- <input- type="text"- class="input-text"- placeholder={$t('settings.advanced.user_agent_placeholder')}- value={settings.advanced?.user_agent ?? ""}- onchange={(e) => updateSettings({ advanced: { user_agent: (e.target as HTMLInputElement).value.trim() } })}- />++ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.advanced.section_debug')}</h5>+ <p class="settings-section-hint">{$t('settings.advanced.section_debug_desc')}</p></div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('debug.enable')}</span>- <span class="setting-path">{$t('debug.enable_desc')}</span>- </div>- <button class="toggle" class:on={isDebugEnabled()} onclick={() => setDebugEnabled(!isDebugEnabled())} role="switch" aria-checked={isDebugEnabled()} aria-label={$t('debug.enable') as string}>- <span class="toggle-knob"></span>- </button>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('debug.enable')}</span>+ <span class="setting-path">{$t('debug.enable_desc')}</span>+ </div>+ <button class="toggle" class:on={isDebugEnabled()} onclick={() => setDebugEnabled(!isDebugEnabled())} role="switch" aria-checked={isDebugEnabled()} aria-label={$t('debug.enable') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if isDebugEnabled()}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('debug.open_panel')}</span>+ <span class="setting-path">{$t('debug.open_panel_desc')}</span>+ </div>+ <button class="button" onclick={() => setDebugPanelOpen(true)}>{$t('debug.open_panel')}</button>+ </div>+ {/if}</div>- {#if isDebugEnabled()}- <div class="divider"></div>++ <section class="section">+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.reset')}</span>+ <span class="setting-path">{$t('settings.advanced.reset_desc')}</span>+ </div>+ <button class="button reset-btn" onclick={onReset} disabled={resetting}>{$t('settings.advanced.reset')}</button>+ </div>+ </div>+ </section>+ {:else if subView === null}+ <nav class="settings-drill-list" aria-label={$t('settings.cat_advanced')}>+ {#each DRILL_ITEMS as item (item.id)}+ <SettingsDrillItem+ title={$t(item.titleKey)}+ hint={$t(item.hintKey)}+ onclick={() => { subView = item.id; }}+ />+ {/each}+ </nav>+ <div class="settings-drill-spacer"></div>+ <div class="card"><div class="setting-row">- <span class="setting-label">{$t('debug.open_panel')}</span>- <button class="button" onclick={() => setDebugPanelOpen(true)}>- {$t('debug.open_panel')}- </button>+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.reset')}</span>+ <span class="setting-path">{$t('settings.advanced.reset_desc')}</span>+ </div>+ <button class="button reset-btn" onclick={onReset} disabled={resetting}>{$t('settings.advanced.reset')}</button></div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.advanced.reset')}</span>- <button class="button reset-btn" onclick={onReset} disabled={resetting}>- {$t('settings.advanced.reset')}- </button></div>- </div>-</section>+ {:else}+ {@const active = DRILL_ITEMS.find((i) => i.id === subView)}+ {#if active}+ <SettingsDrillBack+ title={$t(active.titleKey)}+ hint={$t(active.hintKey)}+ onBack={() => { subView = null; }}+ />+ {/if}++ {#if subView === "performance"}+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_concurrent_downloads')}</span>+ <span class="setting-path">{$t('settings.advanced.max_concurrent_downloads_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="10" value={settings.advanced.max_concurrent_downloads} onchange={(e) => changeNumber("advanced", "max_concurrent_downloads", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_concurrent_segments')}</span>+ <span class="setting-path">{$t('settings.advanced.max_concurrent_segments_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="100" value={settings.advanced.max_concurrent_segments} onchange={(e) => changeNumber("advanced", "max_concurrent_segments", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.concurrent_fragments')}</span>+ <span class="setting-path">{$t('settings.advanced.concurrent_fragments_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="32" value={settings.advanced.concurrent_fragments} onchange={(e) => changeNumber("advanced", "concurrent_fragments", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.max_retries')}</span>+ <span class="setting-path">{$t('settings.advanced.max_retries_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1" max="20" value={settings.advanced.max_retries} onchange={(e) => changeNumber("advanced", "max_retries", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.stagger_delay')}</span>+ <span class="setting-path">{$t('settings.advanced.stagger_delay_desc')}</span>+ </div>+ <input type="number" class="input-number" min="0" max="2000" step="50" value={settings.advanced.stagger_delay_ms} onchange={(e) => changeNumber("advanced", "stagger_delay_ms", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.prevent_sleep')}</span>+ <span class="setting-path">{$t('settings.advanced.prevent_sleep_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.prevent_sleep} onclick={() => toggleBool("advanced", "prevent_sleep", settings.advanced.prevent_sleep)} role="switch" aria-checked={settings.advanced.prevent_sleep} aria-label={$t('settings.advanced.prevent_sleep') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>+ {:else if subView === "torrent"}+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_listen_port')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_listen_port_desc')}</span>+ </div>+ <input type="number" class="input-number" min="1024" max="65525" value={settings.advanced.torrent_listen_port} onchange={(e) => changeNumber("advanced", "torrent_listen_port", e)} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_auto_trackers')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_auto_trackers_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.torrent_auto_trackers} onclick={() => toggleBool("advanced", "torrent_auto_trackers", settings.advanced.torrent_auto_trackers)} role="switch" aria-checked={settings.advanced.torrent_auto_trackers} aria-label={$t('settings.advanced.torrent_auto_trackers') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.torrent_upnp')}</span>+ <span class="setting-path">{$t('settings.advanced.torrent_upnp_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.advanced.torrent_upnp} onclick={() => toggleBool("advanced", "torrent_upnp", settings.advanced.torrent_upnp)} role="switch" aria-checked={settings.advanced.torrent_upnp} aria-label={$t('settings.advanced.torrent_upnp') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>+ {:else if subView === "expert"}+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.cookies_from_browser')}</span>+ <span class="setting-path">{$t('settings.advanced.cookies_from_browser_desc')}</span>+ </div>+ <input type="text" class="input-text" placeholder={$t('settings.advanced.cookies_from_browser_placeholder')} value={settings.advanced?.cookies_from_browser ?? ""} onchange={(e) => updateSettings({ advanced: { cookies_from_browser: (e.target as HTMLInputElement).value.trim() } })} />+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.advanced.user_agent')}</span>+ <span class="setting-path">{$t('settings.advanced.user_agent_desc')}</span>+ </div>+ <input type="text" class="input-text" placeholder={$t('settings.advanced.user_agent_placeholder')} value={settings.advanced?.user_agent ?? ""} onchange={(e) => updateSettings({ advanced: { user_agent: (e.target as HTMLInputElement).value.trim() } })} />+ </div>+ </div>+ {:else if subView === "debug"}+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('debug.enable')}</span>+ <span class="setting-path">{$t('debug.enable_desc')}</span>+ </div>+ <button class="toggle" class:on={isDebugEnabled()} onclick={() => setDebugEnabled(!isDebugEnabled())} role="switch" aria-checked={isDebugEnabled()} aria-label={$t('debug.enable') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if isDebugEnabled()}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('debug.open_panel')}</span>+ <span class="setting-path">{$t('debug.open_panel_desc')}</span>+ </div>+ <button class="button" onclick={() => setDebugPanelOpen(true)}>{$t('debug.open_panel')}</button>+ </div>+ {/if}+ </div>+ {/if}+ {/if}{/if}diff --git a/src/components/settings/SettingsAppearance.svelte b/src/components/settings/SettingsAppearance.svelteindex ff5c5d9a..a28e3a9f 100644--- a/src/components/settings/SettingsAppearance.svelte+++ b/src/components/settings/SettingsAppearance.svelte@@ -1,146 +1,182 @@-<script lang="ts">- import { t } from "$lib/i18n";- import { showToast } from "$lib/stores/toast-store.svelte";- import RichPresencePanel from "./RichPresencePanel.svelte";- import {- getSettings,- updateSettings,- changeTheme,- changeLanguage,- CORE_THEMES,- MORE_THEMES,- MORE_THEME_IDS,- } from "./settings-helpers";-- let settings = $derived(getSettings());- let selectedInMore = $derived(MORE_THEME_IDS.has(settings?.appearance?.theme ?? ""));-</script>--{#if settings}- <section class="section">- <h5 class="section-title">{$t('settings.general.title')}</h5>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.general.start_with_system')}</span>- <span class="setting-path">{$t('settings.general.start_with_system_desc')}</span>- </div>- <button- class="toggle"- class:on={settings.start_with_system}- onclick={() => updateSettings({ start_with_system: !settings.start_with_system })}- role="switch"- aria-checked={settings.start_with_system}- aria-label={$t('settings.general.start_with_system') as string}- >- <span class="toggle-knob"></span>- </button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.general.start_minimized')}</span>- <span class="setting-path">{$t('settings.general.start_minimized_desc')}</span>- </div>- <button- class="toggle"- class:on={settings.start_minimized}- onclick={() => updateSettings({ start_minimized: !settings.start_minimized })}- role="switch"- aria-checked={settings.start_minimized}- aria-label={$t('settings.general.start_minimized') as string}- >- <span class="toggle-knob"></span>- </button>- </div>- </div>- </section>-- <section class="section">- <h5 class="section-title">{$t('settings.appearance.title')}</h5>- <div class="card">- <div class="setting-row">- <span class="setting-label">{$t('settings.appearance.theme')}</span>- </div>- <div class="theme-grid">- {#each CORE_THEMES as theme (theme.id)}- <button- class="theme-card"- class:active={settings.appearance.theme === theme.id}- onclick={() => changeTheme(theme.id)}- >- {#if theme.colors}- <div class="theme-preview">- <div class="preview-bg" style="background: {theme.colors[0]}">- <div class="preview-text" style="color: {theme.colors[1]}">Aa</div>- <div class="preview-accent" style="background: {theme.colors[2]}"></div>- </div>- </div>- {:else}- <div class="theme-preview system-preview">- <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>- </div>- {/if}- <span class="theme-name">{theme.labelKey ? $t(theme.labelKey) : theme.label}</span>- </button>- {/each}- </div>- <details class="more-themes" open={selectedInMore}>- <summary>{$t("settings.appearance.more_themes")}</summary>- <div class="theme-grid">- {#each MORE_THEMES as theme (theme.id)}- <button- class="theme-card"- class:active={settings.appearance.theme === theme.id}- onclick={() => changeTheme(theme.id)}- >- <div class="theme-preview">- <div class="preview-bg" style="background: {theme.colors[0]}">- <div class="preview-text" style="color: {theme.colors[1]}">Aa</div>- <div class="preview-accent" style="background: {theme.colors[2]}"></div>- </div>- </div>- <span class="theme-name">{theme.label}</span>- </button>- {/each}- </div>- </details>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.appearance.language')}</span>- <select class="select" value={settings.appearance.language} onchange={changeLanguage}>- <option value="en">{$t('settings.appearance.lang_en')}</option>- <option value="ru">{$t('settings.appearance.lang_ru')}</option>- <option value="pt">{$t('settings.appearance.lang_pt')}</option>- <option value="zh">{$t('settings.appearance.lang_zh')}</option>- <option value="ja">{$t('settings.appearance.lang_ja')}</option>- <option value="it">{$t('settings.appearance.lang_it')}</option>- <option value="fr">{$t('settings.appearance.lang_fr')}</option>- <option value="es">{$t('settings.appearance.lang_es')}</option>- <option value="el">{$t('settings.appearance.lang_el')}</option>- </select>- </div>- </div>- </section>-- <section class="section">- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.general.reset_hints')}</span>- <span class="setting-path">{$t('settings.general.reset_hints_desc')}</span>- </div>- <button- class="button"- onclick={() => {- const keys = Object.keys(localStorage).filter((k) => k.startsWith('hint_dismissed_'));- for (const k of keys) localStorage.removeItem(k);- showToast('info', $t('settings.general.hints_restored') as string);- }}- >{$t('settings.general.restore')}</button>- </div>- </div>- </section>-- <RichPresencePanel />-{/if}+<script lang="ts">+ import { t } from "$lib/i18n";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import RichPresencePanel from "./RichPresencePanel.svelte";+ import SettingsDrillBack from "./SettingsDrillBack.svelte";+ import SettingsDrillItem from "./SettingsDrillItem.svelte";+ import {+ getSettings,+ updateSettings,+ changeTheme,+ changeLanguage,+ CORE_THEMES,+ MORE_THEMES,+ MORE_THEME_IDS,+ } from "./settings-helpers";++ let { searchActive = false }: { searchActive?: boolean } = $props();++ let settings = $derived(getSettings());+ let selectedInMore = $derived(MORE_THEME_IDS.has(settings?.appearance?.theme ?? ""));+ let moreThemesOpen = $state(false);+ let rpcDrillOpen = $state(false);++ $effect(() => {+ if (selectedInMore) moreThemesOpen = true;+ });++ $effect(() => {+ if (searchActive) rpcDrillOpen = false;+ });+</script>++{#if settings}+ <section class="section">+ <h5 class="section-title">{$t('settings.general.title')}</h5>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.general.start_with_system')}</span>+ <span class="setting-path">{$t('settings.general.start_with_system_desc')}</span>+ </div>+ <button+ class="toggle"+ class:on={settings.start_with_system}+ onclick={() => updateSettings({ start_with_system: !settings.start_with_system })}+ role="switch"+ aria-checked={settings.start_with_system}+ aria-label={$t('settings.general.start_with_system') as string}+ >+ <span class="toggle-knob"></span>+ </button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.general.start_minimized')}</span>+ <span class="setting-path">{$t('settings.general.start_minimized_desc')}</span>+ </div>+ <button+ class="toggle"+ class:on={settings.start_minimized}+ onclick={() => updateSettings({ start_minimized: !settings.start_minimized })}+ role="switch"+ aria-checked={settings.start_minimized}+ aria-label={$t('settings.general.start_minimized') as string}+ >+ <span class="toggle-knob"></span>+ </button>+ </div>+ </div>+ </section>++ <section class="section">+ <h5 class="section-title">{$t('settings.appearance.title')}</h5>+ <div class="card">+ <div class="setting-row">+ <span class="setting-label">{$t('settings.appearance.theme')}</span>+ </div>+ <div class="theme-grid">+ {#each CORE_THEMES as theme (theme.id)}+ <button+ class="theme-card"+ class:active={settings.appearance.theme === theme.id}+ onclick={() => changeTheme(theme.id)}+ >+ {#if theme.colors}+ <div class="theme-preview">+ <div class="preview-bg" style="background: {theme.colors[0]}">+ <div class="preview-text" style="color: {theme.colors[1]}">Aa</div>+ <div class="preview-accent" style="background: {theme.colors[2]}"></div>+ </div>+ </div>+ {:else}+ <div class="theme-preview system-preview">+ <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>+ </div>+ {/if}+ <span class="theme-name">{theme.labelKey ? $t(theme.labelKey) : theme.label}</span>+ </button>+ {/each}+ </div>+ {#if !moreThemesOpen}+ <button type="button" class="more-themes-toggle" onclick={() => { moreThemesOpen = true; }}>+ {$t("settings.appearance.more_themes")}+ </button>+ {:else}+ <div class="more-themes">+ <div class="theme-grid">+ {#each MORE_THEMES as theme (theme.id)}+ <button+ class="theme-card"+ class:active={settings.appearance.theme === theme.id}+ onclick={() => changeTheme(theme.id)}+ >+ <div class="theme-preview">+ <div class="preview-bg" style="background: {theme.colors[0]}">+ <div class="preview-text" style="color: {theme.colors[1]}">Aa</div>+ <div class="preview-accent" style="background: {theme.colors[2]}"></div>+ </div>+ </div>+ <span class="theme-name">{theme.label}</span>+ </button>+ {/each}+ </div>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <span class="setting-label">{$t('settings.appearance.language')}</span>+ <select class="select" value={settings.appearance.language} onchange={changeLanguage}>+ <option value="en">{$t('settings.appearance.lang_en')}</option>+ <option value="ru">{$t('settings.appearance.lang_ru')}</option>+ <option value="pt">{$t('settings.appearance.lang_pt')}</option>+ <option value="zh">{$t('settings.appearance.lang_zh')}</option>+ <option value="ja">{$t('settings.appearance.lang_ja')}</option>+ <option value="it">{$t('settings.appearance.lang_it')}</option>+ <option value="fr">{$t('settings.appearance.lang_fr')}</option>+ <option value="es">{$t('settings.appearance.lang_es')}</option>+ <option value="el">{$t('settings.appearance.lang_el')}</option>+ </select>+ </div>+ </div>+ </section>++ <section class="section">+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.general.reset_hints')}</span>+ <span class="setting-path">{$t('settings.general.reset_hints_desc')}</span>+ </div>+ <button+ class="button"+ onclick={() => {+ const keys = Object.keys(localStorage).filter((k) => k.startsWith('hint_dismissed_'));+ for (const k of keys) localStorage.removeItem(k);+ showToast('info', $t('settings.general.hints_restored') as string);+ }}+ >{$t('settings.general.restore')}</button>+ </div>+ </div>+ </section>++ {#if searchActive || rpcDrillOpen}+ {#if rpcDrillOpen && !searchActive}+ <SettingsDrillBack+ title={$t('settings.rpc.title')}+ hint={$t('settings.rpc.desc')}+ onBack={() => { rpcDrillOpen = false; }}+ />+ {/if}+ <RichPresencePanel />+ {:else}+ <nav class="settings-drill-list">+ <SettingsDrillItem+ title={$t('settings.rpc.title')}+ hint={$t('settings.rpc.desc')}+ onclick={() => { rpcDrillOpen = true; }}+ />+ </nav>+ {/if}+{/if}diff --git a/src/components/settings/SettingsBrowserExtension.svelte b/src/components/settings/SettingsBrowserExtension.svelteindex 584661b7..e7110b5f 100644--- a/src/components/settings/SettingsBrowserExtension.svelte+++ b/src/components/settings/SettingsBrowserExtension.svelte@@ -1,220 +1,220 @@-<script lang="ts">- import { onMount, onDestroy } from "svelte";- import { invoke } from "@tauri-apps/api/core";- import { t } from "$lib/i18n";- import { showToast } from "$lib/stores/toast-store.svelte";-- type BridgeInfo = {- enabled: boolean;- port: number;- token: string;- url: string;- };-- let info = $state<BridgeInfo | null>(null);- let revealed = $state(false);- let rotating = $state(false);- let loading = $state(true);-- async function refresh() {- try {- info = await invoke<BridgeInfo>("get_bridge_info");- } catch (e: any) {- info = null;- showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));- } finally {- loading = false;- }- }-- async function copy(value: string, kind: "url" | "token") {- if (!value) return;- try {- await navigator.clipboard.writeText(value);- showToast(- "success",- kind === "url"- ? ($t("settings.bridge.copied_url") as string)- : ($t("settings.bridge.copied_token") as string)- );- } catch (e: any) {- showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));- }- }-- async function rotate() {- rotating = true;- try {- info = await invoke<BridgeInfo>("rotate_bridge_token");- showToast("success", $t("settings.bridge.rotated") as string);- } catch (e: any) {- showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));- } finally {- rotating = false;- }- }-- let pairing = $state(false);- let pairSecondsLeft = $state(0);- let pairTimer: ReturnType<typeof setInterval> | null = null;-- async function startPairing() {- try {- const res = await invoke<{ ok: boolean; window_secs: number; enabled: boolean }>(- "bridge_open_pairing"- );- if (!res.ok || !res.enabled) {- showToast("error", $t("settings.bridge.pair_unavailable") as string);- return;- }- pairing = true;- pairSecondsLeft = res.window_secs;- if (pairTimer) clearInterval(pairTimer);- pairTimer = setInterval(() => {- pairSecondsLeft -= 1;- if (pairSecondsLeft <= 0) {- pairing = false;- if (pairTimer) clearInterval(pairTimer);- pairTimer = null;- }- }, 1000);- } catch (e: any) {- showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));- }- }-- onDestroy(() => {- if (pairTimer) clearInterval(pairTimer);- });-- function maskedToken(value: string): string {- if (!value) return "";- if (value.length <= 8) return "•".repeat(value.length);- return value.slice(0, 4) + "…" + value.slice(-4);- }-- onMount(refresh);-</script>--<section class="section">- <h5 class="section-title">{$t("settings.bridge.title")}</h5>- <div class="card">- <p class="bridge-intro">{$t("settings.bridge.intro")}</p>-- {#if loading}- <div class="setting-row">- <span class="setting-label">{$t("common.loading")}</span>- </div>- {:else if !info || !info.enabled || info.port === 0 || !info.token}- <div class="setting-row">- <span class="setting-label">{$t("settings.bridge.unavailable")}</span>- </div>- {:else}- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.bridge.pair_label")}</span>- <span class="setting-hint">- {pairing- ? $t("settings.bridge.pair_active", { secs: pairSecondsLeft })- : $t("settings.bridge.pair_hint")}- </span>- </div>- <button- class="bridge-action primary"- type="button"- disabled={pairing}- onclick={startPairing}- >- {pairing ? $t("settings.bridge.pair_waiting") : $t("settings.bridge.pair")}- </button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.bridge.endpoint_label")}</span>- <span class="setting-hint">{info.url}</span>- </div>- <button class="bridge-action" type="button" onclick={() => copy(info!.url, "url")}>- {$t("settings.bridge.copy")}- </button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.bridge.token_label")}</span>- <span class="setting-hint token-display">- {revealed ? info.token : maskedToken(info.token)}- </span>- </div>- <div class="bridge-actions">- <button- class="bridge-action"- type="button"- onclick={() => (revealed = !revealed)}- >- {revealed ? $t("settings.bridge.hide") : $t("settings.bridge.reveal")}- </button>- <button- class="bridge-action"- type="button"- onclick={() => copy(info!.token, "token")}- >- {$t("settings.bridge.copy")}- </button>- </div>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t("settings.bridge.rotate_label")}</span>- <span class="setting-hint">{$t("settings.bridge.rotate_hint")}</span>- </div>- <button- class="bridge-action danger"- type="button"- disabled={rotating}- onclick={rotate}- >- {rotating ? $t("settings.bridge.rotating") : $t("settings.bridge.rotate")}- </button>- </div>- {/if}- </div>-</section>--<style>- .bridge-intro {- margin: 0 0 12px;- color: var(--color-text-muted, #95a0b7);- font-size: 13px;- line-height: 1.5;- }- .token-display {- font-family: var(--font-mono, "IBM Plex Mono", monospace);- word-break: break-all;- }- .bridge-actions {- display: inline-flex;- gap: 8px;- }- .bridge-action {- appearance: none;- border: 1px solid rgba(255, 255, 255, 0.12);- background: rgba(255, 255, 255, 0.04);- color: inherit;- padding: 6px 12px;- border-radius: 8px;- font: inherit;- cursor: pointer;- }- .bridge-action:hover { background: rgba(255, 255, 255, 0.08); }- .bridge-action:disabled { opacity: 0.5; cursor: not-allowed; }- .bridge-action.primary {- background: var(--accent);- color: var(--on-accent);- border-color: transparent;- }- .bridge-action.primary:hover { background: var(--accent-lo, var(--accent)); }- .bridge-action.danger { color: #ff8b6f; border-color: rgba(255, 139, 111, 0.3); }- .bridge-action.danger:hover { background: rgba(255, 139, 111, 0.1); }-</style>+<script lang="ts">+ import { onMount, onDestroy } from "svelte";+ import { invoke } from "@tauri-apps/api/core";+ import { t } from "$lib/i18n";+ import { showToast } from "$lib/stores/toast-store.svelte";++ type BridgeInfo = {+ enabled: boolean;+ port: number;+ token: string;+ url: string;+ };++ let info = $state<BridgeInfo | null>(null);+ let revealed = $state(false);+ let rotating = $state(false);+ let loading = $state(true);++ async function refresh() {+ try {+ info = await invoke<BridgeInfo>("get_bridge_info");+ } catch (e: any) {+ info = null;+ showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));+ } finally {+ loading = false;+ }+ }++ async function copy(value: string, kind: "url" | "token") {+ if (!value) return;+ try {+ await navigator.clipboard.writeText(value);+ showToast(+ "success",+ kind === "url"+ ? ($t("settings.bridge.copied_url") as string)+ : ($t("settings.bridge.copied_token") as string)+ );+ } catch (e: any) {+ showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));+ }+ }++ async function rotate() {+ rotating = true;+ try {+ info = await invoke<BridgeInfo>("rotate_bridge_token");+ showToast("success", $t("settings.bridge.rotated") as string);+ } catch (e: any) {+ showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));+ } finally {+ rotating = false;+ }+ }++ let pairing = $state(false);+ let pairSecondsLeft = $state(0);+ let pairTimer: ReturnType<typeof setInterval> | null = null;++ async function startPairing() {+ try {+ const res = await invoke<{ ok: boolean; window_secs: number; enabled: boolean }>(+ "bridge_open_pairing"+ );+ if (!res.ok || !res.enabled) {+ showToast("error", $t("settings.bridge.pair_unavailable") as string);+ return;+ }+ pairing = true;+ pairSecondsLeft = res.window_secs;+ if (pairTimer) clearInterval(pairTimer);+ pairTimer = setInterval(() => {+ pairSecondsLeft -= 1;+ if (pairSecondsLeft <= 0) {+ pairing = false;+ if (pairTimer) clearInterval(pairTimer);+ pairTimer = null;+ }+ }, 1000);+ } catch (e: any) {+ showToast("error", typeof e === "string" ? e : (e.message ?? String(e)));+ }+ }++ onDestroy(() => {+ if (pairTimer) clearInterval(pairTimer);+ });++ function maskedToken(value: string): string {+ if (!value) return "";+ if (value.length <= 8) return "•".repeat(value.length);+ return value.slice(0, 4) + "…" + value.slice(-4);+ }++ onMount(refresh);+</script>++<section class="section">+ <h5 class="section-title">{$t("settings.bridge.title")}</h5>+ <div class="card">+ <p class="bridge-intro">{$t("settings.bridge.intro")}</p>++ {#if loading}+ <div class="setting-row">+ <span class="setting-label">{$t("common.loading")}</span>+ </div>+ {:else if !info || !info.enabled || info.port === 0 || !info.token}+ <div class="setting-row">+ <span class="setting-label">{$t("settings.bridge.unavailable")}</span>+ </div>+ {:else}+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.bridge.pair_label")}</span>+ <span class="setting-hint">+ {pairing+ ? $t("settings.bridge.pair_active", { secs: pairSecondsLeft })+ : $t("settings.bridge.pair_hint")}+ </span>+ </div>+ <button+ class="bridge-action primary"+ type="button"+ disabled={pairing}+ onclick={startPairing}+ >+ {pairing ? $t("settings.bridge.pair_waiting") : $t("settings.bridge.pair")}+ </button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.bridge.endpoint_label")}</span>+ <span class="setting-hint">{info.url}</span>+ </div>+ <button class="bridge-action" type="button" onclick={() => copy(info!.url, "url")}>+ {$t("settings.bridge.copy")}+ </button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.bridge.token_label")}</span>+ <span class="setting-hint token-display">+ {revealed ? info.token : maskedToken(info.token)}+ </span>+ </div>+ <div class="bridge-actions">+ <button+ class="bridge-action"+ type="button"+ onclick={() => (revealed = !revealed)}+ >+ {revealed ? $t("settings.bridge.hide") : $t("settings.bridge.reveal")}+ </button>+ <button+ class="bridge-action"+ type="button"+ onclick={() => copy(info!.token, "token")}+ >+ {$t("settings.bridge.copy")}+ </button>+ </div>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t("settings.bridge.rotate_label")}</span>+ <span class="setting-hint">{$t("settings.bridge.rotate_hint")}</span>+ </div>+ <button+ class="bridge-action danger"+ type="button"+ disabled={rotating}+ onclick={rotate}+ >+ {rotating ? $t("settings.bridge.rotating") : $t("settings.bridge.rotate")}+ </button>+ </div>+ {/if}+ </div>+</section>++<style>+ .bridge-intro {+ margin: 0 0 12px;+ color: var(--color-text-muted, #95a0b7);+ font-size: 13px;+ line-height: 1.5;+ }+ .token-display {+ font-family: var(--font-mono, "IBM Plex Mono", monospace);+ word-break: break-all;+ }+ .bridge-actions {+ display: inline-flex;+ gap: 8px;+ }+ .bridge-action {+ appearance: none;+ border: 1px solid rgba(255, 255, 255, 0.12);+ background: rgba(255, 255, 255, 0.04);+ color: inherit;+ padding: 6px 12px;+ border-radius: 8px;+ font: inherit;+ cursor: pointer;+ }+ .bridge-action:hover { background: rgba(255, 255, 255, 0.08); }+ .bridge-action:disabled { opacity: 0.5; cursor: not-allowed; }+ .bridge-action.primary {+ background: var(--accent);+ color: var(--on-accent);+ border-color: transparent;+ }+ .bridge-action.primary:hover { background: var(--accent-lo, var(--accent)); }+ .bridge-action.danger { color: #ff8b6f; border-color: rgba(255, 139, 111, 0.3); }+ .bridge-action.danger:hover { background: rgba(255, 139, 111, 0.1); }+</style>diff --git a/src/components/settings/SettingsCookies.svelte b/src/components/settings/SettingsCookies.svelteindex 32b4f0b2..9d02af8f 100644--- a/src/components/settings/SettingsCookies.svelte+++ b/src/components/settings/SettingsCookies.svelte@@ -1,907 +1,907 @@-<script lang="ts">- import { onMount } from "svelte";- import { invoke } from "@tauri-apps/api/core";- import { open as openShell } from "@tauri-apps/plugin-shell";- import { save as saveDialog } from "@tauri-apps/plugin-dialog";- import { t } from "$lib/i18n";- import { showToast } from "$lib/stores/toast-store.svelte";- import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";- import CookieBucketCard from "$lib/components/cookies/CookieBucketCard.svelte";- import CookieImportMenu from "$lib/components/cookies/CookieImportMenu.svelte";- import CookieContentModal from "$lib/components/cookies/CookieContentModal.svelte";- import CookiePasteModal from "$lib/components/cookies/CookiePasteModal.svelte";- import BilibiliQrLogin from "$lib/components/cookies/BilibiliQrLogin.svelte";-- type Account = {- slug: string;- alias: string;- source_url: string | null;- source_label: string | null;- captured_at_ms: number;- cookie_count: number;- last_used_at_ms: number | null;- };- type BucketEntry = { platform_kind: string; accounts: Account[] };- type Registry = { buckets: Record<string, BucketEntry> };- type ListResponse = { registry: Registry; cookies_dir: string };- type ImportResponse = {- buckets_written: Array<{ domain: string; cookie_count: number; platform_kind: string }>;- };-- type HealthItem = {- domain: string;- slug: string;- status: string;- age_days: number;- expires_in_days: number;- cookie_count: number;- };- type HealthResponse = { items: HealthItem[]; fresh_days: number; expire_days: number };-- let registry = $state<Registry>({ buckets: {} });- let healthByKey = $state<Record<string, HealthItem>>({});-- function healthKey(domain: string, slug: string): string {- return `${domain}__${slug}`;- }-- function bucketHealth(domain: string): Record<string, HealthItem> {- const out: Record<string, HealthItem> = {};- for (const [k, v] of Object.entries(healthByKey)) {- if (v.domain === domain) out[v.slug] = v;- }- return out;- }-- let testing = $state<Record<string, boolean>>({});- let selectedCookies = $state<Record<string, boolean>>({});-- function cookieTestUrl(domain: string, platformKind: string | undefined): string {- if (platformKind === "bilibili") return "https://www.bilibili.com/video/BV1xx411c7mu";- if (platformKind === "youtube" || platformKind === "youtube_music") {- return "https://www.youtube.com/watch?v=dQw4w9WgXcQ";- }- if (platformKind === "twitch") return "https://www.twitch.tv/videos/1";- return `https://${domain}`;- }-- async function handleTest(domain: string, slug: string) {- const bucket = registry.buckets[domain];- const url = cookieTestUrl(domain, bucket?.platform_kind);- const key = healthKey(domain, slug);- testing = { ...testing, [key]: true };- try {- const res = await invoke<{ ok: boolean; message: string }>("cookies_test", {- request: { url, slug },- });- if (res.ok) {- showToast("success", $t("settings.cookies.test_ok") as string);- } else {- showToast(- "error",- ($t("settings.cookies.test_fail", { msg: res.message }) as string) || res.message,- );- }- } catch (e) {- showToast("error", String(e));- } finally {- testing = { ...testing, [key]: false };- }- }-- let settings = $derived(getSettings());- let managedOnly = $derived(settings?.download.always_use_managed_cookies ?? true);-- async function toggleManagedOnly() {- await updateSettings({- download: { always_use_managed_cookies: !managedOnly },- });- }- let cookiesDir = $state("");- let loading = $state(true);- let pasteOpen = $state(false);- let genericDomain = $state("");- let genericFormOpen = $state(false);-- let viewOpen = $state(false);- let viewDomain = $state("");- let viewSlug = $state("");- let viewContent = $state("");- let viewPath = $state("");-- let confirmClearOpen = $state(false);- let confirmDomain = $state("");- let confirmSlug = $state("");- let confirmBulkClearOpen = $state(false);-- let addAccountOpen = $state(false);- let addAccountDomain = $state("");- let bilibiliQrOpen = $state(false);-- let bucketList = $derived(- Object.entries(registry.buckets)- .map(([domain, b]) => ({ domain, ...b }))- .sort((a, b) => {- const aTime = a.accounts[0]?.captured_at_ms ?? 0;- const bTime = b.accounts[0]?.captured_at_ms ?? 0;- return bTime - aTime;- }),- );- let selectedCookieItems = $derived.by(() => {- const items: Array<{ domain: string; slug: string; alias: string }> = [];- for (const [domain, bucket] of Object.entries(registry.buckets)) {- for (const account of bucket.accounts) {- if (selectedCookies[healthKey(domain, account.slug)]) {- items.push({ domain, slug: account.slug, alias: account.alias });- }- }- }- return items;- });- let selectedCount = $derived(selectedCookieItems.length);-- async function reload() {- loading = true;- try {- const res = await invoke<ListResponse>("cookies_list");- registry = res.registry;- cookiesDir = res.cookies_dir;- const validSelected: Record<string, boolean> = {};- for (const [domain, bucket] of Object.entries(res.registry.buckets)) {- for (const account of bucket.accounts) {- const key = healthKey(domain, account.slug);- if (selectedCookies[key]) validSelected[key] = true;- }- }- selectedCookies = validSelected;- try {- const h = await invoke<HealthResponse>("cookies_health");- const map: Record<string, HealthItem> = {};- for (const item of h.items) map[healthKey(item.domain, item.slug)] = item;- healthByKey = map;- } catch {- healthByKey = {};- }- } catch (e) {- showToast("error", String(e));- } finally {- loading = false;- }- }-- async function importContent(content: string, sourceUrl: string, alias: string, label: string) {- try {- const res = await invoke<ImportResponse>("cookies_import", {- request: {- content,- source_url: sourceUrl || null,- source_label: label,- alias: alias || null,- },- });- const total = res.buckets_written.reduce((s, b) => s + b.cookie_count, 0);- showToast(- "success",- ($t("settings.cookies.import_success", {- buckets: String(res.buckets_written.length),- cookies: String(total),- }) as string) ?? `Imported ${total} cookies`,- );- pasteOpen = false;- await reload();- } catch (e) {- showToast("error", String(e));- }- }-- async function handleImportFile(path: string) {- try {- const res = await invoke<ImportResponse>("cookies_import_file", {- request: { path, alias: null },- });- const total = res.buckets_written.reduce((s, b) => s + b.cookie_count, 0);- showToast(- "success",- ($t("settings.cookies.import_success", {- buckets: String(res.buckets_written.length),- cookies: String(total),- }) as string) ?? `Imported ${total} cookies`,- );- await reload();- } catch (e) {- showToast("error", String(e));- }- }-- async function handleImportPasteContent(content: string, sourceUrl: string, alias: string) {- await importContent(content, sourceUrl, alias, "Paste import");- }-- async function handleView(domain: string, slug: string) {- try {- const res = await invoke<{ content: string; path: string }>("cookies_read", {- request: { domain, slug },- });- viewContent = res.content;- viewPath = res.path;- viewDomain = domain;- viewSlug = slug;- viewOpen = true;- } catch (e) {- showToast("error", String(e));- }- }-- async function handleExport(domain: string, slug: string) {- try {- const saved = await saveDialog({- title: $t("settings.cookies.export_dialog_title") as string,- defaultPath: `${domain}-cookies.txt`,- filters: [{ name: "Netscape Cookies", extensions: ["txt"] }],- });- if (saved && typeof saved === "string") {- await invoke("cookies_export_to", {- request: { domain, slug, destination_path: saved },- });- showToast("success", $t("settings.cookies.export_done") as string);- }- } catch (e) {- showToast("error", String(e));- }- }-- async function handleRename(domain: string, slug: string, newAlias: string) {- try {- await invoke("cookies_rename", { request: { domain, slug, new_alias: newAlias } });- await reload();- } catch (e) {- showToast("error", String(e));- }- }-- function askClear(domain: string, slug: string) {- confirmDomain = domain;- confirmSlug = slug;- confirmClearOpen = true;- }-- function toggleCookieSelection(domain: string, slug: string, checked: boolean) {- const key = healthKey(domain, slug);- if (checked) {- selectedCookies = { ...selectedCookies, [key]: true };- return;- }- const next = { ...selectedCookies };- delete next[key];- selectedCookies = next;- }-- function selectAllCookies() {- const next: Record<string, boolean> = {};- for (const bucket of bucketList) {- for (const account of bucket.accounts) {- next[healthKey(bucket.domain, account.slug)] = true;- }- }- selectedCookies = next;- }-- function clearCookieSelection() {- selectedCookies = {};- }-- function askBulkClear() {- if (selectedCount === 0) return;- confirmBulkClearOpen = true;- }-- function openAddAccount(domain: string) {- addAccountDomain = domain;- if (domain === "bilibili.com") {- bilibiliQrOpen = true;- return;- }- addAccountOpen = true;- }-- async function handleBilibiliQrSuccess(slug: string, uname: string) {- bilibiliQrOpen = false;- showToast(- "success",- ($t("settings.cookies.bilibili.login_qr_success", { uname }) as string) ||- `Signed in as ${uname}`,- );- await reload();- const _ = slug;- }-- let bilibiliWebviewLoading = $state(false);- async function startBilibiliWebviewLogin() {- if (bilibiliWebviewLoading) return;- bilibiliWebviewLoading = true;- try {- const res = await invoke<{ slug: string; uname: string; mid: number; is_vip: boolean }>(- "bilibili_webview_login",- );- showToast(- "success",- ($t("settings.cookies.bilibili.login_qr_success", { uname: res.uname }) as string) ||- `Signed in as ${res.uname}`,- );- await reload();- } catch (e) {- const key = typeof e === "string" ? e : "errors.bilibili.network_failed";- showToast("error", ($t(key) as string) || String(e));- } finally {- bilibiliWebviewLoading = false;- }- }-- type BilibiliImportedItem = { url: string; title: string };- type BilibiliImportResult = { total: number; items: BilibiliImportedItem[] };-- function bilibiliAccountSlug(): string | null {- const bucket = registry.buckets["bilibili.com"];- if (!bucket) return null;- const real = bucket.accounts.find((a) => !a.slug.startsWith("_") && a.cookie_count > 0);- if (real) return real.slug;- const imported = bucket.accounts.find((a) => a.slug === "_default" && a.cookie_count > 0);- return imported?.slug ?? null;- }-- async function enqueueImportedUrls(items: BilibiliImportedItem[]) {- const settings = getSettings();- const outDir = settings?.download?.default_output_dir ?? "";- for (const it of items) {- try {- await invoke("download_from_url", {- url: it.url,- outputDir: outDir,- downloadMode: null,- quality: null,- formatId: null,- referer: "https://www.bilibili.com",- cookieSlug: null,- timeRange: null,- playlistItems: null,- torrentFiles: null,- scheduledAt: null,- stopAt: null,- });- } catch (e) {- console.warn("[bilibili import] enqueue failed", it.url, e);- }- }- }-- async function importBilibiliWatchLater() {- const slug = bilibiliAccountSlug();- if (!slug) {- showToast("error", $t("settings.cookies.bilibili.import_no_account") as string);- return;- }- try {- const res = await invoke<BilibiliImportResult>("bilibili_import_watch_later", { slug });- showToast(- "success",- ($t("settings.cookies.bilibili.import_done", { count: String(res.items.length) }) as string) ??- `Queued ${res.items.length} items`,- );- await enqueueImportedUrls(res.items);- } catch (e) {- showToast("error", typeof e === "string" ? ($t(e) as string) || e : String(e));- }- }-- async function importBilibiliHistory() {- const slug = bilibiliAccountSlug();- if (!slug) {- showToast("error", $t("settings.cookies.bilibili.import_no_account") as string);- return;- }- try {- const res = await invoke<BilibiliImportResult>("bilibili_import_history", { slug });- showToast(- "success",- ($t("settings.cookies.bilibili.import_done", { count: String(res.items.length) }) as string) ??- `Queued ${res.items.length} items`,- );- await enqueueImportedUrls(res.items);- } catch (e) {- showToast("error", typeof e === "string" ? ($t(e) as string) || e : String(e));- }- }-- async function submitAddAccount(content: string, sourceUrl: string, alias: string) {- try {- const res = await invoke<{ slug: string; cookie_count: number }>("cookies_add_account", {- request: {- domain: addAccountDomain,- alias: alias || "Conta",- content,- source_url: sourceUrl || null,- },- });- showToast(- "success",- ($t("settings.cookies.add_account_success", {- slug: res.slug,- count: String(res.cookie_count),- }) as string) ?? `Account added (${res.slug})`,- );- addAccountOpen = false;- await reload();- } catch (e) {- showToast("error", String(e));- }- }-- async function confirmClear() {- try {- await invoke("cookies_clear", { request: { domain: confirmDomain, slug: confirmSlug } });- confirmClearOpen = false;- await reload();- showToast("success", $t("settings.cookies.cleared_toast") as string);- } catch (e) {- showToast("error", String(e));- }- }-- async function confirmBulkClear() {- const items = selectedCookieItems.map(({ domain, slug }) => ({ domain, slug }));- if (items.length === 0) {- confirmBulkClearOpen = false;- return;- }- try {- const res = await invoke<{ ok: boolean; cleared: number }>("cookies_clear_batch", {- request: { items },- });- confirmBulkClearOpen = false;- clearCookieSelection();- await reload();- showToast(- "success",- `${$t("settings.cookies.cleared_toast") as string} (${res.cleared})`,- );- } catch (e) {- showToast("error", String(e));- }- }-- async function openCookiesDir() {- if (!cookiesDir) return;- try {- await openShell(cookiesDir);- } catch (e) {- console.warn("[cookies] open dir failed", e);- }- }-- function showExtensionHint() {- showToast(- "info",- $t("settings.cookies.hint_use_extension") as string,- );- }-- onMount(() => {- void reload();- });-</script>--<section class="section">- <header class="section-head">- <h2 class="section-title">{$t("settings.cookies.title")}</h2>- <p class="section-intro">{$t("settings.cookies.intro")}</p>- <div class="head-actions">- <button type="button" class="ghost-btn" onclick={showExtensionHint}>- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <rect x="4" y="4" width="16" height="16" rx="3"/>- <path d="M8 8h8M8 12h6M8 16h4"/>- </svg>- {$t("settings.cookies.capture_via_extension")}- </button>- <button type="button" class="ghost-btn subtle" onclick={openCookiesDir} disabled={!cookiesDir}>- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>- </svg>- {$t("settings.cookies.open_folder")}- </button>- <CookieImportMenu- onImportFile={handleImportFile}- onImportPaste={() => pasteOpen = true}- />- </div>- {#if cookiesDir}- <p class="dir-hint" title={cookiesDir}>- <span>{$t("settings.cookies.dir_label")}</span>- <code>{cookiesDir}</code>- </p>- {/if}-- <label class="managed-toggle">- <input- type="checkbox"- checked={managedOnly}- onchange={toggleManagedOnly}- />- <div class="managed-toggle-text">- <span class="managed-toggle-title">{$t("settings.cookies.managed_only_title")}</span>- <span class="managed-toggle-desc">{$t("settings.cookies.managed_only_desc")}</span>- </div>- </label>- </header>-- {#if bucketList.length > 0}- <div class="bulk-bar">- <div class="bulk-info">- <span>{selectedCount} selected</span>- </div>- <div class="bulk-actions">- <button type="button" class="ghost-btn subtle" onclick={selectAllCookies}>- Select all- </button>- <button type="button" class="ghost-btn subtle" onclick={clearCookieSelection} disabled={selectedCount === 0}>- {$t("common.clear")}- </button>- <button type="button" class="danger-btn" onclick={askBulkClear} disabled={selectedCount === 0}>- delete- </button>- </div>- </div>- {/if}-- {#if loading}- <div class="loading">- {#each Array(3) as _, i (i)}- <div class="skel"></div>- {/each}- </div>- {:else if bucketList.length === 0}- <div class="empty-state">- <svg viewBox="0 0 24 24" width="42" height="42" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <circle cx="12" cy="12" r="10"/>- <circle cx="8" cy="10" r="1"/>- <circle cx="16" cy="10" r="1"/>- <circle cx="11" cy="14" r="1"/>- </svg>- <h3>{$t("settings.cookies.empty_title")}</h3>- <p>{$t("settings.cookies.empty_body")}</p>- </div>- {:else}- <div class="buckets">- {#each bucketList as bucket (bucket.domain)}- <CookieBucketCard- {bucket}- health={bucketHealth(bucket.domain)}- testing={testing}- onView={handleView}- onExport={handleExport}- onRename={handleRename}- onClear={askClear}- onAddAccount={openAddAccount}- onTest={handleTest}- selected={selectedCookies}- onToggleSelection={toggleCookieSelection}- />- {#if bucket.domain === "bilibili.com"}- {#if bucket.accounts.some((a) => !a.slug.startsWith("_") && a.cookie_count > 0)}- <div class="bilibili-importers">- <button type="button" class="importer-btn" onclick={importBilibiliWatchLater}>- {$t("settings.cookies.bilibili.import_watch_later")}- </button>- <button type="button" class="importer-btn" onclick={importBilibiliHistory}>- {$t("settings.cookies.bilibili.import_history")}- </button>- </div>- {:else}- <div class="bilibili-importers">- <button type="button" class="importer-btn" onclick={startBilibiliWebviewLogin} disabled={bilibiliWebviewLoading}>- {bilibiliWebviewLoading- ? $t("settings.cookies.bilibili.login_webview_loading")- : $t("settings.cookies.bilibili.login_webview_btn")}- </button>- </div>- {/if}- {/if}- {/each}- </div>- {/if}-- <div class="add-generic">- {#if !genericFormOpen}- <button type="button" class="add-toggle" onclick={() => genericFormOpen = true}>- + {$t("settings.cookies.add_generic_title")}- </button>- <p class="add-hint">{$t("settings.cookies.add_generic_hint")}</p>- {:else}- <div class="add-form">- <input- type="text"- placeholder={$t("settings.cookies.add_generic_placeholder") as string}- bind:value={genericDomain}- />- <button- type="button"- class="ghost-btn"- onclick={() => { genericFormOpen = false; pasteOpen = true; }}- disabled={!genericDomain.trim()}- >- {$t("settings.cookies.add_generic_paste")}- </button>- <button type="button" class="ghost-btn subtle" onclick={() => { genericFormOpen = false; genericDomain = ""; }}>- {$t("settings.cookies.add_generic_cancel")}- </button>- </div>- {/if}- </div>-</section>--<CookieContentModal- open={viewOpen}- domain={viewDomain}- slug={viewSlug}- content={viewContent}- path={viewPath}- onClose={() => viewOpen = false}-/>--<CookiePasteModal- open={pasteOpen}- onSubmit={handleImportPasteContent}- onClose={() => pasteOpen = false}-/>--<CookiePasteModal- open={addAccountOpen}- onSubmit={submitAddAccount}- onClose={() => addAccountOpen = false}-/>--<BilibiliQrLogin- open={bilibiliQrOpen}- onClose={() => (bilibiliQrOpen = false)}- onSuccess={handleBilibiliQrSuccess}-/>--{#if confirmClearOpen}- <div class="overlay" onclick={(e) => { if (e.target === e.currentTarget) confirmClearOpen = false; }} role="presentation">- <div class="confirm" role="dialog" aria-label={$t("settings.cookies.confirm_clear_title") as string}>- <h3>{$t("settings.cookies.confirm_clear_title")}</h3>- <p>{$t("settings.cookies.confirm_clear_body", { domain: confirmDomain })}</p>- <div class="confirm-actions">- <button type="button" class="ghost-btn" onclick={() => confirmClearOpen = false}>- {$t("settings.cookies.confirm_clear_cancel")}- </button>- <button type="button" class="danger-btn" onclick={confirmClear}>- {$t("settings.cookies.confirm_clear_action")}- </button>- </div>- </div>- </div>-{/if}--{#if confirmBulkClearOpen}- <div class="overlay" onclick={(e) => { if (e.target === e.currentTarget) confirmBulkClearOpen = false; }} role="presentation">- <div class="confirm" role="dialog" aria-label={$t("settings.cookies.confirm_clear_title") as string}>- <h3>{$t("settings.cookies.confirm_clear_title")}</h3>- <p>- Cookies for {selectedCount} account{selectedCount === 1 ? "" : "s"} go to the trash- (recoverable for 24h). Continue?- </p>- <div class="confirm-actions">- <button type="button" class="ghost-btn" onclick={() => confirmBulkClearOpen = false}>- {$t("settings.cookies.confirm_clear_cancel")}- </button>- <button type="button" class="danger-btn" onclick={confirmBulkClear}>- delete- </button>- </div>- </div>- </div>-{/if}--<style>- .section { display: flex; flex-direction: column; gap: 16px; }- .section-head { display: flex; flex-direction: column; gap: 8px; }- .section-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--secondary); }- .section-intro { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.5; }- .head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }- .dir-hint {- margin: 6px 0 0;- font-size: 11px;- color: var(--tertiary);- display: flex;- align-items: center;- gap: 8px;- flex-wrap: wrap;- }- .dir-hint code {- font-family: ui-monospace, "Cascadia Code", monospace;- background: color-mix(in oklab, var(--button) 50%, transparent);- padding: 2px 8px;- border-radius: 4px;- overflow: hidden;- text-overflow: ellipsis;- max-width: 100%;- }- .managed-toggle {- display: flex;- gap: 10px;- align-items: flex-start;- margin-top: 10px;- padding: 10px 12px;- background: var(--button);- border-radius: var(--border-radius);- cursor: pointer;- }- .managed-toggle input[type="checkbox"] {- margin-top: 3px;- flex-shrink: 0;- }- .bulk-bar {- display: flex;- justify-content: space-between;- align-items: center;- gap: 12px;- padding: 10px 12px;- background: color-mix(in oklab, var(--button) 55%, transparent);- border: 1px solid color-mix(in oklab, var(--content-border) 35%, transparent);- border-radius: var(--border-radius);- }- .bulk-info {- color: var(--secondary);- font-size: 12px;- }- .bulk-actions {- display: flex;- flex-wrap: wrap;- gap: 8px;- justify-content: flex-end;- }- .managed-toggle-text {- display: flex;- flex-direction: column;- gap: 2px;- }- .managed-toggle-title {- font-size: 13px;- font-weight: 500;- color: var(--secondary);- }- .managed-toggle-desc {- font-size: 12px;- color: var(--secondary);- line-height: 1.4;- }- .ghost-btn {- display: inline-flex;- align-items: center;- gap: 6px;- padding: 7px 14px;- background: transparent;- border: 1px solid color-mix(in oklab, var(--content-border) 50%, transparent);- border-radius: 999px;- color: var(--secondary);- font-size: 13px;- cursor: pointer;- transition: border-color 120ms, color 120ms;- }- .ghost-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }- .ghost-btn:disabled { opacity: 0.4; cursor: not-allowed; }- .ghost-btn.subtle { color: var(--tertiary); }- .loading { display: flex; flex-direction: column; gap: 12px; }- .skel {- height: 92px;- border-radius: 14px;- background: linear-gradient(- 90deg,- color-mix(in oklab, var(--button) 35%, transparent) 0%,- color-mix(in oklab, var(--button) 60%, transparent) 50%,- color-mix(in oklab, var(--button) 35%, transparent) 100%- );- background-size: 200% 100%;- animation: shimmer 1.5s ease-in-out infinite;- }- @keyframes shimmer {- 0% { background-position: 200% 0; }- 100% { background-position: -200% 0; }- }- .empty-state {- display: flex;- flex-direction: column;- align-items: center;- text-align: center;- gap: 8px;- padding: 40px 20px;- color: var(--tertiary);- background: color-mix(in oklab, var(--button) 15%, transparent);- border: 1px dashed color-mix(in oklab, var(--content-border) 50%, transparent);- border-radius: 14px;- }- .empty-state svg { color: var(--tertiary); opacity: 0.6; }- .empty-state h3 { margin: 4px 0 0; font-size: 15px; color: var(--secondary); font-weight: 600; }- .empty-state p { margin: 0; font-size: 13px; max-width: 380px; line-height: 1.5; }- .buckets { display: flex; flex-direction: column; gap: 10px; }- .add-generic {- padding: 14px 18px;- border-radius: 14px;- border: 1px dashed color-mix(in oklab, var(--content-border) 40%, transparent);- margin-top: 4px;- }- .add-toggle {- background: transparent;- border: 0;- color: var(--accent);- font: inherit;- font-size: 13px;- font-weight: 500;- cursor: pointer;- padding: 0;- }- .add-toggle:hover { filter: brightness(1.2); }- .add-hint { margin: 4px 0 0; font-size: 11px; color: var(--tertiary); }- .add-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }- .add-form input {- flex: 1;- min-width: 200px;- padding: 7px 12px;- background: color-mix(in oklab, var(--button) 50%, transparent);- border: 1px solid color-mix(in oklab, var(--content-border) 40%, transparent);- border-radius: 8px;- color: var(--secondary);- font: inherit;- font-size: 13px;- outline: none;- }- .add-form input:focus { border-color: var(--accent); }- .overlay {- position: fixed; inset: 0;- background: rgba(0, 0, 0, 0.6);- display: flex; align-items: center; justify-content: center;- z-index: 1000;- padding: 24px;- }- .confirm {- width: min(420px, 100%);- background: var(--surface, var(--bg));- border: 1px solid color-mix(in oklab, var(--content-border) 50%, transparent);- border-radius: 14px;- padding: 20px;- display: flex; flex-direction: column; gap: 12px;- }- .confirm h3 { margin: 0; font-size: 16px; color: var(--secondary); }- .confirm p { margin: 0; font-size: 13px; color: var(--secondary); line-height: 1.5; }- .confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }- .danger-btn {- padding: 7px 16px;- background: #d33;- color: white;- border: 0;- border-radius: 999px;- font: inherit;- font-size: 13px;- cursor: pointer;- }- .danger-btn:hover { filter: brightness(1.1); }- .bilibili-importers {- display: flex;- gap: 8px;- flex-wrap: wrap;- margin: -8px 0 8px 56px;- padding-left: 18px;- }- .importer-btn {- padding: 6px 12px;- border-radius: 8px;- border: 1px solid color-mix(in oklab, var(--content-border) 60%, transparent);- background: color-mix(in oklab, var(--button) 25%, transparent);- color: var(--text);- font-size: 12px;- cursor: pointer;- }- .importer-btn:hover {- background: color-mix(in oklab, var(--text) 6%, transparent);- }-</style>+<script lang="ts">+ import { onMount } from "svelte";+ import { invoke } from "@tauri-apps/api/core";+ import { open as openShell } from "@tauri-apps/plugin-shell";+ import { save as saveDialog } from "@tauri-apps/plugin-dialog";+ import { t } from "$lib/i18n";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";+ import CookieBucketCard from "$lib/components/cookies/CookieBucketCard.svelte";+ import CookieImportMenu from "$lib/components/cookies/CookieImportMenu.svelte";+ import CookieContentModal from "$lib/components/cookies/CookieContentModal.svelte";+ import CookiePasteModal from "$lib/components/cookies/CookiePasteModal.svelte";+ import BilibiliQrLogin from "$lib/components/cookies/BilibiliQrLogin.svelte";++ type Account = {+ slug: string;+ alias: string;+ source_url: string | null;+ source_label: string | null;+ captured_at_ms: number;+ cookie_count: number;+ last_used_at_ms: number | null;+ };+ type BucketEntry = { platform_kind: string; accounts: Account[] };+ type Registry = { buckets: Record<string, BucketEntry> };+ type ListResponse = { registry: Registry; cookies_dir: string };+ type ImportResponse = {+ buckets_written: Array<{ domain: string; cookie_count: number; platform_kind: string }>;+ };++ type HealthItem = {+ domain: string;+ slug: string;+ status: string;+ age_days: number;+ expires_in_days: number;+ cookie_count: number;+ };+ type HealthResponse = { items: HealthItem[]; fresh_days: number; expire_days: number };++ let registry = $state<Registry>({ buckets: {} });+ let healthByKey = $state<Record<string, HealthItem>>({});++ function healthKey(domain: string, slug: string): string {+ return `${domain}__${slug}`;+ }++ function bucketHealth(domain: string): Record<string, HealthItem> {+ const out: Record<string, HealthItem> = {};+ for (const [k, v] of Object.entries(healthByKey)) {+ if (v.domain === domain) out[v.slug] = v;+ }+ return out;+ }++ let testing = $state<Record<string, boolean>>({});+ let selectedCookies = $state<Record<string, boolean>>({});++ function cookieTestUrl(domain: string, platformKind: string | undefined): string {+ if (platformKind === "bilibili") return "https://www.bilibili.com/video/BV1xx411c7mu";+ if (platformKind === "youtube" || platformKind === "youtube_music") {+ return "https://www.youtube.com/watch?v=dQw4w9WgXcQ";+ }+ if (platformKind === "twitch") return "https://www.twitch.tv/videos/1";+ return `https://${domain}`;+ }++ async function handleTest(domain: string, slug: string) {+ const bucket = registry.buckets[domain];+ const url = cookieTestUrl(domain, bucket?.platform_kind);+ const key = healthKey(domain, slug);+ testing = { ...testing, [key]: true };+ try {+ const res = await invoke<{ ok: boolean; message: string }>("cookies_test", {+ request: { url, slug },+ });+ if (res.ok) {+ showToast("success", $t("settings.cookies.test_ok") as string);+ } else {+ showToast(+ "error",+ ($t("settings.cookies.test_fail", { msg: res.message }) as string) || res.message,+ );+ }+ } catch (e) {+ showToast("error", String(e));+ } finally {+ testing = { ...testing, [key]: false };+ }+ }++ let settings = $derived(getSettings());+ let managedOnly = $derived(settings?.download.always_use_managed_cookies ?? true);++ async function toggleManagedOnly() {+ await updateSettings({+ download: { always_use_managed_cookies: !managedOnly },+ });+ }+ let cookiesDir = $state("");+ let loading = $state(true);+ let pasteOpen = $state(false);+ let genericDomain = $state("");+ let genericFormOpen = $state(false);++ let viewOpen = $state(false);+ let viewDomain = $state("");+ let viewSlug = $state("");+ let viewContent = $state("");+ let viewPath = $state("");++ let confirmClearOpen = $state(false);+ let confirmDomain = $state("");+ let confirmSlug = $state("");+ let confirmBulkClearOpen = $state(false);++ let addAccountOpen = $state(false);+ let addAccountDomain = $state("");+ let bilibiliQrOpen = $state(false);++ let bucketList = $derived(+ Object.entries(registry.buckets)+ .map(([domain, b]) => ({ domain, ...b }))+ .sort((a, b) => {+ const aTime = a.accounts[0]?.captured_at_ms ?? 0;+ const bTime = b.accounts[0]?.captured_at_ms ?? 0;+ return bTime - aTime;+ }),+ );+ let selectedCookieItems = $derived.by(() => {+ const items: Array<{ domain: string; slug: string; alias: string }> = [];+ for (const [domain, bucket] of Object.entries(registry.buckets)) {+ for (const account of bucket.accounts) {+ if (selectedCookies[healthKey(domain, account.slug)]) {+ items.push({ domain, slug: account.slug, alias: account.alias });+ }+ }+ }+ return items;+ });+ let selectedCount = $derived(selectedCookieItems.length);++ async function reload() {+ loading = true;+ try {+ const res = await invoke<ListResponse>("cookies_list");+ registry = res.registry;+ cookiesDir = res.cookies_dir;+ const validSelected: Record<string, boolean> = {};+ for (const [domain, bucket] of Object.entries(res.registry.buckets)) {+ for (const account of bucket.accounts) {+ const key = healthKey(domain, account.slug);+ if (selectedCookies[key]) validSelected[key] = true;+ }+ }+ selectedCookies = validSelected;+ try {+ const h = await invoke<HealthResponse>("cookies_health");+ const map: Record<string, HealthItem> = {};+ for (const item of h.items) map[healthKey(item.domain, item.slug)] = item;+ healthByKey = map;+ } catch {+ healthByKey = {};+ }+ } catch (e) {+ showToast("error", String(e));+ } finally {+ loading = false;+ }+ }++ async function importContent(content: string, sourceUrl: string, alias: string, label: string) {+ try {+ const res = await invoke<ImportResponse>("cookies_import", {+ request: {+ content,+ source_url: sourceUrl || null,+ source_label: label,+ alias: alias || null,+ },+ });+ const total = res.buckets_written.reduce((s, b) => s + b.cookie_count, 0);+ showToast(+ "success",+ ($t("settings.cookies.import_success", {+ buckets: String(res.buckets_written.length),+ cookies: String(total),+ }) as string) ?? `Imported ${total} cookies`,+ );+ pasteOpen = false;+ await reload();+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function handleImportFile(path: string) {+ try {+ const res = await invoke<ImportResponse>("cookies_import_file", {+ request: { path, alias: null },+ });+ const total = res.buckets_written.reduce((s, b) => s + b.cookie_count, 0);+ showToast(+ "success",+ ($t("settings.cookies.import_success", {+ buckets: String(res.buckets_written.length),+ cookies: String(total),+ }) as string) ?? `Imported ${total} cookies`,+ );+ await reload();+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function handleImportPasteContent(content: string, sourceUrl: string, alias: string) {+ await importContent(content, sourceUrl, alias, "Paste import");+ }++ async function handleView(domain: string, slug: string) {+ try {+ const res = await invoke<{ content: string; path: string }>("cookies_read", {+ request: { domain, slug },+ });+ viewContent = res.content;+ viewPath = res.path;+ viewDomain = domain;+ viewSlug = slug;+ viewOpen = true;+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function handleExport(domain: string, slug: string) {+ try {+ const saved = await saveDialog({+ title: $t("settings.cookies.export_dialog_title") as string,+ defaultPath: `${domain}-cookies.txt`,+ filters: [{ name: "Netscape Cookies", extensions: ["txt"] }],+ });+ if (saved && typeof saved === "string") {+ await invoke("cookies_export_to", {+ request: { domain, slug, destination_path: saved },+ });+ showToast("success", $t("settings.cookies.export_done") as string);+ }+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function handleRename(domain: string, slug: string, newAlias: string) {+ try {+ await invoke("cookies_rename", { request: { domain, slug, new_alias: newAlias } });+ await reload();+ } catch (e) {+ showToast("error", String(e));+ }+ }++ function askClear(domain: string, slug: string) {+ confirmDomain = domain;+ confirmSlug = slug;+ confirmClearOpen = true;+ }++ function toggleCookieSelection(domain: string, slug: string, checked: boolean) {+ const key = healthKey(domain, slug);+ if (checked) {+ selectedCookies = { ...selectedCookies, [key]: true };+ return;+ }+ const next = { ...selectedCookies };+ delete next[key];+ selectedCookies = next;+ }++ function selectAllCookies() {+ const next: Record<string, boolean> = {};+ for (const bucket of bucketList) {+ for (const account of bucket.accounts) {+ next[healthKey(bucket.domain, account.slug)] = true;+ }+ }+ selectedCookies = next;+ }++ function clearCookieSelection() {+ selectedCookies = {};+ }++ function askBulkClear() {+ if (selectedCount === 0) return;+ confirmBulkClearOpen = true;+ }++ function openAddAccount(domain: string) {+ addAccountDomain = domain;+ if (domain === "bilibili.com") {+ bilibiliQrOpen = true;+ return;+ }+ addAccountOpen = true;+ }++ async function handleBilibiliQrSuccess(slug: string, uname: string) {+ bilibiliQrOpen = false;+ showToast(+ "success",+ ($t("settings.cookies.bilibili.login_qr_success", { uname }) as string) ||+ `Signed in as ${uname}`,+ );+ await reload();+ const _ = slug;+ }++ let bilibiliWebviewLoading = $state(false);+ async function startBilibiliWebviewLogin() {+ if (bilibiliWebviewLoading) return;+ bilibiliWebviewLoading = true;+ try {+ const res = await invoke<{ slug: string; uname: string; mid: number; is_vip: boolean }>(+ "bilibili_webview_login",+ );+ showToast(+ "success",+ ($t("settings.cookies.bilibili.login_qr_success", { uname: res.uname }) as string) ||+ `Signed in as ${res.uname}`,+ );+ await reload();+ } catch (e) {+ const key = typeof e === "string" ? e : "errors.bilibili.network_failed";+ showToast("error", ($t(key) as string) || String(e));+ } finally {+ bilibiliWebviewLoading = false;+ }+ }++ type BilibiliImportedItem = { url: string; title: string };+ type BilibiliImportResult = { total: number; items: BilibiliImportedItem[] };++ function bilibiliAccountSlug(): string | null {+ const bucket = registry.buckets["bilibili.com"];+ if (!bucket) return null;+ const real = bucket.accounts.find((a) => !a.slug.startsWith("_") && a.cookie_count > 0);+ if (real) return real.slug;+ const imported = bucket.accounts.find((a) => a.slug === "_default" && a.cookie_count > 0);+ return imported?.slug ?? null;+ }++ async function enqueueImportedUrls(items: BilibiliImportedItem[]) {+ const settings = getSettings();+ const outDir = settings?.download?.default_output_dir ?? "";+ for (const it of items) {+ try {+ await invoke("download_from_url", {+ url: it.url,+ outputDir: outDir,+ downloadMode: null,+ quality: null,+ formatId: null,+ referer: "https://www.bilibili.com",+ cookieSlug: null,+ timeRange: null,+ playlistItems: null,+ torrentFiles: null,+ scheduledAt: null,+ stopAt: null,+ });+ } catch (e) {+ console.warn("[bilibili import] enqueue failed", it.url, e);+ }+ }+ }++ async function importBilibiliWatchLater() {+ const slug = bilibiliAccountSlug();+ if (!slug) {+ showToast("error", $t("settings.cookies.bilibili.import_no_account") as string);+ return;+ }+ try {+ const res = await invoke<BilibiliImportResult>("bilibili_import_watch_later", { slug });+ showToast(+ "success",+ ($t("settings.cookies.bilibili.import_done", { count: String(res.items.length) }) as string) ??+ `Queued ${res.items.length} items`,+ );+ await enqueueImportedUrls(res.items);+ } catch (e) {+ showToast("error", typeof e === "string" ? ($t(e) as string) || e : String(e));+ }+ }++ async function importBilibiliHistory() {+ const slug = bilibiliAccountSlug();+ if (!slug) {+ showToast("error", $t("settings.cookies.bilibili.import_no_account") as string);+ return;+ }+ try {+ const res = await invoke<BilibiliImportResult>("bilibili_import_history", { slug });+ showToast(+ "success",+ ($t("settings.cookies.bilibili.import_done", { count: String(res.items.length) }) as string) ??+ `Queued ${res.items.length} items`,+ );+ await enqueueImportedUrls(res.items);+ } catch (e) {+ showToast("error", typeof e === "string" ? ($t(e) as string) || e : String(e));+ }+ }++ async function submitAddAccount(content: string, sourceUrl: string, alias: string) {+ try {+ const res = await invoke<{ slug: string; cookie_count: number }>("cookies_add_account", {+ request: {+ domain: addAccountDomain,+ alias: alias || "Conta",+ content,+ source_url: sourceUrl || null,+ },+ });+ showToast(+ "success",+ ($t("settings.cookies.add_account_success", {+ slug: res.slug,+ count: String(res.cookie_count),+ }) as string) ?? `Account added (${res.slug})`,+ );+ addAccountOpen = false;+ await reload();+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function confirmClear() {+ try {+ await invoke("cookies_clear", { request: { domain: confirmDomain, slug: confirmSlug } });+ confirmClearOpen = false;+ await reload();+ showToast("success", $t("settings.cookies.cleared_toast") as string);+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function confirmBulkClear() {+ const items = selectedCookieItems.map(({ domain, slug }) => ({ domain, slug }));+ if (items.length === 0) {+ confirmBulkClearOpen = false;+ return;+ }+ try {+ const res = await invoke<{ ok: boolean; cleared: number }>("cookies_clear_batch", {+ request: { items },+ });+ confirmBulkClearOpen = false;+ clearCookieSelection();+ await reload();+ showToast(+ "success",+ `${$t("settings.cookies.cleared_toast") as string} (${res.cleared})`,+ );+ } catch (e) {+ showToast("error", String(e));+ }+ }++ async function openCookiesDir() {+ if (!cookiesDir) return;+ try {+ await openShell(cookiesDir);+ } catch (e) {+ console.warn("[cookies] open dir failed", e);+ }+ }++ function showExtensionHint() {+ showToast(+ "info",+ $t("settings.cookies.hint_use_extension") as string,+ );+ }++ onMount(() => {+ void reload();+ });+</script>++<section class="section">+ <header class="section-head">+ <h2 class="section-title">{$t("settings.cookies.title")}</h2>+ <p class="section-intro">{$t("settings.cookies.intro")}</p>+ <div class="head-actions">+ <button type="button" class="ghost-btn" onclick={showExtensionHint}>+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <rect x="4" y="4" width="16" height="16" rx="3"/>+ <path d="M8 8h8M8 12h6M8 16h4"/>+ </svg>+ {$t("settings.cookies.capture_via_extension")}+ </button>+ <button type="button" class="ghost-btn subtle" onclick={openCookiesDir} disabled={!cookiesDir}>+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>+ </svg>+ {$t("settings.cookies.open_folder")}+ </button>+ <CookieImportMenu+ onImportFile={handleImportFile}+ onImportPaste={() => pasteOpen = true}+ />+ </div>+ {#if cookiesDir}+ <p class="dir-hint" title={cookiesDir}>+ <span>{$t("settings.cookies.dir_label")}</span>+ <code>{cookiesDir}</code>+ </p>+ {/if}++ <label class="managed-toggle">+ <input+ type="checkbox"+ checked={managedOnly}+ onchange={toggleManagedOnly}+ />+ <div class="managed-toggle-text">+ <span class="managed-toggle-title">{$t("settings.cookies.managed_only_title")}</span>+ <span class="managed-toggle-desc">{$t("settings.cookies.managed_only_desc")}</span>+ </div>+ </label>+ </header>++ {#if bucketList.length > 0}+ <div class="bulk-bar">+ <div class="bulk-info">+ <span>{selectedCount} selected</span>+ </div>+ <div class="bulk-actions">+ <button type="button" class="ghost-btn subtle" onclick={selectAllCookies}>+ Select all+ </button>+ <button type="button" class="ghost-btn subtle" onclick={clearCookieSelection} disabled={selectedCount === 0}>+ {$t("common.clear")}+ </button>+ <button type="button" class="danger-btn" onclick={askBulkClear} disabled={selectedCount === 0}>+ delete+ </button>+ </div>+ </div>+ {/if}++ {#if loading}+ <div class="loading">+ {#each Array(3) as _, i (i)}+ <div class="skel"></div>+ {/each}+ </div>+ {:else if bucketList.length === 0}+ <div class="empty-state">+ <svg viewBox="0 0 24 24" width="42" height="42" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <circle cx="12" cy="12" r="10"/>+ <circle cx="8" cy="10" r="1"/>+ <circle cx="16" cy="10" r="1"/>+ <circle cx="11" cy="14" r="1"/>+ </svg>+ <h3>{$t("settings.cookies.empty_title")}</h3>+ <p>{$t("settings.cookies.empty_body")}</p>+ </div>+ {:else}+ <div class="buckets">+ {#each bucketList as bucket (bucket.domain)}+ <CookieBucketCard+ {bucket}+ health={bucketHealth(bucket.domain)}+ testing={testing}+ onView={handleView}+ onExport={handleExport}+ onRename={handleRename}+ onClear={askClear}+ onAddAccount={openAddAccount}+ onTest={handleTest}+ selected={selectedCookies}+ onToggleSelection={toggleCookieSelection}+ />+ {#if bucket.domain === "bilibili.com"}+ {#if bucket.accounts.some((a) => !a.slug.startsWith("_") && a.cookie_count > 0)}+ <div class="bilibili-importers">+ <button type="button" class="importer-btn" onclick={importBilibiliWatchLater}>+ {$t("settings.cookies.bilibili.import_watch_later")}+ </button>+ <button type="button" class="importer-btn" onclick={importBilibiliHistory}>+ {$t("settings.cookies.bilibili.import_history")}+ </button>+ </div>+ {:else}+ <div class="bilibili-importers">+ <button type="button" class="importer-btn" onclick={startBilibiliWebviewLogin} disabled={bilibiliWebviewLoading}>+ {bilibiliWebviewLoading+ ? $t("settings.cookies.bilibili.login_webview_loading")+ : $t("settings.cookies.bilibili.login_webview_btn")}+ </button>+ </div>+ {/if}+ {/if}+ {/each}+ </div>+ {/if}++ <div class="add-generic">+ {#if !genericFormOpen}+ <button type="button" class="add-toggle" onclick={() => genericFormOpen = true}>+ + {$t("settings.cookies.add_generic_title")}+ </button>+ <p class="add-hint">{$t("settings.cookies.add_generic_hint")}</p>+ {:else}+ <div class="add-form">+ <input+ type="text"+ placeholder={$t("settings.cookies.add_generic_placeholder") as string}+ bind:value={genericDomain}+ />+ <button+ type="button"+ class="ghost-btn"+ onclick={() => { genericFormOpen = false; pasteOpen = true; }}+ disabled={!genericDomain.trim()}+ >+ {$t("settings.cookies.add_generic_paste")}+ </button>+ <button type="button" class="ghost-btn subtle" onclick={() => { genericFormOpen = false; genericDomain = ""; }}>+ {$t("settings.cookies.add_generic_cancel")}+ </button>+ </div>+ {/if}+ </div>+</section>++<CookieContentModal+ open={viewOpen}+ domain={viewDomain}+ slug={viewSlug}+ content={viewContent}+ path={viewPath}+ onClose={() => viewOpen = false}+/>++<CookiePasteModal+ open={pasteOpen}+ onSubmit={handleImportPasteContent}+ onClose={() => pasteOpen = false}+/>++<CookiePasteModal+ open={addAccountOpen}+ onSubmit={submitAddAccount}+ onClose={() => addAccountOpen = false}+/>++<BilibiliQrLogin+ open={bilibiliQrOpen}+ onClose={() => (bilibiliQrOpen = false)}+ onSuccess={handleBilibiliQrSuccess}+/>++{#if confirmClearOpen}+ <div class="overlay" onclick={(e) => { if (e.target === e.currentTarget) confirmClearOpen = false; }} role="presentation">+ <div class="confirm" role="dialog" aria-label={$t("settings.cookies.confirm_clear_title") as string}>+ <h3>{$t("settings.cookies.confirm_clear_title")}</h3>+ <p>{$t("settings.cookies.confirm_clear_body", { domain: confirmDomain })}</p>+ <div class="confirm-actions">+ <button type="button" class="ghost-btn" onclick={() => confirmClearOpen = false}>+ {$t("settings.cookies.confirm_clear_cancel")}+ </button>+ <button type="button" class="danger-btn" onclick={confirmClear}>+ {$t("settings.cookies.confirm_clear_action")}+ </button>+ </div>+ </div>+ </div>+{/if}++{#if confirmBulkClearOpen}+ <div class="overlay" onclick={(e) => { if (e.target === e.currentTarget) confirmBulkClearOpen = false; }} role="presentation">+ <div class="confirm" role="dialog" aria-label={$t("settings.cookies.confirm_clear_title") as string}>+ <h3>{$t("settings.cookies.confirm_clear_title")}</h3>+ <p>+ Cookies for {selectedCount} account{selectedCount === 1 ? "" : "s"} go to the trash+ (recoverable for 24h). Continue?+ </p>+ <div class="confirm-actions">+ <button type="button" class="ghost-btn" onclick={() => confirmBulkClearOpen = false}>+ {$t("settings.cookies.confirm_clear_cancel")}+ </button>+ <button type="button" class="danger-btn" onclick={confirmBulkClear}>+ delete+ </button>+ </div>+ </div>+ </div>+{/if}++<style>+ .section { display: flex; flex-direction: column; gap: 16px; }+ .section-head { display: flex; flex-direction: column; gap: 8px; }+ .section-title { margin: 0; font-size: 18px; font-weight: 600; color: var(--secondary); }+ .section-intro { margin: 0; color: var(--secondary); font-size: 13px; line-height: 1.5; }+ .head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }+ .dir-hint {+ margin: 6px 0 0;+ font-size: 11px;+ color: var(--tertiary);+ display: flex;+ align-items: center;+ gap: 8px;+ flex-wrap: wrap;+ }+ .dir-hint code {+ font-family: ui-monospace, "Cascadia Code", monospace;+ background: color-mix(in oklab, var(--button) 50%, transparent);+ padding: 2px 8px;+ border-radius: 4px;+ overflow: hidden;+ text-overflow: ellipsis;+ max-width: 100%;+ }+ .managed-toggle {+ display: flex;+ gap: 10px;+ align-items: flex-start;+ margin-top: 10px;+ padding: 10px 12px;+ background: var(--button);+ border-radius: var(--border-radius);+ cursor: pointer;+ }+ .managed-toggle input[type="checkbox"] {+ margin-top: 3px;+ flex-shrink: 0;+ }+ .bulk-bar {+ display: flex;+ justify-content: space-between;+ align-items: center;+ gap: 12px;+ padding: 10px 12px;+ background: color-mix(in oklab, var(--button) 55%, transparent);+ border: 1px solid color-mix(in oklab, var(--content-border) 35%, transparent);+ border-radius: var(--border-radius);+ }+ .bulk-info {+ color: var(--secondary);+ font-size: 12px;+ }+ .bulk-actions {+ display: flex;+ flex-wrap: wrap;+ gap: 8px;+ justify-content: flex-end;+ }+ .managed-toggle-text {+ display: flex;+ flex-direction: column;+ gap: 2px;+ }+ .managed-toggle-title {+ font-size: 13px;+ font-weight: 500;+ color: var(--secondary);+ }+ .managed-toggle-desc {+ font-size: 12px;+ color: var(--secondary);+ line-height: 1.4;+ }+ .ghost-btn {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ padding: 7px 14px;+ background: transparent;+ border: 1px solid color-mix(in oklab, var(--content-border) 50%, transparent);+ border-radius: 999px;+ color: var(--secondary);+ font-size: 13px;+ cursor: pointer;+ transition: border-color 120ms, color 120ms;+ }+ .ghost-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }+ .ghost-btn:disabled { opacity: 0.4; cursor: not-allowed; }+ .ghost-btn.subtle { color: var(--tertiary); }+ .loading { display: flex; flex-direction: column; gap: 12px; }+ .skel {+ height: 92px;+ border-radius: 14px;+ background: linear-gradient(+ 90deg,+ color-mix(in oklab, var(--button) 35%, transparent) 0%,+ color-mix(in oklab, var(--button) 60%, transparent) 50%,+ color-mix(in oklab, var(--button) 35%, transparent) 100%+ );+ background-size: 200% 100%;+ animation: shimmer 1.5s ease-in-out infinite;+ }+ @keyframes shimmer {+ 0% { background-position: 200% 0; }+ 100% { background-position: -200% 0; }+ }+ .empty-state {+ display: flex;+ flex-direction: column;+ align-items: center;+ text-align: center;+ gap: 8px;+ padding: 40px 20px;+ color: var(--tertiary);+ background: color-mix(in oklab, var(--button) 15%, transparent);+ border: 1px dashed color-mix(in oklab, var(--content-border) 50%, transparent);+ border-radius: 14px;+ }+ .empty-state svg { color: var(--tertiary); opacity: 0.6; }+ .empty-state h3 { margin: 4px 0 0; font-size: 15px; color: var(--secondary); font-weight: 600; }+ .empty-state p { margin: 0; font-size: 13px; max-width: 380px; line-height: 1.5; }+ .buckets { display: flex; flex-direction: column; gap: 10px; }+ .add-generic {+ padding: 14px 18px;+ border-radius: 14px;+ border: 1px dashed color-mix(in oklab, var(--content-border) 40%, transparent);+ margin-top: 4px;+ }+ .add-toggle {+ background: transparent;+ border: 0;+ color: var(--accent);+ font: inherit;+ font-size: 13px;+ font-weight: 500;+ cursor: pointer;+ padding: 0;+ }+ .add-toggle:hover { filter: brightness(1.2); }+ .add-hint { margin: 4px 0 0; font-size: 11px; color: var(--tertiary); }+ .add-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }+ .add-form input {+ flex: 1;+ min-width: 200px;+ padding: 7px 12px;+ background: color-mix(in oklab, var(--button) 50%, transparent);+ border: 1px solid color-mix(in oklab, var(--content-border) 40%, transparent);+ border-radius: 8px;+ color: var(--secondary);+ font: inherit;+ font-size: 13px;+ outline: none;+ }+ .add-form input:focus { border-color: var(--accent); }+ .overlay {+ position: fixed; inset: 0;+ background: rgba(0, 0, 0, 0.6);+ display: flex; align-items: center; justify-content: center;+ z-index: 1000;+ padding: 24px;+ }+ .confirm {+ width: min(420px, 100%);+ background: var(--surface, var(--bg));+ border: 1px solid color-mix(in oklab, var(--content-border) 50%, transparent);+ border-radius: 14px;+ padding: 20px;+ display: flex; flex-direction: column; gap: 12px;+ }+ .confirm h3 { margin: 0; font-size: 16px; color: var(--secondary); }+ .confirm p { margin: 0; font-size: 13px; color: var(--secondary); line-height: 1.5; }+ .confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }+ .danger-btn {+ padding: 7px 16px;+ background: #d33;+ color: white;+ border: 0;+ border-radius: 999px;+ font: inherit;+ font-size: 13px;+ cursor: pointer;+ }+ .danger-btn:hover { filter: brightness(1.1); }+ .bilibili-importers {+ display: flex;+ gap: 8px;+ flex-wrap: wrap;+ margin: -8px 0 8px 56px;+ padding-left: 18px;+ }+ .importer-btn {+ padding: 6px 12px;+ border-radius: 8px;+ border: 1px solid color-mix(in oklab, var(--content-border) 60%, transparent);+ background: color-mix(in oklab, var(--button) 25%, transparent);+ color: var(--text);+ font-size: 12px;+ cursor: pointer;+ }+ .importer-btn:hover {+ background: color-mix(in oklab, var(--text) 6%, transparent);+ }+</style>diff --git a/src/components/settings/SettingsDownloads.svelte b/src/components/settings/SettingsDownloads.svelteindex df8eccd4..1a54ed45 100644--- a/src/components/settings/SettingsDownloads.svelte+++ b/src/components/settings/SettingsDownloads.svelte@@ -1,910 +1,72 @@-<script lang="ts">- import { invoke } from "@tauri-apps/api/core";- import { t } from "$lib/i18n";- import ContextHint from "$components/hints/ContextHint.svelte";- import {- getSettings,- updateSettings,- chooseFolder,- chooseCookieFile,- toggleBool,- changeQuality,- } from "./settings-helpers";- import { YTDLP_PRESETS, matchActivePreset, type YtdlpPresetId } from "$lib/ytdlp-presets";-- let settings = $derived(getSettings());- let activePreset = $derived<YtdlpPresetId | null>(matchActivePreset(settings));-- type PathLimitInfo = { limit: number; current: number; reserve: number; ok: boolean };- let pathInfo = $state<PathLimitInfo | null>(null);-- $effect(() => {- const dir = settings?.download.default_output_dir;- if (!dir) {- pathInfo = null;- return;- }- let cancelled = false;- invoke<PathLimitInfo>("validate_output_path", { outputDir: dir })- .then((info) => {- if (!cancelled) pathInfo = info;- })- .catch(() => {- if (!cancelled) pathInfo = null;- });- return () => {- cancelled = true;- };- });-- async function applyPreset(id: YtdlpPresetId) {- const preset = YTDLP_PRESETS.find((p) => p.id === id);- if (!preset) return;- await updateSettings({ download: preset.download });- }-- let templateInput = $state("");- let templateTimer: ReturnType<typeof setTimeout> | null = null;- let hotkeyInput = $state("");- let hotkeyTimer: ReturnType<typeof setTimeout> | null = null;- let hotkeyMode = $state<"record" | "type">("record");- let hotkeyRecording = $state(false);- let musicHotkeyInput = $state("");- let musicHotkeyTimer: ReturnType<typeof setTimeout> | null = null;- let musicHotkeyMode = $state<"record" | "type">("record");- let musicHotkeyRecording = $state(false);-- $effect(() => {- if (settings) {- templateInput = settings.download.filename_template;- hotkeyInput = settings.download.hotkey_binding;- musicHotkeyInput = settings.download.music_hotkey_binding;- }- });-- let speedNum = $state<number | null>(null);- let speedUnit = $state<"K" | "M">("M");-- $effect(() => {- const raw = settings?.download.speed_limit?.trim() ?? "";- const m = raw.match(/^(\d+(?:\.\d+)?)([KM])?$/i);- if (m) {- speedNum = Number(m[1]);- speedUnit = (m[2]?.toUpperCase() as "K" | "M") ?? "M";- } else {- speedNum = null;- }- });-- function applySpeedLimit() {- const value = speedNum && speedNum > 0 ? `${speedNum}${speedUnit}` : "";- updateSettings({ download: { speed_limit: value } });- }-- const SB_CATEGORIES = [- "sponsor",- "selfpromo",- "interaction",- "intro",- "outro",- "preview",- "filler",- "music_offtopic",- ] as const;-- function sbHas(cat: string): boolean {- return settings?.download.sponsorblock_categories?.includes(cat) ?? false;- }-- function toggleSbCategory(cat: string) {- const current = settings?.download.sponsorblock_categories ?? [];- const next = current.includes(cat)- ? current.filter((c) => c !== cat)- : [...current, cat];- updateSettings({ download: { sponsorblock_categories: next } });- }-- function setSbMode(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { sponsorblock_mode: value } });- }-- function setBilibiliDanmakuFormat(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { bilibili_danmaku_format: value } });- }-- function setBilibiliContainer(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { bilibili_container: value } });- }-- function setBilibiliCoverFormat(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { bilibili_cover_format: value } });- }-- let namingTemplatesOpen = $state(false);- let cdnOpen = $state(false);-- async function setBilibiliNamingTemplate(field: string, value: string) {- await updateSettings({ download: { [field]: value } });- }-- async function setBilibiliCdnHosts(e: Event) {- const value = (e.target as HTMLTextAreaElement).value;- await updateSettings({ download: { bilibili_cdn_hosts: value } });- }-- function previewTemplate(template: string): string {- return template- .replace("%(title).200s", "My Video Title")- .replace("%(title)s", "My Video Title")- .replace("%(id)s", "dQw4w9WgXcQ")- .replace("%(ext)s", "mp4")- .replace("%(uploader)s", "Channel Name")- .replace("%(upload_date)s", "20260217")- .replace("%(resolution)s", "1920x1080")- .replace("%(fps)s", "30")- .replace("%(duration)s", "212");- }-- function handleTemplateInput(e: Event) {- const value = (e.target as HTMLInputElement).value;- templateInput = value;- if (templateTimer) clearTimeout(templateTimer);- templateTimer = setTimeout(async () => {- if (value.trim() && value.includes("%(ext)s")) {- await updateSettings({ download: { filename_template: value } });- }- }, 800);- }-- function handleHotkeyInput(e: Event) {- const value = (e.target as HTMLInputElement).value;- hotkeyInput = value;- if (hotkeyTimer) clearTimeout(hotkeyTimer);- hotkeyTimer = setTimeout(async () => {- if (value.trim()) {- await updateSettings({ download: { hotkey_binding: value } });- }- }, 800);- }-- function mapKeyName(key: string): string | null {- if (key.length === 1 && /[a-zA-Z]/.test(key)) return key.toUpperCase();- if (key.length === 1 && /[0-9]/.test(key)) return key;- if (/^F([1-9]|1[0-2])$/.test(key)) return key;- const map: Record<string, string> = {- " ": "Space", ArrowUp: "Up", ArrowDown: "Down", ArrowLeft: "Left", ArrowRight: "Right",- Enter: "Enter", Tab: "Tab", Escape: "Escape", Backspace: "Backspace", Delete: "Delete",- Home: "Home", End: "End", PageUp: "PageUp", PageDown: "PageDown", Insert: "Insert",- };- return map[key] ?? null;- }-- function handleHotkeyKeyDown(e: KeyboardEvent) {- e.preventDefault();- e.stopPropagation();- if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;- const keyName = mapKeyName(e.key);- if (!keyName) return;- const parts: string[] = [];- if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");- if (e.shiftKey) parts.push("Shift");- if (e.altKey) parts.push("Alt");- parts.push(keyName);- const value = parts.join("+");- hotkeyInput = value;- hotkeyRecording = false;- updateSettings({ download: { hotkey_binding: value } });- }-- function handleMusicHotkeyInput(e: Event) {- const value = (e.target as HTMLInputElement).value;- musicHotkeyInput = value;- if (musicHotkeyTimer) clearTimeout(musicHotkeyTimer);- musicHotkeyTimer = setTimeout(async () => {- if (value.trim()) {- await updateSettings({ download: { music_hotkey_binding: value } });- }- }, 800);- }-- function handleMusicHotkeyKeyDown(e: KeyboardEvent) {- e.preventDefault();- e.stopPropagation();- if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;- const keyName = mapKeyName(e.key);- if (!keyName) return;- const parts: string[] = [];- if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");- if (e.shiftKey) parts.push("Shift");- if (e.altKey) parts.push("Alt");- parts.push(keyName);- const value = parts.join("+");- musicHotkeyInput = value;- musicHotkeyRecording = false;- updateSettings({ download: { music_hotkey_binding: value } });- }-- function changeMusicAudioFormat(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { music_audio_format: value } });- }-- function changeCaptionLocale(e: Event) {- const value = (e.target as HTMLSelectElement).value;- updateSettings({ download: { caption_locale: value } });- }-</script>--{#if settings}-<section class="section">- <h5 class="section-title">{$t('settings.download.hotkey_enabled')}</h5>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.hotkey_enabled')} <ContextHint text={$t('hints.hotkey') as string} dismissKey="hotkey" /></span>- <span class="setting-path">{$t('settings.download.hotkey_enabled_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.hotkey_enabled} onclick={() => toggleBool("download", "hotkey_enabled", settings.download.hotkey_enabled)} role="switch" aria-checked={settings.download.hotkey_enabled} aria-label={$t('settings.download.hotkey_enabled') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.hotkey_enabled}- <div class="divider"></div>- <div class="setting-row hotkey-row">- <span class="setting-label">{$t('settings.download.hotkey_binding')}</span>- <div class="hotkey-controls">- <div class="hotkey-mode-switch">- <button class="hotkey-mode-btn" class:active={hotkeyMode === 'record'} onclick={() => { hotkeyMode = 'record'; hotkeyRecording = false; }}>{$t('settings.download.hotkey_record')}</button>- <button class="hotkey-mode-btn" class:active={hotkeyMode === 'type'} onclick={() => { hotkeyMode = 'type'; hotkeyRecording = false; }}>{$t('settings.download.hotkey_type')}</button>- </div>- {#if hotkeyMode === 'type'}- <input type="text" class="input-hotkey" value={hotkeyInput} oninput={handleHotkeyInput} spellcheck="false" />- {:else}- <button class="input-hotkey hotkey-record-btn" class:recording={hotkeyRecording} onclick={() => { hotkeyRecording = true; }} onkeydown={hotkeyRecording ? handleHotkeyKeyDown : undefined} onblur={() => { hotkeyRecording = false; }}>- {hotkeyRecording ? $t('settings.download.hotkey_press') : (hotkeyInput || $t('settings.download.hotkey_press'))}- </button>- {/if}- </div>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.copy_to_clipboard_on_hotkey')}</span>- <span class="setting-path">{$t('settings.download.copy_to_clipboard_on_hotkey_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.copy_to_clipboard_on_hotkey} onclick={() => toggleBool("download", "copy_to_clipboard_on_hotkey", settings.download.copy_to_clipboard_on_hotkey)} role="switch" aria-checked={settings.download.copy_to_clipboard_on_hotkey} aria-label={$t('settings.download.copy_to_clipboard_on_hotkey') as string}><span class="toggle-knob"></span></button>- </div>- {/if}- </div>-</section>--<section class="section">- <h5 class="section-title">{$t('settings.download.music_hotkey_enabled')}</h5>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.music_hotkey_enabled')}</span>- <span class="setting-path">{$t('settings.download.music_hotkey_enabled_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.music_hotkey_enabled} onclick={() => toggleBool("download", "music_hotkey_enabled", settings.download.music_hotkey_enabled)} role="switch" aria-checked={settings.download.music_hotkey_enabled} aria-label={$t('settings.download.music_hotkey_enabled') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.music_hotkey_enabled}- <div class="divider"></div>- <div class="setting-row hotkey-row">- <span class="setting-label">{$t('settings.download.music_hotkey_binding')}</span>- <div class="hotkey-controls">- <div class="hotkey-mode-switch">- <button class="hotkey-mode-btn" class:active={musicHotkeyMode === 'record'} onclick={() => { musicHotkeyMode = 'record'; musicHotkeyRecording = false; }}>{$t('settings.download.hotkey_record')}</button>- <button class="hotkey-mode-btn" class:active={musicHotkeyMode === 'type'} onclick={() => { musicHotkeyMode = 'type'; musicHotkeyRecording = false; }}>{$t('settings.download.hotkey_type')}</button>- </div>- {#if musicHotkeyMode === 'type'}- <input type="text" class="input-hotkey" value={musicHotkeyInput} oninput={handleMusicHotkeyInput} spellcheck="false" />- {:else}- <button class="input-hotkey hotkey-record-btn" class:recording={musicHotkeyRecording} onclick={() => { musicHotkeyRecording = true; }} onkeydown={musicHotkeyRecording ? handleMusicHotkeyKeyDown : undefined} onblur={() => { musicHotkeyRecording = false; }}>- {musicHotkeyRecording ? $t('settings.download.hotkey_press') : (musicHotkeyInput || $t('settings.download.hotkey_press'))}- </button>- {/if}- </div>- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.music_audio_format')}</span>- <span class="setting-path">{$t('settings.download.music_audio_format_desc')}</span>- </div>- <select class="select" value={settings.download.music_audio_format} onchange={changeMusicAudioFormat}>- <option value="m4a">M4A (AAC)</option>- <option value="mp3">MP3</option>- <option value="flac">FLAC (lossless)</option>- <option value="opus">Opus</option>- <option value="wav">WAV</option>- </select>- </div>- </div>-</section>--<section class="section">- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.default_output_dir')}</span>- <span class="setting-path">{settings.download.default_output_dir}</span>- {#if pathInfo && !pathInfo.ok}- <span class="path-warning" role="status">- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" />- <line x1="12" y1="9" x2="12" y2="13" />- <line x1="12" y1="17" x2="12.01" y2="17" />- </svg>- {$t('settings.download.path_too_long', { current: pathInfo.current, limit: pathInfo.limit })}- </span>- {/if}- </div>- <button class="button" onclick={chooseFolder}>{$t('settings.download.choose_folder')}</button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('common.cookie_file_label')}</span>- <span class="setting-path">{settings.download.cookie_file || $t('common.cookie_file_hint')}</span>- </div>- <button class="button" onclick={chooseCookieFile}>{$t('common.cookie_file_choose')}</button>- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.download.video_quality')}</span>- <select class="select" value={settings.download.video_quality} onchange={changeQuality}>- <option value="best">{$t('omnibox.quality_best')}</option>- <option value="1080p">{$t('omnibox.quality_1080p')}</option>- <option value="720p">{$t('omnibox.quality_720p')}</option>- <option value="480p">{$t('omnibox.quality_480p')}</option>- <option value="360p">{$t('omnibox.quality_360p')}</option>- </select>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.speed_limit')}</span>- <span class="setting-path">{$t('settings.download.speed_limit_desc')}</span>- </div>- <div class="speed-limit">- <input- type="number"- class="input-number"- min="0"- step="1"- inputmode="numeric"- placeholder={$t('settings.download.speed_limit_unlimited') as string}- bind:value={speedNum}- onchange={applySpeedLimit}- aria-label={$t('settings.download.speed_limit') as string}- />- <select class="select" bind:value={speedUnit} onchange={applySpeedLimit} aria-label="unit">- <option value="K">KB/s</option>- <option value="M">MB/s</option>- </select>- </div>- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.download.always_ask_path')}</span>- <button class="toggle" class:on={settings.download.always_ask_path} onclick={() => toggleBool("download", "always_ask_path", settings.download.always_ask_path)} role="switch" aria-checked={settings.download.always_ask_path} aria-label={$t('settings.download.always_ask_path') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</section>--<section class="section">- <h5 class="section-title">{$t('settings.download.presets')}</h5>- <p class="setting-path" style="margin: 0 0 8px 4px">{$t('settings.download.presets_desc')}</p>- <div class="preset-grid">- {#each YTDLP_PRESETS as preset (preset.id)}- <button- class="preset-card"- class:active={activePreset === preset.id}- onclick={() => applyPreset(preset.id)}- type="button"- >- <span class="preset-label">{$t(preset.labelKey)}</span>- <span class="preset-desc">{$t(preset.descKey)}</span>- </button>- {/each}- </div>-</section>--<details class="section">- <summary class="section-title">{$t('settings.download.organize_by_platform')}</summary>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.organize_by_platform')}</span>- <span class="setting-path">{$t('settings.download.organize_by_platform_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.organize_by_platform} onclick={() => toggleBool("download", "organize_by_platform", settings.download.organize_by_platform)} role="switch" aria-checked={settings.download.organize_by_platform} aria-label={$t('settings.download.organize_by_platform') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.download.skip_existing')}</span>- <button class="toggle" class:on={settings.download.skip_existing} onclick={() => toggleBool("download", "skip_existing", settings.download.skip_existing)} role="switch" aria-checked={settings.download.skip_existing} aria-label={$t('settings.download.skip_existing') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.what_to_also_save')}</summary>- <div class="card">- <div class="setting-row">- <span class="setting-label">{$t('settings.download.download_attachments')}</span>- <button class="toggle" class:on={settings.download.download_attachments} onclick={() => toggleBool("download", "download_attachments", settings.download.download_attachments)} role="switch" aria-checked={settings.download.download_attachments} aria-label={$t('settings.download.download_attachments') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <span class="setting-label">{$t('settings.download.download_descriptions')}</span>- <button class="toggle" class:on={settings.download.download_descriptions} onclick={() => toggleBool("download", "download_descriptions", settings.download.download_descriptions)} role="switch" aria-checked={settings.download.download_descriptions} aria-label={$t('settings.download.download_descriptions') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.download_subtitles')}</span>- <span class="setting-path">{$t('settings.download.download_subtitles_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.download_subtitles} onclick={() => toggleBool("download", "download_subtitles", settings.download.download_subtitles)} role="switch" aria-checked={settings.download.download_subtitles} aria-label={$t('settings.download.download_subtitles') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.download_subtitles}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.include_auto_subtitles')}</span>- <span class="setting-path">{$t('settings.download.include_auto_subtitles_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.include_auto_subtitles} onclick={() => toggleBool("download", "include_auto_subtitles", settings.download.include_auto_subtitles)} role="switch" aria-checked={settings.download.include_auto_subtitles} aria-label={$t('settings.download.include_auto_subtitles') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.caption_locale')}</span>- <span class="setting-path">{$t('settings.download.caption_locale_desc')}</span>- </div>- <select class="select" value={settings.download.caption_locale} onchange={changeCaptionLocale}>- <option value="en">English</option>- <option value="pt">Português</option>- <option value="es">Español</option>- <option value="fr">Français</option>- <option value="it">Italiano</option>- <option value="ja">日本語</option>- <option value="zh-Hans">简体中文</option>- <option value="zh-Hant">繁體中文</option>- <option value="el">Ελληνικά</option>- </select>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.keep_vtt')}</span>- <span class="setting-path">{$t('settings.download.keep_vtt_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.keep_vtt} onclick={() => toggleBool("download", "keep_vtt", settings.download.keep_vtt)} role="switch" aria-checked={settings.download.keep_vtt} aria-label={$t('settings.download.keep_vtt') as string}><span class="toggle-knob"></span></button>- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.translate_metadata')}</span>- <span class="setting-path">{$t('settings.download.translate_metadata_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.translate_metadata} onclick={() => toggleBool("download", "translate_metadata", settings.download.translate_metadata)} role="switch" aria-checked={settings.download.translate_metadata} aria-label={$t('settings.download.translate_metadata') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.embed_metadata')}</span>- <span class="setting-path">{$t('settings.download.embed_metadata_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.embed_metadata} onclick={() => toggleBool("download", "embed_metadata", settings.download.embed_metadata)} role="switch" aria-checked={settings.download.embed_metadata} aria-label={$t('settings.download.embed_metadata') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.embed_thumbnail')}</span>- <span class="setting-path">{$t('settings.download.embed_thumbnail_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.embed_thumbnail} onclick={() => toggleBool("download", "embed_thumbnail", settings.download.embed_thumbnail)} role="switch" aria-checked={settings.download.embed_thumbnail} aria-label={$t('settings.download.embed_thumbnail') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.youtube_specific')}</summary>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.youtube_sponsorblock')}</span>- <span class="setting-path">{$t('settings.download.youtube_sponsorblock_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.youtube_sponsorblock} onclick={() => toggleBool("download", "youtube_sponsorblock", settings.download.youtube_sponsorblock)} role="switch" aria-checked={settings.download.youtube_sponsorblock} aria-label={$t('settings.download.youtube_sponsorblock') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.youtube_sponsorblock}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.sb_mode')}</span>- <span class="setting-path">{$t('settings.download.sb_mode_desc')}</span>- </div>- <select class="select" value={settings.download.sponsorblock_mode} onchange={setSbMode}>- <option value="remove">{$t('settings.download.sb_mode_remove')}</option>- <option value="mark">{$t('settings.download.sb_mode_mark')}</option>- </select>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.sb_categories')}</span>- <span class="setting-path">{$t('settings.download.sb_categories_desc')}</span>- </div>- </div>- <div class="sb-chips">- {#each SB_CATEGORIES as cat (cat)}- <button- type="button"- class="sb-chip"- class:on={sbHas(cat)}- onclick={() => toggleSbCategory(cat)}- aria-pressed={sbHas(cat)}- >- {$t(`settings.download.sb_cat_${cat}`)}- </button>- {/each}- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.split_by_chapters')}</span>- <span class="setting-path">{$t('settings.download.split_by_chapters_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.split_by_chapters} onclick={() => toggleBool("download", "split_by_chapters", settings.download.split_by_chapters)} role="switch" aria-checked={settings.download.split_by_chapters} aria-label={$t('settings.download.split_by_chapters') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.live_from_start')}</span>- <span class="setting-path">{$t('settings.download.live_from_start_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.live_from_start} onclick={() => toggleBool("download", "live_from_start", settings.download.live_from_start)} role="switch" aria-checked={settings.download.live_from_start} aria-label={$t('settings.download.live_from_start') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.courses_section')}</summary>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.continuous_lecture_numbers')}</span>- <span class="setting-path">{$t('settings.download.continuous_lecture_numbers_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.continuous_lecture_numbers} onclick={() => toggleBool("download", "continuous_lecture_numbers", settings.download.continuous_lecture_numbers)} role="switch" aria-checked={settings.download.continuous_lecture_numbers} aria-label={$t('settings.download.continuous_lecture_numbers') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.bilibili_section')}</summary>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_container_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_container_desc')}</span>- </div>- <select class="select" value={settings.download.bilibili_container} onchange={setBilibiliContainer}>- <option value="mp4">MP4</option>- <option value="mkv">MKV</option>- </select>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_danmaku_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_danmaku_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.bilibili_danmaku_enabled} onclick={() => toggleBool("download", "bilibili_danmaku_enabled", settings.download.bilibili_danmaku_enabled)} role="switch" aria-checked={settings.download.bilibili_danmaku_enabled} aria-label={$t('settings.download.bilibili_danmaku_label') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.bilibili_danmaku_enabled}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_danmaku_format_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_danmaku_format_desc')}</span>- </div>- <select class="select" value={settings.download.bilibili_danmaku_format} onchange={setBilibiliDanmakuFormat}>- <option value="xml">XML</option>- <option value="ass">ASS</option>- <option value="json">JSON</option>- </select>- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_nfo_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_nfo_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.bilibili_nfo_enabled} onclick={() => toggleBool("download", "bilibili_nfo_enabled", settings.download.bilibili_nfo_enabled)} role="switch" aria-checked={settings.download.bilibili_nfo_enabled} aria-label={$t('settings.download.bilibili_nfo_label') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_cover_sidecar_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_cover_sidecar_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.bilibili_cover_sidecar} onclick={() => toggleBool("download", "bilibili_cover_sidecar", settings.download.bilibili_cover_sidecar)} role="switch" aria-checked={settings.download.bilibili_cover_sidecar} aria-label={$t('settings.download.bilibili_cover_sidecar_label') as string}><span class="toggle-knob"></span></button>- </div>- {#if settings.download.bilibili_cover_sidecar}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_cover_format_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_cover_format_desc')}</span>- </div>- <select class="select" value={settings.download.bilibili_cover_format} onchange={setBilibiliCoverFormat}>- <option value="jpg">JPG</option>- <option value="png">PNG</option>- <option value="webp">WebP</option>- <option value="avif">AVIF</option>- </select>- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_naming_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_naming_desc')}</span>- </div>- <button type="button" class="ghost-btn" onclick={() => (namingTemplatesOpen = !namingTemplatesOpen)}>- {namingTemplatesOpen ? $t('settings.download.bilibili_naming_hide') : $t('settings.download.bilibili_naming_edit')}- </button>- </div>- {#if namingTemplatesOpen}- <div class="naming-block">- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_naming_video_label')}</span>- <input class="naming-input" type="text" value={settings.download.bilibili_naming_video} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_video', (e.target as HTMLInputElement).value)} />- </label>- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_naming_multi_part_label')}</span>- <input class="naming-input" type="text" value={settings.download.bilibili_naming_multi_part} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_multi_part', (e.target as HTMLInputElement).value)} />- </label>- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_naming_bangumi_label')}</span>- <input class="naming-input" type="text" value={settings.download.bilibili_naming_bangumi} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_bangumi', (e.target as HTMLInputElement).value)} />- </label>- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_naming_cheese_label')}</span>- <input class="naming-input" type="text" value={settings.download.bilibili_naming_cheese} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_cheese', (e.target as HTMLInputElement).value)} />- </label>- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_naming_collection_label')}</span>- <input class="naming-input" type="text" value={settings.download.bilibili_naming_collection} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_collection', (e.target as HTMLInputElement).value)} />- </label>- <p class="naming-help">{$t('settings.download.bilibili_naming_help')}</p>- </div>- {/if}- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_cdn_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_cdn_desc')}</span>- </div>- <button type="button" class="ghost-btn" onclick={() => (cdnOpen = !cdnOpen)}>- {cdnOpen ? $t('settings.download.bilibili_naming_hide') : $t('settings.download.bilibili_naming_edit')}- </button>- </div>- {#if cdnOpen}- <div class="naming-block">- <label class="naming-row">- <span class="naming-label">{$t('settings.download.bilibili_cdn_hosts_label')}</span>- <textarea class="naming-input" rows="3" value={settings.download.bilibili_cdn_hosts} oninput={setBilibiliCdnHosts} placeholder={$t('settings.download.bilibili_cdn_hosts_placeholder') as string}></textarea>- </label>- <div class="setting-row" style="padding: 4px 0;">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.bilibili_cdn_prefer_label')}</span>- <span class="setting-path">{$t('settings.download.bilibili_cdn_prefer_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.bilibili_cdn_prefer_alternatives} onclick={() => toggleBool("download", "bilibili_cdn_prefer_alternatives", settings.download.bilibili_cdn_prefer_alternatives)} role="switch" aria-checked={settings.download.bilibili_cdn_prefer_alternatives} aria-label={$t('settings.download.bilibili_cdn_prefer_label') as string}><span class="toggle-knob"></span></button>- </div>- </div>- {/if}- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.clipboard_detection')}</summary>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.clipboard_detection')} <ContextHint text={$t('hints.clipboard') as string} dismissKey="clipboard" /></span>- <span class="setting-path">{$t('settings.download.clipboard_detection_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.clipboard_detection} onclick={() => toggleBool("download", "clipboard_detection", settings.download.clipboard_detection)} role="switch" aria-checked={settings.download.clipboard_detection} aria-label={$t('settings.download.clipboard_detection') as string}><span class="toggle-knob"></span></button>- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.auto_download_on_paste')}</span>- <span class="setting-path">{$t('settings.download.auto_download_on_paste_desc')}</span>- </div>- <button class="toggle" class:on={settings.download.auto_download_on_paste} onclick={() => toggleBool("download", "auto_download_on_paste", settings.download.auto_download_on_paste)} role="switch" aria-checked={settings.download.auto_download_on_paste} aria-label={$t('settings.download.auto_download_on_paste') as string}><span class="toggle-knob"></span></button>- </div>- </div>-</details>--<details class="section">- <summary class="section-title">{$t('settings.download.filename_template')}</summary>- <div class="card">- <div class="setting-row template-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.download.filename_template')}</span>- <span class="setting-path">{$t('settings.download.filename_template_desc')}</span>- </div>- <input type="text" class="input-template" value={templateInput} oninput={handleTemplateInput} spellcheck="false" />- </div>- {#if templateInput}- <div class="template-preview">- <span class="setting-path">{$t('settings.download.filename_template_preview', { preview: previewTemplate(templateInput) })}</span>- </div>- {/if}- </div>-</details>-{/if}--<style>- .path-warning {- display: flex;- align-items: flex-start;- gap: 6px;- margin-top: 6px;- color: var(--warning);- font-size: 12px;- line-height: 1.4;- }- .path-warning svg {- flex-shrink: 0;- margin-top: 1px;- }-- .speed-limit {- display: flex;- align-items: center;- gap: 6px;- }- .input-number {- width: 88px;- padding: 6px 8px;- background: var(--surface);- color: var(--text);- border: 1px solid var(--border);- border-radius: var(--border-radius, 6px);- font: inherit;- text-align: right;- }- .input-number:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);- }-- .sb-chips {- display: flex;- flex-wrap: wrap;- gap: 6px;- padding: 4px 0 8px;- }- .sb-chip {- padding: 5px 12px;- border: 1px solid var(--border);- border-radius: 999px;- background: var(--surface);- color: var(--text-muted, var(--text));- font: inherit;- font-size: 12px;- cursor: pointer;- transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;- }- .sb-chip:hover {- border-color: var(--accent);- }- .sb-chip.on {- border-color: var(--accent);- background: color-mix(in srgb, var(--accent) 16%, var(--surface));- color: var(--text);- }- .sb-chip:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);- }-- .preset-grid {- display: grid;- grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));- gap: 8px;- }- .preset-card {- display: flex;- flex-direction: column;- align-items: flex-start;- gap: 4px;- padding: 10px 12px;- border: 1px solid var(--border);- border-radius: var(--border-radius, 6px);- background: var(--surface);- color: var(--text);- cursor: pointer;- text-align: left;- transition: border-color 0.12s ease, background 0.12s ease;- }- .preset-card:hover {- border-color: var(--accent);- }- .preset-card.active {- border-color: var(--accent);- background: color-mix(in srgb, var(--accent) 12%, var(--surface));- }- .preset-label {- font-weight: 600;- font-size: 0.9rem;- }- .preset-desc {- font-size: 0.78rem;- color: var(--text-muted, var(--text));- opacity: 0.75;- }- .ghost-btn {- padding: 6px 12px;- border-radius: 8px;- border: 1px solid var(--content-border, color-mix(in oklab, var(--text) 15%, transparent));- background: transparent;- color: var(--text);- font-size: 0.85rem;- cursor: pointer;- }- .ghost-btn:hover {- background: color-mix(in oklab, var(--text) 6%, transparent);- }- .naming-block {- padding: 14px 16px 4px;- display: flex;- flex-direction: column;- gap: 10px;- }- .naming-row {- display: flex;- flex-direction: column;- gap: 4px;- }- .naming-label {- font-size: 0.78rem;- color: var(--text-muted, var(--text));- opacity: 0.85;- }- .naming-input {- padding: 6px 10px;- border-radius: 6px;- border: 1px solid color-mix(in oklab, var(--content-border) 60%, transparent);- background: var(--surface);- color: var(--text);- font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;- font-size: 0.8rem;- }- .naming-input:focus {- outline: none;- border-color: var(--accent);- }- .naming-help {- font-size: 0.72rem;- color: var(--text-muted, var(--text));- opacity: 0.7;- margin: 4px 0 0;- line-height: 1.4;- }-</style>+<script lang="ts">+ import { t } from "$lib/i18n";+ import { getSettings } from "./settings-helpers";+ import SettingsDrillBack from "./SettingsDrillBack.svelte";+ import SettingsDrillItem from "./SettingsDrillItem.svelte";+ import OutputSection from "./downloads/OutputSection.svelte";+ import QualitySection from "./downloads/QualitySection.svelte";+ import SubtitlesSection from "./downloads/SubtitlesSection.svelte";+ import ClipboardHotkeysSection from "./downloads/ClipboardHotkeysSection.svelte";+ import PlatformOptionsSection from "./downloads/PlatformOptionsSection.svelte";++ let { searchActive = false }: { searchActive?: boolean } = $props();++ type DownloadDrill = "output" | "quality" | "subtitles" | "hotkeys" | "platforms";+ let subView = $state<DownloadDrill | null>(null);++ let settings = $derived(getSettings());++ const DRILL_ITEMS: { id: DownloadDrill; titleKey: string; hintKey: string }[] = [+ { id: "output", titleKey: "settings.download.section_output", hintKey: "settings.download.section_output_desc" },+ { id: "quality", titleKey: "settings.download.section_quality", hintKey: "settings.download.section_quality_desc" },+ { id: "subtitles", titleKey: "settings.download.section_subtitles", hintKey: "settings.download.section_subtitles_desc" },+ { id: "hotkeys", titleKey: "settings.download.section_clipboard_hotkeys", hintKey: "settings.download.section_clipboard_hotkeys_desc" },+ { id: "platforms", titleKey: "settings.download.section_per_platform", hintKey: "settings.download.section_per_platform_desc" },+ ];++ $effect(() => {+ if (searchActive) subView = null;+ });+</script>++{#if settings}+ {#if searchActive}+ <section class="section"><OutputSection /></section>+ <section class="section"><QualitySection /></section>+ <section class="section"><SubtitlesSection /></section>+ <section class="section"><ClipboardHotkeysSection /></section>+ <section class="section"><PlatformOptionsSection /></section>+ {:else if subView === null}+ <nav class="settings-drill-list" aria-label={$t('settings.cat_downloads')}>+ {#each DRILL_ITEMS as item (item.id)}+ <SettingsDrillItem+ title={$t(item.titleKey)}+ hint={$t(item.hintKey)}+ onclick={() => { subView = item.id; }}+ />+ {/each}+ </nav>+ {:else}+ {@const active = DRILL_ITEMS.find((i) => i.id === subView)}+ {#if active}+ <SettingsDrillBack+ title={$t(active.titleKey)}+ hint={$t(active.hintKey)}+ onBack={() => { subView = null; }}+ />+ {/if}+ <section class="section">+ {#if subView === "output"}+ <OutputSection embedded />+ {:else if subView === "quality"}+ <QualitySection embedded />+ {:else if subView === "subtitles"}+ <SubtitlesSection embedded />+ {:else if subView === "hotkeys"}+ <ClipboardHotkeysSection embedded />+ {:else if subView === "platforms"}+ <PlatformOptionsSection embedded />+ {/if}+ </section>+ {/if}+{/if}diff --git a/src/components/settings/SettingsDrillBack.svelte b/src/components/settings/SettingsDrillBack.sveltenew file mode 100644index 00000000..d86a821b--- /dev/null+++ b/src/components/settings/SettingsDrillBack.svelte@@ -0,0 +1,22 @@+<script lang="ts">+ import { t } from "$lib/i18n";++ let { title, hint = "", onBack }: {+ title: string;+ hint?: string;+ onBack: () => void;+ } = $props();+</script>++<div class="settings-drill-back">+ <button type="button" class="settings-drill-back-btn" onclick={onBack}>+ <span class="settings-drill-back-chevron" aria-hidden="true">‹</span>+ {$t('settings.drill_back')}+ </button>+ <div class="settings-drill-back-head">+ <h5 class="section-title">{title}</h5>+ {#if hint}+ <p class="settings-section-hint">{hint}</p>+ {/if}+ </div>+</div>diff --git a/src/components/settings/SettingsDrillItem.svelte b/src/components/settings/SettingsDrillItem.sveltenew file mode 100644index 00000000..e93103f5--- /dev/null+++ b/src/components/settings/SettingsDrillItem.svelte@@ -0,0 +1,15 @@+<script lang="ts">+ let { title, hint, onclick }: {+ title: string;+ hint: string;+ onclick: () => void;+ } = $props();+</script>++<button type="button" class="settings-drill-item" {onclick}>+ <span class="settings-drill-item-text">+ <span class="settings-drill-item-title">{title}</span>+ <span class="settings-drill-item-hint">{hint}</span>+ </span>+ <span class="settings-drill-item-chevron" aria-hidden="true">›</span>+</button>diff --git a/src/components/settings/SettingsNetwork.svelte b/src/components/settings/SettingsNetwork.svelteindex b418a7e8..21ce6e2d 100644--- a/src/components/settings/SettingsNetwork.svelte+++ b/src/components/settings/SettingsNetwork.svelte@@ -48,48 +48,6 @@await updateSettings({ proxy: { password: value } });}, 800);}-- const YTDLP_FLAG_CATALOG = [- { flag: "--embed-subs", key: "embed_subs" },- { flag: "--write-thumbnail", key: "write_thumbnail" },- { flag: "--write-description", key: "write_description" },- { flag: "--write-comments", key: "write_comments" },- { flag: "--restrict-filenames", key: "restrict_filenames" },- { flag: "--no-overwrites", key: "no_overwrites" },- { flag: "--prefer-free-formats", key: "prefer_free_formats" },- { flag: "--force-ipv4", key: "force_ipv4" },- { flag: "--geo-bypass", key: "geo_bypass" },- { flag: "--limit-rate", key: "limit_rate", hasValue: true, phKey: "limit_rate_ph" },- { flag: "--sleep-interval", key: "sleep_interval", hasValue: true, phKey: "sleep_interval_ph" },- ];-- async function toggleFlag(flag: string) {- if (!settings) return;- let current = [...(settings.download?.extra_ytdlp_flags ?? [])];- const idx = current.findIndex((f) => f === flag || f.startsWith(flag + " "));- if (idx >= 0) current.splice(idx, 1);- else current.push(flag);- await updateSettings({ download: { extra_ytdlp_flags: current } });- }-- async function setFlagValue(flag: string, value: string) {- if (!settings) return;- let current = [...(settings.download?.extra_ytdlp_flags ?? [])];- const idx = current.findIndex((f) => f === flag || f.startsWith(flag + " "));- if (idx >= 0) {- current[idx] = value ? `${flag} ${value}` : flag;- }- await updateSettings({ download: { extra_ytdlp_flags: current } });- }-- function isFlagActive(flag: string): boolean {- return (settings?.download?.extra_ytdlp_flags ?? []).some((f) => f === flag || f.startsWith(flag + " "));- }-- function getFlagValue(flag: string): string {- const f = (settings?.download?.extra_ytdlp_flags ?? []).find((f) => f.startsWith(flag + " "));- return f ? f.slice(flag.length + 1) : "";- }</script>{#if settings}@@ -144,35 +102,4 @@{/if}</div></section>--<section class="section">- <h5 class="section-title">{$t('settings.ytdlp_flags.title')}</h5>- <div class="card">- <div class="flag-grid">- {#each YTDLP_FLAG_CATALOG as item (item.flag)}- <button- class="flag-chip"- class:active={isFlagActive(item.flag)}- onclick={() => toggleFlag(item.flag)}- title={item.flag}- >- {$t(`settings.ytdlp_flags.${item.key}`)}- </button>- {#if item.hasValue && isFlagActive(item.flag)}- <input- class="flag-value-input"- type="text"- placeholder={item.phKey ? ($t(`settings.ytdlp_flags.${item.phKey}`) as string) : ""}- value={getFlagValue(item.flag)}- oninput={(e) => {- const val = (e.target as HTMLInputElement).value;- setFlagValue(item.flag, val);- }}- spellcheck="false"- />- {/if}- {/each}- </div>- </div>-</section>{/if}diff --git a/src/components/settings/SettingsPlugins.svelte b/src/components/settings/SettingsPlugins.svelteindex 1c62230d..8025e089 100644--- a/src/components/settings/SettingsPlugins.svelte+++ b/src/components/settings/SettingsPlugins.svelte@@ -1,234 +1,210 @@-<script lang="ts">- import { onMount } from "svelte";- import { invoke } from "@tauri-apps/api/core";- import { t } from "$lib/i18n";- import { getSettings, toggleBool, changeNumber, type DependencyStatus } from "./settings-helpers";- import { showToast } from "$lib/stores/toast-store.svelte";- import DependencyRow from "./DependencyRow.svelte";-- let { deps = [], installingDep = null, onInstallDep, onRefresh }: {- deps?: DependencyStatus[];- installingDep?: string | null;- onInstallDep: (name: string, variant: string | null) => void;- onRefresh?: () => void | Promise<void>;- } = $props();-- let settings = $derived(getSettings());-- type BrowserExtStatus = {- browser: string;- supported: boolean;- bundled_version: string | null;- installable: boolean;- install_hint: string;- store_url: string | null;- };-- let extStatuses = $state<BrowserExtStatus[]>([]);- let busyBrowser = $state<string | null>(null);- let installModal = $state<{ browser: string; path: string; hint: string } | null>(null);-- onMount(async () => {- try {- extStatuses = await invoke<BrowserExtStatus[]>("browser_extension_status");- } catch (e) {- console.warn("[ext] status failed", e);- }- });-- async function exportExtension(browser: string) {- if (busyBrowser) return;- busyBrowser = browser;- try {- const res = await invoke<{ path: string; version: string | null; browser: string }>(- "browser_extension_export",- { browser },- );- const status = extStatuses.find((s) => s.browser === browser);- installModal = {- browser,- path: res.path,- hint: status?.install_hint ?? "",- };- } catch (e) {- showToast("error", e instanceof Error ? e.message : String(e));- } finally {- busyBrowser = null;- }- }-- async function openFolder(path: string) {- try {- await invoke("browser_extension_open_folder", { path });- } catch (e) {- showToast("error", e instanceof Error ? e.message : String(e));- }- }-- function closeInstall() {- installModal = null;- }-- function browserLabel(b: string): string {- if (b === "chrome") return "Chrome / Edge / Brave";- if (b === "firefox") return "Firefox";- if (b === "safari") return "Safari";- return b;- }-</script>--{#if settings}- <section class="section">- <h5 class="section-title">{$t('settings.download.telegram_plugin_section')}</h5>- <div class="card">- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.telegram.concurrent_downloads')}</span>- <span class="setting-path">{$t('settings.telegram.concurrent_downloads_desc')}</span>- </div>- <input- type="number"- class="input-number"- min="1"- max="10"- value={settings.telegram.concurrent_downloads}- onchange={(e) => changeNumber("telegram", "concurrent_downloads", e)}- />- </div>- <div class="divider"></div>- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{$t('settings.telegram.fix_file_extensions')}</span>- <span class="setting-path">{$t('settings.telegram.fix_file_extensions_desc')}</span>- </div>- <button- class="toggle"- class:on={settings.telegram.fix_file_extensions}- onclick={() => toggleBool("telegram", "fix_file_extensions", settings.telegram.fix_file_extensions)}- role="switch"- aria-checked={settings.telegram.fix_file_extensions}- aria-label={$t('settings.telegram.fix_file_extensions') as string}- >- <span class="toggle-knob"></span>- </button>- </div>- </div>- </section>-- <section class="section">- <h5 class="section-title">Extensão de navegador</h5>- <p class="muted">A extensão envia cookies e URLs do seu navegador para o OmniGet. Auto-update direto pelo app só funciona via lojas oficiais — enquanto não publicamos, use os botões abaixo para extrair a versão atual e (re)instalar manualmente.</p>- <div class="card">- {#each extStatuses as ext, i (ext.browser)}- {#if i > 0}<div class="divider"></div>{/if}- <div class="setting-row">- <div class="setting-col">- <span class="setting-label">{browserLabel(ext.browser)}</span>- <span class="setting-path">- {#if ext.bundled_version}- Versão empacotada: v{ext.bundled_version}- {:else}- {ext.install_hint}- {/if}- </span>- </div>- {#if ext.installable}- <button- class="button"- disabled={busyBrowser === ext.browser}- onclick={() => exportExtension(ext.browser)}- >- {busyBrowser === ext.browser ? "Extraindo..." : "Atualizar / Instalar"}- </button>- {:else if ext.store_url}- <a class="button" href={ext.store_url} target="_blank" rel="noreferrer">Abrir loja</a>- {:else}- <span class="muted small">Indisponível</span>- {/if}- </div>- {/each}- </div>- </section>-- {#if deps.length > 0}- <section class="section">- <h5 class="section-title">{$t('settings.dependencies.title')}</h5>- <div class="card">- {#each deps as dep, i (dep.name)}- {#if i > 0}<div class="divider"></div>{/if}- <DependencyRow- name={dep.name}- installed={dep.installed}- version={dep.version}- busy={installingDep === dep.name}- onInstall={(variant) => onInstallDep(dep.name, variant)}- onAfterCustomFile={onRefresh}- />- {/each}- </div>- </section>- {/if}-{/if}--{#if installModal}- <div class="overlay" role="presentation" onclick={(e) => { if (e.target === e.currentTarget) closeInstall(); }}>- <div class="dialog" role="dialog" aria-modal="true">- <header class="head">- <h3>Instalar / Atualizar extensão — {browserLabel(installModal.browser)}</h3>- <button class="close" onclick={closeInstall} aria-label="fechar">×</button>- </header>- <div class="body">- <p>A extensão foi extraída para:</p>- <code class="path">{installModal.path}</code>- <button class="button" onclick={() => openFolder(installModal!.path)}>Abrir pasta</button>- <h4>Como instalar / atualizar</h4>- <p class="hint">{installModal.hint}</p>- <p class="hint small">- Se a extensão já está instalada, clique em "Recarregar" no <code>{installModal.browser === 'firefox' ? 'about:debugging' : 'chrome://extensions'}</code> apontando pra essa pasta — ou remova a antiga e adicione a nova.- </p>- </div>- <footer class="foot">- <button class="button" onclick={closeInstall}>Fechar</button>- </footer>- </div>- </div>-{/if}--<style>- .muted { color: rgba(255, 255, 255, 0.6); font-size: 12px; line-height: 1.4; margin: 0 0 8px; }- .small { font-size: 11px; }- .overlay {- position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);- display: grid; place-items: center; z-index: 999;- }- .dialog {- background: var(--bg-card, #1a1a1a);- border: 1px solid rgba(255, 255, 255, 0.1);- border-radius: 12px;- width: min(560px, 90vw);- max-height: 80vh; overflow: auto;- display: flex; flex-direction: column;- }- .head {- display: flex; justify-content: space-between; align-items: center;- padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);- }- .head h3 { margin: 0; font-size: 16px; }- .close {- background: transparent; border: 0; color: rgba(255, 255, 255, 0.6);- font-size: 22px; line-height: 1; cursor: pointer;- }- .body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }- .body h4 { margin: 8px 0 0; font-size: 13px; font-weight: 600; }- .body p { margin: 0; font-size: 13px; line-height: 1.5; }- .body .hint { color: rgba(255, 255, 255, 0.7); }- .path {- display: block; padding: 8px 10px; background: rgba(0, 0, 0, 0.4);- border-radius: 6px; font-family: var(--font-mono, monospace); font-size: 11px;- word-break: break-all;- }- .foot {- padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.05);- display: flex; justify-content: flex-end;- }-</style>+<script lang="ts">+ import { onMount } from "svelte";+ import { invoke } from "@tauri-apps/api/core";+ import { t } from "$lib/i18n";+ import { getSettings, type DependencyStatus } from "./settings-helpers";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import DependencyRow from "./DependencyRow.svelte";++ let { deps = [], installingDep = null, onInstallDep, onRefresh }: {+ deps?: DependencyStatus[];+ installingDep?: string | null;+ onInstallDep: (name: string, variant: string | null) => void;+ onRefresh?: () => void | Promise<void>;+ } = $props();++ let settings = $derived(getSettings());++ type BrowserExtStatus = {+ browser: string;+ supported: boolean;+ bundled_version: string | null;+ installable: boolean;+ install_hint: string;+ store_url: string | null;+ };++ let extStatuses = $state<BrowserExtStatus[]>([]);+ let busyBrowser = $state<string | null>(null);+ let installModal = $state<{ browser: string; path: string; hint: string } | null>(null);++ onMount(async () => {+ try {+ extStatuses = await invoke<BrowserExtStatus[]>("browser_extension_status");+ } catch (e) {+ console.warn("[ext] status failed", e);+ }+ });++ async function exportExtension(browser: string) {+ if (busyBrowser) return;+ busyBrowser = browser;+ try {+ const res = await invoke<{ path: string; version: string | null; browser: string }>(+ "browser_extension_export",+ { browser },+ );+ const status = extStatuses.find((s) => s.browser === browser);+ installModal = {+ browser,+ path: res.path,+ hint: status?.install_hint ?? "",+ };+ } catch (e) {+ showToast("error", e instanceof Error ? e.message : String(e));+ } finally {+ busyBrowser = null;+ }+ }++ async function openFolder(path: string) {+ try {+ await invoke("browser_extension_open_folder", { path });+ } catch (e) {+ showToast("error", e instanceof Error ? e.message : String(e));+ }+ }++ function closeInstall() {+ installModal = null;+ }++ function browserLabel(b: string): string {+ if (b === "chrome") return "Chrome / Edge / Brave";+ if (b === "firefox") return "Firefox";+ if (b === "safari") return "Safari";+ return b;+ }+</script>++{#if settings}+ <section class="section">+ <h5 class="section-title">Extensão de navegador</h5>+ <p class="muted">A extensão envia cookies e URLs do seu navegador para o OmniGet. Auto-update direto pelo app só funciona via lojas oficiais — enquanto não publicamos, use os botões abaixo para extrair a versão atual e (re)instalar manualmente.</p>+ <div class="card">+ {#each extStatuses as ext, i (ext.browser)}+ {#if i > 0}<div class="divider"></div>{/if}+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{browserLabel(ext.browser)}</span>+ <span class="setting-path">+ {#if ext.bundled_version}+ Versão empacotada: v{ext.bundled_version}+ {:else}+ {ext.install_hint}+ {/if}+ </span>+ </div>+ {#if ext.installable}+ <button+ class="button"+ disabled={busyBrowser === ext.browser}+ onclick={() => exportExtension(ext.browser)}+ >+ {busyBrowser === ext.browser ? "Extraindo..." : "Atualizar / Instalar"}+ </button>+ {:else if ext.store_url}+ <a class="button" href={ext.store_url} target="_blank" rel="noreferrer">Abrir loja</a>+ {:else}+ <span class="muted small">Indisponível</span>+ {/if}+ </div>+ {/each}+ </div>+ </section>++ {#if deps.length > 0}+ <section class="section">+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.dependencies.title')}</h5>+ </div>+ <div class="deps-table-wrap">+ <table class="deps-table">+ <thead>+ <tr>+ <th scope="col">{$t('settings.dependencies.col_name')}</th>+ <th scope="col">{$t('settings.dependencies.col_version')}</th>+ <th scope="col">{$t('settings.dependencies.col_status')}</th>+ <th scope="col" class="deps-col-action">{$t('settings.dependencies.col_action')}</th>+ </tr>+ </thead>+ <tbody>+ {#each deps as dep (dep.name)}+ <DependencyRow+ name={dep.name}+ installed={dep.installed}+ version={dep.version}+ busy={installingDep === dep.name}+ onInstall={(variant) => onInstallDep(dep.name, variant)}+ onAfterCustomFile={onRefresh}+ />+ {/each}+ </tbody>+ </table>+ </div>+ </section>+ {/if}+{/if}++{#if installModal}+ <div class="overlay" role="presentation" onclick={(e) => { if (e.target === e.currentTarget) closeInstall(); }}>+ <div class="dialog" role="dialog" aria-modal="true">+ <header class="head">+ <h3>Instalar / Atualizar extensão — {browserLabel(installModal.browser)}</h3>+ <button class="close" onclick={closeInstall} aria-label="fechar">×</button>+ </header>+ <div class="body">+ <p>A extensão foi extraída para:</p>+ <code class="path">{installModal.path}</code>+ <button class="button" onclick={() => openFolder(installModal!.path)}>Abrir pasta</button>+ <h4>Como instalar / atualizar</h4>+ <p class="hint">{installModal.hint}</p>+ <p class="hint small">+ Se a extensão já está instalada, clique em "Recarregar" no <code>{installModal.browser === 'firefox' ? 'about:debugging' : 'chrome://extensions'}</code> apontando pra essa pasta — ou remova a antiga e adicione a nova.+ </p>+ </div>+ <footer class="foot">+ <button class="button" onclick={closeInstall}>Fechar</button>+ </footer>+ </div>+ </div>+{/if}++<style>+ .muted { color: rgba(255, 255, 255, 0.6); font-size: 12px; line-height: 1.4; margin: 0 0 8px; }+ .small { font-size: 11px; }+ .overlay {+ position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);+ display: grid; place-items: center; z-index: 999;+ }+ .dialog {+ background: var(--bg-card, #1a1a1a);+ border: 1px solid rgba(255, 255, 255, 0.1);+ border-radius: 12px;+ width: min(560px, 90vw);+ max-height: 80vh; overflow: auto;+ display: flex; flex-direction: column;+ }+ .head {+ display: flex; justify-content: space-between; align-items: center;+ padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);+ }+ .head h3 { margin: 0; font-size: 16px; }+ .close {+ background: transparent; border: 0; color: rgba(255, 255, 255, 0.6);+ font-size: 22px; line-height: 1; cursor: pointer;+ }+ .body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }+ .body h4 { margin: 8px 0 0; font-size: 13px; font-weight: 600; }+ .body p { margin: 0; font-size: 13px; line-height: 1.5; }+ .body .hint { color: rgba(255, 255, 255, 0.7); }+ .path {+ display: block; padding: 8px 10px; background: rgba(0, 0, 0, 0.4);+ border-radius: 6px; font-family: var(--font-mono, monospace); font-size: 11px;+ word-break: break-all;+ }+ .foot {+ padding: 12px 20px; border-top: 1px solid rgba(255, 255, 255, 0.05);+ display: flex; justify-content: flex-end;+ }+</style>diff --git a/src/components/settings/downloads/ClipboardHotkeysSection.svelte b/src/components/settings/downloads/ClipboardHotkeysSection.sveltenew file mode 100644index 00000000..5c142ea8--- /dev/null+++ b/src/components/settings/downloads/ClipboardHotkeysSection.svelte@@ -0,0 +1,201 @@+<script lang="ts">+ import { t } from "$lib/i18n";+ import ContextHint from "$components/hints/ContextHint.svelte";+ import { getSettings, updateSettings, toggleBool } from "../settings-helpers";++ let { embedded = false }: { embedded?: boolean } = $props();++ let settings = $derived(getSettings());++ let hotkeyInput = $state("");+ let hotkeyTimer: ReturnType<typeof setTimeout> | null = null;+ let hotkeyMode = $state<"record" | "type">("record");+ let hotkeyRecording = $state(false);+ let musicHotkeyInput = $state("");+ let musicHotkeyTimer: ReturnType<typeof setTimeout> | null = null;+ let musicHotkeyMode = $state<"record" | "type">("record");+ let musicHotkeyRecording = $state(false);++ $effect(() => {+ if (settings) {+ hotkeyInput = settings.download.hotkey_binding;+ musicHotkeyInput = settings.download.music_hotkey_binding;+ }+ });++ function handleHotkeyInput(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ hotkeyInput = value;+ if (hotkeyTimer) clearTimeout(hotkeyTimer);+ hotkeyTimer = setTimeout(async () => {+ if (value.trim()) {+ await updateSettings({ download: { hotkey_binding: value } });+ }+ }, 800);+ }++ function mapKeyName(key: string): string | null {+ if (key.length === 1 && /[a-zA-Z]/.test(key)) return key.toUpperCase();+ if (key.length === 1 && /[0-9]/.test(key)) return key;+ if (/^F([1-9]|1[0-2])$/.test(key)) return key;+ const map: Record<string, string> = {+ " ": "Space", ArrowUp: "Up", ArrowDown: "Down", ArrowLeft: "Left", ArrowRight: "Right",+ Enter: "Enter", Tab: "Tab", Escape: "Escape", Backspace: "Backspace", Delete: "Delete",+ Home: "Home", End: "End", PageUp: "PageUp", PageDown: "PageDown", Insert: "Insert",+ };+ return map[key] ?? null;+ }++ function handleHotkeyKeyDown(e: KeyboardEvent) {+ e.preventDefault();+ e.stopPropagation();+ if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;+ const keyName = mapKeyName(e.key);+ if (!keyName) return;+ const parts: string[] = [];+ if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");+ if (e.shiftKey) parts.push("Shift");+ if (e.altKey) parts.push("Alt");+ parts.push(keyName);+ const value = parts.join("+");+ hotkeyInput = value;+ hotkeyRecording = false;+ updateSettings({ download: { hotkey_binding: value } });+ }++ function handleMusicHotkeyInput(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ musicHotkeyInput = value;+ if (musicHotkeyTimer) clearTimeout(musicHotkeyTimer);+ musicHotkeyTimer = setTimeout(async () => {+ if (value.trim()) {+ await updateSettings({ download: { music_hotkey_binding: value } });+ }+ }, 800);+ }++ function handleMusicHotkeyKeyDown(e: KeyboardEvent) {+ e.preventDefault();+ e.stopPropagation();+ if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;+ const keyName = mapKeyName(e.key);+ if (!keyName) return;+ const parts: string[] = [];+ if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");+ if (e.shiftKey) parts.push("Shift");+ if (e.altKey) parts.push("Alt");+ parts.push(keyName);+ const value = parts.join("+");+ musicHotkeyInput = value;+ musicHotkeyRecording = false;+ updateSettings({ download: { music_hotkey_binding: value } });+ }++ function changeMusicAudioFormat(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { music_audio_format: value } });+ }+</script>++{#if settings}+ {#if !embedded}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.download.section_clipboard_hotkeys')}</h5>+ <p class="settings-section-hint">{$t('settings.download.section_clipboard_hotkeys_desc')}</p>+ </div>+ {/if}++ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.clipboard_detection')} <ContextHint text={$t('hints.clipboard') as string} dismissKey="clipboard" /></span>+ <span class="setting-path">{$t('settings.download.clipboard_detection_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.clipboard_detection} onclick={() => toggleBool("download", "clipboard_detection", settings.download.clipboard_detection)} role="switch" aria-checked={settings.download.clipboard_detection} aria-label={$t('settings.download.clipboard_detection') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.auto_download_on_paste')}</span>+ <span class="setting-path">{$t('settings.download.auto_download_on_paste_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.auto_download_on_paste} onclick={() => toggleBool("download", "auto_download_on_paste", settings.download.auto_download_on_paste)} role="switch" aria-checked={settings.download.auto_download_on_paste} aria-label={$t('settings.download.auto_download_on_paste') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.hotkey_enabled')} <ContextHint text={$t('hints.hotkey') as string} dismissKey="hotkey" /></span>+ <span class="setting-path">{$t('settings.download.hotkey_enabled_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.hotkey_enabled} onclick={() => toggleBool("download", "hotkey_enabled", settings.download.hotkey_enabled)} role="switch" aria-checked={settings.download.hotkey_enabled} aria-label={$t('settings.download.hotkey_enabled') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.hotkey_enabled}+ <div class="divider"></div>+ <div class="setting-row hotkey-row">+ <span class="setting-label">{$t('settings.download.hotkey_binding')}</span>+ <div class="hotkey-controls">+ <div class="hotkey-mode-switch">+ <button class="hotkey-mode-btn" class:active={hotkeyMode === 'record'} onclick={() => { hotkeyMode = 'record'; hotkeyRecording = false; }}>{$t('settings.download.hotkey_record')}</button>+ <button class="hotkey-mode-btn" class:active={hotkeyMode === 'type'} onclick={() => { hotkeyMode = 'type'; hotkeyRecording = false; }}>{$t('settings.download.hotkey_type')}</button>+ </div>+ {#if hotkeyMode === 'type'}+ <input type="text" class="input-hotkey" value={hotkeyInput} oninput={handleHotkeyInput} spellcheck="false" />+ {:else}+ <button class="input-hotkey hotkey-record-btn" class:recording={hotkeyRecording} onclick={() => { hotkeyRecording = true; }} onkeydown={hotkeyRecording ? handleHotkeyKeyDown : undefined} onblur={() => { hotkeyRecording = false; }}>+ {hotkeyRecording ? $t('settings.download.hotkey_press') : (hotkeyInput || $t('settings.download.hotkey_press'))}+ </button>+ {/if}+ </div>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.copy_to_clipboard_on_hotkey')}</span>+ <span class="setting-path">{$t('settings.download.copy_to_clipboard_on_hotkey_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.copy_to_clipboard_on_hotkey} onclick={() => toggleBool("download", "copy_to_clipboard_on_hotkey", settings.download.copy_to_clipboard_on_hotkey)} role="switch" aria-checked={settings.download.copy_to_clipboard_on_hotkey} aria-label={$t('settings.download.copy_to_clipboard_on_hotkey') as string}><span class="toggle-knob"></span></button>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.music_hotkey_enabled')}</span>+ <span class="setting-path">{$t('settings.download.music_hotkey_enabled_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.music_hotkey_enabled} onclick={() => toggleBool("download", "music_hotkey_enabled", settings.download.music_hotkey_enabled)} role="switch" aria-checked={settings.download.music_hotkey_enabled} aria-label={$t('settings.download.music_hotkey_enabled') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.music_hotkey_enabled}+ <div class="divider"></div>+ <div class="setting-row hotkey-row">+ <span class="setting-label">{$t('settings.download.music_hotkey_binding')}</span>+ <div class="hotkey-controls">+ <div class="hotkey-mode-switch">+ <button class="hotkey-mode-btn" class:active={musicHotkeyMode === 'record'} onclick={() => { musicHotkeyMode = 'record'; musicHotkeyRecording = false; }}>{$t('settings.download.hotkey_record')}</button>+ <button class="hotkey-mode-btn" class:active={musicHotkeyMode === 'type'} onclick={() => { musicHotkeyMode = 'type'; musicHotkeyRecording = false; }}>{$t('settings.download.hotkey_type')}</button>+ </div>+ {#if musicHotkeyMode === 'type'}+ <input type="text" class="input-hotkey" value={musicHotkeyInput} oninput={handleMusicHotkeyInput} spellcheck="false" />+ {:else}+ <button class="input-hotkey hotkey-record-btn" class:recording={musicHotkeyRecording} onclick={() => { musicHotkeyRecording = true; }} onkeydown={musicHotkeyRecording ? handleMusicHotkeyKeyDown : undefined} onblur={() => { musicHotkeyRecording = false; }}>+ {musicHotkeyRecording ? $t('settings.download.hotkey_press') : (musicHotkeyInput || $t('settings.download.hotkey_press'))}+ </button>+ {/if}+ </div>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.music_audio_format')}</span>+ <span class="setting-path">{$t('settings.download.music_audio_format_desc')}</span>+ </div>+ <select class="select" value={settings.download.music_audio_format} onchange={changeMusicAudioFormat}>+ <option value="m4a">M4A (AAC)</option>+ <option value="mp3">MP3</option>+ <option value="flac">FLAC (lossless)</option>+ <option value="opus">Opus</option>+ <option value="wav">WAV</option>+ </select>+ </div>+ </div>+{/if}diff --git a/src/components/settings/downloads/OutputSection.svelte b/src/components/settings/downloads/OutputSection.sveltenew file mode 100644index 00000000..f0805812--- /dev/null+++ b/src/components/settings/downloads/OutputSection.svelte@@ -0,0 +1,127 @@+<script lang="ts">+ import { invoke } from "@tauri-apps/api/core";+ import { t } from "$lib/i18n";+ import {+ getSettings,+ updateSettings,+ chooseFolder,+ toggleBool,+ } from "../settings-helpers";++ let { embedded = false }: { embedded?: boolean } = $props();++ let settings = $derived(getSettings());++ type PathLimitInfo = { limit: number; current: number; reserve: number; ok: boolean };+ let pathInfo = $state<PathLimitInfo | null>(null);++ $effect(() => {+ const dir = settings?.download.default_output_dir;+ if (!dir) {+ pathInfo = null;+ return;+ }+ let cancelled = false;+ invoke<PathLimitInfo>("validate_output_path", { outputDir: dir })+ .then((info) => {+ if (!cancelled) pathInfo = info;+ })+ .catch(() => {+ if (!cancelled) pathInfo = null;+ });+ return () => {+ cancelled = true;+ };+ });++ let templateInput = $state("");+ let templateTimer: ReturnType<typeof setTimeout> | null = null;++ $effect(() => {+ if (settings) {+ templateInput = settings.download.filename_template;+ }+ });++ function previewTemplate(template: string): string {+ return template+ .replace("%(title).200s", "My Video Title")+ .replace("%(title)s", "My Video Title")+ .replace("%(id)s", "dQw4w9WgXcQ")+ .replace("%(ext)s", "mp4")+ .replace("%(uploader)s", "Channel Name")+ .replace("%(upload_date)s", "20260217")+ .replace("%(resolution)s", "1920x1080")+ .replace("%(fps)s", "30")+ .replace("%(duration)s", "212");+ }++ function handleTemplateInput(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ templateInput = value;+ if (templateTimer) clearTimeout(templateTimer);+ templateTimer = setTimeout(async () => {+ if (value.trim() && value.includes("%(ext)s")) {+ await updateSettings({ download: { filename_template: value } });+ }+ }, 800);+ }+</script>++{#if settings}+ {#if !embedded}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.download.section_output')}</h5>+ <p class="settings-section-hint">{$t('settings.download.section_output_desc')}</p>+ </div>+ {/if}++ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.default_output_dir')}</span>+ <span class="setting-path">{settings.download.default_output_dir}</span>+ {#if pathInfo && !pathInfo.ok}+ <span class="path-warning" role="status">+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" />+ <line x1="12" y1="9" x2="12" y2="13" />+ <line x1="12" y1="17" x2="12.01" y2="17" />+ </svg>+ {$t('settings.download.path_too_long', { current: pathInfo.current, limit: pathInfo.limit })}+ </span>+ {/if}+ </div>+ <button class="button" onclick={chooseFolder}>{$t('settings.download.choose_folder')}</button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.organize_by_platform')}</span>+ <span class="setting-path">{$t('settings.download.organize_by_platform_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.organize_by_platform} onclick={() => toggleBool("download", "organize_by_platform", settings.download.organize_by_platform)} role="switch" aria-checked={settings.download.organize_by_platform} aria-label={$t('settings.download.organize_by_platform') as string}><span class="toggle-knob"></span></button>+ </div>++ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.skip_existing')}</span>+ <span class="setting-path">{$t('settings.download.skip_existing_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.skip_existing} onclick={() => toggleBool("download", "skip_existing", settings.download.skip_existing)} role="switch" aria-checked={settings.download.skip_existing} aria-label={$t('settings.download.skip_existing') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row template-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.filename_template')}</span>+ <span class="setting-path">{$t('settings.download.filename_template_desc')}</span>+ </div>+ <input type="text" class="input-template" value={templateInput} oninput={handleTemplateInput} spellcheck="false" />+ </div>+ {#if templateInput}+ <div class="template-preview">+ <span class="setting-path">{$t('settings.download.filename_template_preview', { preview: previewTemplate(templateInput) })}</span>+ </div>+ {/if}+ </div>+{/if}diff --git a/src/components/settings/downloads/PlatformOptionsSection.svelte b/src/components/settings/downloads/PlatformOptionsSection.sveltenew file mode 100644index 00000000..c904ee7f--- /dev/null+++ b/src/components/settings/downloads/PlatformOptionsSection.svelte@@ -0,0 +1,259 @@+<script lang="ts">+ import { t } from "$lib/i18n";+ import { getSettings, updateSettings, toggleBool } from "../settings-helpers";++ let { embedded = false }: { embedded?: boolean } = $props();++ let settings = $derived(getSettings());++ const SB_CATEGORIES = [+ "sponsor",+ "selfpromo",+ "interaction",+ "intro",+ "outro",+ "preview",+ "filler",+ "music_offtopic",+ ] as const;++ function sbHas(cat: string): boolean {+ return settings?.download.sponsorblock_categories?.includes(cat) ?? false;+ }++ function toggleSbCategory(cat: string) {+ const current = settings?.download.sponsorblock_categories ?? [];+ const next = current.includes(cat)+ ? current.filter((c) => c !== cat)+ : [...current, cat];+ updateSettings({ download: { sponsorblock_categories: next } });+ }++ function setSbMode(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { sponsorblock_mode: value } });+ }++ function setBilibiliDanmakuFormat(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { bilibili_danmaku_format: value } });+ }++ function setBilibiliContainer(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { bilibili_container: value } });+ }++ function setBilibiliCoverFormat(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { bilibili_cover_format: value } });+ }++ let namingTemplatesOpen = $state(false);+ let cdnOpen = $state(false);++ async function setBilibiliNamingTemplate(field: string, value: string) {+ await updateSettings({ download: { [field]: value } });+ }++ async function setBilibiliCdnHosts(e: Event) {+ const value = (e.target as HTMLTextAreaElement).value;+ await updateSettings({ download: { bilibili_cdn_hosts: value } });+ }+</script>++{#if settings}+ {#if !embedded}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.download.section_per_platform')}</h5>+ <p class="settings-section-hint">{$t('settings.download.section_per_platform_desc')}</p>+ </div>+ {/if}++ <p class="settings-subsection-head">{$t('settings.download.youtube_specific')}</p>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.youtube_sponsorblock')}</span>+ <span class="setting-path">{$t('settings.download.youtube_sponsorblock_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.youtube_sponsorblock} onclick={() => toggleBool("download", "youtube_sponsorblock", settings.download.youtube_sponsorblock)} role="switch" aria-checked={settings.download.youtube_sponsorblock} aria-label={$t('settings.download.youtube_sponsorblock') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.youtube_sponsorblock}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.sb_mode')}</span>+ <span class="setting-path">{$t('settings.download.sb_mode_desc')}</span>+ </div>+ <select class="select" value={settings.download.sponsorblock_mode} onchange={setSbMode}>+ <option value="remove">{$t('settings.download.sb_mode_remove')}</option>+ <option value="mark">{$t('settings.download.sb_mode_mark')}</option>+ </select>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.sb_categories')}</span>+ <span class="setting-path">{$t('settings.download.sb_categories_desc')}</span>+ </div>+ </div>+ <div class="sb-chips">+ {#each SB_CATEGORIES as cat (cat)}+ <button+ type="button"+ class="sb-chip"+ class:on={sbHas(cat)}+ onclick={() => toggleSbCategory(cat)}+ aria-pressed={sbHas(cat)}+ >+ {$t(`settings.download.sb_cat_${cat}`)}+ </button>+ {/each}+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.split_by_chapters')}</span>+ <span class="setting-path">{$t('settings.download.split_by_chapters_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.split_by_chapters} onclick={() => toggleBool("download", "split_by_chapters", settings.download.split_by_chapters)} role="switch" aria-checked={settings.download.split_by_chapters} aria-label={$t('settings.download.split_by_chapters') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.live_from_start')}</span>+ <span class="setting-path">{$t('settings.download.live_from_start_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.live_from_start} onclick={() => toggleBool("download", "live_from_start", settings.download.live_from_start)} role="switch" aria-checked={settings.download.live_from_start} aria-label={$t('settings.download.live_from_start') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>++ <p class="settings-subsection-head">{$t('settings.download.bilibili_section')}</p>+ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_container_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_container_desc')}</span>+ </div>+ <select class="select" value={settings.download.bilibili_container} onchange={setBilibiliContainer}>+ <option value="mp4">MP4</option>+ <option value="mkv">MKV</option>+ </select>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_danmaku_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_danmaku_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.bilibili_danmaku_enabled} onclick={() => toggleBool("download", "bilibili_danmaku_enabled", settings.download.bilibili_danmaku_enabled)} role="switch" aria-checked={settings.download.bilibili_danmaku_enabled} aria-label={$t('settings.download.bilibili_danmaku_label') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.bilibili_danmaku_enabled}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_danmaku_format_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_danmaku_format_desc')}</span>+ </div>+ <select class="select" value={settings.download.bilibili_danmaku_format} onchange={setBilibiliDanmakuFormat}>+ <option value="xml">XML</option>+ <option value="ass">ASS</option>+ <option value="json">JSON</option>+ </select>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_nfo_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_nfo_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.bilibili_nfo_enabled} onclick={() => toggleBool("download", "bilibili_nfo_enabled", settings.download.bilibili_nfo_enabled)} role="switch" aria-checked={settings.download.bilibili_nfo_enabled} aria-label={$t('settings.download.bilibili_nfo_label') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_cover_sidecar_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_cover_sidecar_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.bilibili_cover_sidecar} onclick={() => toggleBool("download", "bilibili_cover_sidecar", settings.download.bilibili_cover_sidecar)} role="switch" aria-checked={settings.download.bilibili_cover_sidecar} aria-label={$t('settings.download.bilibili_cover_sidecar_label') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.bilibili_cover_sidecar}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_cover_format_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_cover_format_desc')}</span>+ </div>+ <select class="select" value={settings.download.bilibili_cover_format} onchange={setBilibiliCoverFormat}>+ <option value="jpg">JPG</option>+ <option value="png">PNG</option>+ <option value="webp">WebP</option>+ <option value="avif">AVIF</option>+ </select>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_naming_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_naming_desc')}</span>+ </div>+ <button type="button" class="ghost-btn" onclick={() => (namingTemplatesOpen = !namingTemplatesOpen)}>+ {namingTemplatesOpen ? $t('settings.download.bilibili_naming_hide') : $t('settings.download.bilibili_naming_edit')}+ </button>+ </div>+ {#if namingTemplatesOpen}+ <div class="naming-block">+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_naming_video_label')}</span>+ <input class="naming-input" type="text" value={settings.download.bilibili_naming_video} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_video', (e.target as HTMLInputElement).value)} />+ </label>+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_naming_multi_part_label')}</span>+ <input class="naming-input" type="text" value={settings.download.bilibili_naming_multi_part} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_multi_part', (e.target as HTMLInputElement).value)} />+ </label>+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_naming_bangumi_label')}</span>+ <input class="naming-input" type="text" value={settings.download.bilibili_naming_bangumi} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_bangumi', (e.target as HTMLInputElement).value)} />+ </label>+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_naming_cheese_label')}</span>+ <input class="naming-input" type="text" value={settings.download.bilibili_naming_cheese} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_cheese', (e.target as HTMLInputElement).value)} />+ </label>+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_naming_collection_label')}</span>+ <input class="naming-input" type="text" value={settings.download.bilibili_naming_collection} oninput={(e) => setBilibiliNamingTemplate('bilibili_naming_collection', (e.target as HTMLInputElement).value)} />+ </label>+ <p class="naming-help">{$t('settings.download.bilibili_naming_help')}</p>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_cdn_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_cdn_desc')}</span>+ </div>+ <button type="button" class="ghost-btn" onclick={() => (cdnOpen = !cdnOpen)}>+ {cdnOpen ? $t('settings.download.bilibili_naming_hide') : $t('settings.download.bilibili_naming_edit')}+ </button>+ </div>+ {#if cdnOpen}+ <div class="naming-block">+ <label class="naming-row">+ <span class="naming-label">{$t('settings.download.bilibili_cdn_hosts_label')}</span>+ <textarea class="naming-input" rows="3" value={settings.download.bilibili_cdn_hosts} oninput={setBilibiliCdnHosts} placeholder={$t('settings.download.bilibili_cdn_hosts_placeholder') as string}></textarea>+ </label>+ <div class="setting-row" style="padding: 4px 0;">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.bilibili_cdn_prefer_label')}</span>+ <span class="setting-path">{$t('settings.download.bilibili_cdn_prefer_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.bilibili_cdn_prefer_alternatives} onclick={() => toggleBool("download", "bilibili_cdn_prefer_alternatives", settings.download.bilibili_cdn_prefer_alternatives)} role="switch" aria-checked={settings.download.bilibili_cdn_prefer_alternatives} aria-label={$t('settings.download.bilibili_cdn_prefer_label') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>+ {/if}+ </div>+{/if}diff --git a/src/components/settings/downloads/QualitySection.svelte b/src/components/settings/downloads/QualitySection.sveltenew file mode 100644index 00000000..7db1fc55--- /dev/null+++ b/src/components/settings/downloads/QualitySection.svelte@@ -0,0 +1,111 @@+<script lang="ts">+ import { t } from "$lib/i18n";+ import {+ getSettings,+ updateSettings,+ toggleBool,+ changeQuality,+ } from "../settings-helpers";+ import { YTDLP_PRESETS, matchActivePreset, type YtdlpPresetId } from "$lib/ytdlp-presets";++ let { embedded = false }: { embedded?: boolean } = $props();++ let settings = $derived(getSettings());+ let activePreset = $derived<YtdlpPresetId | null>(matchActivePreset(settings));++ async function applyPreset(id: YtdlpPresetId) {+ const preset = YTDLP_PRESETS.find((p) => p.id === id);+ if (!preset) return;+ await updateSettings({ download: preset.download });+ }++ let speedNum = $state<number | null>(null);+ let speedUnit = $state<"K" | "M">("M");++ $effect(() => {+ const raw = settings?.download.speed_limit?.trim() ?? "";+ const m = raw.match(/^(\d+(?:\.\d+)?)([KM])?$/i);+ if (m) {+ speedNum = Number(m[1]);+ speedUnit = (m[2]?.toUpperCase() as "K" | "M") ?? "M";+ } else {+ speedNum = null;+ }+ });++ function applySpeedLimit() {+ const value = speedNum && speedNum > 0 ? `${speedNum}${speedUnit}` : "";+ updateSettings({ download: { speed_limit: value } });+ }+</script>++{#if settings}+ {#if !embedded}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.download.section_quality')}</h5>+ <p class="settings-section-hint">{$t('settings.download.section_quality_desc')}</p>+ </div>+ {/if}++ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.video_quality')}</span>+ <span class="setting-path">{$t('settings.download.video_quality_desc')}</span>+ </div>+ <select class="select" value={settings.download.video_quality} onchange={changeQuality}>+ <option value="best">{$t('omnibox.quality_best')}</option>+ <option value="1080p">{$t('omnibox.quality_1080p')}</option>+ <option value="720p">{$t('omnibox.quality_720p')}</option>+ <option value="480p">{$t('omnibox.quality_480p')}</option>+ <option value="360p">{$t('omnibox.quality_360p')}</option>+ </select>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.speed_limit')}</span>+ <span class="setting-path">{$t('settings.download.speed_limit_desc')}</span>+ </div>+ <div class="speed-limit">+ <input+ type="number"+ class="downloads-speed-input"+ min="0"+ step="1"+ inputmode="numeric"+ placeholder={$t('settings.download.speed_limit_unlimited') as string}+ bind:value={speedNum}+ onchange={applySpeedLimit}+ aria-label={$t('settings.download.speed_limit') as string}+ />+ <select class="select" bind:value={speedUnit} onchange={applySpeedLimit} aria-label="unit">+ <option value="K">KB/s</option>+ <option value="M">MB/s</option>+ </select>+ </div>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.always_ask_path')}</span>+ <span class="setting-path">{$t('settings.download.always_ask_path_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.always_ask_path} onclick={() => toggleBool("download", "always_ask_path", settings.download.always_ask_path)} role="switch" aria-checked={settings.download.always_ask_path} aria-label={$t('settings.download.always_ask_path') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>++ <div class="preset-grid">+ {#each YTDLP_PRESETS as preset (preset.id)}+ <button+ class="preset-card"+ class:active={activePreset === preset.id}+ onclick={() => applyPreset(preset.id)}+ type="button"+ >+ <span class="preset-label">{$t(preset.labelKey)}</span>+ <span class="preset-desc">{$t(preset.descKey)}</span>+ </button>+ {/each}+ </div>+{/if}diff --git a/src/components/settings/downloads/SubtitlesSection.svelte b/src/components/settings/downloads/SubtitlesSection.sveltenew file mode 100644index 00000000..bfd951ae--- /dev/null+++ b/src/components/settings/downloads/SubtitlesSection.svelte@@ -0,0 +1,92 @@+<script lang="ts">+ import { t } from "$lib/i18n";+ import { getSettings, updateSettings, toggleBool } from "../settings-helpers";++ let { embedded = false }: { embedded?: boolean } = $props();++ let settings = $derived(getSettings());++ function changeCaptionLocale(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ updateSettings({ download: { caption_locale: value } });+ }+</script>++{#if settings}+ {#if !embedded}+ <div class="settings-section-head section-title">+ <h5 class="section-title">{$t('settings.download.section_subtitles')}</h5>+ <p class="settings-section-hint">{$t('settings.download.section_subtitles_desc')}</p>+ </div>+ {/if}++ <div class="card">+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.download_subtitles')}</span>+ <span class="setting-path">{$t('settings.download.download_subtitles_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.download_subtitles} onclick={() => toggleBool("download", "download_subtitles", settings.download.download_subtitles)} role="switch" aria-checked={settings.download.download_subtitles} aria-label={$t('settings.download.download_subtitles') as string}><span class="toggle-knob"></span></button>+ </div>+ {#if settings.download.download_subtitles}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.include_auto_subtitles')}</span>+ <span class="setting-path">{$t('settings.download.include_auto_subtitles_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.include_auto_subtitles} onclick={() => toggleBool("download", "include_auto_subtitles", settings.download.include_auto_subtitles)} role="switch" aria-checked={settings.download.include_auto_subtitles} aria-label={$t('settings.download.include_auto_subtitles') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.caption_locale')}</span>+ <span class="setting-path">{$t('settings.download.caption_locale_desc')}</span>+ </div>+ <select class="select" value={settings.download.caption_locale} onchange={changeCaptionLocale}>+ <option value="en">English</option>+ <option value="pt">Português</option>+ <option value="es">Español</option>+ <option value="fr">Français</option>+ <option value="it">Italiano</option>+ <option value="ja">日本語</option>+ <option value="zh-Hans">简体中文</option>+ <option value="zh-Hant">繁體中文</option>+ <option value="el">Ελληνικά</option>+ </select>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.keep_vtt')}</span>+ <span class="setting-path">{$t('settings.download.keep_vtt_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.keep_vtt} onclick={() => toggleBool("download", "keep_vtt", settings.download.keep_vtt)} role="switch" aria-checked={settings.download.keep_vtt} aria-label={$t('settings.download.keep_vtt') as string}><span class="toggle-knob"></span></button>+ </div>+ {/if}+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.translate_metadata')}</span>+ <span class="setting-path">{$t('settings.download.translate_metadata_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.translate_metadata} onclick={() => toggleBool("download", "translate_metadata", settings.download.translate_metadata)} role="switch" aria-checked={settings.download.translate_metadata} aria-label={$t('settings.download.translate_metadata') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.embed_metadata')}</span>+ <span class="setting-path">{$t('settings.download.embed_metadata_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.embed_metadata} onclick={() => toggleBool("download", "embed_metadata", settings.download.embed_metadata)} role="switch" aria-checked={settings.download.embed_metadata} aria-label={$t('settings.download.embed_metadata') as string}><span class="toggle-knob"></span></button>+ </div>+ <div class="divider"></div>+ <div class="setting-row">+ <div class="setting-col">+ <span class="setting-label">{$t('settings.download.embed_thumbnail')}</span>+ <span class="setting-path">{$t('settings.download.embed_thumbnail_desc')}</span>+ </div>+ <button class="toggle" class:on={settings.download.embed_thumbnail} onclick={() => toggleBool("download", "embed_thumbnail", settings.download.embed_thumbnail)} role="switch" aria-checked={settings.download.embed_thumbnail} aria-label={$t('settings.download.embed_thumbnail') as string}><span class="toggle-knob"></span></button>+ </div>+ </div>+{/if}diff --git a/src/components/shell/AppSidebar.svelte b/src/components/shell/AppSidebar.sveltenew file mode 100644index 00000000..9ae6fe41--- /dev/null+++ b/src/components/shell/AppSidebar.svelte@@ -0,0 +1,90 @@+<script lang="ts">+ import { page } from "$app/state";+ import { t } from "$lib/i18n";+ import NavIcon from "$components/shell/NavIcon.svelte";+ import type { NavItem } from "$lib/nav-config";++ let {+ primaryNav,+ appNav,+ pluginNav,+ badgeLabel,+ badgeCount,+ }: {+ primaryNav: NavItem[];+ appNav: NavItem[];+ pluginNav: NavItem[];+ badgeLabel: string;+ badgeCount: number;+ } = $props();++ let pluginsExpanded = $state(true);++ function isActive(href: string): boolean {+ if (href === "/") return page.url.pathname === "/";+ return page.url.pathname.startsWith(href);+ }++ function itemTitle(item: NavItem): string {+ return item.label || (item.labelKey ? $t(item.labelKey) : "");+ }+</script>++<aside class="mac-source-list">+ <div class="mac-nav-section">+ <div class="mac-nav-section-header">{$t("nav.section_primary")}</div>+ {#each primaryNav as item}+ {@const title = itemTitle(item)}+ <a href={item.href} class="mac-nav-item" class:active={isActive(item.href)} title={title}>+ <NavIcon icon={item.icon} iconSvg={item.iconSvg} />+ <span class="mac-nav-label">{title}</span>+ {#if item.badge === "downloads" && badgeCount > 0}+ <span class="mac-nav-badge">{badgeLabel}</span>+ {/if}+ </a>+ {/each}+ </div>++ <div class="mac-nav-section">+ <div class="mac-nav-section-header">{$t("nav.section_app")}</div>+ {#each appNav as item}+ {@const title = itemTitle(item)}+ <a href={item.href} class="mac-nav-item" class:active={isActive(item.href)} title={title}>+ <NavIcon icon={item.icon} iconSvg={item.iconSvg} />+ <span class="mac-nav-label">{title}</span>+ </a>+ {/each}+ </div>++ {#if pluginNav.length > 0}+ <div class="mac-nav-section">+ <div class="mac-nav-section-header">+ <span>{$t("nav.section_plugins")}</span>+ <button+ type="button"+ class="mac-plugins-toggle"+ onclick={() => { pluginsExpanded = !pluginsExpanded; }}+ aria-expanded={pluginsExpanded}+ aria-label={pluginsExpanded ? $t("nav.collapse_plugins") : $t("nav.expand_plugins")}+ >+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">+ {#if pluginsExpanded}+ <path d="M6 9l6 6 6-6" />+ {:else}+ <path d="M9 6l6 6-6 6" />+ {/if}+ </svg>+ </button>+ </div>+ {#if pluginsExpanded}+ {#each pluginNav as item}+ {@const title = itemTitle(item)}+ <a href={item.href} class="mac-nav-item" class:active={isActive(item.href)} title={title}>+ <NavIcon icon={item.icon} iconSvg={item.iconSvg} />+ <span class="mac-nav-label">{title}</span>+ </a>+ {/each}+ {/if}+ </div>+ {/if}+</aside>diff --git a/src/components/shell/AppToolbar.svelte b/src/components/shell/AppToolbar.sveltenew file mode 100644index 00000000..9cfd410c--- /dev/null+++ b/src/components/shell/AppToolbar.svelte@@ -0,0 +1,25 @@+<script lang="ts">+ import { page } from "$app/state";+ import { t } from "$lib/i18n";+ import { openCommandPalette } from "$lib/stores/command-palette-store.svelte";++ let pageTitle = $derived.by(() => {+ const path = page.url.pathname;+ if (path === "/") return $t("nav.home");+ if (path.startsWith("/downloads")) return $t("nav.downloads");+ if (path.startsWith("/marketplace")) return $t("nav.marketplace");+ if (path.startsWith("/settings")) return $t("nav.settings");+ if (path.startsWith("/about")) return $t("nav.about");+ return "OmniGet";+ });+</script>++<header class="mac-titlebar">+ <span class="mac-titlebar-title">{pageTitle}</span>+ <div class="mac-titlebar-actions">+ <button type="button" class="btn btn-secondary btn-sm" onclick={() => openCommandPalette()}>+ {$t("command_palette.open")}+ <span class="mac-kbd">⌘K</span>+ </button>+ </div>+</header>diff --git a/src/components/shell/CommandPalette.svelte b/src/components/shell/CommandPalette.sveltenew file mode 100644index 00000000..03fe8473--- /dev/null+++ b/src/components/shell/CommandPalette.svelte@@ -0,0 +1,130 @@+<script lang="ts">+ import { onMount } from "svelte";+ import { t } from "$lib/i18n";+ import {+ closeCommandPalette,+ getCommandPaletteItems,+ getCommandPaletteQuery,+ getCommandPaletteSelectedIndex,+ isCommandPaletteOpen,+ moveCommandPaletteSelection,+ runCommandPaletteSelected,+ setCommandPaletteQuery,+ setCommandPaletteSelectedIndex,+ } from "$lib/stores/command-palette-store.svelte";++ let inputEl = $state<HTMLInputElement | null>(null);++ let open = $derived(isCommandPaletteOpen());+ let query = $derived(getCommandPaletteQuery());+ let selectedIndex = $derived(getCommandPaletteSelectedIndex());+ let allItems = $derived(getCommandPaletteItems());++ let filtered = $derived.by(() => {+ const q = query.trim().toLowerCase();+ if (!q) return allItems;+ return allItems.filter((item) => {+ const hay = `${item.label} ${item.group} ${item.keywords ?? ""}`.toLowerCase();+ return hay.includes(q);+ });+ });++ $effect(() => {+ if (open && inputEl) {+ inputEl.focus();+ }+ });++ $effect(() => {+ if (selectedIndex >= filtered.length) {+ setCommandPaletteSelectedIndex(0);+ }+ });++ function onKeydown(e: KeyboardEvent) {+ if (!open) return;+ if (e.key === "Escape") {+ e.preventDefault();+ closeCommandPalette();+ return;+ }+ if (e.key === "ArrowDown") {+ e.preventDefault();+ moveCommandPaletteSelection(1, filtered.length);+ return;+ }+ if (e.key === "ArrowUp") {+ e.preventDefault();+ moveCommandPaletteSelection(-1, filtered.length);+ return;+ }+ if (e.key === "Enter") {+ e.preventDefault();+ runCommandPaletteSelected(filtered);+ }+ }++ onMount(() => {+ const handler = (e: KeyboardEvent) => {+ if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") {+ e.preventDefault();+ import("$lib/stores/command-palette-store.svelte").then((m) => m.openCommandPalette());+ }+ onKeydown(e);+ };+ window.addEventListener("keydown", handler);+ return () => window.removeEventListener("keydown", handler);+ });+</script>++{#if open}+ <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->+ <div class="mac-command-backdrop" onclick={() => closeCommandPalette()}>+ <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->+ <div class="mac-command-palette" onclick={(e) => e.stopPropagation()}>+ <div class="mac-command-input-row">+ <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">+ <circle cx="11" cy="11" r="8" />+ <path d="M21 21l-4.35-4.35" />+ </svg>+ <input+ bind:this={inputEl}+ class="mac-command-input"+ type="search"+ placeholder={$t("command_palette.placeholder")}+ value={query}+ oninput={(e) => setCommandPaletteQuery((e.target as HTMLInputElement).value)}+ spellcheck="false"+ />+ <button type="button" class="btn btn-secondary btn-sm" onclick={() => closeCommandPalette()} aria-label={$t("common.close")}>+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">+ <path d="M18 6L6 18M6 6l12 12" />+ </svg>+ </button>+ </div>+ <div class="mac-command-list" role="listbox">+ {#each filtered as item, i (item.id)}+ <button+ type="button"+ class="mac-command-item"+ class:selected={i === selectedIndex}+ onclick={() => runCommandPaletteSelected(filtered)}+ onmouseenter={() => setCommandPaletteSelectedIndex(i)}+ >+ <span>{item.label}</span>+ <span style="margin-left: auto; font-size: 11px; color: var(--text-dim);">{item.group}</span>+ </button>+ {:else}+ <div style="padding: 16px; text-align: center; color: var(--text-dim); font-size: 13px;">+ {$t("command_palette.empty")}+ </div>+ {/each}+ </div>+ <div class="mac-command-footer">+ <span><span class="mac-kbd">↑</span> <span class="mac-kbd">↓</span> {$t("command_palette.navigate")}</span>+ <span><span class="mac-kbd">↵</span> {$t("command_palette.select")}</span>+ <span><span class="mac-kbd">esc</span> {$t("command_palette.close")}</span>+ </div>+ </div>+ </div>+{/if}diff --git a/src/components/shell/NavIcon.svelte b/src/components/shell/NavIcon.sveltenew file mode 100644index 00000000..ddb12002--- /dev/null+++ b/src/components/shell/NavIcon.svelte@@ -0,0 +1,43 @@+<script lang="ts">+ let { icon, iconSvg, size = 18 }: { icon: string; iconSvg?: string; size?: number } = $props();+</script>++<svg+ viewBox="0 0 24 24"+ width={size}+ height={size}+ fill="none"+ stroke="currentColor"+ stroke-width="1.8"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+>+ {#if iconSvg}+ {#each iconSvg.split(" M").map((d, i) => (i === 0 ? d : "M" + d)) as pathD}+ <path d={pathD} />+ {/each}+ {:else if icon === "home"}+ <path d="M3 12L12 3l9 9" />+ <path d="M5 10v9a1 1 0 001 1h3v-5h6v5h3a1 1 0 001-1v-9" />+ {:else if icon === "downloads"}+ <path d="M12 3v12m0 0l-4-4m4 4l4-4" />+ <path d="M4 17v2a1 1 0 001 1h14a1 1 0 001-1v-2" />+ {:else if icon === "marketplace"}+ <path d="M3 21h18" />+ <path d="M3 7v1a3 3 0 0 0 6 0V7" />+ <path d="M9 7v1a3 3 0 0 0 6 0V7" />+ <path d="M15 7v1a3 3 0 0 0 6 0V7" />+ <path d="M3 7h18l-1.5-4H4.5z" />+ <path d="M5 21V10" />+ <path d="M19 21V10" />+ {:else if icon === "settings"}+ <path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />+ <circle cx="12" cy="12" r="3" />+ {:else if icon === "about"}+ <circle cx="12" cy="12" r="10" />+ <path d="M12 16v-4m0-4h.01" />+ {:else}+ <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />+ {/if}+</svg>diff --git a/src/lib/home/omnibox-controller.ts b/src/lib/home/omnibox-controller.tsnew file mode 100644index 00000000..b55d3275--- /dev/null+++ b/src/lib/home/omnibox-controller.ts@@ -0,0 +1,61 @@+export type OmniState =+ | { kind: "idle" }+ | { kind: "detecting" }+ | { kind: "detected"; info: PlatformInfo }+ | { kind: "unsupported" }+ | { kind: "preparing"; platform: string }+ | { kind: "batch"; urls: string[] }+ | { kind: "searching" }+ | { kind: "search-results"; results: SearchResult[] }+ | { kind: "search-empty" }+ | { kind: "error"; message: string; originalUrl: string; platform: string };++export type PlatformInfo = {+ platform: string;+ supported: boolean;+ content_id: string | null;+ content_type: string | null;+};++export type SearchResult = {+ id: string;+ title: string;+ author: string;+ duration: number | null;+ thumbnail_url: string | null;+ url: string;+ platform: string;+};++export type HomeInputMode = "url" | "batch" | "torrent" | "p2p";++export function isUrl(value: string): boolean {+ return (+ value.startsWith("http://") ||+ value.startsWith("https://") ||+ value.startsWith("magnet:") ||+ value.startsWith("p2p:") ||+ value.endsWith(".torrent")+ );+}++export function showInspectorForState(state: OmniState): boolean {+ return (+ state.kind === "detected" ||+ state.kind === "preparing" ||+ state.kind === "error"+ );+}++export function showOmniboxForState(state: OmniState): boolean {+ return (+ state.kind === "idle" ||+ state.kind === "detecting" ||+ state.kind === "detected" ||+ state.kind === "unsupported" ||+ state.kind === "batch" ||+ state.kind === "searching" ||+ state.kind === "search-results" ||+ state.kind === "search-empty"+ );+}diff --git a/src/lib/i18n/el.json b/src/lib/i18n/el.jsonindex ee850f6f..0d223220 100644--- a/src/lib/i18n/el.json+++ b/src/lib/i18n/el.json@@ -41,7 +41,32 @@"downloads": "Λήψεις","marketplace": "Marketplace","settings": "Ρυθμίσεις",- "about": "Σχετικά"+ "about": "Σχετικά",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Εργαλεία",@@ -346,11 +371,24 @@"path_too_long": "Η διαδρομή αυτού του φακέλου είναι μεγάλη ({{current}}/{{limit}} χαρακτήρες). Οι λήψεις με μεγάλα ονόματα μπορεί να αποτύχουν — διάλεξε έναν πιο σύντομο φάκελο.","choose_folder": "Διάλεξε","always_ask_path": "Πάντα ερώτηση πριν αποθήκευση",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Ποιότητα βίντεο",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Όριο ταχύτητας λήψης","speed_limit_desc": "Περιορίζει τον ρυθμό λήψης. Άφησέ το κενό για χωρίς όριο.","speed_limit_unlimited": "Χωρίς όριο","skip_existing": "Παράλειψη υπαρχόντων αρχείων",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Λήψη συνημμένων","download_descriptions": "Αποθήκευση περιγραφών","embed_metadata": "Ενσωμάτωση μεταδεδομένων",@@ -467,6 +505,12 @@},"dependencies": {"title": "Εξαρτήσεις",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "δεν βρέθηκε","install": "Εγκατάσταση","update": "Ενημέρωση",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Ταυτόχρονες λήψεις","max_concurrent_downloads_desc": "Μέγιστες ταυτόχρονες λήψεις","max_concurrent_segments": "Ταυτόχρονα τμήματα",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Ταυτόχρονα θραύσματα","concurrent_fragments_desc": "Λήψεις παράλληλων τμημάτων ανά βίντεο (yt-dlp)","max_retries": "Επαναλήψεις ανά τμήμα",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Καθυστέρηση μεταξύ τμημάτων (χτδ)","stagger_delay_desc": "Καθυστέρηση μεταξύ έναρξης ταυτόχρονων λήψεων",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Επαναφορά εξ'ορισμού ρυθμίσεων","reset_confirm": "Είσαι σίγουροι; Θα γίνει επαναφορά όλων των ρυθμίσεων.","torrent_listen_port": "Θύρα ακρόασης torrent",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Χειροκίνητο cookie","twitter_manual_cookie_desc": "Αν μια λήψη αποτύχει, μπορείτε να επικολλήσετε εδώ μια χειροκίνητη κεφαλίδα Cookie και να δοκιμάσετε ξανά. Δεν περιορίζεται στο Twitter/X. Παράδειγμα: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "Τυπογραφία","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "Δικτυο","cat_advanced": "Προχωρημενα","search_placeholder": "Αναζήτηση ρυθμίσεων...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Εμφανιστε τη δραστηριοτητα σας στο προφιλ Discord. Το χρονομετρο δεν μηδενιζεται αλλαζοντας δραστηριοτητα.",@@ -1233,7 +1293,8 @@"report_copied": "Η αναφορά διαγνωστικών αντιγράφηκε στο πρόχειρο","clear": "Εκκαθάριση","no_entries": "Δεν υπάρχει ακόμη δραστηριότητα. Ξεκινήστε μια λήψη για να δείτε συμβάντα εδώ.",- "open_panel": "Άνοιγμα αρχείου καταγραφής"+ "open_panel": "Άνοιγμα αρχείου καταγραφής",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Αποστολή αρχείου",diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.jsonindex aed73e99..0be377f5 100644--- a/src/lib/i18n/en.json+++ b/src/lib/i18n/en.json@@ -1,3617 +1,3678 @@-{- "confirm_close": {- "title": "Downloads in progress",- "message": "You have {{count}} active download(s). Closing now will cancel them.",- "cancel": "Keep running",- "confirm": "Close anyway"- },- "legal": {- "title": "Use OmniGet responsibly",- "body_paragraph_1": "OmniGet is a tool to download media you are entitled to access. You are responsible for respecting the copyright and terms of service of every platform you download from.",- "body_paragraph_2": "By continuing you acknowledge the following:",- "rule_copyright": "I will only download content that I own, have a licence for, or that is explicitly free to reuse.",- "rule_tos": "I will respect the terms of service of the source platform.",- "rule_personal_use": "I understand this tool is provided as-is and the maintainers are not responsible for misuse.",- "acknowledge": "I understand"- },- "recovery": {- "title": "Unfinished downloads",- "message": "OmniGet found {{count}} download(s) that didn't finish last session. Would you like to resume them?",- "more": "and {{count}} more...",- "restore": "Resume downloads",- "discard": "Discard",- "restored": "{{count}} download(s) resumed"- },- "shortcuts": {- "title": "Keyboard shortcuts",- "section_application": "Application",- "section_downloads": "Downloads",- "section_navigation": "Navigation",- "paste_url": "Paste URL and download",- "show_shortcuts": "Show this dialog",- "open_settings": "Open settings",- "search_settings": "Search settings",- "start_download": "Start download",- "cancel_dialog": "Close dialog or cancel",- "nav_home": "Go to Home",- "nav_downloads": "Go to Downloads"- },- "nav": {- "home": "Home",- "downloads": "Downloads",- "marketplace": "Marketplace",- "settings": "Settings",- "about": "About"- },- "tools": {- "tab": "Tools",- "working": "Working…",- "url_placeholder": "Paste a video URL",- "metadata_title": "Metadata fetcher",- "metadata_desc": "Save the video's info, description and thumbnail without downloading the video itself.",- "metadata_action": "Fetch metadata",- "metadata_done": "Saved {{count}} file(s) for \"{{title}}\"",- "thumbnails_title": "Thumbnail downloader",- "thumbnails_desc": "Browse every available cover image and save it at any resolution.",- "thumbnails_action": "List sizes",- "thumbnails_none": "No thumbnails found for this URL.",- "thumbnails_saved": "Saved {{name}}",- "thumbnails_save": "Save this size",- "thumbnails_default": "Default",- "subs_title": "Subtitle extractor",- "subs_desc": "Download subtitles, or merge two languages into one bilingual file.",- "subs_action": "List subtitles",- "subs_none": "— none —",- "subs_primary": "Primary",- "subs_format": "Format",- "subs_secondary": "Second language",- "subs_save": "Save subtitle",- "subs_merge": "Merge bilingual",- "subs_merge_hint": "Pick a second language; merge needs SRT or VTT.",- "subs_saved": "Saved {{name}}",- "cc_title": "Comments & chapters",- "cc_desc": "Fetch a video's comments or chapter markers, filter them, and export as JSON or CSV.",- "cc_comments": "Fetch comments",- "cc_chapters": "Fetch chapters",- "cc_max": "Max comments",- "cc_sort": "Sort",- "cc_sort_top": "Top",- "cc_sort_new": "Newest",- "cc_filter": "Filter…",- "cc_none": "Nothing found for this URL.",- "cc_exported": "Exported {{name}}",- "cc_showing": "Showing {{shown}} of {{total}}",- "lc_title": "Live chat archiver",- "lc_desc": "Pull a finished livestream's chat replay, filter it, and export as JSON or CSV.",- "lc_action": "Fetch live chat",- "lc_none": "No live chat replay for this video.",- "lc_exported": "Exported {{name}}"- },- "downloads": {- "title": "Downloads",- "empty": "No downloads in progress",- "status": {- "queued": "Queued",- "downloading": "Downloading",- "paused": "Paused",- "complete": "Complete",- "error": "Error",- "seeding": "Seeding"- },- "section_queued": "Queued",- "section_finished": "Finished",- "pause": "Pause",- "resume": "Resume",- "retry": "Retry",- "page_progress": "Page {{current}}/{{total}}",- "module_progress": "Module {{current}}/{{total}}",- "phase_fetching_info": "Fetching video info...",- "phase_starting": "Starting download engine...",- "phase_connecting": "Connecting to server...",- "phase_preparing": "Preparing download...",- "cancel": "Cancel",- "clear_finished": "Clear finished",- "clear_confirm": "Clear all finished downloads?",- "pause_all": "Pause all",- "resume_all": "Resume all",- "reorder_hint": "drag to reorder",- "history_toggle": "Toggle download history",- "history_toggle_hint": "View past downloads (Ctrl+H)",- "history_view_link": "View download history",- "history_loading": "Loading history…",- "history_empty": "No completed downloads yet.",- "history_clear": "Clear history",- "history_clear_confirm": "Clear the entire download history? This won't delete the files.",- "history_redownload": "Download again",- "history_requeued": "Re-queued for download",- "show_more": "Show {{count}} more",- "open_folder": "Show in folder",- "open_in_study": "Watch in Study",- "stop": "Stop",- "confirm_remove": "Remove this download?",- "delete_file": "Delete file from disk",- "delete_file_confirm": "Permanently delete the downloaded file from disk? This cannot be undone.",- "sw": {- "title": "Subtitle workshop",- "tool_desc": "Open, edit timing/text, translate and save SRT/VTT/ASS subtitles.",- "open": "Open subtitle file",- "load_media": "Load media (waveform)",- "save_srt": "Save .srt",- "save_vtt": "Save .vtt",- "save_ass": "Save .ass",- "autofix": "Auto-fix issues",- "autofixed": "{{count}} cue(s) auto-fixed",- "autofix_none": "No issues to fix",- "grammar": "AI grammar fix",- "grammar_done": "Grammar fixed",- "grammar_mismatch": "Grammar fix didn't line up — try again",- "grammar_style": "Style",- "style_original": "Original",- "style_formal": "Formal",- "style_casual": "Casual",- "twopoint": "Two-point sync",- "tp_old": "Old time",- "tp_new": "New time",- "tp_apply": "Apply sync",- "tp_invalid": "The two anchor points must differ",- "shift": "Shift all (ms)",- "find": "Find",- "replace": "Replace with",- "replace_btn": "Replace all",- "replaced": "{{count}} cue(s) changed",- "target_lang": "Target language",- "translate": "AI translate",- "translated": "Subtitles translated",- "translate_mismatch": "Translation didn't line up — try again",- "not_configured": "Configure an AI provider in Settings first",- "saved": "Subtitles saved",- "split": "Split",- "merge": "Merge ↓",- "empty": "Open an SRT or VTT file to start.",- "qc_negative": "End is before start",- "qc_overlap": "Overlaps the next cue",- "qc_fast": "Reading speed too high"- },- "vop": {- "action_label": "AI video tools",- "title": "AI video tools",- "not_configured": "Configure an AI provider in Settings first",- "done": "Done — saved to:",- "quick_actions": "Quick actions",- "extract_audio": "Extract audio",- "mute": "Remove audio",- "to_mp4": "Convert to MP4",- "to_gif": "Convert to GIF",- "trim_start": "Start (hh:mm:ss)",- "trim_end": "End (hh:mm:ss)",- "trim": "Trim",- "nl_label": "Describe what you want",- "nl_placeholder": "e.g. make it 720p and mute it",- "propose": "Propose",- "review_title": "Review the command before running",- "review_hint": "The app fills the input/output. This runs only after you confirm.",- "run": "Run",- "processing": "Processing…"- },- "quality_hint": "Quality being downloaded for this item",- "stats_line": "{{count}} downloads · {{size}} saved",- "filter_label": "Filter downloads by status",- "filter": {- "all": "All",- "active": "Active",- "queued": "Queued",- "completed": "Completed",- "failed": "Failed"- },- "log": {- "show": "Show log",- "hide": "Hide log",- "copy": "Copy",- "copied": "Log copied to clipboard",- "copy_failed": "Couldn't copy log",- "empty": "No log lines yet"- }- },- "toast": {- "download_preparing": "Preparing download...",- "download_started": "Starting: {{name}}",- "download_complete": "Done! {{name}} is in your folder",- "download_error": "Couldn't download {{name}}. Want to retry?",- "clipboard_url_detected": "Link detected! Paste to download",- "auto_download_started": "Auto-download started",- "external_url_ready": "URL received and ready to download",- "external_url_queued": "Download added from the Chrome extension",- "channel_new": "{{channel}}: {{count}} new video(s)",- "channel_new_auto": "{{channel}}: downloading {{count}} new video(s)",- "file_copied_to_clipboard": "File copied to clipboard",- "drm_skipped": "{{count}} video(s) skipped — protected by DRM (FairPlay/SAMPLE-AES)",- "generic_download_complete": "{{name}} — download complete!"- },- "reencode": {- "title": "Re-encode video",- "action_label": "Re-encode (compress)",- "codec_legend": "Codec",- "codec_hevc_title": "HEVC / H.265",- "codec_hevc_desc": "Best balance of quality and file size. Plays on most modern devices.",- "codec_h264_title": "H.264 / AVC",- "codec_h264_desc": "Best compatibility. Plays everywhere, files are larger.",- "codec_av1_title": "AV1",- "codec_av1_desc": "Smallest files, slowest encode. Best for storage if device supports it.",- "tag_recommended": "recommended",- "replace_title": "Replace original file",- "replace_desc": "If the new file is smaller, swap it in place. Original is removed after success.",- "start": "Re-encode",- "encoding": "Encoding…",- "toast_done": "Saved {{saved}} ({{pct}}%) using {{encoder}}",- "toast_replaced": "Replaced original. Saved {{saved}} ({{pct}}%) using {{encoder}}"- },- "telegram": {- "title": "Telegram",- "checking_session": "Checking session...",- "login": "Sign in",- "logout": "Sign out",- "logged_as": "Logged in as {{phone}}",- "phone_label": "Phone number",- "phone_placeholder": "+1 234 567 8900",- "phone_hint": "Include the country code",- "send_code": "Send code",- "sending_code": "Sending...",- "code_label": "Verification code",- "code_placeholder": "00000",- "code_hint": "We sent a code to your Telegram app",- "verify": "Verify",- "verifying": "Verifying...",- "invalid_code": "Invalid code. Please try again.",- "password_label": "Two-factor password",- "password_placeholder": "Your 2FA password",- "password_hint": "Hint: {{hint}}",- "password_submit": "Confirm",- "password_verifying": "Verifying...",- "invalid_password": "Invalid password. Please try again.",- "chats_title": "Your Chats",- "loading_chats": "Loading chats...",- "chats_error": "Failed to load chats",- "no_chats": "No chats found.",- "chat_count": "{{count}} chats",- "chat_count_one": "{{count}} chat",- "chat_type_private": "Private",- "chat_type_group": "Group",- "chat_type_channel": "Channel",- "media_title": "Media",- "loading_media": "Loading media...",- "no_media": "No media found in this chat.",- "media_error": "Failed to load media",- "filter_all": "All",- "filter_photo": "Photos",- "filter_video": "Videos",- "filter_document": "Files",- "filter_audio": "Audio",- "search_files": "Search files...",- "searching": "Searching...",- "back_to_chats": "Back to chats",- "download_btn": "Download",- "downloading": "Downloading...",- "downloaded": "Downloaded",- "choose_folder": "Choose download folder",- "unknown_error": "Unknown error",- "download_all": "Download all",- "batch_progress": "{{done}} of {{total}} files",- "batch_cancelled": "Batch download cancelled",- "batch_complete": "All files downloaded",- "load_more": "Load more",- "status_waiting": "Waiting",- "status_skipped": "Skipped",- "status_error": "Error",- "file_count": "{{count}} items",- "cancel_batch": "Cancel",- "qr_title": "Scan to log in",- "qr_instruction": "Open Telegram on your phone, go to Settings > Devices > Link Desktop Device",- "qr_loading": "Generating QR code...",- "qr_error": "Failed to generate QR code",- "or_separator": "or",- "use_phone": "Use phone number instead",- "back_to_qr": "Back to QR code"- },- "settings": {- "title": "Settings",- "general": {- "title": "General",- "start_with_system": "Start with system",- "start_with_system_desc": "Launch OmniGet automatically when your computer starts",- "start_minimized": "Start in tray only",- "start_minimized_desc": "Open OmniGet to the system tray without showing the window. Click the tray icon to open.",- "reset_hints": "Reset hints",- "reset_hints_desc": "Show all dismissed tips again",- "restore": "Restore",- "hints_restored": "All hints restored"- },- "appearance": {- "title": "Appearance",- "theme": "Theme",- "theme_system": "System",- "more_themes": "More themes",- "language": "Language",- "lang_pt": "Português",- "lang_en": "English",- "lang_ru": "Русский",- "lang_zh": "中文",- "lang_ja": "日本語",- "lang_it": "Italiano",- "lang_fr": "Français",- "lang_es": "Español",- "lang_el": "Ελληνικά"- },- "download": {- "default_output_dir": "Default folder",- "path_too_long": "This folder path is long ({{current}}/{{limit}} characters). Downloads with long filenames may fail — pick a shorter folder.",- "choose_folder": "Choose",- "always_ask_path": "Always ask where to save",- "video_quality": "Video quality",- "speed_limit": "Download speed limit",- "speed_limit_desc": "Cap the download rate. Leave empty for no limit.",- "speed_limit_unlimited": "No limit",- "skip_existing": "Skip existing files",- "download_attachments": "Download attachments",- "download_descriptions": "Save descriptions",- "embed_metadata": "Embed metadata",- "embed_metadata_desc": "Write title and artist info into downloaded files",- "embed_thumbnail": "Embed thumbnail as cover",- "embed_thumbnail_desc": "Embed album art into audio files",- "clipboard_detection": "Clipboard detection",- "clipboard_detection_desc": "Auto-detect URLs copied to clipboard",- "auto_download_on_paste": "Auto-download on paste",- "auto_download_on_paste_desc": "Start downloading instantly when a URL is detected in the clipboard",- "organize_by_platform": "Organize by platform",- "organize_by_platform_desc": "Save files in subfolders named after the platform",- "download_subtitles": "Download subtitles",- "download_subtitles_desc": "Download available subtitles alongside videos (YouTube)",- "what_to_also_save": "What to also save",- "youtube_specific": "YouTube-specific",- "telegram_plugin_section": "Telegram (plugin)",- "include_auto_subtitles": "Include auto-generated subtitles",- "include_auto_subtitles_desc": "Also fetch captions auto-generated by YouTube when no manual ones exist (quality varies)",- "caption_locale": "Subtitle language",- "caption_locale_desc": "Language to download subtitles in (when available). Falls back to whatever the source has.",- "caption_locale_auto": "Match app language",- "keep_vtt": "Keep original .vtt files",- "keep_vtt_desc": "Keep the raw WebVTT alongside the converted SRT. Useful for players or scripts that need the original format.",- "courses_section": "Courses (plugin)",- "continuous_lecture_numbers": "Continuous lecture numbering",- "continuous_lecture_numbers_desc": "Number lectures sequentially across modules (1, 2, 3…) instead of restarting at each module.",- "bilibili_section": "Bilibili",- "bilibili_container_label": "Output container",- "bilibili_container_desc": "MKV recommended when downloading Hi-Res FLAC or Dolby Atmos. MP4 works everywhere.",- "bilibili_danmaku_label": "Download danmaku (弹幕)",- "bilibili_danmaku_desc": "Save the floating comments alongside the video. Requires a logged-in Bilibili account in Settings → Cookies.",- "bilibili_danmaku_format_label": "Danmaku format",- "bilibili_danmaku_format_desc": "XML is the legacy format (best player compatibility). ASS overlays on the video natively. JSON is the raw data.",- "bilibili_nfo_label": "Generate NFO metadata (Kodi / Jellyfin / Emby)",- "bilibili_nfo_desc": "Save a .nfo file next to each download so media centers can identify it. Series get tvshow.nfo + episode.nfo automatically.",- "bilibili_cover_sidecar_label": "Save cover image as sidecar file",- "bilibili_cover_sidecar_desc": "Saves the video poster separately (in addition to whatever is embedded). Useful for media libraries that want a thumbnail next to the file.",- "bilibili_cover_format_label": "Cover format",- "bilibili_cover_format_desc": "JPG is most compatible. WebP/AVIF are smaller. PNG is lossless.",- "bilibili_naming_label": "Filename templates",- "bilibili_naming_desc": "Customize how downloaded files are named per content type. Use {variable} placeholders. Forward slash creates a subfolder.",- "bilibili_naming_edit": "Edit",- "bilibili_naming_hide": "Hide",- "bilibili_naming_video_label": "Single video",- "bilibili_naming_multi_part_label": "Multi-part video (分P)",- "bilibili_naming_bangumi_label": "Bangumi (anime / movie / series)",- "bilibili_naming_cheese_label": "Course (cheese)",- "bilibili_naming_collection_label": "Channel / Favorites / Collection",- "bilibili_naming_help": "Variables: {title}, {bvid}, {aid}, {cid}, {ep_id}, {season_id}, {series_title}, {season_title}, {season_number}, {episode_number}, {episode_number_pad2}, {episode_title}, {parent_title}, {section_title}, {collection_title}, {favorites_name}, {space_owner}, {uploader}, {pub_date}, {pub_year}, {page}.",- "bilibili_cdn_label": "CDN fallback",- "bilibili_cdn_desc": "Add alternative mirror hosts to try when the default CDN is slow or geo-blocked.",- "bilibili_cdn_hosts_label": "Alternative hosts (one per line, or comma-separated)",- "bilibili_cdn_hosts_placeholder": "upos-hz-mirrorcos.bilivideo.com\nupos-sz-mirroraliov.bilivideo.com",- "bilibili_cdn_prefer_label": "Prefer alternative CDN over default",- "bilibili_cdn_prefer_desc": "When on, try the alternatives first. Use this if the default CDN is unreliable in your region.",- "translate_metadata": "Translate video title and description into your app language",- "translate_metadata_desc": "Ask YouTube to localize titles and chapter names to the app language (YouTube only)",- "youtube_sponsorblock": "Remove SponsorBlock segments",- "youtube_sponsorblock_desc": "Cut sponsored, intro and outro segments from YouTube videos (community-sourced data; may miss or over-cut)",- "sb_mode": "SponsorBlock action",- "sb_mode_desc": "Remove cuts the segments out of the file. Mark only adds chapter markers so you can skip them in the player.",- "sb_mode_remove": "Remove segments",- "sb_mode_mark": "Mark only",- "sb_categories": "Segment types",- "sb_categories_desc": "Which kinds of segment to act on.",- "sb_cat_sponsor": "Sponsor",- "sb_cat_selfpromo": "Self-promotion",- "sb_cat_interaction": "Interaction reminder",- "sb_cat_intro": "Intro",- "sb_cat_outro": "Outro / endcards",- "sb_cat_preview": "Preview / recap",- "sb_cat_filler": "Filler / tangent",- "sb_cat_music_offtopic": "Non-music section",- "split_by_chapters": "Split video by chapters",- "split_by_chapters_desc": "When the source has chapter markers, save each chapter as a separate file",- "live_from_start": "Record live streams from the start",- "live_from_start_desc": "When downloading an ongoing livestream, capture it from the beginning instead of the current moment",- "presets": "Quick presets",- "presets_desc": "One-click setup for common workflows. Tap a card to apply.",- "preset_fast": "Fast",- "preset_fast_desc": "480p · no metadata · no subtitles",- "preset_quality": "Quality",- "preset_quality_desc": "Best video · metadata · thumbnail",- "preset_compact": "Compact",- "preset_compact_desc": "720p · metadata · no thumbnail",- "preset_music_only": "Music only",- "preset_music_only_desc": "Audio · ID3 tags · cover art",- "hotkey_enabled": "Global hotkey",- "hotkey_enabled_desc": "Download clipboard URL with a keyboard shortcut",- "hotkey_binding": "Hotkey shortcut",- "hotkey_record": "Record",- "hotkey_type": "Type",- "hotkey_press": "Press keys...",- "music_hotkey_enabled": "Music download hotkey",- "music_hotkey_enabled_desc": "Download clipboard URL as audio with a keyboard shortcut (uses Music Format below)",- "music_hotkey_binding": "Music hotkey shortcut",- "music_audio_format": "Music download format",- "music_audio_format_desc": "Audio format used by the music hotkey and the Music plugin downloader",- "copy_to_clipboard_on_hotkey": "Copy file to clipboard after hotkey download",- "copy_to_clipboard_on_hotkey_desc": "Automatically copy the downloaded file to clipboard for easy pasting",- "filename_template": "Filename template",- "filename_template_desc": "yt-dlp output template for downloaded files",- "filename_template_preview": "Preview: {{preview}}"- },- "update_available": "OmniGet {{version}} is available",- "update_button": "update now",- "update_downloading": "downloading update...",- "telegram": {- "concurrent_downloads": "Concurrent downloads",- "concurrent_downloads_desc": "Max simultaneous file downloads",- "fix_file_extensions": "Fix file extensions",- "fix_file_extensions_desc": "Add correct extension to files based on type"- },- "dependencies": {- "title": "Dependencies",- "not_found": "not found",- "install": "Install",- "update": "Update",- "install_success": "{{name}} {{version}} installed",- "update_success": "{{name}} updated to {{version}}",- "variant_aria": "Variant",- "more_options": "More options",- "pick_custom_file": "Pick file from disk…",- "show_folder": "Show folder",- "pick_dialog_title": "Select file for {{name}}",- "filter_pdfium": "PDFium library",- "filter_all_files": "All files",- "set_file_failed": "Failed to set file: {{msg}}",- "open_folder_failed": "Failed to open folder: {{msg}}",- "system_font_suffix": "system"- },- "typography": {- "section_title": "Typography",- "presets_title": "Presets",- "presets_desc": "Tested combinations. One click applies fonts + line-height + spacing.",- "modified_indicator": "(manually modified)",- "fonts_title": "Fonts",- "fonts_desc": "Per-family choice. List shows fonts bundled with the app (system fonts not yet supported).",- "reset": "Reset",- "display_label": "Display",- "body_label": "Body",- "mono_label": "Mono",- "body_sample": "The quick brown fox",- "line_height_label": "Line-height",- "line_height_desc": "Vertical space between lines. Higher = airier, easier to read on long sessions.",- "spacing_label": "Global spacing",- "spacing_desc": "Multiplies the space tokens (padding, gap, margin). 1.0× = default. 0.85× compacts the entire UI; 1.25× makes it airier.",- "preview_title": "Preview",- "preview_desc": "Real-time. Active theme is honored.",- "preset_omniget_default_name": "Omniget default",- "preset_omniget_default_desc": "Bricolage display, Inter body, Plex Mono. House standard.",- "preset_notion_like_name": "Notion-like",- "preset_notion_like_desc": "Inter for display + body. Hierarchy by size+weight, not family swap.",- "preset_compact_name": "Compact",- "preset_compact_desc": "DM Sans + Inter, 90% spacing. More text on screen.",- "preset_reading_name": "Reading mode",- "preset_reading_desc": "Bricolage + DM Sans, line-height 1.7, 110% spacing. Long sessions.",- "preset_tech_minimal_name": "Tech minimal",- "preset_tech_minimal_desc": "Plex Mono everywhere. Divisive. For devs who like it."- },- "proxy": {- "title": "Proxy",- "enabled": "Enable proxy",- "type": "Type",- "host": "Host",- "port": "Port",- "username": "Username",- "password": "Password"- },- "ytdlp_flags": {- "title": "yt-dlp Flags",- "embed_subs": "Embed subtitles",- "write_thumbnail": "Save thumbnail",- "write_description": "Save description",- "write_comments": "Save comments",- "restrict_filenames": "ASCII filenames",- "no_overwrites": "No overwrites",- "prefer_free_formats": "Free formats",- "force_ipv4": "Force IPv4",- "geo_bypass": "Geo bypass",- "limit_rate": "Limit rate",- "sleep_interval": "Sleep interval",- "limit_rate_ph": "e.g. 1M",- "sleep_interval_ph": "e.g. 5"- },- "advanced": {- "title": "Advanced",- "max_concurrent_downloads": "Concurrent downloads",- "max_concurrent_downloads_desc": "Max simultaneous downloads",- "max_concurrent_segments": "Pieces downloaded in parallel for HLS streams (advanced)",- "concurrent_fragments": "Pieces downloaded in parallel (advanced)",- "concurrent_fragments_desc": "How many file pieces yt-dlp downloads at the same time per video",- "max_retries": "Retries per segment",- "stagger_delay": "Pause between each download (ms)",- "stagger_delay_desc": "Delay before starting the next concurrent download",- "reset": "Reset defaults",- "reset_confirm": "Are you sure? All settings will be reset.",- "torrent_listen_port": "Torrent listen port",- "torrent_listen_port_desc": "TCP port for incoming BitTorrent connections",- "torrent_auto_trackers": "Add extra public trackers",- "torrent_auto_trackers_desc": "Improves peer discovery for magnets with few or dead trackers",- "torrent_upnp": "Open router port (UPnP)",- "torrent_upnp_desc": "Lets routers accept incoming peer connections for faster torrents",- "prevent_sleep": "Keep system awake while downloading",- "prevent_sleep_desc": "Stops the computer from sleeping while downloads are active",- "cookies_from_browser": "Read cookies directly from a browser profile (advanced)",- "cookies_from_browser_desc": "Only set this if the browser extension isn't working. Most users should leave this empty.",- "cookies_from_browser_placeholder": "ex.: firefox, chrome, edge",- "user_agent": "Custom User-Agent (advanced)",- "user_agent_desc": "Send a custom User-Agent to downloads. Leave empty to use the default.",- "user_agent_placeholder": "Default browser User-Agent",- "twitter_manual_cookie": "Manual cookie",- "twitter_manual_cookie_desc": "If a download fails, you can paste a manual Cookie header here and try again. This is not limited to Twitter/X. Example: sessionid=...; csrftoken=...; auth_token=..."- },- "cat_appearance": "Appearance",- "cat_typography": "Typography",- "cat_plugins": "Plugins",- "cat_downloads": "Downloads",- "cat_network": "Network",- "cat_advanced": "Advanced",- "search_placeholder": "Search settings...",- "rpc": {- "title": "Discord Rich Presence",- "desc": "Show your activity on your Discord profile. The timer keeps going across activities, never resets.",- "enable": "Show activity on Discord",- "privacy_note": "Shows what you're listening to, watching or reading. Downloads stay private.",- "test": "Test connection",- "test_desc": "Send a test activity to verify Discord is running and connected.",- "test_button": "Send test",- "test_ok": "Connected to Discord",- "test_fail": "Could not reach Discord. Make sure it is running.",- "saved": "Saved",- "save": "Save",- "advanced": "Advanced",- "app_id": "Application ID",- "app_id_hint": "Discord application ID. Change only if you know what you're doing.",- "large_image": "Large image key",- "large_image_hint": "Asset name uploaded to your Discord application."- },- "bridge": {- "title": "Browser extension",- "intro": "Pair the OmniGet browser extension with this app over a private localhost connection. Open the extension's options page, paste the endpoint URL and token below, and click Save.",- "pair_label": "Pair the extension",- "pair_hint": "One click here, then the installed extension connects on its own — no copy-paste.",- "pair": "Pair extension",- "pair_waiting": "Waiting…",- "pair_active": "Window open — the extension will connect automatically ({{secs}}s left).",- "pair_unavailable": "Enable the browser bridge first.",- "endpoint_label": "Endpoint URL",- "token_label": "Pairing token",- "rotate_label": "Rotate token",- "rotate_hint": "Generates a new token. Any browser already paired will need to update its token.",- "rotate": "Rotate",- "rotating": "Rotating…",- "rotated": "New pairing token generated.",- "reveal": "Reveal",- "hide": "Hide",- "copy": "Copy",- "copied_url": "Endpoint URL copied to clipboard.",- "copied_token": "Token copied to clipboard.",- "unavailable": "Bridge unavailable. Try restarting the app."- },- "cat_cookies": "Cookies",- "cat_channels": "Channels",- "cat_ai": "AI",- "ai": {- "title": "AI provider",- "provider": "Provider",- "provider_desc": "Choose where AI requests go. Your key is stored locally and never logged.",- "provider_none": "Off",- "provider_local": "Local (OpenAI-compatible)",- "model": "Model",- "model_desc": "The model identifier for the chosen provider.",- "model_placeholder": "e.g. gpt-4o-mini, claude-3-5-sonnet-latest, llama3",- "openai_key": "OpenAI API key",- "anthropic_key": "Anthropic API key",- "key_set": "A key is saved. Leave blank to keep it.",- "key_unset": "No key saved yet.",- "local_url": "Local endpoint URL",- "local_url_desc": "OpenAI-compatible base URL (Ollama, LM Studio, …).",- "save": "Save",- "test": "Test connection",- "test_ok": "AI connection works",- "test_fail": "AI test failed: {{error}}",- "saved": "AI settings saved",- "summarize_title": "Summarize a video",- "summarize": "Summarize",- "summarizing": "Summarizing…",- "summarize_placeholder": "Video URL",- "summarize_hint": "Fetches the video's subtitles and summarizes them. Result is saved below.",- "style": "Summary style",- "style_short": "Short",- "style_balanced": "Balanced",- "style_detailed": "Detailed",- "lang_placeholder": "Output language (optional)",- "summary_ready": "Summary ready",- "no_transcript": "No transcript available for this video",- "not_configured": "Configure an AI provider first",- "history": "AI history",- "history_clear": "Clear",- "history_clear_confirm": "Clear all AI history?",- "history_empty": "No AI results yet."- },- "channels": {- "title": "Followed channels",- "tray_header": "Channels",- "add": "Follow",- "add_placeholder": "Channel or playlist URL",- "add_hint": "New uploads are checked in the background. Auto-download is off until you turn it on.",- "empty_title": "No channels followed yet",- "empty_hint": "Follow a channel or playlist to get new uploads automatically.",- "last_checked": "Last checked {{when}}",- "never": "never",- "check_now": "Check now",- "checked": "{{count}} new video(s)",- "remove": "Remove",- "remove_confirm": "Stop following this channel?",- "enabled": "Enabled",- "auto_download": "Auto-download",- "interval": "Every (min)"- },- "cookies": {- "title": "Cookies",- "intro": "Manage your account cookies. Everything stays on your computer — nothing is sent to our servers.",- "managed_only_title": "Always use managed cookies",- "managed_only_desc": "When on, downloads use only the cookies imported here. If a domain has no managed cookie, the download proceeds without auth and the log records it. Turn off to fall back to the legacy cookie sources (manual header, global file, browser extraction).",- "capture_via_extension": "Capture via extension",- "open_folder": "Open folder",- "dir_label": "Folder:",- "hint_use_extension": "On any logged-in site, click the omniget extension icon in your browser. The cookies show up here in seconds.",- "empty_title": "No cookies here yet",- "empty_body": "Use the browser extension to capture cookies from sites where you're logged in, or import a file manually.",- "status_fresh": "Fresh cookies",- "status_aging": "Aging cookies",- "status_stale": "Old cookies — possibly expired",- "status_empty": "No cookies",- "count_cookies": "{{count}} cookies",- "captured_from": "Captured from",- "via_label": "via {{label}}",- "time_just_now": "just now",- "time_minutes": "{{count}}m ago",- "time_hours": "{{count}}h ago",- "time_days": "{{count}}d ago",- "time_months": "{{count}}mo ago",- "time_years": "{{count}}y ago",- "alias_aria": "Name for this entry",- "alias_edit_aria": "Rename this entry",- "action_view": "View",- "action_export": "Export",- "action_rename": "Rename",- "action_test": "Test",- "test_running": "Testing…",- "test_ok": "Cookies work.",- "test_fail": "Test failed: {{msg}}",- "expires_in": "expires in ~{{days}}d",- "expired": "expired",- "action_clear": "Clear",- "import_trigger": "Import",- "import_file_title": "File",- "import_file_hint": "Netscape (.txt) or JSON (.json)",- "import_file_dialog_title": "Select cookies file",- "import_paste_title": "Paste",- "import_paste_hint": "Paste cookie contents in a modal",- "import_success": "Imported: {{cookies}} cookies across {{buckets}} platform(s)",- "paste_modal_title": "Paste cookies",- "paste_modal_subtitle": "Paste your cookie file contents — Netscape (yt-dlp) or JSON (Edit-This-Cookie) accepted.",- "paste_field_content": "Content",- "paste_field_source": "Source URL (optional)",- "paste_field_alias": "Name (optional)",- "paste_content_placeholder": "# Netscape HTTP Cookie File\\n.youtube.com\\tTRUE\\t/\\tTRUE\\t...",- "paste_source_placeholder": "https://www.example.com/...",- "paste_alias_placeholder": "e.g. YouTube personal",- "paste_cancel": "Cancel",- "paste_submit": "Import",- "paste_importing": "Importing…",- "export_dialog_title": "Save cookies file",- "export_done": "File saved",- "modal_title": "Cookie contents",- "modal_close": "Close",- "modal_filter_placeholder": "Filter by cookie name…",- "modal_copy_all": "Copy all",- "modal_copied": "Content copied",- "modal_no_results": "No cookies found with this filter.",- "modal_total": "{{count}} cookies",- "modal_expired_count": "{{count}} expired",- "modal_expired_tag": "expired",- "add_generic_title": "Add generic",- "add_generic_hint": "For yt-dlp-supported sites not listed above.",- "add_generic_placeholder": "Domain (e.g. bandcamp.com)",- "add_generic_paste": "Paste cookies",- "add_generic_cancel": "Cancel",- "confirm_clear_title": "Clear cookies?",- "confirm_clear_body": "Cookies for {{domain}} go to the trash (recoverable for 24h). Continue?",- "confirm_clear_cancel": "Cancel",- "confirm_clear_action": "Clear",- "cleared_toast": "Cookies moved to trash",- "add_account_label": "Add another account",- "add_account_success": "Account '{{slug}}' added — {{count}} cookies",- "account_primary_tag": "default",- "bilibili": {- "login_qr_title": "Sign in to Bilibili with QR Code",- "login_qr_subtitle": "Open the Bilibili app and scan the QR code below.",- "login_qr_pending": "Waiting for scan...",- "login_qr_scanned": "Scanned. Confirm sign-in on your phone.",- "login_qr_expired": "QR code expired. Generate a new one.",- "login_qr_cancelled": "Sign-in cancelled.",- "login_qr_regenerate": "Generate new code",- "login_qr_success": "Signed in as {{uname}}",- "login_sms_title": "Sign in with SMS",- "login_sms_country": "Country code",- "login_sms_phone": "Phone number",- "login_sms_send_code": "Send code",- "login_sms_resend_in": "Resend in {{seconds}}s",- "login_sms_code": "Verification code",- "login_sms_submit": "Sign in",- "login_sms_captcha_required": "Solve the captcha first",- "login_sms_captcha_solve": "Open captcha",- "login_sms_sent": "SMS sent. Enter the code you received.",- "login_close": "Close",- "login_cancel": "Cancel",- "login_error_generic": "Sign-in failed. Try again.",- "add_account_qr_btn": "Sign in with QR Code",- "add_account_sms_btn": "Sign in with SMS",- "add_account_manual_btn": "Paste cookies manually",- "import_watch_later": "Import Watch Later",- "import_history": "Import History",- "import_no_account": "Sign in to Bilibili first",- "import_done": "Queued {{count}} items",- "login_webview_btn": "Sign in via Bilibili page",- "login_webview_loading": "Opening sign-in window..."- }- }- },- "omnibox": {- "placeholder": "Paste a URL, magnet link, .torrent, or search",- "searching": "Searching...",- "search_empty": "No results found",- "unsupported": "Platform not supported yet",- "go_to_hotmart": "Go to Hotmart",- "download": "Download",- "options": "Options",- "advanced": "Advanced",- "preparing": "Preparing download...",- "error": "Download failed",- "retry": "Retry",- "batch_detected": "{{count}} URLs detected",- "batch_download_all": "Download all",- "batch_queued": "{{count}} downloads added to queue",- "batch_file_open": "Load from file",- "batch_file_title": "Select a .txt file with URLs",- "batch_file_empty": "No valid URLs found in the file",- "mode_auto": "Auto",- "mode_audio": "Audio Only (MP3)",- "mode_mute": "No Sound",- "quality": "Quality",- "quality_best": "Best quality",- "quality_1080p": "Full HD (1080p)",- "quality_720p": "HD (720p) — lighter",- "quality_480p": "Medium (480p) — fast",- "quality_360p": "Low (360p) — very light",- "quality_best_short": "Best",- "quality_audio": "Audio",- "view_formats": "View formats",- "hide_formats": "Hide formats",- "no_formats": "No formats available for this video",- "formats_error": "Failed to load formats",- "preset_best": "Best",- "preset_music": "Music",- "preset_custom": "Custom",- "formats_presets_label": "Format preset",- "formats_merge_note": "Video formats (V) will be automatically merged with audio (A) if FFmpeg is available.",- "formats_playlist_note": "Per-video format picker doesn't apply to playlists. The Quality option above applies to every video.",- "referer_label": "Referer (optional)",- "referer_placeholder": "https://example.com",- "timerange_label": "Download only a section (optional)",- "timerange_start": "Start",- "timerange_end": "End",- "timerange_hint": "Use mm:ss or hh:mm:ss. Leave empty to download the whole video.",- "schedule_label": "Schedule",- "schedule_1h": "In 1 hour",- "schedule_tonight": "Tonight",- "schedule_1d": "Tomorrow",- "schedule_clear": "Clear",- "schedule_start": "Start time",- "schedule_stop": "Stop time",- "schedule_hint": "Leave empty to start now. Optional stop time cancels the download if it's still running.",- "playlist_selected": "{{selected}} of {{total}} selected",- "playlist_all": "Select all",- "playlist_none": "None",- "playlist_loading": "Loading playlist…",- "playlist_empty": "Could not load playlist items",- "playlist_none_selected": "Select at least one item to download",- "torrent_selected": "{{selected}} of {{total}} files selected",- "torrent_loading": "Reading torrent contents…",- "torrent_none_selected": "Select at least one file to download",- "cookie_hint_stale": "This site's saved cookie is getting old.",- "cookie_hint_expired": "This site's saved cookie has expired — downloads may fail.",- "cookie_hint_action": "Update it",- "external_url_ready": "URL received from the Chrome extension",- "content_type": {- "video": "Video",- "audio": "Audio",- "image": "Image",- "post": "Post",- "reel": "Reel",- "clip": "Clip",- "short": "Short",- "playlist": "Playlist",- "course": "Course",- "file": "File",- "unknown": "Media"- },- "fmt_type": "Type",- "fmt_quality": "Quality",- "fmt_streams": "A/V",- "fmt_video": "Video",- "fmt_audio": "Audio",- "fmt_size": "Size",- "fmt_speed": "Speed",- "cookie_account": "Account",- "cookie_account_cookies": "cookies",- "mode_normal": "Normal",- "mode_advanced": "Advanced",- "adv": {- "url_label": "URL",- "url_placeholder": "https://...",- "args_label": "yt-dlp arguments",- "args_placeholder": "-f bv*+ba/b --merge-output-format mp4 --sub-langs en --embed-subs",- "args_hint": "One flag per token, separated by spaces. Use quotes around values that contain spaces.",- "run": "Run download",- "queuing": "Queuing...",- "queued": "Download queued",- "url_required": "Type a URL first",- "templates_title": "Saved templates",- "templates_empty": "No templates saved yet. Type flags above and click Save to keep them for next time.",- "template_new": "+ New",- "template_name_placeholder": "Template name",- "template_name_required": "Give the template a name",- "template_save": "Save",- "template_update": "Update",- "template_saved": "Template saved",- "template_delete": "Delete template",- "template_flags": "flags"- }- },- "about": {- "tab": {- "terms": "terms",- "project": "project",- "roadmap": "roadmap",- "changelog": "changelog",- "debug": "debug info"- },- "debug": {- "title": "Debug info",- "description": "Environment details to paste in a bug report. Does not include any secrets.",- "copy_button": "Copy to clipboard",- "copied_short": "Copied",- "copied": "Debug info copied to clipboard",- "copy_failed": "Could not copy to clipboard"- },- "debug_disabled_redirect": "Debug page is hidden. Enable it in Settings → Advanced → Diagnostics.",- "description": "your media downloader. open source and free.",- "terms_title": "terms of use",- "terms_text": "OmniGet is provided as is and we make no guarantees. the app makes it easier to download content that's publicly available on the internet, but we take zero responsibility for what you download or what you do with it. by using OmniGet, you agree to that.",- "legal_title": "legal basis",- "legal_text": "personal use of OmniGet is supported by Article 184, §4 of the Brazilian Penal Code, which says that copying a work for your own private use, in a single copy, without any profit intent, is not a crime. that said, this doesn't mean you can distribute, resell, or use downloaded content commercially. copyright law still applies in civil matters.",- "responsibility_title": "user responsibility",- "responsibility_text": "you (the user) are responsible for what you do with OmniGet and the content you get through it. respect copyright and each platform's terms of service. always credit the original creators. don't use it for anything illegal or commercial that violates someone else's rights. if you're using content for education, cite your sources.",- "mascot_title": "Loop",- "mascot_text": "Loop is OmniGet's mascot, an expressive little creature that reacts to your downloads in real time. we want to keep Loop safe, so here are a few rules: you can make fan art of Loop freely, but you can't use his design or artworks commercially, in your own projects, or modify and redistribute the original artworks from the project.",- "license_title": "license",- "license_text": "OmniGet is open source and licensed under GPL-3.0. the source code is on GitHub. the \"OmniGet\" name, logo, and Loop are project trademarks and aren't covered by the code license.",- "star_button": "star on GitHub",- "star_description": "if you enjoy the project, leave a star!",- "version": "version",- "features_title": "what we've built so far",- "feature_platforms": "downloads from 10+ platforms and 1000+ more via yt-dlp: YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, Telegram",- "feature_hotmart": "Hotmart course downloads with login (videos, attachments, descriptions)",- "feature_progress": "real-time download progress with ETA and speed",- "feature_mascot": "Loop, the mascot that reacts to your downloads",- "feature_themes": "11 themes: Dark, Light, Catppuccin (4 flavors), One Dark Pro, Dracula, NyxVamp (3 variants)",- "feature_i18n": "available in English, Portuguese, Chinese, Japanese, Italian, and French",- "feature_tech": "built with Tauri + Rust. fast and lightweight",- "roadmap_intro": "what's planned for the next versions of OmniGet.",- "roadmap_platforms_title": "integrations",- "roadmap_features_title": "features",- "roadmap_feature_telegram_multi_account": "Telegram multiple accounts",- "roadmap_community_title": "got an idea?",- "roadmap_community_text": "we're accepting ideas and suggestions! it's a great way to request a new platform or feature.",- "roadmap_community_discord": "reach out on discord:",- "roadmap_community_issue": "or open an issue on the repository:",- "tagline": "Download anything, from anywhere.",- "credit": "Made with love by tonho.wtf"- },- "marketplace": {- "title": "Marketplace",- "installed": "Installed",- "browse": "Browse",- "no_plugins": "No plugins installed",- "enable": "Enable",- "disable": "Disable",- "enabled": "Enabled",- "disabled": "Disabled",- "version": "v{{version}}",- "by_author": "by {{author}}",- "uninstall": "Uninstall",- "restart_required": "Restart OmniGet to apply changes",- "browse_loading": "Loading plugins...",- "browse_error": "Could not load plugins",- "browse_error_hint": "OmniGet couldn't reach the plugin registry. If GitHub is blocked on your network, set up a proxy in Settings → Network, then try again.",- "browse_retry": "Try again",- "install_network_error": "Couldn't reach GitHub to download this plugin. Set up a proxy in Settings → Network, then try again.",- "browse_empty": "No plugins available yet",- "official_badge": "Official",- "community_badge": "Community",- "installed_badge": "Installed",- "capabilities": "Permissions",- "cap_events": "Send events to the app",- "cap_toast": "Show notifications",- "cap_settings": "Read and save settings",- "cap_filesystem": "Access download folders",- "cap_proxy": "Use proxy configuration",- "cap_tools": "Use managed tools (yt-dlp, FFmpeg)",- "cap_download_queue": "Submit downloads to the queue",- "install": "Install",- "update_available": "Update",- "update_hint": "v{{version}} available",- "plugin_not_installed": "Plugin not installed",- "plugin_install_hint": "Install this plugin from the Marketplace to use it.",- "go_to_marketplace": "Go to Marketplace",- "plugin_restart_hint": "Restart OmniGet to load this plugin.",- "plugin_incompatible_title": "Plugin incompatible with this version",- "plugin_incompatible_hint": "This plugin was built for an older version of OmniGet and cannot be loaded. Reinstall it from the Marketplace to get a compatible build — restarting will not fix this.",- "plugin_load_failed_title": "Plugin failed to load",- "plugin_load_failed_hint": "OmniGet couldn't load this plugin. Try reinstalling it from the Marketplace.",- "plugin_load_error_details": "Details: {{error}}",- "reinstall": "Reinstall"- },- "services": {- "title": "Supports YouTube, Instagram and 1000+ sites",- "title_show": "show supported services",- "title_hide": "hide supported services",- "disclaimer": "availability depends on each platform and may vary",- "and_more": "+1000 more"- },- "terms_note": {- "agreement": "by continuing, you agree to the",- "link": "terms and ethics of use"- },- "convert": {- "title": "Convert",- "select_files": "Select files",- "select_folder": "Select folder",- "empty": "No files selected. Add files to convert.",- "file_list": "Files",- "options_title": "Options",- "output_format": "Output format",- "video_codec": "Video codec",- "audio_codec": "Audio codec",- "resolution": "Resolution",- "preset": "Preset",- "video_bitrate": "Video bitrate",- "audio_bitrate": "Audio bitrate",- "trim_start": "Trim start",- "trim_end": "Trim end",- "convert_btn": "Convert",- "converting": "Converting...",- "cancel": "Cancel",- "remove": "Remove",- "clear_all": "Clear all",- "status_idle": "Pending",- "status_probing": "Analyzing...",- "status_ready": "Ready",- "status_converting": "Converting",- "status_complete": "Complete",- "status_error": "Error",- "original": "Original",- "auto": "Auto",- "hwaccel_detected": "GPU acceleration: {{encoder}}",- "hwaccel_none": "No GPU acceleration detected",- "probe_failed": "Probe failed",- "conversion_failed": "Conversion failed",- "toast_complete": "Conversion complete",- "toast_error": "Conversion failed",- "no_ffmpeg": "FFmpeg not found. Install FFmpeg to use conversion."- },- "changelog": {- "title": "What's New",- "empty": "No release notes available."- },- "onboarding": {- "welcome_title": "Welcome to OmniGet!",- "welcome_desc": "I'll help you download any video or course from the internet. Simple, fast, and free.",- "next": "Next",- "skip": "Skip",- "back": "Back",- "finish": "Get started",- "step_of": "Step {{current}} of {{total}}",- "folder_title": "Where to save your downloads?",- "folder_desc": "Choose the folder where your videos and courses will be saved.",- "folder_current": "Current folder:",- "folder_change": "Change folder",- "deps_title": "Required Tools",- "deps_desc": "I need a couple of tools to work properly. I can install everything automatically!",- "deps_install_all": "Install all",- "language_label": "Language",- "done_title": "All set!",- "done_desc": "Paste a URL in the search bar and watch the magic happen.",- "plugins_title": "Supercharge your OmniGet",- "plugins_desc": "Choose which features to install. You can always add or remove them later from the Marketplace.",- "hotkey_title": "Global Hotkey",- "hotkey_desc": "Copy any video URL, press the hotkey, and OmniGet starts downloading instantly — even when minimized.",- "hotkey_on": "Enabled",- "hotkey_off": "Disabled",- "rpc_title": "Discord Rich Presence",- "rpc_desc": "Show on your Discord profile that you're using OmniGet — including what you're listening to, watching or reading.",- "rpc_on": "Enabled",- "rpc_off": "Disabled",- "rpc_privacy_note": "Shows what you're listening to, watching or reading. Downloads stay private.",- "theme_label": "Theme",- "theme_system": "System",- "theme_light": "Light",- "theme_dark": "Dark"- },- "hints": {- "omnibox": "Paste the URL of the video or media you want to download here.",- "telegram": "Connect your Telegram account to download media from channels and groups.",- "hotkey": "Global hotkey: automatically downloads the URL currently in your clipboard.",- "clipboard": "Detects URLs automatically when you copy a link and fills the omnibox.",- "downloads_empty": "Your downloads will appear here. Go to the home page to start.",- "convert": "Convert media files between formats using FFmpeg."- },- "common": {- "cancel": "Cancel",- "clear": "Clear",- "retry": "Retry",- "close": "Close",- "hint": "Hint",- "error": "Error",- "loading": "Loading…",- "unknown_error": "Unknown error",- "ytdlp_missing": "yt-dlp is not installed. Install it in Settings to enable downloads.",- "go_to_settings": "Go to Settings",- "cookie_error_message": "Automatic cookie detection only works with Firefox. Chrome, Edge, and other Chromium-based browsers block cookie access. To use cookies: install Firefox and log in to your accounts there, or export a cookies.txt file from your browser and set it in Settings > Download > Cookie file.",- "cookie_file_label": "Cookie file (cookies.txt)",- "cookie_file_choose": "Choose file",- "cookie_file_hint": "Export cookies from your browser using an extension like 'Get cookies.txt LOCALLY' and select the file here. This is required for Chrome/Edge users who need authenticated downloads."- },- "platforms": {- "bilibili": {- "kind": {- "video": "Video",- "bangumi_episode": "Anime · Episode",- "bangumi_season": "Anime · Season",- "bangumi_media": "Anime",- "cheese_episode": "Course · Lesson",- "cheese_season": "Course",- "space": "Creator channel",- "favlist": "Favorites",- "collection": "Collection",- "series": "Series",- "popular": "Weekly Popular",- "watch_later": "Watch Later",- "history": "History",- "festival": "Event page"- },- "qn": {- "8k": "8K",- "dolby_vision": "Dolby Vision",- "hdr": "HDR",- "4k": "4K",- "1080p60": "1080p60",- "1080p_plus": "1080p+",- "ai": "AI Upscale",- "1080p": "1080p",- "720p": "720p",- "480p": "480p",- "360p": "360p",- "unknown": "Unknown"- },- "codec": {- "avc": "H.264 / AVC",- "hevc": "H.265 / HEVC",- "av1": "AV1",- "unknown": "Unknown"- },- "audio": {- "hires": "Hi-Res Lossless",- "dolby_atmos": "Dolby Atmos",- "192k": "192 kbps",- "132k": "132 kbps",- "64k": "64 kbps",- "unknown": "Unknown"- },- "badge": {- "charging_exclusive": "Sponsor-only",- "preview": "Preview",- "paid_locked": "Paid",- "partial_preview": "Trial",- "pgc": "Series",- "collab": "Collab",- "expired": "Expired"- },- "phase": {- "preview": "Reading qualities",- "connecting": "Connecting to CDN",- "downloading": "Downloading",- "muxing": "Muxing",- "done": "Done"- },- "preview": {- "loading": "Reading available qualities...",- "auto": "Auto",- "quality": "Quality",- "codec": "Codec",- "audio": "Audio",- "no_account_hint": "Sign in to Bilibili to unlock 4K, HDR, Hi-Res Lossless and Dolby.",- "premium_hint": "Some qualities here require a 大会员 (premium) subscription on Bilibili."- },- "notice": {- "session_expired_title": "Session expired",- "session_expired_body": "Your Bilibili session has expired. Sign in again to keep downloading at premium quality.",- "session_expired_action": "Sign in again",- "session_expired_dismiss": "Later"- }- }- },- "errors": {- "bilibili": {- "network_failed": "Network error while reaching Bilibili",- "http_status": "Unexpected response from Bilibili",- "invalid_json": "Bilibili returned malformed data",- "api_code": "Bilibili rejected the request",- "not_logged_in": "Sign in to Bilibili to continue",- "geo_blocked": "Not available in your region",- "rate_limited": "Bilibili is rate-limiting requests — try again later",- "premium_required": "Premium (大会员) required for this quality",- "content_unavailable": "Content unavailable",- "cookie_missing": "Bilibili cookies missing",- "cancelled": "Cancelled"- },- "login_required": "Login required — use browser cookies or try another URL",- "rate_limited": "Too many requests (429) — try again later",- "access_denied": "Access denied (403) — video may be private or region-restricted",- "extraction_failed": "Extraction failed — update yt-dlp or try again",- "format_unavailable": "Requested format not available",- "video_unavailable": "Video unavailable or removed",- "video_private": "This video is private",- "copyright_blocked": "Blocked due to copyright",- "geo_restricted": "Not available in your region",- "connection_timeout": "Connection timed out — check your internet",- "ffmpeg_missing": "FFmpeg not found — install it in Settings",- "unsupported_url": "Unsupported URL — check the link",- "page_access_failed": "Could not access the page — check the link and connection",- "no_formats": "No video formats found for this link",- "cookie_database": "Browser cookie access failed. Download will continue without authentication.",- "tiktok_blocked": "TikTok is temporarily blocking requests. Try again in a few minutes.",- "download_timeout": "Download timed out. Check your internet connection.",- "size_mismatch": "Downloaded file size doesn't match. Try again.",- "disk_full": "Write error — your disk may be full.",- "path_too_long": "Download folder path is too long ({{current}}/{{limit}} chars). Choose a shorter folder.",- "console_encoding": "Console encoding issue (non-UTF-8 locale). Update yt-dlp in Settings → Dependencies, or run \"chcp 65001\" in a terminal and reopen the app.",- "extractor_broken": "The site extractor is broken. Update yt-dlp in Settings → Dependencies, then retry.",- "output_missing": "Download finished, but no file appeared in the folder (or it's empty). Check disk space and antivirus exclusions, then try again."- },- "debug": {- "title": "Activity Log",- "enable": "Activity log",- "enable_desc": "See what OmniGet is doing behind the scenes",- "filter_all": "All",- "filter_downloads": "Downloads",- "filter_network": "Network",- "filter_auth": "Authentication",- "filter_system": "System",- "filter_convert": "Convert",- "filter_errors": "Errors only",- "copy_report": "Copy report",- "report_copied": "Diagnostic report copied to clipboard",- "clear": "Clear",- "no_entries": "No activity yet. Start a download to see events here.",- "open_panel": "Open activity log"- },- "p2p": {- "send_file": "Send File",- "send_title": "Send File via P2P",- "send_description": "Send any file to another OmniGet user. A share code will be generated — the receiver pastes it in the omnibox to download.",- "select_file": "Select File",- "share_code": "Share Code",- "click_to_copy": "Click to copy",- "share_hint": "Share this code with the receiver",- "code_copied": "Code copied to clipboard",- "waiting_for_receiver": "Waiting for receiver...",- "transferring": "Transferring...",- "transfer_complete": "Transfer complete",- "send_failed": "Send failed",- "try_again": "Try Again",- "pause": "Pause",- "resume": "Resume",- "paused": "Paused",- "receive_title": "Incoming P2P Transfer",- "receive_description": "Someone wants to send you a file. Accept to start downloading.",- "accept_transfer": "Accept & Download",- "reject_transfer": "Decline",- "searching_hint": "Connecting to relay server..."- },- "mascot": {- "idle": "Paste a link or search to get started!|What are we downloading today?|Ready when you are!",- "detecting": "Hmm, let me check this...|Analyzing the link...|One sec...",- "detected": "Got it! Ready when you are!|Found it! Let's go?|All set!",- "preparing": "Setting things up...|Almost ready...|Preparing your download...",- "search": "Here's what I found!|Take a look!|Check these out!",- "error": "Oops, something went wrong. Wanna try again?|That didn't work. Let's try again?|Hmm, something broke...",- "complete": "All done!|Download complete!|Got it for you!",- "amazed": "Wow, your first download! 🎉|There it is — your first one!|Saved! Welcome aboard!",- "downloading": "Downloading now...|Working on it!|Getting your files...",- "stalled": "Hmm, this is taking a while...|Hang tight, still working...|The connection seems slow...",- "queue": "Waiting in line...|Patience, almost there...|Your turn is coming!"- },- "courses": {- "title": "Courses",- "search_placeholder": "Search platforms...",- "not_connected": "Not connected",- "connection_failed": "Connection failed",- "connected_as": "Connected as {{email}}",- "back": "Back to Courses",- "coming_soon": "Coming soon",- "update_plugin_hint": "Update the Courses plugin for the best experience.",- "update_plugin_for_platform": "This platform requires an updated Courses plugin. Check the Marketplace for updates.",- "search_btn": "Search",- "no_search_results": "No results found.",- "login_with_browser": "Login with Browser",- "browser": "Browser",- "browser_hint": "A browser window will open for you to log in. After logging in, your session will be detected automatically.",- "otp_check_email": "Check your email for the verification code.",- "otp_code_label": "Verification Code",- "verify_code": "Verify Code"- },- "hotmart": {- "title": "Hotmart",- "login": "Sign in",- "logout": "Sign out",- "checking_session": "Checking session...",- "logged_as": "Logged in as {{email}}",- "email_label": "Email",- "email_placeholder": "[email protected]",- "password_label": "Password",- "password_placeholder": "Your password",- "authenticating": "Authenticating...",- "courses_title": "Your Courses",- "loading_courses": "Loading courses...",- "courses_error": "Failed to load courses",- "no_courses": "No courses found in this account.",- "course_count": "{{count}} courses",- "course_count_one": "{{count}} course",- "page_of": "Page {{current}} of {{total}}",- "free": "Free",- "download_btn": "Download",- "downloading": "Downloading...",- "downloaded": "Downloaded",- "download_retry": "Error — Retry",- "cancel_download": "Cancel",- "unavailable": "Unavailable",- "external_platform": "External platform",- "choose_folder": "Choose download folder",- "refresh": "Refresh",- "unknown_error": "Unknown error",- "captcha_detected": "Captcha detected — please solve it in the login window."- },- "torrent": {- "open_file": "Open .torrent"- },- "udemy": {- "title": "Udemy",- "login": "Sign in",- "logout": "Sign out",- "checking_session": "Checking session...",- "logged_as": "Logged in as {{email}}",- "email_label": "Email",- "email_placeholder": "[email protected]",- "authenticating": "Signing in...",- "waiting_code": "A 6-digit code was sent to your email. Please enter it in the login window.",- "waiting_code_title": "Check your email",- "courses_title": "Your Courses",- "loading_courses": "Loading courses...",- "courses_error": "Failed to load courses",- "no_courses": "No courses found in this account.",- "course_count": "{{count}} courses",- "course_count_one": "{{count}} course",- "page_of": "Page {{current}} of {{total}}",- "download_btn": "Download",- "downloading": "Downloading...",- "downloaded": "Downloaded",- "download_retry": "Error — Retry",- "choose_folder": "Choose download folder",- "refresh": "Refresh",- "unknown_error": "Unknown error",- "lectures": "{{count}} lectures",- "login_email_tab": "Email (Udemy.com)",- "login_cookies_tab": "Cookies (Enterprise)",- "cookies_instructions": "For Udemy Business/Enterprise accounts (e.g. company.udemy.com), export your cookies from the browser using an extension like \"Get cookies.txt locally\" in JSON format, then paste or load the file here.",- "cookies_placeholder": "Paste cookie JSON here...",- "cookies_load_file": "Load JSON file",- "cookies_login": "Sign in with Cookies",- "logged_as_enterprise": "Logged in as {{email}} ({{portal}}.udemy.com)",- "upload_file": "Upload file"- },- "notifications": {- "title": "Notifications",- "close": "Close",- "filter_label": "Filter",- "filter_unread": "Unread",- "filter_all": "All",- "dismiss_all": "Clear all",- "dismiss_all_aria": "Clear all notifications",- "empty_unread": "All caught up!",- "empty_all": "No notifications",- "loading": "Loading…",- "dismiss": "Dismiss",- "unread_indicator": "Unread",- "new_lesson_fallback": "New lesson",- "bell_aria": "Notifications ({{count}} unread)",- "badge_aria": "{{count}} new notifications",- "time_now": "now",- "time_min": "{{n}}min",- "time_hour": "{{n}}h",- "time_day": "{{n}}d",- "inline_section_aria": "New lessons",- "inline_count_one": "{{n}} new lesson",- "inline_count_other": "{{n}} new lessons",- "inline_unread_tag_one": "{{n}} unread",- "inline_unread_tag_other": "{{n}} unread",- "inline_dismiss_all": "Dismiss all"- },- "study": {- "common": {- "loading": "Loading...",- "error": "Error",- "save": "Save",- "saving": "Saving...",- "cancel": "Cancel",- "create": "Create",- "clear": "Clear",- "delete": "Delete",- "edit": "Edit",- "close": "Close",- "copy": "Copy",- "copied": "Copied!",- "retry": "Retry",- "refresh": "Refresh",- "search": "Search",- "all": "All",- "empty": "Nothing here yet",- "confirm": "Are you sure?",- "dismiss": "Dismiss",- "go_home": "Back"- },- "about": {- "eyebrow": "omniget · open-source",- "short_pitch": "Open-source on GitHub",- "long_pitch": "Studying isn't just PDFs. It's books, podcasts, lessons, scribbled notes in between. omniget bundles all of it — without losing your flow switching windows.",- "cta_github": "See on GitHub"- },- "hub": {- "title": "Study",- "subtitle": "Turn your downloaded courses into a deliberate practice loop.",- "library": "Library",- "music": "Music",- "focus": "Focus",- "progress": "Progress",- "achievements": "Achievements",- "anki": "Anki",- "notes": "Notes",- "read": "Read",- "settings": "Settings",- "visited_recent": "Recently visited",- "recently_added": "Recently added",- "new": "new",- "now": "Now",- "continue_title": "Continue course",- "continue_cta": "Resume",- "review_title": "Review cards",- "review_count": "{{n}} cards due",- "review_cta": "Review",- "review_empty": "Nothing due today",- "focus_title": "Focus session",- "focus_hint": "25 min · deep focus",- "focus_cta": "Start",- "explore": "Explore",- "streak_label": "days",- "streak_none": "No streak",- "goal_met": "Daily goal reached",- "greeting_morning": "Good morning",- "greeting_afternoon": "Good afternoon",- "greeting_evening": "Good evening",- "secondary_review": "{{n}} cards to review",- "secondary_continue": "Resume {{title}}",- "secondary_resume_book": "Keep reading {{title}}",- "secondary_focus": "Start a focus session",- "secondary_explore": "Browse library",- "review_subtitle": "cards due today",- "focus_hint_default": "25 min · deep focus",- "made_by": "Made by:"- },- "search": {- "placeholder": "Search courses, lessons, notes, flashcards...",- "courses": "Courses",- "lessons": "Lessons",- "notes": "Notes",- "no_results": "No results for \"{{term}}\"",- "hint": "Press Ctrl+K to open · Esc to close"- },- "palette": {- "aria_modes": "Palette modes",- "tab_search": "Search",- "tab_jump": "Jump to",- "tab_action": "Actions",- "heading_shortcuts": "Shortcuts",- "heading_recent_pages": "Recent pages",- "heading_actions": "Actions",- "empty_pages": "No pages yet.",- "shortcut_daily": "Today's daily",- "shortcut_journal_history": "Journal history",- "shortcut_graph": "Graph",- "shortcut_templates": "Templates",- "aria_xp_progress": "{{pct}}% to level {{level}}",- "action_create_page_label": "Create page",- "action_create_page_hint": "New blank page",- "action_open_daily_label": "Open today's daily",- "action_open_templates_label": "Open templates",- "action_open_graph_label": "Open graph",- "action_open_graph_hint": "Graph visualization",- "action_rebuild_fts_label": "Rebuild search (FTS)",- "action_rebuild_fts_hint": "Rebuild full-text index",- "action_export_graph_label": "Export graph (JSON)",- "action_export_graph_hint": "Download notes-graph.json",- "action_open_settings_label": "Open settings",- "action_vacuum_label": "Compact database (vacuum)",- "action_vacuum_hint": "SQLite maintenance"- },- "music": {- "title": "Music",- "subtitle": "Your tracks, albums and playlists.",- "library_title": "Library",- "favorites_title": "Favorites",- "favorites_subtitle": "Tracks you marked with ❤",- "favorites_empty": "Nothing favorited yet. Mark a track to start.",- "add_root": "Add folder",- "add_root_cta": "Add music folder",- "clear_covers": "Reset covers",- "clear_covers_hint": "Wipes the cover cache and forces re-extraction on next scan",- "clear_covers_confirm": "Delete all cached covers? Next scan will re-extract them.",- "clear_covers_done": "{{files}} files deleted · {{tracks}} tracks reset",- "diagnostics": "Diagnostics",- "diagnostics_hint": "Shows current cover state (paths, sizes, counts) — useful when thumbs don't show",- "diagnostics_title": "Cover diagnostics",- "scan_now": "Scan",- "scanning": "Scanning…",- "scan_done": "{{added}} added · {{updated}} updated · {{removed}} removed",- "root_added": "Folder added: {{path}}",- "empty_no_roots_title": "Your music library is empty",- "empty_no_roots_body": "Point to a folder with your audio files. MP3, FLAC, M4A, OGG, OPUS — all common formats. Nothing is copied or moved.",- "empty_no_tracks_title": "Ready to scan",- "empty_no_tracks_body": "Folders are configured but we haven't scanned yet. Click below to index your tracks.",- "shelf_continue_empty": "Nothing unfinished here. Play something to pick it up later.",- "shelf_recent": "Recently played",- "shelf_recent_empty": "Your listening story starts with the next track you play.",- "diag_metrics_title": "YouTube metrics",- "diag_refresh": "Refresh",- "diag_metrics_reset": "Reset metrics",- "diag_loading": "Loading…",- "diag_metrics_empty": "No data yet. Play some tracks to gather telemetry.",- "diag_metrics_endpoint": "Endpoint",- "diag_metrics_success": "Success",- "diag_metrics_fail": "Failures",- "diag_metrics_last_error": "Last error",- "diag_potoken_title": "PoToken",- "diag_potoken_engine": "JS engine",- "diag_potoken_snapshot": "Snapshot",- "diag_potoken_minting": "Mint",- "diag_potoken_minting_active": "Active",- "diag_potoken_minting_pending": "Pending (multi-week)",- "diag_potoken_visitor": "Visitor token",- "diag_potoken_visitor_expired": "Expired",- "diag_potoken_visitor_active": "Active — expires in {{seconds}}s",- "diag_potoken_visitor_active_unknown": "Active",- "diag_potoken_visitor_none": "No token",- "diag_potoken_cache_count": "Cached tokens",- "diag_potoken_last_generated": "Generated at",- "diag_loop_title": "Loop extension (YouTube cookies)",- "diag_loop_missing": "Cookie file not found.",- "diag_loop_missing_hint": "Install the Loop browser extension and export cookies to the path shown.",- "diag_loop_no_youtube": "File present but no YouTube cookies.",- "diag_loop_no_youtube_hint": "Open youtube.com in your browser with the Loop extension installed and sign in. Cookies show up here automatically.",- "diag_loop_ready": "YouTube cookies ready.",- "retry": "Try again",- "speed_dial_search": "Search",- "speed_dial_library": "Library",- "speed_dial_playlists": "Playlists",- "speed_dial_favorites": "Favorites",- "speed_dial_history": "History",- "speed_dial_trending": "Trending",- "speed_dial_albums": "Albums",- "speed_dial_artists": "Artists",- "speed_dial_genres": "Genres",- "shelf_recent_albums": "Recently added",- "shelf_recent_albums_empty": "Point to a music folder in the menu to scan your albums.",- "shelf_artists": "Artists",- "shelf_artists_empty": "No artists indexed yet.",- "explore_youtube_cta": "Explore on YouTube",- "explore_youtube_cta_body": "Discoveries, charts, new releases, and subscriptions.",- "pull_to_refresh_hint": "Release to refresh",- "pull_to_refresh_release": "Refreshing…",- "loading": "Loading…",- "play_count_today": "Pick up where you left off",- "history_empty_title": "Your history starts when you play something",- "history_empty_cta": "Search on YouTube",- "back": "Back",- "play_all": "Play all",- "shuffle_play": "Shuffle",- "save_playlist": "Save",- "share": "Share",- "share_copied": "Link copied",- "expandable_more": "show more",- "expandable_less": "show less",- "album_loading_error": "Couldn't load this album.",- "playlist_loading_error": "Couldn't load this playlist.",- "album_empty": "This album has no available tracks.",- "playlist_empty": "This playlist is empty.",- "eyebrow_playlist": "Playlist",- "tab_songs": "Songs",- "tab_videos": "Videos",- "tab_about": "About",- "shuffle_radio": "Shuffle radio",- "no_description": "No description.",- "my_playlists_title": "My playlists",- "my_playlists_subtitle": "Your local lists built from YouTube tracks.",- "my_playlists_empty_title": "No playlists yet",- "my_playlists_empty_body": "Create one to organize your way — nothing leaves your machine.",- "my_playlists_create": "New playlist",- "my_playlists_create_title": "Create playlist",- "my_playlists_form_name": "Name",- "my_playlists_form_name_placeholder": "e.g. To study",- "my_playlists_form_description": "Description (optional)",- "my_playlists_form_save": "Create",- "my_playlists_form_cancel": "Cancel",- "my_playlists_delete_confirm_title": "Delete playlist?",- "my_playlists_delete_confirm_body": "The {{count}} tracks stay on YouTube — only your local list disappears.",- "my_playlists_delete_confirm_empty": "Your local list disappears. This can't be undone.",- "my_playlists_delete_confirm_action": "Delete playlist",- "my_playlists_delete_confirm_cancel": "Cancel",- "my_playlists_rename_aria": "Rename playlist",- "my_playlists_settings_aria": "Playlist actions",- "my_playlists_open_aria": "Open playlist",- "remove_from_playlist": "Remove from playlist",- "remove_from_playlist_aria": "Remove {{title}} from playlist",- "add_to_playlist": "Add to playlist",- "add_to_playlist_modal_title": "Add from YouTube",- "add_to_playlist_search_placeholder": "Search a video to add…",- "add_to_playlist_search_short": "Type at least 2 characters.",- "add_to_playlist_close": "Close",- "add_to_playlist_added": "Added to playlist",- "rename_inline_placeholder": "Playlist name",- "tracks_count_n": "{{count}} tracks",- "track_count_one": "1 track",- "playlist_empty_cta": "Add from YouTube",- "shelf_spotify_recent": "Spotify · Recently played",- "shelf_soundcloud_likes": "SoundCloud · Your likes",- "history_filter_all": "All",- "empty_results": "Your library is empty — import a folder or connect a source from the side menu.",- "empty_search_no_results": "No matching tracks — try another search.",- "empty_album": "This album is empty.",- "shelf_continue": "Continue listening",- "shelf_albums": "Albums",- "shelf_added": "Recently added",- "shelf_most_played": "Most played",- "see_all": "See all",- "tracks_count": "{{count}} tracks",- "eyebrow_album": "Album",- "play": "Play",- "pause": "Pause",- "prev": "Previous",- "next": "Next",- "shuffle": "Shuffle",- "repeat": "Repeat",- "favorite": "Favorite",- "unfavorite": "Unfavorite",- "player_aria": "Music player",- "seek_aria": "Playback position",- "tab_tracks": "Tracks",- "tab_albums": "Albums",- "tab_artists": "Artists",- "search_placeholder": "Search title, artist, album…",- "nav_home": "Home",- "nav_library": "Library",- "nav_favorites": "Favorites",- "nav_genres": "Genres",- "nav_activity": "Activity",- "nav_history": "History",- "queue_clear": "Clear",- "eq_title": "Equalizer",- "eq_enable": "Enable equalizer",- "eq_preset": "Preset",- "eq_reset": "Reset",- "crossfade_label": "Crossfade",- "crossfade_off": "Off",- "normalization_label": "Volume normalization",- "normalization_hint": "Match perceived loudness across tracks (uses YouTube loudnessDb when available).",- "skip_silence_label": "Skip silence",- "skip_silence_hint": "Auto-skip silent passages longer than 1.5s. Useful for podcasts.",- "listen_together_title": "Listen together",- "listen_together_intro": "Share what you're listening to in real time with a friend. Connect to a WebSocket relay and create or join a room with a short code.",- "listen_together_relay_url": "Relay URL",- "listen_together_relay_hint": "Your own ws:// or wss:// relay (see omniget-listen-relay).",- "listen_together_name": "Your display name",- "listen_together_create": "Create a room",- "listen_together_join": "Join",- "listen_together_connecting": "Connecting…",- "listen_together_room": "Room",- "listen_together_copied": "copied!",- "listen_together_role_host": "Host",- "listen_together_role_guest": "Guest",- "listen_together_members": "Members",- "listen_together_you": "(you)",- "listen_together_chat": "Chat",- "listen_together_chat_empty": "No messages yet — say hi!",- "listen_together_chat_placeholder": "Type a message…",- "listen_together_send": "Send",- "listen_together_leave": "Leave room",- "sleep_timer_title": "Sleep timer",- "sleep_timer_active": "Active",- "sleep_timer_presets": "Presets",- "sleep_timer_minutes_short": "min",- "sleep_timer_minutes": "minutes",- "sleep_timer_custom": "Custom",- "sleep_timer_apply": "Apply",- "sleep_timer_other": "Other",- "sleep_timer_end_of_track": "Stop after current track",- "sleep_timer_cancel": "Cancel",- "eq_preset_flat": "Flat",- "eq_preset_bass": "Bass",- "eq_preset_vocal": "Vocal",- "eq_preset_treble": "Treble",- "eq_preset_rock": "Rock",- "eq_preset_pop": "Pop",- "eq_preset_classical": "Classical",- "eq_preset_electronic": "Electronic",- "eq_preset_custom": "Custom",- "genres_title": "Genres",- "genres_subtitle": "Browse by music genre detected in your files.",- "no_genres": "No genres found. Tracks need a genre tag.",- "eyebrow_genre": "Genre",- "albums_count": "{{count}} albums",- "artists_count": "{{count}} artists",- "activity_title": "Your activity",- "activity_subtitle": "What you listened, when, how much.",- "no_activity": "No activity in this period yet. Play some tracks to start seeing stats.",- "period_7d": "7 days",- "period_30d": "30 days",- "period_90d": "90 days",- "period_1y": "1 year",- "period_all": "All time",- "total_plays": "Plays",- "total_listened": "Time listened",- "unique_tracks": "Unique tracks",- "top_tracks": "Top tracks",- "top_artists": "Top artists",- "top_albums": "Top albums",- "top_genres": "Top genres",- "empty": "Empty",- "lyrics_title": "Lyrics",- "lyrics_loading": "Fetching lyrics…",- "lyrics_not_found": "No lyrics available",- "lyrics_lrclib_hint": "You can paste lyrics manually in .lrc format",- "lyrics_no_track": "No track playing",- "lyrics_refresh": "Fetch again",- "lyrics_retry": "Try again",- "lyrics_source": "Source: {{source}}",- "lyrics_error": "Failed to fetch lyrics",- "lyrics_error_hint": "Music keeps playing — you can try again anytime",- "lyrics_add_manual": "Add lyrics",- "lyrics_paste_title": "Paste lyrics manually",- "lyrics_paste_placeholder": "Paste the contents of a .lrc file here",- "lyrics_paste_hint": "Accepts LRC format with [mm:ss.xx] timestamps. At least one synced line is required.",- "lyrics_paste_save": "Save lyrics",- "lyrics_paste_invalid": "No timestamped lines found — check the format",- "lyrics_paste_cancel": "Cancel",- "lyrics_translation_show": "Show translation",- "lyrics_translation_hide": "Hide translation",- "lyrics_translation_loading": "Translating lyrics…",- "lyrics_translation_skipped_pt": "Lyrics already in Portuguese",- "lyrics_translation_no_translator": "Translation not configured",- "lyrics_translation_no_translator_hint": "Open Settings → Music → Lyrics to pick a translator",- "lyrics_translation_error": "Translation failed — you can try again",- "lyrics_translation_edited_badge": "✎ community",- "lyrics_translation_edit_placeholder": "Rewrite this line",- "lyrics_translation_edit_save": "Save",- "lyrics_translation_edit_cancel": "Cancel",- "lyrics_translation_available_hint": "Translation available 🌐",- "lyrics_translation_attribution": "Translated via {{translator}}",- "player_resolving": "Resolving track…",- "player_error_network": "No connection right now.",- "player_error_auth_expired": "Session expired — refreshing.",- "player_error_track_unavailable": "Track was pulled from the source.",- "player_error_region_blocked": "Blocked in your region.",- "player_error_unsupported_format": "Format we can't play here.",- "player_error_format_unavailable": "This video needs YouTube login. Open youtube.com in a browser with the Loop extension and sign in to your account.",- "player_error_unknown": "Something went sideways.",- "player_action_retry": "Try again",- "player_action_skip": "Skip",- "player_action_refresh": "Refresh",- "player_action_configure": "Configure",- "player_auto_skip_label": "Skip automatically next time",- "player_dismiss_error": "Dismiss",- "translation_settings_title": "Lyrics translation",- "translation_settings_translator_label": "Translator",- "translation_settings_translator_libretranslate": "LibreTranslate (self-hosted)",- "translation_settings_translator_deepl": "DeepL (your API key)",- "translation_settings_translator_none": "Off",- "translation_settings_libretranslate_url_label": "LibreTranslate endpoint",- "translation_settings_libretranslate_url_hint": "e.g. http://localhost:5000 — leave empty to disable",- "translation_settings_deepl_key_label": "DeepL API key",- "translation_settings_deepl_key_hint": "Get one at deepl.com/account. Free tier covers ~150 lyrics/month",- "translation_settings_deepl_key_set": "Key saved (reveal/edit)",- "translation_settings_target_lang_label": "Target language",- "translation_settings_show_label": "Show translation by default",- "translation_settings_saved": "Settings saved",- "n_selected": "{{count}} selected",- "selection_aria": "Selection actions",- "queued_count": "{{count}} queued",- "favorited_count": "{{count}} favorited",- "add_to_queue": "Add to queue",- "ctx_show_in_folder": "Open folder",- "ctx_show_failed": "Could not open folder",- "nav_download": "Download",- "nav_spotify": "Spotify",- "nav_soundcloud": "SoundCloud",- "ytdlp_title": "Download audio",- "ytdlp_subtitle": "Paste a URL (YouTube, SoundCloud, Bandcamp, anything yt-dlp supports). Will convert to audio in your library.",- "ytdlp_url": "URL",- "ytdlp_target": "Save to",- "ytdlp_format": "Format",- "ytdlp_no_roots": "Add a music folder first",- "ytdlp_start": "Download",- "ytdlp_downloading": "Downloading…",- "ytdlp_done": "Download complete. Library refreshed.",- "ytdlp_log": "Log",- "ytdlp_missing_title": "yt-dlp not found",- "ytdlp_missing_body": "Install yt-dlp and make sure it's on your system PATH (https://github.com/yt-dlp/yt-dlp). On Windows: winget install yt-dlp.yt-dlp.",- "ytdlp_bin": "yt-dlp: {{path}}",- "tab_queue": "Queue",- "tab_lyrics": "Lyrics",- "tab_info": "Info",- "tab_chapters": "Chapters",- "chapters_empty": "No chapters available",- "video_mode_toggle": "Video mode",- "video_mode_only_youtube": "Video only available for YouTube tracks",- "expand_video": "Open fullscreen video",- "watch_title": "Watch",- "watch_video_unavailable": "Video unavailable for this track",- "watch_back": "Back to music",- "info_no_track": "Play a track to see details",- "field_album": "Album",- "field_year": "Year",- "field_genre": "Genre",- "field_duration": "Duration",- "field_bitrate": "Bitrate",- "field_samplerate": "Sample rate",- "field_plays": "Plays",- "lastfm_title": "Last.fm",- "lastfm_intro": "Connect your Last.fm account to scrobble what you play. You'll need to create a free API app.",- "lastfm_step1_title": "Create an API app",- "lastfm_step1_desc": "Go to Last.fm and create an application. You'll get an API key and a shared secret.",- "lastfm_step2_title": "Paste credentials",- "lastfm_step2_desc": "Paste the API key and shared secret from the app you created.",- "lastfm_save_keys": "Save credentials",- "lastfm_keys_saved": "Credentials saved",- "lastfm_step3_title": "Authorize access",- "lastfm_step3_desc": "Opens Last.fm in your browser to approve. Then come back and click Finalize.",- "lastfm_authorize": "Authorize with Last.fm",- "lastfm_authorize_pending": "Approve access on the Last.fm page that opened, then click Finalize:",- "lastfm_open_auth": "Open approval page",- "lastfm_finalize": "Finalize connection",- "lastfm_connected": "Connected as {{username}}",- "lastfm_connected_as": "Connected as {{username}}",- "lastfm_connected_hint": "Tracks played for over 30s scrobble to your account. Now playing updates in real time.",- "lastfm_enable_scrobble": "Auto-scrobble",- "lastfm_disconnect": "Disconnect",- "lastfm_disconnect_confirm": "Delete credentials and disconnect?",- "lastfm_disconnected": "Disconnected",- "dl_hero_title": "Paste a URL or search",- "dl_hero_sub": "YouTube, SoundCloud, Bandcamp, anything yt-dlp supports. Becomes audio in your library.",- "dl_quality": "Quality",- "dl_quality_best": "Best available",- "dl_idle_hint": "Paste a track or album URL, or search by title. Ctrl+V auto-detects.",- "dl_detecting": "Detecting…",- "dl_searching": "Searching…",- "dl_search_empty": "No results found.",- "dl_unsupported": "Site not recognized. Try pasting the direct track URL.",- "dl_preparing": "Starting download…",- "dl_download_audio": "Download audio",- "dl_started": "Download started",- "dl_recent": "Recent downloads",- "batch_done": "{{ok}} started, {{fail}} failed",- "music_theme_title": "Music theme",- "music_theme_subtitle": "Customize music section colors. Saved separately from the global app theme.",- "music_theme_preset": "Preset",- "music_theme_accent": "Accent color",- "music_theme_save": "Save theme",- "music_theme_reset": "Restore default",- "music_theme_preset_default": "Default",- "music_theme_preset_indigo": "Indigo",- "music_theme_preset_spotify": "Spotify",- "music_theme_preset_purple": "Purple",- "music_theme_preset_amber": "Amber",- "music_theme_preset_custom": "Custom",- "music_theme_use_dominant": "Use current cover color",- "music_theme_dominant_off": "Fixed color",- "music_theme_dominant_on": "Auto (cover color)",- "music_theme_reduce_motion": "Reduce animations",- "music_theme_reduce_motion_auto": "Follow system",- "music_theme_reduce_motion_off": "Animations on",- "music_theme_reduce_motion_on": "Always reduce",- "music_theme_reduce_motion_hint": "Disables transitions and animations in the music section, independent of the global system setting.",- "now_playing_title": "Now playing",- "youtube_live": "LIVE",- "youtube_error_generic": "Something went wrong talking to YouTube",- "youtube_error_retry": "Try again",- "youtube_error_audio_only": "Audio only",- "youtube_error_details": "Technical details",- "youtube_error_hide_details": "Hide details",- "now_playing_close": "Back",- "now_playing_tab_lyrics": "Lyrics",- "now_playing_tab_queue": "Up next",- "now_playing_tab_previous": "Previous",- "now_playing_lyrics_empty": "No lyrics available.",- "now_playing_lyrics_error": "Couldn't load lyrics. Try again.",- "now_playing_lyrics_retry": "Try again",- "now_playing_lyrics_show_translation": "Show translation",- "now_playing_lyrics_hide_translation": "Hide translation",- "now_playing_lyrics_plain_note": "Unsynced lyrics",- "now_playing_lyrics_sync_earlier": "Lyrics earlier",- "now_playing_lyrics_sync_later": "Lyrics later",- "now_playing_lyrics_sync_reset": "Reset sync",- "now_playing_queue_empty": "Queue is empty — click any track to start.",- "now_playing_previous_empty": "Nothing played in this session yet.",- "now_playing_no_track": "No track playing right now.",- "now_playing_open": "Open fullscreen",- "rpc_title": "Discord Rich Presence",- "rpc_intro": "Shows what you're listening to on your Discord profile. Needs Discord open on the machine.",- "rpc_connected": "Connected",- "rpc_disconnected": "Disconnected",- "rpc_enable": "Show activity on Discord",- "rpc_advanced": "Advanced settings",- "rpc_appid_hint": "Application ID from your Discord Developer Portal app. Default is the omniget \"Loop\" app.",- "rpc_large_image": "Large image key",- "rpc_image_hint": "Asset name (Rich Presence Assets) uploaded on Discord Dev Portal. Without it, activity shows without icon.",- "rpc_save": "Save",- "rpc_saved": "Settings saved",- "rpc_test": "Test connection",- "rpc_test_ok": "Connected!",- "rpc_test_fail": "Failed (Discord not running or invalid app ID)",- "rpc_discord_running": "Discord must be running on the machine (desktop client, not browser).",- "rpc_music_section": "How the track appears",- "rpc_show_cover": "Show album cover",- "rpc_show_cover_hint": "When on, the current track's cover shows as the large image. Local covers only render if you have the asset uploaded to Discord Dev Portal.",- "rpc_show_buttons": "Show buttons",- "rpc_show_buttons_hint": "Adds two buttons: \"Play now\" (opens the track at its source) and \"View on GitHub\".",- "rpc_update_interval": "Update every (seconds)",- "rpc_update_interval_hint": "Update frequency during playback. Min 2s, max 30s. Discord rate-limits to 5 updates/20s.",- "nav_youtube": "YouTube",- "yt_title": "YouTube Music",- "yt_subtitle": "Import playlists from YouTube and YouTube Music. Streams on demand — no download.",- "yt_intro": "Paste any YouTube or YouTube Music playlist link. For private playlists (including \"Likes\"), point to the browser you're logged into.",- "yt_step1_title": "Which browser to pull cookies from?",- "yt_step1_desc": "For private playlists and your Library, omniget needs cookies from the browser you're signed into. Without cookies, only public playlists work.",- "yt_browser_micro": "yt-dlp reads cookies straight from your browser. Nothing leaves your machine — it's all local.",- "yt_browser_saved": "{{browser}} cookies configured",- "yt_step2_title": "Import a playlist",- "yt_step2_desc": "Paste the link, omniget imports the track list. Playback streams on demand — nothing is downloaded.",- "yt_import": "Import",- "yt_imported": "{{title}}: {{count}} tracks imported",- "yt_lm_label": "Likes (Liked Music)",- "yt_playlist_label": "YouTube Music playlist",- "yt_yt_playlist_label": "YouTube video playlist",- "yt_add_playlist": "Add playlist",- "yt_empty_title": "No playlists yet",- "yt_empty_body": "Hook up a YouTube or YouTube Music playlist to see your tracks here alongside your local files.",- "yt_setup": "Set up YouTube",- "yt_refresh": "Re-import",- "yt_refreshed": "Refreshed: {{count}} tracks",- "yt_remove": "Remove",- "yt_remove_confirm": "Remove this playlist from your library? (The YouTube playlist stays intact.)",- "yt_search_placeholder": "Search YouTube Music — songs, artists, albums…",- "yt_recs_for": "Because you played: {{name}}",- "yt_download": "Download",- "yt_download_started": "Download started",- "sc_title": "SoundCloud",- "sc_signin_heading": "Connect to SoundCloud",- "sc_signin_body": "Sign in to SoundCloud in your browser — the OmniGet extension grabs the cookies automatically. Then come back and refresh.",- "sc_open_in_browser": "Open SoundCloud in browser",- "sc_already_signed_in": "I'm signed in, refresh",- "sc_search": "Search",- "sc_refresh": "Refresh",- "sc_logout": "Sign out",- "sc_loading": "Loading…",- "sc_status_client_id": "client_id",- "sc_status_oauth": "oauth",- "sc_import_url": "Import by URL",- "sc_import_url_title": "Import from a SoundCloud URL",- "sc_import_url_desc": "Paste any link to a track, playlist or artist — we'll figure out the rest.",- "sc_import_url_placeholder": "https://soundcloud.com/…",- "sc_import_action": "Import",- "sc_import_invalid": "That doesn't look like a SoundCloud URL.",- "sc_import_failed": "Could not resolve that URL: {{error}}",- "sc_import_success": "Imported \"{{title}}\"",- "sc_section_continue": "Pick up where you left off",- "sc_section_stream": "From people you follow",- "sc_section_recommended": "Because you liked {{name}}",- "sc_section_likes": "Your likes ({{count}})",- "sc_section_playlists": "Your playlists",- "sc_section_following": "Following",- "sc_followers_count": "{{count}} followers",- "sc_track_count": "{{count}} tracks",- "sc_download_track": "Download track",- "sc_download_all": "Download all ({{count}})",- "sc_download_started": "Download queued",- "sc_download_bulk_progress": "Downloading {{current}} of {{total}}",- "sc_download_bulk_done": "Finished — {{success}} downloaded, {{failed}} failed",- "sc_go_plus_badge": "Go+",- "sc_go_plus_unavailable_hint": "Higher quality streams require a SoundCloud Go+ account. Standard MP3 still works without it.",- "sc_empty_likes_title": "No likes yet",- "sc_empty_likes_body": "Hearts you give on SoundCloud show up here.",- "sc_empty_likes_action": "Search music",- "sc_empty_playlists_title": "No playlists yet",- "sc_empty_playlists_body": "Create or import a playlist on soundcloud.com — it'll show here on next refresh.",- "sc_empty_following_title": "Not following anyone yet",- "sc_empty_state_logged_out_action": "Take me to SoundCloud",- "sc_load_more": "Load more",- "sc_show_count": "Showing {{shown}} of {{total}}",- "sc_skeleton_loading": "Pulling your library…",- "sc_offline_for_focus": "Save offline so it plays even with no internet",- "sc_recommended_seed_fallback": "your taste",- "yt_eyebrow": "YouTube Music",- "yt_state_authed": "Connected",- "yt_state_anon": "Not connected",- "yt_auth_title": "Connect to your account",- "yt_auth_desc": "To pull your private library (Likes, your playlists), paste 2 cookies from the browser where you're logged into YouTube Music.",- "yt_auth_how": "How to get the cookies",- "yt_auth_step1": "Open music.youtube.com in Chrome/Edge/Firefox where you're logged in.",- "yt_auth_step2": "F12 → Application/Storage tab → Cookies → music.youtube.com",- "yt_auth_step3": "Copy the value of __Secure-3PAPISID and paste in the first field.",- "yt_auth_step4": "In Network tab, click any request, copy the whole Cookie: header and paste in the second field.",- "yt_cookie_full": "Full cookie header",- "yt_cookie_hint": "Paste the entire Cookie: header from any request to music.youtube.com.",- "yt_save_auth": "Save credentials",- "yt_auth_saved": "Credentials saved",- "yt_disconnect": "Disconnect",- "yt_disconnect_confirm": "Delete saved credentials?",- "yt_disconnected": "Disconnected",- "yt_visitor_ok": "Visitor data refreshed",- "yt_sync_title": "Sync my library",- "yt_sync_desc": "Imports Liked Music + all your playlists in one batch. Runs in the background. Tracks show up in Library / Albums / Artists alongside your local files.",- "yt_sync_now": "Sync now",- "yt_syncing": "Syncing…",- "yt_sync_starting": "Starting…",- "yt_sync_liked": "Fetching Liked Music…",- "yt_sync_playlists": "Fetching {{total}} playlists…",- "yt_sync_done": "Synced: {{playlists}} playlists, {{tracks}} tracks",- "yt_ext_import": "Import from extension",- "yt_ext_hint": "Pulls YouTube cookies straight from the omniget browser extension. No F12, no copy-paste.",- "yt_ext_imported": "{{count}} cookies imported from extension",- "yt_ext_empty": "No cookies captured yet. Open music.youtube.com in your browser with the omniget extension active, then try again.",- "yt_ext_no_sapisid": "Cookies found but no __Secure-3PAPISID. Sign in to YouTube Music and try again.",- "yt_ext_no_file": "Cookie file doesn't exist. Extension never sent anything — check: (1) omniget host running, (2) extension active, (3) Native Messaging registered. Expected at: {{path}}",- "yt_ext_no_youtube": "File exists ({{age}}) but only has cookies for: {{domains}}. Open music.youtube.com in browser, wait 3s, try again.",- "yt_ext_no_sapisid_detail": "{{count}} cookies imported ({{age}}) but none is __Secure-3PAPISID. Sign in to YouTube Music.",- "yt_ext_imported_detail": "{{count}} cookies imported ({{age}})",- "yt_or_manual": "or manually",- "quality_title": "Audio quality",- "quality_short": "Quality",- "quality_intro": "Pick how downloaded music is encoded. You can change anytime — this only affects new downloads.",- "quality_current": "Current: {{label}}",- "quality_saved": "Quality set to {{label}}",- "quality_group_recommended": "Recommended",- "quality_group_compact": "Save space",- "quality_group_high": "High quality",- "quality_group_lossless": "Lossless (audiophile)",- "quality_hint_mp3_128": "Smallest files · ~3 MB per song · basic quality",- "quality_hint_mp3_192": "Balanced · ~5 MB per song · plays everywhere",- "quality_hint_mp3_320": "MP3 at max · ~7 MB per song · maximum compatibility",- "quality_hint_aac_192": "Sounds great, small files, plays everywhere · ~5 MB per song",- "quality_hint_aac_256": "Premium lossy · ~6 MB per song · transparent quality",- "quality_hint_opus_160": "Most efficient · ~4 MB per song · may not play on older devices",- "quality_hint_flac": "Lossless · keeps source file size",- "quality_hint_flac_cd": "Lossless CD quality · ~30 MB per song",- "quality_hint_flac_hires": "Studio quality · 24-bit/96 kHz · ~80 MB per song",- "quality_hint_wav": "Uncompressed PCM · ~50 MB per song · largest files",- "sources_title": "Music sources",- "sources_short": "Sources",- "sources_subtitle": "Where to look for tracks",- "sources_intro": "When you ask omniget to fetch a song by name, it tries these sources in order. Drag with arrows to reorder.",- "source_status_connected": "Connected",- "source_status_not_connected": "Not connected",- "source_status_unavailable": "Coming soon",- "source_connect": "Connect",- "source_inactive_header": "Not in rotation",- "source_reset_default": "Restore default order",- "source_move_up": "Move up",- "source_move_down": "Move down",- "qobuz_title": "Qobuz",- "qobuz_state_connected": "Connected",- "qobuz_state_disconnected": "Not connected",- "qobuz_intro": "Connect your Qobuz account to get lossless tracks (FLAC up to 24-bit/192 kHz). Requires an active Qobuz subscription.",- "qobuz_email_label": "Qobuz email",- "qobuz_password_label": "Password",- "qobuz_pwd_show": "Show password",- "qobuz_pwd_hide": "Hide password",- "qobuz_privacy": "Stored locally on your device only. Never sent to omniget servers.",- "qobuz_connect": "Connect",- "qobuz_connecting": "Connecting…",- "qobuz_connected": "Connected to Qobuz",- "qobuz_disconnected": "Disconnected from Qobuz",- "qobuz_disconnect": "Disconnect",- "qobuz_disconnect_confirm": "Remove saved Qobuz credentials?",- "qobuz_signed_in_as": "Signed in as",- "qobuz_connected_hint": "Qobuz is now in the source pool. Use the Sources panel to control its priority.",- "qobuz_test_again": "Test connection",- "qobuz_testing": "Testing…",- "qobuz_test_ok": "Qobuz login works",- "qobuz_test_failed": "Qobuz test failed: {{error}}",- "nav_aria": "Music navigation",- "sidebar_hint_title": "Tip",- "sidebar_hint_body": "Music keeps playing while you navigate between Courses, Notes and other sections.",- "nav_search": "Search",- "playlists_section": "Playlists",- "playlists_title": "Playlists",- "playlists_empty_title": "You have no playlists yet",- "playlists_empty_body": "Create a playlist to group your favorite tracks and listen in sequence.",- "new_playlist": "New playlist",- "playlist_name_placeholder": "Playlist name…",- "no_playlists_yet": "No playlists yet.",- "added_to_playlist": "Added to \"{{name}}\"",- "playlist_duplicate": "Already in \"{{name}}\"",- "created_playlist_with_track": "\"{{name}}\" created and track added",- "playlist_empty_title": "Playlist is empty",- "playlist_empty_body": "Add tracks via the ⊕ menu on any track row.",- "playlist_not_found": "Playlist not found.",- "playlist_deleted": "Playlist deleted",- "click_to_rename": "Click to rename",- "delete_playlist": "Delete playlist",- "delete_confirm_title": "Delete playlist?",- "delete_confirm_msg": "Playlist \"{{name}}\" will be deleted. Tracks remain in your library.",- "delete_confirm": "Delete",- "refresh_covers_action": "Refresh covers",- "refresh_covers_title": "Refresh track covers?",- "refresh_covers_body": "We'll fetch one cover per track from YouTube for the {{count}} tracks in this playlist. Should take a few seconds.",- "refresh_covers_hint": "Existing covers for tracks with a known YouTube ID will be replaced.",- "refresh_covers_confirm": "Refresh now",- "refresh_covers_progress": "Updating covers — {{current}} / {{total}}",- "refresh_covers_done": "{{updated}} cover(s) updated · {{skipped}} skipped",- "transcode_eyebrow": "Tools",- "transcode_title": "Batch transcode video → audio",- "transcode_lead": "Convert a folder of downloaded videos into audio files. Each output keeps the per-video thumbnail as cover.",- "transcode_pick_input": "Pick folder with videos",- "transcode_pick_output": "Pick output folder",- "transcode_input_label": "Input folder",- "transcode_input_placeholder": "Folder with .mp4 / .mkv / .webm files",- "transcode_output_label": "Output folder (optional)",- "transcode_output_placeholder": "Defaults to input folder",- "transcode_format_label": "Output format",- "transcode_quality_label": "Bitrate",- "transcode_browse": "Pick…",- "transcode_start": "Start transcode",- "transcode_starting": "Starting…",- "transcode_cancel": "Cancel transcode",- "transcode_missing_input": "Pick an input folder first.",- "transcode_state_running": "Transcoding…",- "transcode_state_done": "Done",- "transcode_state_cancelled": "Cancelled",- "transcode_eta": "ETA",- "transcode_done": "{{current}} of {{total}} files transcoded",- "transcode_cancelled": "Transcode cancelled",- "nav_transcode": "Transcode",- "eyebrow_artist": "Artist",- "discography": "Discography",- "queue_title": "Queue",- "queue_aria": "Playback queue",- "queue_empty": "Queue is empty — click any track to start.",- "queue_toggle": "Toggle queue",- "search_hint": "Type a track title, artist or album.",- "exit": "Exit",- "featured_album": "Featured album",- "by": "By",- "start_listening": "Start listening",- "open_album": "Open album",- "shelf_listen_now": "Listen now",- "shelf_top_artists": "Top Artists",- "jump_back_in": "Jump back in",- "albums_empty": "No albums found.",- "artists_empty": "No artists found.",- "sort_added": "Added",- "sort_name": "Name A→Z",- "sort_year": "Year",- "sort_track_count": "Most tracks",- "manage_folders": "Manage folders",- "roots_title": "Music folders",- "roots_hint": "Folders we scan for audio. Disable one to ignore without deleting from disk. Removing here does not delete any file.",- "roots_empty": "You haven't added any music folder yet.",- "root_missing": "missing",- "root_remove": "Remove",- "root_removed": "Folder removed: {{path}}",- "nav_albums": "Albums",- "nav_artists": "Artists",- "nav_playlists": "Playlists",- "local_search_hint": "Type a title, artist or album to search your local library.",- "history_now": "now",- "history_unplayable": "Couldn't play that entry — track isn't available anymore.",- "history_clear_confirm_yt": "This will erase your entire YouTube history. Continue?",- "history_clear_confirm_local": "This will erase your entire local history. Continue?",- "history_clear": "Clear",- "history_title": "History",- "history_title_yt": "YouTube history",- "history_empty_title_yt": "Your YouTube history starts when you play something",- "history_empty_cta_yt": "Search YouTube",- "history_empty_title_local": "Your history starts when you play something from your library",- "history_empty_cta_local": "Search library",- "history_filter_local": "Local",- "history_filter_spotify": "Spotify",- "history_filter_soundcloud": "SoundCloud",- "history_filter_aria": "Filter by source",- "history_remove_aria": "Remove from history",- "history_entries_removed": "entries removed",- "youtube": {- "shelf_group": "From YouTube",- "shelf_charts": "Music charts",- "shelf_charts_empty": "Charts are out of reach right now. Try in a bit.",- "shelf_new_releases": "New releases",- "shelf_new_releases_empty": "No new releases right now. Come back tomorrow.",- "shelf_moods_and_genres": "Moods & genres",- "moods_empty": "Moods unavailable right now. Try in a bit.",- "shelf_trending": "Trending now",- "shelf_trending_error": "YouTube is unreachable right now. Try again in a few minutes.",- "shelf_quick_picks": "For you",- "shelf_quick_picks_empty": "We're still learning your taste. Play a few tracks to get started.",- "shelf_daily_discover": "Daily discover",- "shelf_daily_discover_empty": "Play a track you like and we'll suggest what could come next.",- "shelf_continue_watching": "Keep watching",- "shelf_continue_watching_empty": "Nothing to resume yet. Play something to start.",- "shelf_subscriptions": "Subscriptions",- "shelf_subscriptions_empty": "Follow a channel to see new uploads here.",- "explore_title": "Explore",- "explore_tagline": "Find new music without committing to anything.",- "back_to_explore": "Back to Explore",- "mood_loading_error": "Couldn't load this mood. Try again.",- "mood_empty": "This mood has no playlists right now. Maybe later.",- "hub_title": "YouTube",- "hub_tagline": "YouTube music and videos in one place.",- "search_filter_aria": "Filter results",- "search_filter_all": "All",- "search_filter_music": "Music",- "search_filter_videos": "Videos",- "search_filter_channels": "Channels",- "search_filter_playlists": "Playlists",- "search_sort_aria": "Sort results",- "search_sort_relevance": "Relevance",- "search_sort_recent": "Most recent",- "search_sort_views": "Most viewed",- "search_history_label": "Recent searches",- "search_history_clear": "Clear history",- "search_history_remove_aria": "Remove \"{{query}}\" from history",- "subscribers_count_label": "subscribers",- "creator_by": "By {{name}}",- "channel_subscribe": "Subscribe",- "channel_subscribed": "Subscribed",- "channel_unsubscribe_aria": "Unsubscribe",- "channel_no_items": "Nothing here yet.",- "search_placeholder": "Search YouTube…",- "search_hint": "Start typing to find videos, channels and playlists.",- "connect_title": "Connect your YouTube account",- "connect_body": "Your library, subscriptions and what you were watching show up here after you connect. Without an account, only Search and Explore work (anonymous).",- "connect_step_missing_label": "How to connect",- "connect_step_missing": "Install the Loop extension in your browser and export cookies to the path below. Come back — the app detects automatically.",- "connect_step_no_youtube_label": "Almost there",- "connect_step_no_youtube": "Loop is installed but you haven't signed in to YouTube in your browser. Open youtube.com and log in — cookies will appear here automatically.",- "connect_cta_setup": "Set up connection",- "connect_cta_anon": "Browse anonymously",- "connect_footnote": "Cookies stay on your computer — nothing is sent to our servers.",- "anon_speed_dial_aria": "Anonymous YouTube access"- },- "spotify_connected": "Connected to Spotify",- "spotify_auth_failed": "Authentication failed",- "spotify_library_updated": "Library updated",- "spotify_auth_waiting": "Waiting for authorization in the browser. Come back after you accept.",- "spotify_disconnected": "Disconnected from Spotify",- "spotify_play_via_yt": "Playing via YouTube (Free mode)",- "spotify_search_aria": "Search on Spotify",- "spotify_search_label": "Search",- "spotify_refresh_label": "Refresh",- "spotify_prev_aria": "Previous",- "spotify_next_aria": "Next"- },- "library": {- "title": "Library",- "subtitle": "Your courses, videos and PDFs in one place.",- "empty_browse_title": "Your library is still empty",- "empty_browse_description": "Point to your course folders or import videos from Telegram. Nothing is copied or moved.",- "empty_add_folder_title": "Add a video folder",- "empty_add_folder_desc": "Point to where your courses already are. No copy, no move.",- "empty_add_folder_cta": "Choose folder",- "empty_telegram_title": "Import from Telegram",- "empty_telegram_desc": "Download videos straight from channels you've joined.",- "empty_telegram_cta": "Connect",- "pinned_strip_aria": "Pinned folders",- "pin_action": "Pin",- "pin_action_active": "Pinned",- "pin_action_title": "Pin this folder",- "unpin_action": "Unpin",- "unpin_action_title": "Unpin this folder",- "pin_failed": "Pin failed: {{msg}}",- "unpin_failed": "Unpin failed: {{msg}}",- "siblings_aria": "Sibling folders",- "siblings_empty": "No sibling folders",- "view_mode_aria": "View mode",- "view_mode_grid": "Grid",- "view_mode_list": "List",- "back_toast": "Back to {{folder}}",- "address_bar_placeholder": "Paste or type a path…",- "address_bar_open": "Edit path",- "new_folder": "New folder",- "new_folder_placeholder": "Folder name",- "ctx_open": "Open",- "ctx_rename": "Rename",- "ctx_delete": "Delete (Trash)",- "ctx_show_in_explorer": "Show in file manager",- "delete_confirm_title": "Move to Trash?",- "delete_confirm_msg_folder": "The folder \"{{name}}\" and everything inside will be moved to the system Trash.",- "delete_confirm_msg_file": "\"{{name}}\" will be moved to the system Trash.",- "delete_confirm_btn": "Move to Trash",- "delete_toast_done": "\"{{name}}\" moved to Trash",- "last_watched_label": "Last watched",- "roots_button_hint": "Folders the library scans for courses and videos",- "empty_with_roots_one": "Detected 1 configured folder but no courses indexed yet.",- "empty_with_roots_other": "Detected {{count}} configured folders but no courses indexed yet.",- "empty_with_roots_cta": "Rescan now",- "pin_added_toast": "\"{{name}}\" pinned",- "pin_removed_toast": "Pin removed",- "root_missing_label": "missing",- "root_missing_hint": "Drive unplugged? Folder deleted? Reconnect or remove here.",- "mode_telegram_disconnected_suffix": "(not connected)",- "browse_sort_label": "Sort",- "browse_sort_name_asc": "Name A→Z",- "browse_sort_name_desc": "Name Z→A",- "browse_sort_size_desc": "Size",- "browse_sort_recent": "Modified",- "selection_count_one": "1 selected",- "selection_count_other": "{{count}} selected",- "selection_clear": "Clear selection",- "selection_delete": "Delete selected",- "selection_delete_confirm_title": "Delete {{count}} item(s)?",- "selection_delete_confirm_msg": "Items will be moved to the system Trash. You can restore from there if you change your mind.",- "selection_delete_done": "{{count}} item(s) moved to Trash",- "selection_delete_partial": "{{ok}} OK · {{fail}} failed",- "open_in_new_tab": "Open in new tab",- "tab_close": "Close tab",- "tab_new": "New tab",- "empty": "No courses indexed yet. Run a scan from Settings.",- "error_loading_notes": "Couldn't load your notes. Try reloading or contact support if it persists.",- "health_title": "Library health",- "health_ok": "Everything's where it should be.",- "health_banner_one": "1 file needs your attention",- "health_banner_many": "{{count}} files need your attention",- "health_banner_part_empty": "{{count}} empty",- "health_banner_part_missing": "{{count}} missing",- "health_banner_part_orphan": "{{count}} orphan",- "health_banner_cta": "Review",- "health_banner_aria": "Open library health report",- "health_zero_byte": "Empty videos",- "health_zero_byte_hint": "These didn't finish downloading. Re-download the course, or delete the empty file and rescan.",- "health_missing": "Missing videos",- "health_missing_hint": "Tracked in the database but not on disk — usually moved or deleted outside the app. Cleanup only removes entries when the course folder still exists, so unmounted drives are safe.",- "health_orphan_desc": "Orphan description.html",- "health_orphan_hint": "Folders with description text but no video. Often a scraped \"free preview\" that didn't download, or a text-only lesson the scanner skipped.",- "health_checking": "Checking…",- "health_recheck": "Re-check",- "cleanup_busy": "Cleaning…",- "filters": "Filters",- "filter_status": "Status",- "filter_playlist": "Playlist",- "filter_tags": "Tags",- "all_courses": "All courses",- "manage_playlists": "Manage playlists →",- "clear_filters": "clear",- "tags_hint": "Click → include · Shift+Click → exclude",- "loading_more": "Loading more courses…",- "status_all": "All",- "status_in_progress": "In progress",- "status_not_started": "Not started",- "status_completed": "Completed",- "status_aria": "Status",- "cleanup_btn": "Clean orphan entries",- "cleanup_orphan_delete": "Delete file",- "cleanup_confirm_title": "Clean missing-video entries",- "cleanup_confirm_message": "Will remove {{count}} lesson(s) whose video file no longer exists on disk. Courses whose entire folder is gone are preserved (likely an unmounted drive). Courses left with no lessons are removed too. No files are deleted from disk.",- "cleanup_done": "{{lessons}} lesson(s) removed · {{courses}} course(s) removed · {{kept}} preserved (unmounted drive)",- "cleanup_force_btn": "Force (include courses with missing folders)",- "cleanup_force_hint": "Use this if you renamed/deleted folders intentionally. WARNING: disconnected external drives will be wiped too.",- "cleanup_force_confirm_title": "Force full cleanup",- "cleanup_force_confirm_message": "Will remove ALL {{count}} entries, INCLUDING courses whose entire folder no longer exists on disk. Use only if you're sure folders were renamed/deleted and this isn't a disconnected external drive. Orphan courses are removed too. No files are deleted from disk.",- "notes_pages_section": "Pages",- "notes_page_not_found": "not found",- "notes_no_references": "No references yet.",- "notes_no_pages": "No pages yet.",- "notes_new_page": "New page",- "notes_rename_page": "Rename page",- "notes_filter_pages": "Filter pages…",- "notes_page_name_placeholder": "Page name",- "notes_journal_history": "Journal history",- "notes_history_recent": "Recent history",- "notes_no_open_page": "No page open. Create or select one in the sidebar.",- "search_placeholder": "Search courses...",- "sort_label": "Sort",- "sort_title": "Name",- "sort_recent": "Recently added",- "sort_progress": "Progress",- "sort_name": "Name",- "sort_added": "Added",- "sort_last_watched": "Last watched",- "favorites_only": "Favorites only",- "lessons_count": "{{count}} lesson(s)",- "progress_pct": "{{pct}}% complete",- "favorite_on": "Unfavorite",- "favorite_off": "Favorite",- "platform": "Platform",- "status": "Status",- "status_new": "New",- "status_empty": "Empty",- "has_gaps": "Has gaps",- "has_notes": "Has notes",- "has_cards": "Has cards",- "no_platforms": "Set a platform on a course to filter here.",- "more_filters": "More filters",- "tag": "Tag",- "tags": "Tags",- "tag_add": "Add tag…",- "reset": "Reset",- "view_grid": "Grid",- "view_list": "List",- "lessons": "lessons",- "notes": "notes",- "gap": "gap",- "recent": "Recent",- "history": "History",- "history_empty": "No recent activity",- "mode_browse": "Folders & files",- "mode_courses": "My courses",- "browse_empty": "Empty folder.",- "videos": "videos",- "roots": "Library roots",- "loose_lessons": "Loose lessons",- "kind_all": "All",- "kind_course": "Courses",- "kind_media": "Videos",- "kind_media_badge": "Video",- "favorite": "Favorite",- "resume": "Resume",- "roots_button": "Where to look",- "roots_add_btn": "Add folder",- "roots_remove": "Remove",- "roots_remove_tooltip": "Remove this folder",- "roots_default": "Default",- "roots_empty": "No folders configured.",- "roots_hint": "Toggle folders on or off to include them in scans.",- "rescan_now": "Rescan now",- "rescanning": "Scanning...",- "rescan_ok": "{{courses}} course(s), {{lessons}} lesson(s)",- "browse_empty_roots": "Add a folder to get started.",- "browse_breadcrumb_root": "Roots",- "videos_count": "{{count}} video(s)",- "video": "Video",- "folder": "Folder",- "back": "Back",- "watch_title": "Watching",- "watch_back": "Back to library",- "watch_not_found": "No video selected.",- "watch_file_missing": "File not found.",- "mode_telegram": "Import from Telegram",- "telegram": {- "plugin_missing_title": "Telegram plugin not found",- "plugin_missing_body": "Install the Telegram plugin from the marketplace to access your chats here.",- "connected_as": "Connected as {{phone}}",- "coming_soon": "Telegram browser coming soon — auth is wired up.",- "auth": {- "title": "Connect Telegram",- "subtitle": "Sign in to browse your chats and media.",- "tab_qr": "QR code",- "tab_phone": "Phone",- "qr_hint_scan": "Open Telegram › Settings › Devices › Link Desktop Device",- "qr_expires_in": "Refreshes in {{sec}}s",- "phone_input": "Phone number (E.164)",- "code_input": "Code",- "send_code": "Send code",- "code_resend": "Resend",- "password_title": "Two-step verification",- "password_hint": "Hint: {{hint}}"- },- "chats_title": "Your Telegram chats",- "chats_subtitle": "Open a chat to browse its media.",- "chats_empty": "No chats yet.",- "chat_empty": "No media of this type in this chat.",- "chat_type_private": "Private",- "chat_type_group": "Group",- "chat_type_channel": "Channel",- "crumb_root": "Telegram",- "filter_all": "All",- "filter_photo": "Photos",- "filter_video": "Videos",- "filter_document": "Documents",- "filter_audio": "Audio",- "filter_gif": "GIFs",- "filter_round_video": "Round videos",- "filter_round_voice": "Voice",- "filter_photo_video": "Photos+Videos",- "filter_chat_photos": "Chat photos",- "downloads_view_panel": "Open downloads panel",- "album_title": "Album",- "album_prev": "Previous",- "album_next": "Next",- "album_indicator": "Album ({{n}} items)",- "folder_autoscan": "Scan chats for drive folders",- "folder_autoscan_desc": "Find channels marked with [og] in title or [telegram-drive-folder] in description.",- "folder_autoscan_running": "Scanning chats…",- "folder_autoscan_result": "{{n}} channels detected as drive folders",- "folder_autoscan_none": "No drive folders detected.",- "keymap_title": "Keyboard shortcuts",- "keymap_search": "Focus search",- "keymap_clear": "Clear / dismiss",- "keymap_nav": "Navigate",- "keymap_open": "Open",- "keymap_open_player": "Open in player",- "keymap_select_all": "Select all visible",- "keymap_delete": "Delete selection",- "keymap_play_pause": "Play / pause",- "keymap_help": "Show this help",- "keymap_next_prev": "Next / previous item",- "keymap_fullscreen": "Toggle fullscreen",- "keymap_close": "Close player",- "keymap_volume": "Volume up / down",- "keymap_mute": "Mute / unmute",- "keymap_seek": "Seek 10s back / forward",- "output_dir_pick": "Choose folder…",- "output_dir_reset": "Use default",- "crumb_clear_search": "Clear search",- "delete_done_local": "{{n}} item(s) removed locally",- "delete_done_revoke": "{{n}} item(s) deleted for everyone (irreversible)",- "smart_yt-courses": "YouTube courses",- "load_more": "Load more",- "downloads": {- "title": "Downloads",- "empty": "No downloads yet.",- "download": "Download",- "no_output_dir": "Output folder not configured.",- "clear_finished": "Clear finished",- "toggle": "Toggle downloads panel",- "status_queued": "Queued",- "status_downloading": "Downloading",- "status_done": "Done",- "status_error": "Error",- "status_cancelled": "Cancelled",- "open_in_reader": "Open in reader"- },- "search_chats": "Filter chats by title…",- "search_chats_empty": "No chats match.",- "search_media": "Filter by file name…",- "search_media_empty": "No items match the filter.",- "search_server": "Search server",- "clear_server_search": "Clear server search",- "favorites": "Favorites",- "favorites_empty": "No favorites yet. Star items inside a chat to pin them here.",- "favorites_count_suffix": "items",- "bookmark": "Add to favorites",- "unbookmark": "Remove from favorites",- "selected": "{{n}} selected",- "select_all_visible": "Select all",- "bulk_download": "Download",- "bulk_bookmark": "Favorite",- "clear_selection": "Clear selection",- "smart_pdfs": "PDFs",- "smart_videos": "Videos",- "smart_audios": "Audios",- "smart_images": "Images",- "smart_untagged": "Untagged",- "smart_empty": "No favorites match this folder. Star items to populate it.",- "tag_add": "Add tag",- "tag_add_short": "tag",- "tag_remove": "Remove tag",- "tag_placeholder": "tag…",- "status_connected": "Connected",- "status_checking": "Checking…",- "status_disconnected": "Disconnected",- "settings_title": "Telegram settings",- "settings_output_dir": "Download folder",- "settings_prune_cache": "Clear thumbnail cache",- "settings_logout": "Disconnect",- "saved_messages": "Saved Messages",- "saved_messages_hint": "Your personal stash",- "verified": "Verified",- "muted": "Muted",- "pinned": "Pinned",- "ctx_open": "Open chat",- "ctx_mark_read": "Mark as read",- "ctx_pin": "Pin to top",- "ctx_unpin": "Unpin",- "ctx_mute": "Mute notifications",- "ctx_unmute": "Unmute notifications",- "tabs_label": "Chat filters",- "tab_all": "All",- "tab_unread": "Unread",- "tab_private": "Personal",- "tab_group": "Groups",- "tab_channel": "Channels",- "tab_folder": "Drives",- "online": "Online",- "player_pip": "Picture-in-picture",- "flood_wait_hint": "Telegram asked us to wait before more requests",- "list_trimmed_hint": "Showing first {{shown}} of {{total}} chats. Use search to find specific ones.",- "auto_resume_downloads": "Auto-resume downloads",- "auto_resume_downloads_hint": "On app start, resume downloads that were in progress.",- "thumb_cache_limit": "Thumbnail cache limit",- "bulk_confirm_threshold": "Confirm bulk actions above",- "bulk_confirm_threshold_unit": "items",- "player_not_playable": "This media type can't be played inline.",- "player_kbd_hint": "Esc close · J/↓ next · K/↑ previous",- "filter_webpage": "Links",- "webpage_open_external": "Open in browser",- "allow_remote_delete": "Allow remote delete",- "allow_remote_delete_hint": "Lets the bulk delete button erase messages from Telegram. Off by default.",- "bulk_delete": "Delete",- "bulk_copy": "Copy",- "bulk_move": "Move",- "move_needs_delete_perm": "Enable \"Allow remote delete\" in settings to move (move = copy + delete original).",- "delete_confirm_title": "Delete remote messages?",- "delete_confirm_body": "{{n}} messages will be deleted from Telegram. Cannot be undone.",- "move_to": "Move to…",- "copy_to": "Copy to…",- "upload_files": "Upload",- "upload_hint": "Send files to this chat",- "kbd_help": "Open this help",- "kbd_esc": "Close player / clear selection",- "kbd_click": "Open player",- "kbd_ctrl_click": "Toggle selection",- "kbd_shift_click": "Range selection",- "kbd_ctrl_a": "Select all visible",- "kbd_next": "Next item (player)",- "kbd_prev": "Previous item (player)",- "kbd_space": "Play/pause native control",- "title_edit_hint": "Double-click to edit caption",- "player_book_hint": "PDF/EPUB — download to read in the embedded reader.",- "load_more_chats": "Load more chats",- "refreshing_in_background": "Updating list…",- "create_folder": "New folder",- "create_folder_title": "Create new folder",- "create_folder_hint": "Creates a private Telegram channel marked as a course folder.",- "create_folder_placeholder": "Folder name (e.g. Linear Algebra)",- "chats_empty_hint": "Create your first folder to start hosting courses on Telegram.",- "folder_rename": "Rename",- "folder_delete": "Delete",- "folder_rename_title": "Rename folder",- "folder_delete_title": "Delete folder?",- "folder_delete_body": "The Telegram channel will be removed permanently along with all uploads. Cannot be undone.",- "drop_to_upload_title": "Drop to upload",- "drop_to_upload_hint": "Files will be sent to {{chat}}",- "watched": "Watched",- "resume_at": "Resume at {{time}}",- "player_speed": "Playback speed"- },- "home_continue_title": "Continue where you left off",- "home_continue_eyebrow": "Recent",- "home_continue_empty": "No courses in progress yet. Start a lesson to see it here.",- "home_continue_next": "Next: {{title}}",- "home_continue_current": "On: {{title}}",- "home_news_title": "With updates",- "home_news_eyebrow": "New lessons",- "home_news_count_one": "{{count}} new lesson",- "home_news_count_other": "{{count}} new lessons",- "home_recently_title": "Recently added",- "home_recently_eyebrow": "New",- "home_platform_eyebrow": "Platform",- "home_subject_eyebrow": "Subject",- "home_empty_title": "Your library is empty",- "home_empty_desc": "Add a folder with courses to begin.",- "home_empty_cta": "Add courses folder",- "home_load_error": "Failed to load library: {{error}}",- "view_home": "Home",- "view_catalog": "Catalog",- "platform_generic": "Other platforms"- },- "player": {- "title": "Player",- "placeholder": "Select a lesson from the library to start."- },- "course": {- "back": "Back to library",- "continue": "Continue watching",- "start": "Start course",- "lessons_total": "{{count}} lessons",- "progress": "{{completed}} of {{total}} completed ({{pct}}%)",- "no_lessons": "No lessons found for this course.",- "loose_lessons": "Lessons",- "mark_complete": "Mark as complete",- "mark_incomplete": "Mark as not watched",- "search_placeholder": "Search lessons...",- "resume_label": "Resume from here"- },- "attachments": {- "title": "Attachments ({{count}})"- },- "lesson": {- "progress_label": "Lesson progress",- "back_to_course": "Back to course",- "next": "Next lesson",- "prev": "Previous lesson",- "mark_complete": "Mark as complete",- "completed": "Completed",- "loading": "Loading video...",- "no_video": "Video file not found on disk.",- "autoplay_title": "Next up",- "autoplay_in": "Playing next in {{seconds}}s...",- "autoplay_play_now": "Play now",- "autoplay_cancel": "Cancel autoplay",- "autoplay_last": "You finished the last lesson.",- "speed": "Speed",- "theater_on": "Exit theater mode",- "theater_off": "Theater mode",- "theater_hint": "Hide sidebar and panels (T)",- "description_title": "Description",- "clip": "Clip last 60s",- "clip_loading": "Clipping…",- "clip_done": "Clip saved",- "clip_failed": "Clip failed",- "clip_no_video": "Video not loaded yet",- "clip_aria": "Save last 60 seconds as clip"- },- "notes": {- "title": "Notes",- "placeholder": "Notes you take while studying will appear here.",- "empty": "No notes yet. Take one while watching a lesson.",- "add_placeholder": "Write a note... (markdown supported)",- "quick_placeholder": "Quick note at {{time}} — press Enter to save",- "add": "Add note",- "save": "Save",- "cancel": "Cancel",- "edit": "Edit",- "delete": "Delete",- "confirm_delete": "Delete this note?",- "jump_to": "Jump to {{time}}",- "panel_title": "Notes for this lesson",- "at_time": "at {{time}}",- "no_timestamp": "No timestamp",- "quick_note_hint": "Press N while watching to capture a note at the current time.",- "recent": "Recent notes",- "loading": "Loading notes...",- "course_col": "Course",- "lesson_col": "Lesson",- "body_col": "Note",- "search_placeholder": "Search your notes...",- "tab_recent": "Recent",- "tab_daily": "Daily review",- "cal_today": "Today",- "cal_selected": "{{date}} — {{count}} note(s)",- "empty_day": "No notes on this day.",- "new": "New note",- "preview": "Preview",- "convert": "Convert to flashcard",- "export_md": "Export .md",- "export_pdf": "Export PDF",- "to_flashcard": "→ Flashcard",- "pick_deck": "Deck...",- "empty_front": "(untitled)",- "editor_placeholder": "Write in Markdown + LaTeX (use $...$ and $$...$$)",- "select_or_new": "Select a note or create a new one.",- "filter": {- "all": "All",- "notes": "Notes",- "bookmarks": "Bookmarks"- },- "read_mode": "Read",- "edit_mode": "Edit",- "open_menu": "More options",- "menu_label": "Note options",- "delete_title": "Delete note?",- "delete_body": "The note will be removed permanently. Cannot be undone.",- "toggle_preview": "Preview",- "export_menu": "Export…",- "untitled": "(untitled)",- "scope_global": "Unlinked",- "scope_course": "Course",- "scope_module": "Module",- "scope_lesson": "Lesson"- },- "achievements": {- "title": "Achievements",- "subtitle": "Local XP — no leaderboard, no social comparison",- "loading": "Loading…",- "level_tag": "Level",- "to_next": "to level {{next}}",- "level_progress": "{{pct}}% to next level",- "history_title": "Recent XP history",- "history_empty": "Nothing here yet. Study something to start earning XP.",- "reset_title": "Reset gamification",- "reset_desc": "Clears XP, achievements, and counters. Does not affect course progress.",- "reset_confirm_title": "Reset gamification",- "reset_confirm_message": "XP, level, achievements, and counters will be cleared. This action cannot be undone.",- "minutes_ago": "{{n}} min ago",- "hours_ago": "{{n}} h ago",- "day_ago": "{{n}} day ago",- "days_ago": "{{n}} days ago",- "filter_all": "All",- "filter_xp": "XP",- "filter_lessons": "Lessons",- "filter_focus": "Focus",- "filter_streak": "Streak",- "tier_bronze": "bronze",- "tier_silver": "silver",- "tier_gold": "gold",- "unlocked_prefix": "unlocked",- "reset_done": "Reset done",- "reset_confirm_label": "Reset",- "filter_aria": "Category filters",- "tree_link": "Tree",- "charts_link": "Charts",- "label_xp_100": "First 100 XP",- "label_xp_500": "500 XP",- "label_xp_1000": "Thousand XP",- "label_xp_5000": "5k XP",- "label_xp_10000": "10k XP",- "label_lessons_1": "First lesson",- "label_lessons_10": "10 lessons",- "label_lessons_50": "50 lessons",- "label_lessons_100": "100 lessons",- "label_focus_60": "1h focused",- "label_focus_600": "10h focused",- "label_focus_6000": "100h focused",- "label_streak_3": "3 days in a row",- "label_streak_7": "1-week streak",- "label_streak_30": "30-day streak",- "label_streak_100": "100-day streak",- "desc_xp_100": "Earn 100 XP studying",- "desc_xp_500": "Earn 500 XP",- "desc_xp_1000": "1000 XP milestone",- "desc_xp_5000": "Five thousand XP collected",- "desc_xp_10000": "Ten thousand XP — you're dedicated",- "desc_lessons_1": "Complete your first lesson",- "desc_lessons_10": "Complete 10 lessons",- "desc_lessons_50": "Half-century of lessons",- "desc_lessons_100": "A hundred lessons completed",- "desc_focus_60": "60 minutes of focus collected",- "desc_focus_600": "600 minutes of focus collected",- "desc_focus_6000": "6000 minutes of focus — rare discipline",- "desc_streak_3": "Maintain streak for 3 days",- "desc_streak_7": "7 consecutive days studying",- "desc_streak_30": "A whole month of consistency",- "desc_streak_100": "Habit of steel"- },- "focus": {- "title": "Focus",- "placeholder": "Pomodoro and deep-work sessions live here.",- "intent_label": "What's this session for?",- "intent_prefix": "Studying",- "intent_placeholder": "thesis, calculus exam, sales certification...",- "intent_hint": "Shows up on your Discord if RPC is on. Leave empty if you'd rather not.",- "intent_for": "studying",- "rpc_default": "Focus session",- "preset_pomodoro": "Pomodoro",- "preset_short_break": "Short break",- "preset_long_break": "Long break",- "preset_deep": "Deep work",- "preset_long": "Deep work (50/10)",- "preset_custom": "Stopwatch",- "start": "Start",- "stop": "Stop",- "running": "Active",- "no_session": "No active session. Pick a preset to begin.",- "elapsed": "{{minutes}} min",- "today": "Today",- "this_week": "This week",- "history": "Session history",- "history_empty": "No sessions yet. Start one to build the streak.",- "no_history": "No sessions yet.",- "minutes_unit": "min",- "min": "min",- "break_toast": "Break time! Take 5.",- "done_toast": "Session finished: {{minutes}} min",- "pomodoro": "Pomodoro (min)",- "short_break": "Short break (min)",- "long_break": "Long break (min)",- "cycles": "Cycles until long break",- "deep": "Deep work",- "notify_end": "Notify on end",- "notify_sound": "Sound alert",- "auto_pause_player": "Auto-pause player",- "daily_target": "Daily target (min)",- "weekly_target": "Days per week",- "today_progress": "Today",- "interrupt": "Interrupt",- "start_now": "Start now",- "interrupted": "interrupted",- "cycles_today": "Cycles today: {{count}}",- "settings_title": "Timer preferences",- "min_per_week": " min/wk",- "auto_start": {- "breaks": "Auto-start breaks",- "focus": "Auto-start focus",- "cycles_until_long_break": "Cycles until long break"- },- "notifications": {- "title": "Notifications",- "enable": "Browser notification",- "sound": "End-of-cycle sound",- "sound_volume": "Volume",- "permission_denied": "Permission denied in browser",- "unsupported": "Notifications not supported in this browser"- },- "cycle_end": {- "focus_done": "Focus done",- "break_done": "Break done",- "long_break_done": "Long break done",- "body": "Come back when you're ready"- },- "hero_title": "Start",- "hero_subtitle": "Pick a subject and a preset to begin.",- "page_subtitle": "Focused sessions with Pomodoro or deep work",- "stats_subjects": "Active subjects",- "stats_today": "Today",- "stats_week": "This week",- "today_session": "{{n}} session · {{min}} min",- "today_sessions": "{{n}} sessions · {{min}} min",- "config_cycles": "Cycles and breaks",- "config_sounds": "Sounds and notifications",- "config_autostart": "Auto-start",- "stop_title": "Interrupt session?",- "stop_body": "The session will be marked as interrupted and won't count towards stats.",- "stop_confirm": "Interrupt",- "active_preset_label": "In focus",- "session_ended": "Session ended",- "settings_saving": "saving…",- "settings_saved": "saved ✓",- "acc_cycles_title": "Cycles",- "acc_cycles_summary": "{{focus}}min focus · {{break}}min break · {{cycles}}× until long break",- "acc_cycles_focus": "Focus (min)",- "acc_cycles_short": "Short break (min)",- "acc_cycles_long": "Long break (min)",- "acc_cycles_count": "Cycles before long break",- "acc_breaks_title": "Breaks & auto-start",- "acc_breaks_auto_yes": "auto-pause",- "acc_breaks_auto_no": "manual",- "acc_breaks_focus_yes": "auto-resume",- "acc_breaks_focus_no": "manual",- "acc_breaks_player_yes": "pauses player",- "acc_breaks_player_no": "ignores player",- "acc_breaks_check_breaks": "Auto-start breaks after focus",- "acc_breaks_check_focus": "Auto-resume focus after break",- "acc_breaks_check_player": "Pause video during focus break",- "acc_sounds_title": "Sounds & notification",- "acc_sounds_notify_on": "notification ON",- "acc_sounds_notify_off": "silent",- "acc_sounds_sound_on": "sound {{n}}%",- "acc_sounds_sound_off": "no sound",- "acc_sounds_check_notify": "Notify on cycle end",- "acc_sounds_check_sound": "Play sound on end",- "acc_sounds_volume": "Volume ({{n}}%)",- "unlimited_aria": "unlimited"- },- "subjects": {- "title": "Subjects",- "new": "New",- "name": "Name",- "color": "Color",- "weekly_minutes": "Weekly goal (min)",- "edit": "Edit subject",- "empty": "No subjects yet",- "archive": "Archive",- "unarchive": "Unarchive",- "archived_label": "Archived",- "active": "Active subject",- "none": "None",- "confirm_delete": "Delete this subject?",- "progress_today": "Subjects today",- "field": {- "name": "Name",- "color": "Color",- "weekly_target": "Weekly target (min)",- "daily_targets": "Daily targets (min)",- "daily_sum": "Weekly sum",- "distribute_equally": "Distribute equally"- },- "day": {- "mon": "Mon",- "tue": "Tue",- "wed": "Wed",- "thu": "Thu",- "fri": "Fri",- "sat": "Sat",- "sun": "Sun"- },- "progress": {- "status_not_started": "Not started",- "status_in_progress": "In progress",- "status_reached": "Goal reached",- "status_exceeded": "Goal exceeded"- }- },- "progress": {- "title": "Progress",- "placeholder": "Streak, daily activity and milestones.",- "no_data": "No progress yet — watch a lesson to get started.",- "streak": "Streak",- "streak_unit": "day",- "streak_unit_plural": "days",- "today_lessons": "Lessons today",- "today_minutes": "Focus minutes today",- "lessons_done": "Lessons completed",- "courses_done": "Courses completed",- "courses_completed": "Courses completed",- "lessons_completed_total": "Total lessons completed",- "heatmap_title": "Last 90 days",- "heatmap_empty": "No activity yet. Complete a lesson to light it up.",- "goal_daily": "Daily goal",- "goal_lessons": "{{current}} / {{target}} lessons",- "goal_minutes": "{{current}} / {{target}} focus minutes",- "goal_hit": "Goal hit!",- "goal_missed": "Keep going",- "legend_less": "Less",- "legend_more": "More",- "read_title": "Reading",- "read_streak": "Reading streak",- "read_today": "Today",- "read_week": "This week",- "read_total": "All time",- "read_active": "Currently reading",- "minutes_per_week": "Minutes per week",- "cards_per_day": "Lessons per day",- "time_by_subject": "Time by subject",- "retention": "Card pool",- "new": "New",- "learning": "Learning",- "review": "Review",- "no_subjects": "No subjects defined",- "page_subtitle": "Your study pace and goals",- "period_today": "Today",- "period_7d": "7d",- "period_30d": "30d",- "period_90d": "90d",- "hero_today": "Today",- "daily_goal_pct": "of daily goal",- "stat_lessons": "Lessons",- "stat_cards": "Cards",- "stat_minutes": "Focus (min)",- "stat_streak": "Streak",- "heatmap_hint": "Last {{n}} days · click for daily notes",- "chart_explore_library": "Browse library",- "chart_review_weak": "Review weak cards",- "chart_adjust_goals": "Adjust goals",- "streak_best": "best: {{n}}",- "chart_time_per_course": "Time per course",- "chart_time_per_course_empty": "No time logged in this period.",- "chart_time_period_days": "last {{n}} days",- "chart_activity_by_hour": "Activity by hour",- "chart_activity_hint": "sum of focus · 24h",- "chart_activity_empty": "No activity in the last {{n}} days.",- "chart_subject": "By subject",- "chart_subject_unit": "focus minutes",- "chart_subject_empty": "Create subjects and assign sessions to see the breakdown.",- "chart_subject_unassigned": "No subject",- "retention_title": "Retention (Anki)",- "retention_method": "FSRS-5",- "retention_stub_before": "Real retention will come from the Anki cross-DB query. For now, open",- "retention_link": "Anki Stats →",- "retention_stub_after": "to see retention, interval distribution, and review history.",- "recent_achievements": "Recent achievements",- "view_all": "View all →",- "time_today": "today",- "time_yesterday": "yesterday",- "time_days_ago": "{{n}} days ago",- "time_months_ago": "{{n}} months ago",- "time_years_ago": "{{n}} years ago",- "ach_label_xp_100": "100 XP collected",- "ach_label_xp_500": "500 XP collected",- "ach_label_xp_1000": "1,000 XP collected",- "ach_label_xp_5000": "5,000 XP collected",- "ach_label_xp_10000": "10,000 XP collected",- "ach_label_lessons_1": "First lesson",- "ach_label_lessons_10": "10 lessons completed",- "ach_label_lessons_50": "50 lessons completed",- "ach_label_lessons_100": "100 lessons completed",- "ach_label_focus_60": "1 hour of focus",- "ach_label_focus_600": "10 hours of focus",- "ach_label_focus_6000": "100 hours of focus",- "ach_label_streak_3": "3-day streak",- "ach_label_streak_7": "1-week streak",- "ach_label_streak_30": "30-day streak",- "ach_label_streak_100": "100-day streak"- },- "settings": {- "title": "Settings",- "placeholder": "Plugin preferences and library rescan.",- "tab_diagnostic": "Diagnostic",- "saving": "Saving…",- "saved": "Saved",- "categories_aria": "Categories",- "library_section": "Library",- "rescan": "Rescan library",- "rescan_desc": "Walk the downloads folder again and refresh courses, modules and lessons.",- "rescan_running": "Scanning...",- "rescan_done": "Found {{courses}} course(s) and {{lessons}} lesson(s) in {{ms}} ms.",- "rescan_error": "Rescan failed: {{message}}",- "stats_section": "Library stats",- "stat_courses": "Courses",- "stat_lessons": "Lessons",- "stat_completed": "Completed",- "stat_notes": "Notes",- "stat_decks": "Decks",- "stat_flashcards": "Flashcards",- "stat_focus": "Focus sessions",- "backup_section": "Backup & restore",- "export": "Export data",- "export_desc": "Download a JSON snapshot with courses, notes, flashcards, progress and focus history.",- "export_button": "Export JSON",- "exporting": "Exporting...",- "import": "Import data",- "import_desc": "Restore from a previously exported JSON file. Existing rows with matching IDs are overwritten.",- "import_button": "Choose file...",- "importing": "Importing...",- "import_replace": "Wipe current data before import (destructive)",- "import_done": "Imported {{courses}} courses, {{lessons}} lessons, {{notes}} notes, {{flashcards}} flashcards."- },- "read": {- "title": "Read",- "subtitle": "Library of books, PDFs and documents.",- "empty": "No books yet. Add folders and click Rescan.",- "scan_now": "Rescan now",- "scanning": "Scanning...",- "scan_done": "{{added}} added · {{updated}} updated · {{found}} found",- "open": "Open",- "back_to_library": "Back to library",- "no_book": "No book selected.",- "loading_page": "Loading page...",- "file_missing": "File not found on disk.",- "format_pdf": "PDF",- "format_epub": "EPUB",- "format_djvu": "DJVU",- "format_mobi": "MOBI",- "format_azw3": "AZW3",- "format_fb2": "FB2",- "format_cbz": "CBZ",- "format_cbr": "CBR",- "format_txt": "TXT",- "format_rtf": "RTF",- "format_html": "HTML",- "format_unknown": "File",- "filter_all": "All",- "filter_reading": "Reading",- "filter_finished": "Finished",- "filter_favorites": "Favorites",- "search_placeholder": "Search books...",- "sort_last_opened": "Last opened",- "sort_added": "Added",- "sort_title": "Title",- "sort_author": "Author",- "page_count": "{{count}} pages",- "progress_pct": "{{pct}}% read",- "not_started": "Not started",- "in_progress": "Reading",- "finished": "Finished",- "collections_title": "Collections",- "collection_new": "New collection",- "collection_name": "Collection name",- "no_collections": "No collections.",- "soon": "Reader under construction. For now, files open in the default app.",- "open_external": "Open in default app",- "loading_book": "Loading book…",- "txt_load_more": "Load more",- "page_of": "{{current}} of {{total}}",- "prev_page": "Previous page",- "next_page": "Next page",- "go_to": "Go to page",- "zoom_in": "Zoom in",- "zoom_out": "Zoom out",- "fit_width": "Fit width",- "manga_rtl": "Manga mode (right to left)",- "outline_title": "Outline",- "outline_empty": "No outline for this book.",- "pdfium_missing": "pdfium.dll not found. Run scripts/fetch-pdfium.ps1.",- "unsupported_format": "Format {{format}} is not yet supported in the internal reader. Use 'Open in default app'.",- "search_title": "Search",- "search_input": "Search in book…",- "search_no_hits": "No results.",- "search_hits_count": "{{n}} result(s)",- "bookmarks_title": "Bookmarks",- "bookmarks_empty": "No bookmarks. Press B to mark current page.",- "add_bookmark": "Bookmark page",- "remove_bookmark": "Remove bookmark",- "panel_outline": "Outline",- "panel_bookmarks": "Bookmarks",- "panel_search": "Search",- "highlight_save": "Highlight",- "highlight_delete": "Remove highlight",- "color_yellow": "Yellow",- "color_green": "Green",- "color_pink": "Pink",- "color_blue": "Blue",- "panel_highlights": "Highlights",- "highlights_empty": "Select text on the page and pick a color.",- "menu": "More options",- "export_md": "Export annotations (.md)",- "export_md_v2": "Export rich markdown (v2)",- "export_json": "Export annotations (.json)",- "export_pdf_burn_in": "Export annotated PDF",- "export_pdf_ok": "Annotated PDF · {{highlights}} highlights · {{bookmarks}} bookmarks · {{notes}} notes · {{inks}} inks",- "export_pdf_only": "PDF format only",- "export_ok": "Exported to {{path}}",- "export_failed": "Export failed: {{err}}",- "import_json": "Import annotations (.json)",- "import_ok": "{{imported}} imported · {{skipped}} duplicates · {{errors}} errors",- "import_failed": "Import failed: {{err}}",- "bulk_export_btn": "Export all (.md)",- "bulk_export_hint": "Export markdown v2 for every book into a folder",- "bulk_export_done": "{{written}} books exported · {{skipped}} skipped · {{kb}} KB",- "ink_toggle": "Pen mode",- "ink_undo": "Undo last ink",- "ink_color_black": "Black",- "ink_color_red": "Red",- "ink_color_blue": "Blue",- "chapter": "Chapter",- "chapter_of": "Ch {{current}} of {{total}}",- "prev_chapter": "Previous chapter",- "next_chapter": "Next chapter",- "no_outline": "No outline available.",- "theme_label": "Theme",- "theme_default": "Default",- "theme_day": "E-ink day",- "theme_night": "E-ink night",- "theme_sepia": "Sepia",- "effects_label": "Effects",- "effect_paper": "Paper filter",- "effect_cursor": "Reading line",- "reading_style": "Reading style",- "focus_mode": "Focus mode (F)",- "format_all": "All formats",- "roots_btn": "Folders ({{count}})",- "roots_title": "Book folders",- "roots_hint": "Choose where to look for books. Scanner walks these folders recursively and ignores dotfolders.",- "roots_empty": "No folders yet. Add one below.",- "roots_add_btn": "Add folder",- "roots_rescan": "Scan now",- "empty_no_roots_title": "No folders configured",- "empty_no_roots_hint": "Add a folder with books to start scanning. Courses and books use separate roots.",- "empty_no_roots_cta": "Choose folders",- "folder_label": "Folder",- "folder_all": "All folders",- "scan_removed": "removed {{n}} missing",- "view_scroll": "Continuous scroll",- "view_paged": "Paged view",- "tags_edit": "Edit tags",- "delete_book_title": "Delete book",- "delete_book_confirm": "\"{{title}}\" will be permanently deleted from disk and removed from your library. This cannot be undone.",- "delete_book_done": "\"{{title}}\" deleted from disk",- "delete_book_done_missing": "File was already gone — \"{{title}}\" removed from the library",- "delete_book_failed": "Could not delete book: {{err}}",- "enrich_metadata": "Enrich metadata",- "enrich_search_btn": "Search OpenLibrary",- "enrich_search_hint": "Looks up by current title + author. Picks best match from OpenLibrary.",- "enrich_apply_hint": "Pick which fields to overwrite:",- "enrich_apply_btn": "Apply",- "tags_empty": "No tags yet.",- "tags_input_placeholder": "type tag and press Enter",- "tags_add_btn": "Add tag",- "collections_btn": "Collections ({{count}})",- "collections_hint": "Group books across folders. Open a collection from the dropdown above to add or remove books.",- "collections_empty": "No collections yet.",- "collection_create": "New collection",- "collection_create_prompt": "Collection name?",- "collection_rename": "Rename",- "collection_delete_confirm": "Delete collection \"{{name}}\"? Books stay; only the grouping is removed.",- "collection_label": "Collection",- "collection_all": "All books",- "collection_add_book": "Add to active collection",- "collection_remove_book": "Remove from active collection",- "typo_title": "Typography",- "typo_font": "Font",- "typo_size": "Size",- "typo_line": "Line height",- "typo_justify": "Alignment",- "typo_justify_left": "Left",- "typo_justify_full": "Justify",- "typo_reset": "Reset to defaults",- "manga_nav_btn": "Manga",- "manga_title": "Manga",- "manga_subtitle": "Manga, manhwa, manhua, webtoons and other Japanese-style serialized comics.",- "series_empty_title": "No manga detected",- "series_empty_hint": "Add folders with CBZ/CBR files or unpacked chapter folders, then scan.",- "series_scan_done": "{{found}} titles · {{added}} new",- "series_count_chapters": "{{current}}/{{total}} ch",- "series_chapters": "Chapters",- "series_start_reading": "Start reading",- "series_continue_reading": "Continue reading",- "back_to_manga": "Back to manga",- "back_to_manga_detail": "Back to chapter list",- "clean_orphans_btn": "Clean orphans",- "clean_orphans_hint": "Remove DB rows pointing to files that no longer exist or that became series chapters.",- "orphans_cleared": "Removed {{missing}} missing · {{member}} now in manga · {{junk}} junk (LICENSE/README/tiny)",- "manga_clean_orphans_btn": "Clean missing folders",- "manga_clean_orphans_hint": "Remove local series whose folder no longer exists.",- "manga_orphans_cleared": "Removed {{n}} missing folder(s)",- "manga_clear_remote_btn": "Clear tracked",- "manga_clear_remote_confirm": "Delete all manga tracked from MangaDex? Local series stay.",- "manga_remote_cleared": "Removed {{n}} tracked manga",- "manga_clear_all_btn": "Clear ALL",- "manga_clear_all_confirm": "Delete every manga from the library, including local? This cannot be undone.",- "manga_all_cleared": "Removed {{n}} manga",- "mark_read": "Mark as read",- "mark_unread": "Mark as unread",- "spread_toggle": "Double page",- "entry_empty": "No pages found in this chapter.",- "kind_comic": "Comic",- "kind_manga": "Manga",- "kind_manhwa": "Manhwa",- "kind_manhua": "Manhua",- "kind_webcomic": "Webcomic",- "kind_light_novel": "Light Novel",- "discover_nav": "Discover",- "discover_title": "Discover series",- "discover_subtitle": "Search MangaDex and add to your library.",- "discover_source": "Source",- "discover_search_placeholder": "Search by title…",- "discover_empty": "No results. Try another search.",- "track_btn": "+ Track",- "tracking": "Adding…",- "tracked_ok": "Tracked. {{count}} new chapters ({{total}} total)",- "discover_source_all": "★ All enabled sources (global)",- "discover_global_summary": "{{alive}}/{{total}} sources responded · {{items}} items total",- "discover_global_failed": "{{n}} source(s) failed",- "book_discover_nav": "Books online",- "book_discover_title": "Discover books",- "book_discover_subtitle": "Search public domain libraries and download free ebooks straight into your library.",- "book_search_placeholder": "Search by title, author…",- "book_download_btn": "+ Download",- "book_downloading": "Downloading…",- "book_download_ok": "Downloaded ({{format}}). Added to library.",- "book_already_in_library": "Already in your library.",- "book_results_count": "{{n}} results",- "book_page_label": "Page {{current}}",- "book_metadata_only": "Metadata only",- "book_borrow_only": "Borrow on archive.org",- "book_borrow_only_hint": "This book is under Controlled Digital Lending. Free download is not available; borrowing requires an archive.org account.",- "annas_manage_link": "Advanced sources (Alt Library)",- "annas_title": "Alt Library — advanced source",- "annas_subtitle": "Shadow-library metasearch. Disabled by default. Jurisdiction-dependent.",- "annas_warning_title": "Legal & safety notice",- "annas_warning_body1": "Alt Library aggregates mirrors of LibGen, Z-Library, Sci-Hub and other shadow libraries. Material there may be copyrighted.",- "annas_warning_body2": "The legality of accessing, downloading or distributing that content varies per country. In some jurisdictions (Palau, for example) personal use is permitted; in others it is not. You are solely responsible for checking your own laws.",- "annas_warning_body3": "omniget-study merely provides a programmable HTTP client. Enabling this source downloads content that YOU chose to request. Keep your own compliance.",- "annas_status": "Source status",- "annas_acked_at": "Warning acknowledged on {{date}}",- "annas_not_acked": "Warning not yet acknowledged — enabling requires confirmation.",- "annas_on": "Active",- "annas_enable_btn": "Enable source",- "annas_disable_btn": "Disable",- "annas_enabled": "Alt Library enabled.",- "annas_disabled": "Alt Library disabled.",- "annas_log_title": "Log mirrors tried",- "annas_log_hint": "Optional local log of which domains/mirrors each download used. Stored locally only.",- "annas_domains_title": "Mirror domains",- "annas_domains_hint": "One per line. Try in order on each request. Reset to clear to defaults.",- "annas_domains_save": "Save domains",- "annas_domains_revert": "Revert",- "annas_domains_saved": "Domains saved.",- "annas_reset_title": "Reset everything",- "annas_reset_hint": "Clears acknowledgement, disables source, restores default domains. Does NOT remove already-downloaded files.",- "annas_reset_btn": "Reset Alt Library settings",- "annas_reset_confirm": "Reset all Alt Library settings? Source will be disabled and require re-acknowledgement.",- "annas_reset_done": "Settings reset.",- "annas_warning_modal_title": "Before enabling Alt Library",- "annas_warning_modal_line1": "This source scrapes shadow libraries.",- "annas_warning_modal_line2": "Most content there is copyrighted. Downloading it may be legal in your jurisdiction, grey-area, or outright illegal — verify with your local laws.",- "annas_warning_modal_line3": "omniget-study does not host content. All downloads go through mirrors YOU configure and YOU trigger.",- "annas_warning_modal_line4": "Tick the box below if you understand and accept personal responsibility for your usage.",- "annas_warning_ack_label": "I understand. I take full responsibility for my use in my jurisdiction.",- "annas_warning_cancel": "Cancel",- "annas_warning_confirm": "Enable Alt Library",- "search_notes_btn": "Search notes",- "downloads_btn": "Downloads",- "enrich_no_results": "No results. Try editing the book title first.",- "enrich_done": "✓ Metadata updated",- "enrich_field_title": "Title:",- "enrich_field_author": "Author:",- "enrich_field_publisher": "Publisher:",- "enrich_field_cover": "Cover (download)"- },- "bulk": {- "select_all": "Select all",- "selected": "selected",- "mark_completed": "Mark completed",- "mark_uncompleted": "Unmark",- "mark_module_completed": "Module completed",- "mark_module_uncompleted": "Unmark module",- "mark_course_completed": "Course completed",- "mark_course_uncompleted": "Unmark course",- "marked_completed": "{{count}} lesson(s) marked completed",- "marked_uncompleted": "{{count}} lesson(s) unmarked",- "undo": "Undo"- },- "goals": {- "title": "Goals",- "weekly": "Weekly",- "monthly": "Monthly",- "metric": {- "minutes": "Minutes",- "lessons": "Lessons",- "cards": "Cards"- }- },- "export": {- "all_md": "Export .md",- "all_hint": "Export all filtered notes as .md",- "ok": "{{count}} note(s) exported"- },- "bookmark": {- "add": "Mark",- "add_hint": "Add bookmark at current time (B)",- "seek_hint": "Jump to this point",- "default_label": "{{time}}"- },- "stats": {- "chart": {- "time_per_course": "Time per course (last 30 days)",- "empty": "No data for period"- }- },- "empty": {- "library_hint": "Download a course via Courses plugin or set the folder in Settings.",- "notes_hint": "Create a note during playback or via Ctrl+Shift+N.",- "subjects_hint": "Add subjects to distribute weekly goals."- },- "maintenance": {- "title": "{{feature}} under maintenance",- "lead": "We're polishing this section. The rest of Study works normally — this part will be back soon.",- "eta_label": "ETA",- "back_to_study": "Back to Study",- "open_library": "Open Library",- "feature_notes": "Notes",- "feature_anki": "Anki",- "feature_focus": "Focus",- "feature_progress": "Progress",- "feature_achievements": "Achievements",- "detail_notes": "Block-based editor (Tiptap), backlinks, graph view and templates still being polished.",- "detail_anki": "Internal Anki client (FSRS-5, sync, .apkg) is being finalized.",- "detail_focus": "Pomodoro timer, focus history and Discord presence are being reworked.",- "detail_progress": "Charts, streaks and weekly goals are being rebuilt for accuracy.",- "detail_achievements": "XP, badges and the achievements tree are being polished.",- "home_banner_title": "Some study features are under maintenance",- "home_banner_body": "Focus, Progress, Achievements and Notes are temporarily unavailable while we polish them. The rest of OmniGet works normally."- },- "library_health": {- "removed_toast": "Removed: {{name}}",- "remove_failed_toast": "Failed to remove: {{msg}}",- "no_issues_toast": "Library has no issues",- "issues_found_toast": "{{count}} issue(s) found",- "verify_failed_toast": "Failed to verify library: {{msg}}"- }- },- "tracking": {- "title": "Package tracking",- "subtitle_summary": "{{count}} package(s) · {{in_transit}} in transit",- "subtitle_empty": "Track packages from Brazilian carriers.",- "privacy_show_title": "Show codes",- "privacy_hide_title": "Hide codes (streamer mode)",- "privacy_button": "Private",- "refresh_all": "Refresh all",- "refresh_all_busy": "Refreshing…",- "refresh_all_title": "Refresh every package",- "add_button": "+ Add",- "search_placeholder": "Search by code, alias or status…",- "tab": {- "all": "All",- "in_transit": "In transit",- "awaiting": "Awaiting",- "delivered": "Delivered",- "delayed": "Delayed",- "archived": "Archived"- },- "empty": {- "none_title": "No packages tracked",- "none_desc": "Add a tracking code to follow deliveries.",- "none_cta": "Add first package",- "in_transit": "No packages in transit.",- "awaiting": "No packages awaiting pickup.",- "delivered": "No packages delivered yet.",- "delayed": "No delayed packages.",- "archived": "No archived packages.",- "nothing": "Nothing here.",- "search": "No packages match \"{{query}}\"."- },- "card": {- "delivered": "Delivered",- "days_one": "1 day in transit",- "days_other": "{{count}} days in transit",- "no_events": "No events",- "awaiting_first": "Awaiting first update…",- "archived_label": "Archived"- },- "rel": {- "now": "now",- "minutes": "{{count}} min ago",- "hours": "{{count}} h ago"- },- "menu": {- "refresh": "Refresh",- "refreshing": "Refreshing…",- "copy_code": "Copy code",- "rename": "Rename",- "unarchive": "Unarchive",- "remove": "Remove"- },- "loading": "Loading…",- "error_prefix": "Error",- "toast": {- "added": "Package added, refreshing…",- "copied": "Code copied",- "copy_failed": "Couldn't copy",- "refresh_failed": "Couldn't refresh ({{error}})",- "offline": "No internet — refresh postponed",- "refresh_done": "Refresh complete",- "package_removed": "Package removed",- "archived": "Package archived",- "unarchived": "Package unarchived",- "cpf_updated": "CPF updated",- "status_changed": "{{code}}: {{status}}"- },- "rename_prompt": "Package alias",- "add_dialog": {- "title": "Add package",- "close": "Close",- "code_label": "Tracking code *",- "code_placeholder": "e.g. AB123456789BR",- "alias_label": "Alias (optional)",- "alias_placeholder": "e.g. New sneakers",- "cpf_label": "Recipient's CPF *",- "cpf_placeholder": "000.000.000-00",- "cpf_hint": "Carrier requires CPF for lookup.",- "detecting": "Detecting carrier…",- "detected": "Carrier: {{carrier}}",- "requires_cpf_suffix": "· CPF required",- "error_code_required": "Enter the tracking code.",- "error_cpf_required": "This carrier requires a CPF.",- "cancel": "Cancel",- "submit": "Save",- "submitting": "Saving…"- },- "remove_dialog": {- "title": "Remove package",- "question": "Are you sure you want to remove {{name}}?",- "sub": "The tracked events will also be deleted.",- "cancel": "Cancel",- "confirm": "Remove",- "confirming": "Removing…",- "close": "Close"- },- "archive_prompt": {- "title": "Package delivered 🎉",- "body": "Want to archive this package? It leaves the active list but the history is kept.",- "keep": "No, keep it",- "archive": "Archive"- },- "detail": {- "back": "← Tracking",- "not_found_title": "Package not found",- "not_found_body": "This package may have been removed.",- "not_found_back": "Back to list",- "awaiting_first": "Awaiting first update",- "refresh_failed_title": "Last refresh failed.",- "retry": "Try again",- "archived_pill": "Archived",- "delivered_pill": "Delivered",- "days_one_pill": "1 day in transit",- "days_other_pill": "{{count}} days in transit",- "action": {- "refresh": "Refresh",- "refreshing": "Refreshing…",- "rename": "Rename",- "add_cpf": "Add CPF",- "archive": "Archive",- "unarchive": "Unarchive",- "remove": "Remove"- },- "meta": {- "code": "Code",- "cpf": "CPF",- "route": "Route",- "posted_at": "Posted on",- "updated": "Updated",- "copy_code_title": "Copy code",- "edit": "Edit"- },- "cpf_dialog": {- "title_add": "Add CPF",- "title_edit": "Edit CPF",- "label": "Recipient's CPF",- "placeholder": "000.000.000-00",- "hint": "Leave empty to remove.",- "cancel": "Cancel",- "submit": "Save",- "submitting": "Saving…",- "close": "Close"- },- "history": {- "title": "History",- "empty": "No events recorded yet."- }- },- "status": {- "preadvice": "Order created",- "picked_up": "Posted",- "in_transit": "In transit",- "in_warehouse": "At distribution center",- "customs": "In customs clearance",- "customs_held": "Held at customs",- "customs_cleared": "Released by customs",- "out_for_delivery": "Out for delivery",- "awaiting_pickup": "Awaiting pickup",- "delivered": "Delivered",- "delivery_failure": "Delivery attempt failed",- "delayed": "Delayed",- "returning_to_sender": "Returning to sender",- "returned_to_sender": "Returned to sender",- "damaged": "Damaged",- "unknown": "Unknown status"- },- "carrier": {- "unknown": "Unknown"- },- "settings": {- "title": "Settings",- "subtitle": "Notification preferences for package tracking.",- "notifications_label": "Notify me about status changes",- "notifications_hint": "Send a system notification when a package moves to a new stage (e.g. out for delivery, delivered).",- "test_notification": "Send test notification",- "test_busy": "Sending…",- "test_toast_sent": "Test notification sent",- "test_failed": "Couldn't send notification",- "permission_denied_toast": "Notifications are disabled at the system level. Enable them in your OS settings.",- "permission_denied_banner": "System notifications are disabled",- "permission_denied_hint": "Allow notifications for Omniget in your operating system settings to receive package updates.",- "request_permission": "Request permission"- },- "notification": {- "title_template": "{{code}}: {{status}}",- "body_fallback": "Status updated",- "test_title": "Tracking notifications are working",- "test_body": "You will see notifications like this when your packages move."- }- }-}+{+ "confirm_close": {+ "title": "Downloads in progress",+ "message": "You have {{count}} active download(s). Closing now will cancel them.",+ "cancel": "Keep running",+ "confirm": "Close anyway"+ },+ "legal": {+ "title": "Use OmniGet responsibly",+ "body_paragraph_1": "OmniGet is a tool to download media you are entitled to access. You are responsible for respecting the copyright and terms of service of every platform you download from.",+ "body_paragraph_2": "By continuing you acknowledge the following:",+ "rule_copyright": "I will only download content that I own, have a licence for, or that is explicitly free to reuse.",+ "rule_tos": "I will respect the terms of service of the source platform.",+ "rule_personal_use": "I understand this tool is provided as-is and the maintainers are not responsible for misuse.",+ "acknowledge": "I understand"+ },+ "recovery": {+ "title": "Unfinished downloads",+ "message": "OmniGet found {{count}} download(s) that didn't finish last session. Would you like to resume them?",+ "more": "and {{count}} more...",+ "restore": "Resume downloads",+ "discard": "Discard",+ "restored": "{{count}} download(s) resumed"+ },+ "shortcuts": {+ "title": "Keyboard shortcuts",+ "section_application": "Application",+ "section_downloads": "Downloads",+ "section_navigation": "Navigation",+ "paste_url": "Paste URL and download",+ "show_shortcuts": "Show this dialog",+ "open_settings": "Open settings",+ "search_settings": "Search settings",+ "start_download": "Start download",+ "cancel_dialog": "Close dialog or cancel",+ "nav_home": "Go to Home",+ "nav_downloads": "Go to Downloads"+ },+ "nav": {+ "home": "Home",+ "downloads": "Downloads",+ "marketplace": "Marketplace",+ "settings": "Settings",+ "about": "About",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"+ },+ "tools": {+ "tab": "Tools",+ "working": "Working…",+ "url_placeholder": "Paste a video URL",+ "metadata_title": "Metadata fetcher",+ "metadata_desc": "Save the video's info, description and thumbnail without downloading the video itself.",+ "metadata_action": "Fetch metadata",+ "metadata_done": "Saved {{count}} file(s) for \"{{title}}\"",+ "thumbnails_title": "Thumbnail downloader",+ "thumbnails_desc": "Browse every available cover image and save it at any resolution.",+ "thumbnails_action": "List sizes",+ "thumbnails_none": "No thumbnails found for this URL.",+ "thumbnails_saved": "Saved {{name}}",+ "thumbnails_save": "Save this size",+ "thumbnails_default": "Default",+ "subs_title": "Subtitle extractor",+ "subs_desc": "Download subtitles, or merge two languages into one bilingual file.",+ "subs_action": "List subtitles",+ "subs_none": "— none —",+ "subs_primary": "Primary",+ "subs_format": "Format",+ "subs_secondary": "Second language",+ "subs_save": "Save subtitle",+ "subs_merge": "Merge bilingual",+ "subs_merge_hint": "Pick a second language; merge needs SRT or VTT.",+ "subs_saved": "Saved {{name}}",+ "cc_title": "Comments & chapters",+ "cc_desc": "Fetch a video's comments or chapter markers, filter them, and export as JSON or CSV.",+ "cc_comments": "Fetch comments",+ "cc_chapters": "Fetch chapters",+ "cc_max": "Max comments",+ "cc_sort": "Sort",+ "cc_sort_top": "Top",+ "cc_sort_new": "Newest",+ "cc_filter": "Filter…",+ "cc_none": "Nothing found for this URL.",+ "cc_exported": "Exported {{name}}",+ "cc_showing": "Showing {{shown}} of {{total}}",+ "lc_title": "Live chat archiver",+ "lc_desc": "Pull a finished livestream's chat replay, filter it, and export as JSON or CSV.",+ "lc_action": "Fetch live chat",+ "lc_none": "No live chat replay for this video.",+ "lc_exported": "Exported {{name}}"+ },+ "downloads": {+ "title": "Downloads",+ "empty": "No downloads in progress",+ "status": {+ "queued": "Queued",+ "downloading": "Downloading",+ "paused": "Paused",+ "complete": "Complete",+ "error": "Error",+ "seeding": "Seeding"+ },+ "section_queued": "Queued",+ "section_finished": "Finished",+ "pause": "Pause",+ "resume": "Resume",+ "retry": "Retry",+ "page_progress": "Page {{current}}/{{total}}",+ "module_progress": "Module {{current}}/{{total}}",+ "phase_fetching_info": "Fetching video info...",+ "phase_starting": "Starting download engine...",+ "phase_connecting": "Connecting to server...",+ "phase_preparing": "Preparing download...",+ "cancel": "Cancel",+ "clear_finished": "Clear finished",+ "clear_confirm": "Clear all finished downloads?",+ "pause_all": "Pause all",+ "resume_all": "Resume all",+ "reorder_hint": "drag to reorder",+ "history_toggle": "Toggle download history",+ "history_toggle_hint": "View past downloads (Ctrl+H)",+ "history_view_link": "View download history",+ "history_loading": "Loading history…",+ "history_empty": "No completed downloads yet.",+ "history_clear": "Clear history",+ "history_clear_confirm": "Clear the entire download history? This won't delete the files.",+ "history_redownload": "Download again",+ "history_requeued": "Re-queued for download",+ "show_more": "Show {{count}} more",+ "open_folder": "Show in folder",+ "open_in_study": "Watch in Study",+ "stop": "Stop",+ "confirm_remove": "Remove this download?",+ "delete_file": "Delete file from disk",+ "delete_file_confirm": "Permanently delete the downloaded file from disk? This cannot be undone.",+ "sw": {+ "title": "Subtitle workshop",+ "tool_desc": "Open, edit timing/text, translate and save SRT/VTT/ASS subtitles.",+ "open": "Open subtitle file",+ "load_media": "Load media (waveform)",+ "save_srt": "Save .srt",+ "save_vtt": "Save .vtt",+ "save_ass": "Save .ass",+ "autofix": "Auto-fix issues",+ "autofixed": "{{count}} cue(s) auto-fixed",+ "autofix_none": "No issues to fix",+ "grammar": "AI grammar fix",+ "grammar_done": "Grammar fixed",+ "grammar_mismatch": "Grammar fix didn't line up — try again",+ "grammar_style": "Style",+ "style_original": "Original",+ "style_formal": "Formal",+ "style_casual": "Casual",+ "twopoint": "Two-point sync",+ "tp_old": "Old time",+ "tp_new": "New time",+ "tp_apply": "Apply sync",+ "tp_invalid": "The two anchor points must differ",+ "shift": "Shift all (ms)",+ "find": "Find",+ "replace": "Replace with",+ "replace_btn": "Replace all",+ "replaced": "{{count}} cue(s) changed",+ "target_lang": "Target language",+ "translate": "AI translate",+ "translated": "Subtitles translated",+ "translate_mismatch": "Translation didn't line up — try again",+ "not_configured": "Configure an AI provider in Settings first",+ "saved": "Subtitles saved",+ "split": "Split",+ "merge": "Merge ↓",+ "empty": "Open an SRT or VTT file to start.",+ "qc_negative": "End is before start",+ "qc_overlap": "Overlaps the next cue",+ "qc_fast": "Reading speed too high"+ },+ "vop": {+ "action_label": "AI video tools",+ "title": "AI video tools",+ "not_configured": "Configure an AI provider in Settings first",+ "done": "Done — saved to:",+ "quick_actions": "Quick actions",+ "extract_audio": "Extract audio",+ "mute": "Remove audio",+ "to_mp4": "Convert to MP4",+ "to_gif": "Convert to GIF",+ "trim_start": "Start (hh:mm:ss)",+ "trim_end": "End (hh:mm:ss)",+ "trim": "Trim",+ "nl_label": "Describe what you want",+ "nl_placeholder": "e.g. make it 720p and mute it",+ "propose": "Propose",+ "review_title": "Review the command before running",+ "review_hint": "The app fills the input/output. This runs only after you confirm.",+ "run": "Run",+ "processing": "Processing…"+ },+ "quality_hint": "Quality being downloaded for this item",+ "stats_line": "{{count}} downloads · {{size}} saved",+ "filter_label": "Filter downloads by status",+ "filter": {+ "all": "All",+ "active": "Active",+ "queued": "Queued",+ "completed": "Completed",+ "failed": "Failed"+ },+ "log": {+ "show": "Show log",+ "hide": "Hide log",+ "copy": "Copy",+ "copied": "Log copied to clipboard",+ "copy_failed": "Couldn't copy log",+ "empty": "No log lines yet"+ }+ },+ "toast": {+ "download_preparing": "Preparing download...",+ "download_started": "Starting: {{name}}",+ "download_complete": "Done! {{name}} is in your folder",+ "download_error": "Couldn't download {{name}}. Want to retry?",+ "clipboard_url_detected": "Link detected! Paste to download",+ "auto_download_started": "Auto-download started",+ "external_url_ready": "URL received and ready to download",+ "external_url_queued": "Download added from the Chrome extension",+ "channel_new": "{{channel}}: {{count}} new video(s)",+ "channel_new_auto": "{{channel}}: downloading {{count}} new video(s)",+ "file_copied_to_clipboard": "File copied to clipboard",+ "drm_skipped": "{{count}} video(s) skipped — protected by DRM (FairPlay/SAMPLE-AES)",+ "generic_download_complete": "{{name}} — download complete!"+ },+ "reencode": {+ "title": "Re-encode video",+ "action_label": "Re-encode (compress)",+ "codec_legend": "Codec",+ "codec_hevc_title": "HEVC / H.265",+ "codec_hevc_desc": "Best balance of quality and file size. Plays on most modern devices.",+ "codec_h264_title": "H.264 / AVC",+ "codec_h264_desc": "Best compatibility. Plays everywhere, files are larger.",+ "codec_av1_title": "AV1",+ "codec_av1_desc": "Smallest files, slowest encode. Best for storage if device supports it.",+ "tag_recommended": "recommended",+ "replace_title": "Replace original file",+ "replace_desc": "If the new file is smaller, swap it in place. Original is removed after success.",+ "start": "Re-encode",+ "encoding": "Encoding…",+ "toast_done": "Saved {{saved}} ({{pct}}%) using {{encoder}}",+ "toast_replaced": "Replaced original. Saved {{saved}} ({{pct}}%) using {{encoder}}"+ },+ "telegram": {+ "title": "Telegram",+ "checking_session": "Checking session...",+ "login": "Sign in",+ "logout": "Sign out",+ "logged_as": "Logged in as {{phone}}",+ "phone_label": "Phone number",+ "phone_placeholder": "+1 234 567 8900",+ "phone_hint": "Include the country code",+ "send_code": "Send code",+ "sending_code": "Sending...",+ "code_label": "Verification code",+ "code_placeholder": "00000",+ "code_hint": "We sent a code to your Telegram app",+ "verify": "Verify",+ "verifying": "Verifying...",+ "invalid_code": "Invalid code. Please try again.",+ "password_label": "Two-factor password",+ "password_placeholder": "Your 2FA password",+ "password_hint": "Hint: {{hint}}",+ "password_submit": "Confirm",+ "password_verifying": "Verifying...",+ "invalid_password": "Invalid password. Please try again.",+ "chats_title": "Your Chats",+ "loading_chats": "Loading chats...",+ "chats_error": "Failed to load chats",+ "no_chats": "No chats found.",+ "chat_count": "{{count}} chats",+ "chat_count_one": "{{count}} chat",+ "chat_type_private": "Private",+ "chat_type_group": "Group",+ "chat_type_channel": "Channel",+ "media_title": "Media",+ "loading_media": "Loading media...",+ "no_media": "No media found in this chat.",+ "media_error": "Failed to load media",+ "filter_all": "All",+ "filter_photo": "Photos",+ "filter_video": "Videos",+ "filter_document": "Files",+ "filter_audio": "Audio",+ "search_files": "Search files...",+ "searching": "Searching...",+ "back_to_chats": "Back to chats",+ "download_btn": "Download",+ "downloading": "Downloading...",+ "downloaded": "Downloaded",+ "choose_folder": "Choose download folder",+ "unknown_error": "Unknown error",+ "download_all": "Download all",+ "batch_progress": "{{done}} of {{total}} files",+ "batch_cancelled": "Batch download cancelled",+ "batch_complete": "All files downloaded",+ "load_more": "Load more",+ "status_waiting": "Waiting",+ "status_skipped": "Skipped",+ "status_error": "Error",+ "file_count": "{{count}} items",+ "cancel_batch": "Cancel",+ "qr_title": "Scan to log in",+ "qr_instruction": "Open Telegram on your phone, go to Settings > Devices > Link Desktop Device",+ "qr_loading": "Generating QR code...",+ "qr_error": "Failed to generate QR code",+ "or_separator": "or",+ "use_phone": "Use phone number instead",+ "back_to_qr": "Back to QR code"+ },+ "settings": {+ "title": "Settings",+ "general": {+ "title": "General",+ "start_with_system": "Start with system",+ "start_with_system_desc": "Launch OmniGet automatically when your computer starts",+ "start_minimized": "Start in tray only",+ "start_minimized_desc": "Open OmniGet to the system tray without showing the window. Click the tray icon to open.",+ "reset_hints": "Reset hints",+ "reset_hints_desc": "Show all dismissed tips again",+ "restore": "Restore",+ "hints_restored": "All hints restored"+ },+ "appearance": {+ "title": "Appearance",+ "theme": "Theme",+ "theme_system": "System",+ "more_themes": "More themes",+ "language": "Language",+ "lang_pt": "Português",+ "lang_en": "English",+ "lang_ru": "Русский",+ "lang_zh": "中文",+ "lang_ja": "日本語",+ "lang_it": "Italiano",+ "lang_fr": "Français",+ "lang_es": "Español",+ "lang_el": "Ελληνικά"+ },+ "download": {+ "default_output_dir": "Default folder",+ "path_too_long": "This folder path is long ({{current}}/{{limit}} characters). Downloads with long filenames may fail — pick a shorter folder.",+ "choose_folder": "Choose",+ "always_ask_path": "Always ask where to save",+ "always_ask_path_desc": "Show a save dialog for every download.",+ "video_quality": "Video quality",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.",+ "speed_limit": "Download speed limit",+ "speed_limit_desc": "Cap the download rate. Leave empty for no limit.",+ "speed_limit_unlimited": "No limit",+ "skip_existing": "Skip existing files",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.",+ "download_attachments": "Download attachments",+ "download_descriptions": "Save descriptions",+ "embed_metadata": "Embed metadata",+ "embed_metadata_desc": "Write title and artist info into downloaded files",+ "embed_thumbnail": "Embed thumbnail as cover",+ "embed_thumbnail_desc": "Embed album art into audio files",+ "clipboard_detection": "Clipboard detection",+ "clipboard_detection_desc": "Auto-detect URLs copied to clipboard",+ "auto_download_on_paste": "Auto-download on paste",+ "auto_download_on_paste_desc": "Start downloading instantly when a URL is detected in the clipboard",+ "organize_by_platform": "Organize by platform",+ "organize_by_platform_desc": "Save files in subfolders named after the platform",+ "download_subtitles": "Download subtitles",+ "download_subtitles_desc": "Download available subtitles alongside videos (YouTube)",+ "what_to_also_save": "What to also save",+ "youtube_specific": "YouTube-specific",+ "telegram_plugin_section": "Telegram (plugin)",+ "include_auto_subtitles": "Include auto-generated subtitles",+ "include_auto_subtitles_desc": "Also fetch captions auto-generated by YouTube when no manual ones exist (quality varies)",+ "caption_locale": "Subtitle language",+ "caption_locale_desc": "Language to download subtitles in (when available). Falls back to whatever the source has.",+ "caption_locale_auto": "Match app language",+ "keep_vtt": "Keep original .vtt files",+ "keep_vtt_desc": "Keep the raw WebVTT alongside the converted SRT. Useful for players or scripts that need the original format.",+ "courses_section": "Courses (plugin)",+ "continuous_lecture_numbers": "Continuous lecture numbering",+ "continuous_lecture_numbers_desc": "Number lectures sequentially across modules (1, 2, 3…) instead of restarting at each module.",+ "bilibili_section": "Bilibili",+ "bilibili_container_label": "Output container",+ "bilibili_container_desc": "MKV recommended when downloading Hi-Res FLAC or Dolby Atmos. MP4 works everywhere.",+ "bilibili_danmaku_label": "Download danmaku (弹幕)",+ "bilibili_danmaku_desc": "Save the floating comments alongside the video. Requires a logged-in Bilibili account in Settings → Cookies.",+ "bilibili_danmaku_format_label": "Danmaku format",+ "bilibili_danmaku_format_desc": "XML is the legacy format (best player compatibility). ASS overlays on the video natively. JSON is the raw data.",+ "bilibili_nfo_label": "Generate NFO metadata (Kodi / Jellyfin / Emby)",+ "bilibili_nfo_desc": "Save a .nfo file next to each download so media centers can identify it. Series get tvshow.nfo + episode.nfo automatically.",+ "bilibili_cover_sidecar_label": "Save cover image as sidecar file",+ "bilibili_cover_sidecar_desc": "Saves the video poster separately (in addition to whatever is embedded). Useful for media libraries that want a thumbnail next to the file.",+ "bilibili_cover_format_label": "Cover format",+ "bilibili_cover_format_desc": "JPG is most compatible. WebP/AVIF are smaller. PNG is lossless.",+ "bilibili_naming_label": "Filename templates",+ "bilibili_naming_desc": "Customize how downloaded files are named per content type. Use {variable} placeholders. Forward slash creates a subfolder.",+ "bilibili_naming_edit": "Edit",+ "bilibili_naming_hide": "Hide",+ "bilibili_naming_video_label": "Single video",+ "bilibili_naming_multi_part_label": "Multi-part video (分P)",+ "bilibili_naming_bangumi_label": "Bangumi (anime / movie / series)",+ "bilibili_naming_cheese_label": "Course (cheese)",+ "bilibili_naming_collection_label": "Channel / Favorites / Collection",+ "bilibili_naming_help": "Variables: {title}, {bvid}, {aid}, {cid}, {ep_id}, {season_id}, {series_title}, {season_title}, {season_number}, {episode_number}, {episode_number_pad2}, {episode_title}, {parent_title}, {section_title}, {collection_title}, {favorites_name}, {space_owner}, {uploader}, {pub_date}, {pub_year}, {page}.",+ "bilibili_cdn_label": "CDN fallback",+ "bilibili_cdn_desc": "Add alternative mirror hosts to try when the default CDN is slow or geo-blocked.",+ "bilibili_cdn_hosts_label": "Alternative hosts (one per line, or comma-separated)",+ "bilibili_cdn_hosts_placeholder": "upos-hz-mirrorcos.bilivideo.com\nupos-sz-mirroraliov.bilivideo.com",+ "bilibili_cdn_prefer_label": "Prefer alternative CDN over default",+ "bilibili_cdn_prefer_desc": "When on, try the alternatives first. Use this if the default CDN is unreliable in your region.",+ "translate_metadata": "Translate video title and description into your app language",+ "translate_metadata_desc": "Ask YouTube to localize titles and chapter names to the app language (YouTube only)",+ "youtube_sponsorblock": "Remove SponsorBlock segments",+ "youtube_sponsorblock_desc": "Cut sponsored, intro and outro segments from YouTube videos (community-sourced data; may miss or over-cut)",+ "sb_mode": "SponsorBlock action",+ "sb_mode_desc": "Remove cuts the segments out of the file. Mark only adds chapter markers so you can skip them in the player.",+ "sb_mode_remove": "Remove segments",+ "sb_mode_mark": "Mark only",+ "sb_categories": "Segment types",+ "sb_categories_desc": "Which kinds of segment to act on.",+ "sb_cat_sponsor": "Sponsor",+ "sb_cat_selfpromo": "Self-promotion",+ "sb_cat_interaction": "Interaction reminder",+ "sb_cat_intro": "Intro",+ "sb_cat_outro": "Outro / endcards",+ "sb_cat_preview": "Preview / recap",+ "sb_cat_filler": "Filler / tangent",+ "sb_cat_music_offtopic": "Non-music section",+ "split_by_chapters": "Split video by chapters",+ "split_by_chapters_desc": "When the source has chapter markers, save each chapter as a separate file",+ "live_from_start": "Record live streams from the start",+ "live_from_start_desc": "When downloading an ongoing livestream, capture it from the beginning instead of the current moment",+ "presets": "Quick presets",+ "presets_desc": "One-click setup for common workflows. Tap a card to apply.",+ "preset_fast": "Fast",+ "preset_fast_desc": "480p · no metadata · no subtitles",+ "preset_quality": "Quality",+ "preset_quality_desc": "Best video · metadata · thumbnail",+ "preset_compact": "Compact",+ "preset_compact_desc": "720p · metadata · no thumbnail",+ "preset_music_only": "Music only",+ "preset_music_only_desc": "Audio · ID3 tags · cover art",+ "hotkey_enabled": "Global hotkey",+ "hotkey_enabled_desc": "Download clipboard URL with a keyboard shortcut",+ "hotkey_binding": "Hotkey shortcut",+ "hotkey_record": "Record",+ "hotkey_type": "Type",+ "hotkey_press": "Press keys...",+ "music_hotkey_enabled": "Music download hotkey",+ "music_hotkey_enabled_desc": "Download clipboard URL as audio with a keyboard shortcut (uses Music Format below)",+ "music_hotkey_binding": "Music hotkey shortcut",+ "music_audio_format": "Music download format",+ "music_audio_format_desc": "Audio format used by the music hotkey and the Music plugin downloader",+ "copy_to_clipboard_on_hotkey": "Copy file to clipboard after hotkey download",+ "copy_to_clipboard_on_hotkey_desc": "Automatically copy the downloaded file to clipboard for easy pasting",+ "filename_template": "Filename template",+ "filename_template_desc": "yt-dlp output template for downloaded files",+ "filename_template_preview": "Preview: {{preview}}"+ },+ "update_available": "OmniGet {{version}} is available",+ "update_button": "update now",+ "update_downloading": "downloading update...",+ "telegram": {+ "concurrent_downloads": "Concurrent downloads",+ "concurrent_downloads_desc": "Max simultaneous file downloads",+ "fix_file_extensions": "Fix file extensions",+ "fix_file_extensions_desc": "Add correct extension to files based on type"+ },+ "dependencies": {+ "title": "Dependencies",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing",+ "not_found": "not found",+ "install": "Install",+ "update": "Update",+ "install_success": "{{name}} {{version}} installed",+ "update_success": "{{name}} updated to {{version}}",+ "variant_aria": "Variant",+ "more_options": "More options",+ "pick_custom_file": "Pick file from disk…",+ "show_folder": "Show folder",+ "pick_dialog_title": "Select file for {{name}}",+ "filter_pdfium": "PDFium library",+ "filter_all_files": "All files",+ "set_file_failed": "Failed to set file: {{msg}}",+ "open_folder_failed": "Failed to open folder: {{msg}}",+ "system_font_suffix": "system"+ },+ "typography": {+ "section_title": "Typography",+ "presets_title": "Presets",+ "presets_desc": "Tested combinations. One click applies fonts + line-height + spacing.",+ "modified_indicator": "(manually modified)",+ "fonts_title": "Fonts",+ "fonts_desc": "Per-family choice. List shows fonts bundled with the app (system fonts not yet supported).",+ "reset": "Reset",+ "display_label": "Display",+ "body_label": "Body",+ "mono_label": "Mono",+ "body_sample": "The quick brown fox",+ "line_height_label": "Line-height",+ "line_height_desc": "Vertical space between lines. Higher = airier, easier to read on long sessions.",+ "spacing_label": "Global spacing",+ "spacing_desc": "Multiplies the space tokens (padding, gap, margin). 1.0× = default. 0.85× compacts the entire UI; 1.25× makes it airier.",+ "preview_title": "Preview",+ "preview_desc": "Real-time. Active theme is honored.",+ "preset_omniget_default_name": "Omniget default",+ "preset_omniget_default_desc": "Bricolage display, Inter body, Plex Mono. House standard.",+ "preset_notion_like_name": "Notion-like",+ "preset_notion_like_desc": "Inter for display + body. Hierarchy by size+weight, not family swap.",+ "preset_compact_name": "Compact",+ "preset_compact_desc": "DM Sans + Inter, 90% spacing. More text on screen.",+ "preset_reading_name": "Reading mode",+ "preset_reading_desc": "Bricolage + DM Sans, line-height 1.7, 110% spacing. Long sessions.",+ "preset_tech_minimal_name": "Tech minimal",+ "preset_tech_minimal_desc": "Plex Mono everywhere. Divisive. For devs who like it."+ },+ "proxy": {+ "title": "Proxy",+ "enabled": "Enable proxy",+ "type": "Type",+ "host": "Host",+ "port": "Port",+ "username": "Username",+ "password": "Password"+ },+ "ytdlp_flags": {+ "title": "yt-dlp Flags",+ "embed_subs": "Embed subtitles",+ "write_thumbnail": "Save thumbnail",+ "write_description": "Save description",+ "write_comments": "Save comments",+ "restrict_filenames": "ASCII filenames",+ "no_overwrites": "No overwrites",+ "prefer_free_formats": "Free formats",+ "force_ipv4": "Force IPv4",+ "geo_bypass": "Geo bypass",+ "limit_rate": "Limit rate",+ "sleep_interval": "Sleep interval",+ "limit_rate_ph": "e.g. 1M",+ "sleep_interval_ph": "e.g. 5"+ },+ "advanced": {+ "title": "Advanced",+ "max_concurrent_downloads": "Concurrent downloads",+ "max_concurrent_downloads_desc": "Max simultaneous downloads",+ "max_concurrent_segments": "Pieces downloaded in parallel for HLS streams (advanced)",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.",+ "concurrent_fragments": "Pieces downloaded in parallel (advanced)",+ "concurrent_fragments_desc": "How many file pieces yt-dlp downloads at the same time per video",+ "max_retries": "Retries per segment",+ "max_retries_desc": "How many times to retry a failed segment before giving up.",+ "stagger_delay": "Pause between each download (ms)",+ "stagger_delay_desc": "Delay before starting the next concurrent download",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.",+ "reset": "Reset defaults",+ "reset_confirm": "Are you sure? All settings will be reset.",+ "torrent_listen_port": "Torrent listen port",+ "torrent_listen_port_desc": "TCP port for incoming BitTorrent connections",+ "torrent_auto_trackers": "Add extra public trackers",+ "torrent_auto_trackers_desc": "Improves peer discovery for magnets with few or dead trackers",+ "torrent_upnp": "Open router port (UPnP)",+ "torrent_upnp_desc": "Lets routers accept incoming peer connections for faster torrents",+ "prevent_sleep": "Keep system awake while downloading",+ "prevent_sleep_desc": "Stops the computer from sleeping while downloads are active",+ "cookies_from_browser": "Read cookies directly from a browser profile (advanced)",+ "cookies_from_browser_desc": "Only set this if the browser extension isn't working. Most users should leave this empty.",+ "cookies_from_browser_placeholder": "ex.: firefox, chrome, edge",+ "user_agent": "Custom User-Agent (advanced)",+ "user_agent_desc": "Send a custom User-Agent to downloads. Leave empty to use the default.",+ "user_agent_placeholder": "Default browser User-Agent",+ "twitter_manual_cookie": "Manual cookie",+ "twitter_manual_cookie_desc": "If a download fails, you can paste a manual Cookie header here and try again. This is not limited to Twitter/X. Example: sessionid=...; csrftoken=...; auth_token=..."+ },+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced",+ "cat_appearance": "Appearance",+ "cat_typography": "Typography",+ "cat_plugins": "Plugins",+ "cat_downloads": "Downloads",+ "cat_network": "Network",+ "cat_advanced": "Advanced",+ "search_placeholder": "Search settings...",+ "drill_back": "Back",+ "rpc": {+ "title": "Discord Rich Presence",+ "desc": "Show your activity on your Discord profile. The timer keeps going across activities, never resets.",+ "enable": "Show activity on Discord",+ "privacy_note": "Shows what you're listening to, watching or reading. Downloads stay private.",+ "test": "Test connection",+ "test_desc": "Send a test activity to verify Discord is running and connected.",+ "test_button": "Send test",+ "test_ok": "Connected to Discord",+ "test_fail": "Could not reach Discord. Make sure it is running.",+ "saved": "Saved",+ "save": "Save",+ "advanced": "Advanced",+ "app_id": "Application ID",+ "app_id_hint": "Discord application ID. Change only if you know what you're doing.",+ "large_image": "Large image key",+ "large_image_hint": "Asset name uploaded to your Discord application."+ },+ "bridge": {+ "title": "Browser extension",+ "intro": "Pair the OmniGet browser extension with this app over a private localhost connection. Open the extension's options page, paste the endpoint URL and token below, and click Save.",+ "pair_label": "Pair the extension",+ "pair_hint": "One click here, then the installed extension connects on its own — no copy-paste.",+ "pair": "Pair extension",+ "pair_waiting": "Waiting…",+ "pair_active": "Window open — the extension will connect automatically ({{secs}}s left).",+ "pair_unavailable": "Enable the browser bridge first.",+ "endpoint_label": "Endpoint URL",+ "token_label": "Pairing token",+ "rotate_label": "Rotate token",+ "rotate_hint": "Generates a new token. Any browser already paired will need to update its token.",+ "rotate": "Rotate",+ "rotating": "Rotating…",+ "rotated": "New pairing token generated.",+ "reveal": "Reveal",+ "hide": "Hide",+ "copy": "Copy",+ "copied_url": "Endpoint URL copied to clipboard.",+ "copied_token": "Token copied to clipboard.",+ "unavailable": "Bridge unavailable. Try restarting the app."+ },+ "cat_cookies": "Cookies",+ "cat_channels": "Channels",+ "cat_ai": "AI",+ "ai": {+ "title": "AI provider",+ "provider": "Provider",+ "provider_desc": "Choose where AI requests go. Your key is stored locally and never logged.",+ "provider_none": "Off",+ "provider_local": "Local (OpenAI-compatible)",+ "model": "Model",+ "model_desc": "The model identifier for the chosen provider.",+ "model_placeholder": "e.g. gpt-4o-mini, claude-3-5-sonnet-latest, llama3",+ "openai_key": "OpenAI API key",+ "anthropic_key": "Anthropic API key",+ "key_set": "A key is saved. Leave blank to keep it.",+ "key_unset": "No key saved yet.",+ "local_url": "Local endpoint URL",+ "local_url_desc": "OpenAI-compatible base URL (Ollama, LM Studio, …).",+ "save": "Save",+ "test": "Test connection",+ "test_ok": "AI connection works",+ "test_fail": "AI test failed: {{error}}",+ "saved": "AI settings saved",+ "summarize_title": "Summarize a video",+ "summarize": "Summarize",+ "summarizing": "Summarizing…",+ "summarize_placeholder": "Video URL",+ "summarize_hint": "Fetches the video's subtitles and summarizes them. Result is saved below.",+ "style": "Summary style",+ "style_short": "Short",+ "style_balanced": "Balanced",+ "style_detailed": "Detailed",+ "lang_placeholder": "Output language (optional)",+ "summary_ready": "Summary ready",+ "no_transcript": "No transcript available for this video",+ "not_configured": "Configure an AI provider first",+ "history": "AI history",+ "history_clear": "Clear",+ "history_clear_confirm": "Clear all AI history?",+ "history_empty": "No AI results yet."+ },+ "channels": {+ "title": "Followed channels",+ "tray_header": "Channels",+ "add": "Follow",+ "add_placeholder": "Channel or playlist URL",+ "add_hint": "New uploads are checked in the background. Auto-download is off until you turn it on.",+ "empty_title": "No channels followed yet",+ "empty_hint": "Follow a channel or playlist to get new uploads automatically.",+ "last_checked": "Last checked {{when}}",+ "never": "never",+ "check_now": "Check now",+ "checked": "{{count}} new video(s)",+ "remove": "Remove",+ "remove_confirm": "Stop following this channel?",+ "enabled": "Enabled",+ "auto_download": "Auto-download",+ "interval": "Every (min)"+ },+ "cookies": {+ "title": "Cookies",+ "intro": "Manage your account cookies. Everything stays on your computer — nothing is sent to our servers.",+ "managed_only_title": "Always use managed cookies",+ "managed_only_desc": "When on, downloads use only the cookies imported here. If a domain has no managed cookie, the download proceeds without auth and the log records it. Turn off to fall back to the legacy cookie sources (manual header, global file, browser extraction).",+ "capture_via_extension": "Capture via extension",+ "open_folder": "Open folder",+ "dir_label": "Folder:",+ "hint_use_extension": "On any logged-in site, click the omniget extension icon in your browser. The cookies show up here in seconds.",+ "empty_title": "No cookies here yet",+ "empty_body": "Use the browser extension to capture cookies from sites where you're logged in, or import a file manually.",+ "status_fresh": "Fresh cookies",+ "status_aging": "Aging cookies",+ "status_stale": "Old cookies — possibly expired",+ "status_empty": "No cookies",+ "count_cookies": "{{count}} cookies",+ "captured_from": "Captured from",+ "via_label": "via {{label}}",+ "time_just_now": "just now",+ "time_minutes": "{{count}}m ago",+ "time_hours": "{{count}}h ago",+ "time_days": "{{count}}d ago",+ "time_months": "{{count}}mo ago",+ "time_years": "{{count}}y ago",+ "alias_aria": "Name for this entry",+ "alias_edit_aria": "Rename this entry",+ "action_view": "View",+ "action_export": "Export",+ "action_rename": "Rename",+ "action_test": "Test",+ "test_running": "Testing…",+ "test_ok": "Cookies work.",+ "test_fail": "Test failed: {{msg}}",+ "expires_in": "expires in ~{{days}}d",+ "expired": "expired",+ "action_clear": "Clear",+ "import_trigger": "Import",+ "import_file_title": "File",+ "import_file_hint": "Netscape (.txt) or JSON (.json)",+ "import_file_dialog_title": "Select cookies file",+ "import_paste_title": "Paste",+ "import_paste_hint": "Paste cookie contents in a modal",+ "import_success": "Imported: {{cookies}} cookies across {{buckets}} platform(s)",+ "paste_modal_title": "Paste cookies",+ "paste_modal_subtitle": "Paste your cookie file contents — Netscape (yt-dlp) or JSON (Edit-This-Cookie) accepted.",+ "paste_field_content": "Content",+ "paste_field_source": "Source URL (optional)",+ "paste_field_alias": "Name (optional)",+ "paste_content_placeholder": "# Netscape HTTP Cookie File\\n.youtube.com\\tTRUE\\t/\\tTRUE\\t...",+ "paste_source_placeholder": "https://www.example.com/...",+ "paste_alias_placeholder": "e.g. YouTube personal",+ "paste_cancel": "Cancel",+ "paste_submit": "Import",+ "paste_importing": "Importing…",+ "export_dialog_title": "Save cookies file",+ "export_done": "File saved",+ "modal_title": "Cookie contents",+ "modal_close": "Close",+ "modal_filter_placeholder": "Filter by cookie name…",+ "modal_copy_all": "Copy all",+ "modal_copied": "Content copied",+ "modal_no_results": "No cookies found with this filter.",+ "modal_total": "{{count}} cookies",+ "modal_expired_count": "{{count}} expired",+ "modal_expired_tag": "expired",+ "add_generic_title": "Add generic",+ "add_generic_hint": "For yt-dlp-supported sites not listed above.",+ "add_generic_placeholder": "Domain (e.g. bandcamp.com)",+ "add_generic_paste": "Paste cookies",+ "add_generic_cancel": "Cancel",+ "confirm_clear_title": "Clear cookies?",+ "confirm_clear_body": "Cookies for {{domain}} go to the trash (recoverable for 24h). Continue?",+ "confirm_clear_cancel": "Cancel",+ "confirm_clear_action": "Clear",+ "cleared_toast": "Cookies moved to trash",+ "add_account_label": "Add another account",+ "add_account_success": "Account '{{slug}}' added — {{count}} cookies",+ "account_primary_tag": "default",+ "bilibili": {+ "login_qr_title": "Sign in to Bilibili with QR Code",+ "login_qr_subtitle": "Open the Bilibili app and scan the QR code below.",+ "login_qr_pending": "Waiting for scan...",+ "login_qr_scanned": "Scanned. Confirm sign-in on your phone.",+ "login_qr_expired": "QR code expired. Generate a new one.",+ "login_qr_cancelled": "Sign-in cancelled.",+ "login_qr_regenerate": "Generate new code",+ "login_qr_success": "Signed in as {{uname}}",+ "login_sms_title": "Sign in with SMS",+ "login_sms_country": "Country code",+ "login_sms_phone": "Phone number",+ "login_sms_send_code": "Send code",+ "login_sms_resend_in": "Resend in {{seconds}}s",+ "login_sms_code": "Verification code",+ "login_sms_submit": "Sign in",+ "login_sms_captcha_required": "Solve the captcha first",+ "login_sms_captcha_solve": "Open captcha",+ "login_sms_sent": "SMS sent. Enter the code you received.",+ "login_close": "Close",+ "login_cancel": "Cancel",+ "login_error_generic": "Sign-in failed. Try again.",+ "add_account_qr_btn": "Sign in with QR Code",+ "add_account_sms_btn": "Sign in with SMS",+ "add_account_manual_btn": "Paste cookies manually",+ "import_watch_later": "Import Watch Later",+ "import_history": "Import History",+ "import_no_account": "Sign in to Bilibili first",+ "import_done": "Queued {{count}} items",+ "login_webview_btn": "Sign in via Bilibili page",+ "login_webview_loading": "Opening sign-in window..."+ }+ }+ },+ "omnibox": {+ "placeholder": "Paste a URL, magnet link, .torrent, or search",+ "searching": "Searching...",+ "search_empty": "No results found",+ "unsupported": "Platform not supported yet",+ "go_to_hotmart": "Go to Hotmart",+ "download": "Download",+ "options": "Options",+ "advanced": "Advanced",+ "preparing": "Preparing download...",+ "error": "Download failed",+ "retry": "Retry",+ "batch_detected": "{{count}} URLs detected",+ "batch_download_all": "Download all",+ "batch_queued": "{{count}} downloads added to queue",+ "batch_file_open": "Load from file",+ "batch_file_title": "Select a .txt file with URLs",+ "batch_file_empty": "No valid URLs found in the file",+ "mode_auto": "Auto",+ "mode_audio": "Audio Only (MP3)",+ "mode_mute": "No Sound",+ "quality": "Quality",+ "quality_best": "Best quality",+ "quality_1080p": "Full HD (1080p)",+ "quality_720p": "HD (720p) — lighter",+ "quality_480p": "Medium (480p) — fast",+ "quality_360p": "Low (360p) — very light",+ "quality_best_short": "Best",+ "quality_audio": "Audio",+ "view_formats": "View formats",+ "hide_formats": "Hide formats",+ "no_formats": "No formats available for this video",+ "formats_error": "Failed to load formats",+ "preset_best": "Best",+ "preset_music": "Music",+ "preset_custom": "Custom",+ "formats_presets_label": "Format preset",+ "formats_merge_note": "Video formats (V) will be automatically merged with audio (A) if FFmpeg is available.",+ "formats_playlist_note": "Per-video format picker doesn't apply to playlists. The Quality option above applies to every video.",+ "referer_label": "Referer (optional)",+ "referer_placeholder": "https://example.com",+ "timerange_label": "Download only a section (optional)",+ "timerange_start": "Start",+ "timerange_end": "End",+ "timerange_hint": "Use mm:ss or hh:mm:ss. Leave empty to download the whole video.",+ "schedule_label": "Schedule",+ "schedule_1h": "In 1 hour",+ "schedule_tonight": "Tonight",+ "schedule_1d": "Tomorrow",+ "schedule_clear": "Clear",+ "schedule_start": "Start time",+ "schedule_stop": "Stop time",+ "schedule_hint": "Leave empty to start now. Optional stop time cancels the download if it's still running.",+ "playlist_selected": "{{selected}} of {{total}} selected",+ "playlist_all": "Select all",+ "playlist_none": "None",+ "playlist_loading": "Loading playlist…",+ "playlist_empty": "Could not load playlist items",+ "playlist_none_selected": "Select at least one item to download",+ "torrent_selected": "{{selected}} of {{total}} files selected",+ "torrent_loading": "Reading torrent contents…",+ "torrent_none_selected": "Select at least one file to download",+ "cookie_hint_stale": "This site's saved cookie is getting old.",+ "cookie_hint_expired": "This site's saved cookie has expired — downloads may fail.",+ "cookie_hint_action": "Update it",+ "external_url_ready": "URL received from the Chrome extension",+ "content_type": {+ "video": "Video",+ "audio": "Audio",+ "image": "Image",+ "post": "Post",+ "reel": "Reel",+ "clip": "Clip",+ "short": "Short",+ "playlist": "Playlist",+ "course": "Course",+ "file": "File",+ "unknown": "Media"+ },+ "fmt_type": "Type",+ "fmt_quality": "Quality",+ "fmt_streams": "A/V",+ "fmt_video": "Video",+ "fmt_audio": "Audio",+ "fmt_size": "Size",+ "fmt_speed": "Speed",+ "cookie_account": "Account",+ "cookie_account_cookies": "cookies",+ "mode_normal": "Normal",+ "mode_advanced": "Advanced",+ "adv": {+ "url_label": "URL",+ "url_placeholder": "https://...",+ "args_label": "yt-dlp arguments",+ "args_placeholder": "-f bv*+ba/b --merge-output-format mp4 --sub-langs en --embed-subs",+ "args_hint": "One flag per token, separated by spaces. Use quotes around values that contain spaces.",+ "run": "Run download",+ "queuing": "Queuing...",+ "queued": "Download queued",+ "url_required": "Type a URL first",+ "templates_title": "Saved templates",+ "templates_empty": "No templates saved yet. Type flags above and click Save to keep them for next time.",+ "template_new": "+ New",+ "template_name_placeholder": "Template name",+ "template_name_required": "Give the template a name",+ "template_save": "Save",+ "template_update": "Update",+ "template_saved": "Template saved",+ "template_delete": "Delete template",+ "template_flags": "flags"+ }+ },+ "about": {+ "tab": {+ "terms": "terms",+ "project": "project",+ "roadmap": "roadmap",+ "changelog": "changelog",+ "debug": "debug info"+ },+ "debug": {+ "title": "Debug info",+ "description": "Environment details to paste in a bug report. Does not include any secrets.",+ "copy_button": "Copy to clipboard",+ "copied_short": "Copied",+ "copied": "Debug info copied to clipboard",+ "copy_failed": "Could not copy to clipboard"+ },+ "debug_disabled_redirect": "Debug page is hidden. Enable it in Settings → Advanced → Diagnostics.",+ "description": "your media downloader. open source and free.",+ "terms_title": "terms of use",+ "terms_text": "OmniGet is provided as is and we make no guarantees. the app makes it easier to download content that's publicly available on the internet, but we take zero responsibility for what you download or what you do with it. by using OmniGet, you agree to that.",+ "legal_title": "legal basis",+ "legal_text": "personal use of OmniGet is supported by Article 184, §4 of the Brazilian Penal Code, which says that copying a work for your own private use, in a single copy, without any profit intent, is not a crime. that said, this doesn't mean you can distribute, resell, or use downloaded content commercially. copyright law still applies in civil matters.",+ "responsibility_title": "user responsibility",+ "responsibility_text": "you (the user) are responsible for what you do with OmniGet and the content you get through it. respect copyright and each platform's terms of service. always credit the original creators. don't use it for anything illegal or commercial that violates someone else's rights. if you're using content for education, cite your sources.",+ "mascot_title": "Loop",+ "mascot_text": "Loop is OmniGet's mascot, an expressive little creature that reacts to your downloads in real time. we want to keep Loop safe, so here are a few rules: you can make fan art of Loop freely, but you can't use his design or artworks commercially, in your own projects, or modify and redistribute the original artworks from the project.",+ "license_title": "license",+ "license_text": "OmniGet is open source and licensed under GPL-3.0. the source code is on GitHub. the \"OmniGet\" name, logo, and Loop are project trademarks and aren't covered by the code license.",+ "star_button": "star on GitHub",+ "star_description": "if you enjoy the project, leave a star!",+ "version": "version",+ "features_title": "what we've built so far",+ "feature_platforms": "downloads from 10+ platforms and 1000+ more via yt-dlp: YouTube, Instagram, TikTok, Twitter/X, Reddit, Twitch, Pinterest, Vimeo, Bluesky, Telegram",+ "feature_hotmart": "Hotmart course downloads with login (videos, attachments, descriptions)",+ "feature_progress": "real-time download progress with ETA and speed",+ "feature_mascot": "Loop, the mascot that reacts to your downloads",+ "feature_themes": "11 themes: Dark, Light, Catppuccin (4 flavors), One Dark Pro, Dracula, NyxVamp (3 variants)",+ "feature_i18n": "available in English, Portuguese, Chinese, Japanese, Italian, and French",+ "feature_tech": "built with Tauri + Rust. fast and lightweight",+ "roadmap_intro": "what's planned for the next versions of OmniGet.",+ "roadmap_platforms_title": "integrations",+ "roadmap_features_title": "features",+ "roadmap_feature_telegram_multi_account": "Telegram multiple accounts",+ "roadmap_community_title": "got an idea?",+ "roadmap_community_text": "we're accepting ideas and suggestions! it's a great way to request a new platform or feature.",+ "roadmap_community_discord": "reach out on discord:",+ "roadmap_community_issue": "or open an issue on the repository:",+ "tagline": "Download anything, from anywhere.",+ "credit": "Made with love by tonho.wtf"+ },+ "marketplace": {+ "title": "Marketplace",+ "installed": "Installed",+ "browse": "Browse",+ "no_plugins": "No plugins installed",+ "enable": "Enable",+ "disable": "Disable",+ "enabled": "Enabled",+ "disabled": "Disabled",+ "version": "v{{version}}",+ "by_author": "by {{author}}",+ "uninstall": "Uninstall",+ "restart_required": "Restart OmniGet to apply changes",+ "browse_loading": "Loading plugins...",+ "browse_error": "Could not load plugins",+ "browse_error_hint": "OmniGet couldn't reach the plugin registry. If GitHub is blocked on your network, set up a proxy in Settings → Network, then try again.",+ "browse_retry": "Try again",+ "install_network_error": "Couldn't reach GitHub to download this plugin. Set up a proxy in Settings → Network, then try again.",+ "browse_empty": "No plugins available yet",+ "official_badge": "Official",+ "community_badge": "Community",+ "installed_badge": "Installed",+ "capabilities": "Permissions",+ "cap_events": "Send events to the app",+ "cap_toast": "Show notifications",+ "cap_settings": "Read and save settings",+ "cap_filesystem": "Access download folders",+ "cap_proxy": "Use proxy configuration",+ "cap_tools": "Use managed tools (yt-dlp, FFmpeg)",+ "cap_download_queue": "Submit downloads to the queue",+ "install": "Install",+ "update_available": "Update",+ "update_hint": "v{{version}} available",+ "plugin_not_installed": "Plugin not installed",+ "plugin_install_hint": "Install this plugin from the Marketplace to use it.",+ "go_to_marketplace": "Go to Marketplace",+ "plugin_restart_hint": "Restart OmniGet to load this plugin.",+ "plugin_incompatible_title": "Plugin incompatible with this version",+ "plugin_incompatible_hint": "This plugin was built for an older version of OmniGet and cannot be loaded. Reinstall it from the Marketplace to get a compatible build — restarting will not fix this.",+ "plugin_load_failed_title": "Plugin failed to load",+ "plugin_load_failed_hint": "OmniGet couldn't load this plugin. Try reinstalling it from the Marketplace.",+ "plugin_load_error_details": "Details: {{error}}",+ "reinstall": "Reinstall"+ },+ "services": {+ "title": "Supports YouTube, Instagram and 1000+ sites",+ "title_show": "show supported services",+ "title_hide": "hide supported services",+ "disclaimer": "availability depends on each platform and may vary",+ "and_more": "+1000 more"+ },+ "terms_note": {+ "agreement": "by continuing, you agree to the",+ "link": "terms and ethics of use"+ },+ "convert": {+ "title": "Convert",+ "select_files": "Select files",+ "select_folder": "Select folder",+ "empty": "No files selected. Add files to convert.",+ "file_list": "Files",+ "options_title": "Options",+ "output_format": "Output format",+ "video_codec": "Video codec",+ "audio_codec": "Audio codec",+ "resolution": "Resolution",+ "preset": "Preset",+ "video_bitrate": "Video bitrate",+ "audio_bitrate": "Audio bitrate",+ "trim_start": "Trim start",+ "trim_end": "Trim end",+ "convert_btn": "Convert",+ "converting": "Converting...",+ "cancel": "Cancel",+ "remove": "Remove",+ "clear_all": "Clear all",+ "status_idle": "Pending",+ "status_probing": "Analyzing...",+ "status_ready": "Ready",+ "status_converting": "Converting",+ "status_complete": "Complete",+ "status_error": "Error",+ "original": "Original",+ "auto": "Auto",+ "hwaccel_detected": "GPU acceleration: {{encoder}}",+ "hwaccel_none": "No GPU acceleration detected",+ "probe_failed": "Probe failed",+ "conversion_failed": "Conversion failed",+ "toast_complete": "Conversion complete",+ "toast_error": "Conversion failed",+ "no_ffmpeg": "FFmpeg not found. Install FFmpeg to use conversion."+ },+ "changelog": {+ "title": "What's New",+ "empty": "No release notes available."+ },+ "onboarding": {+ "welcome_title": "Welcome to OmniGet!",+ "welcome_desc": "I'll help you download any video or course from the internet. Simple, fast, and free.",+ "next": "Next",+ "skip": "Skip",+ "back": "Back",+ "finish": "Get started",+ "step_of": "Step {{current}} of {{total}}",+ "folder_title": "Where to save your downloads?",+ "folder_desc": "Choose the folder where your videos and courses will be saved.",+ "folder_current": "Current folder:",+ "folder_change": "Change folder",+ "deps_title": "Required Tools",+ "deps_desc": "I need a couple of tools to work properly. I can install everything automatically!",+ "deps_install_all": "Install all",+ "language_label": "Language",+ "done_title": "All set!",+ "done_desc": "Paste a URL in the search bar and watch the magic happen.",+ "plugins_title": "Supercharge your OmniGet",+ "plugins_desc": "Choose which features to install. You can always add or remove them later from the Marketplace.",+ "hotkey_title": "Global Hotkey",+ "hotkey_desc": "Copy any video URL, press the hotkey, and OmniGet starts downloading instantly — even when minimized.",+ "hotkey_on": "Enabled",+ "hotkey_off": "Disabled",+ "rpc_title": "Discord Rich Presence",+ "rpc_desc": "Show on your Discord profile that you're using OmniGet — including what you're listening to, watching or reading.",+ "rpc_on": "Enabled",+ "rpc_off": "Disabled",+ "rpc_privacy_note": "Shows what you're listening to, watching or reading. Downloads stay private.",+ "theme_label": "Theme",+ "theme_system": "System",+ "theme_light": "Light",+ "theme_dark": "Dark"+ },+ "hints": {+ "omnibox": "Paste the URL of the video or media you want to download here.",+ "telegram": "Connect your Telegram account to download media from channels and groups.",+ "hotkey": "Global hotkey: automatically downloads the URL currently in your clipboard.",+ "clipboard": "Detects URLs automatically when you copy a link and fills the omnibox.",+ "downloads_empty": "Your downloads will appear here. Go to the home page to start.",+ "convert": "Convert media files between formats using FFmpeg."+ },+ "common": {+ "cancel": "Cancel",+ "clear": "Clear",+ "retry": "Retry",+ "close": "Close",+ "hint": "Hint",+ "error": "Error",+ "loading": "Loading…",+ "unknown_error": "Unknown error",+ "ytdlp_missing": "yt-dlp is not installed. Install it in Settings to enable downloads.",+ "go_to_settings": "Go to Settings",+ "cookie_error_message": "Automatic cookie detection only works with Firefox. Chrome, Edge, and other Chromium-based browsers block cookie access. To use cookies: install Firefox and log in to your accounts there, or export a cookies.txt file from your browser and set it in Settings > Download > Cookie file.",+ "cookie_file_label": "Cookie file (cookies.txt)",+ "cookie_file_choose": "Choose file",+ "cookie_file_hint": "Export cookies from your browser using an extension like 'Get cookies.txt LOCALLY' and select the file here. This is required for Chrome/Edge users who need authenticated downloads."+ },+ "platforms": {+ "bilibili": {+ "kind": {+ "video": "Video",+ "bangumi_episode": "Anime · Episode",+ "bangumi_season": "Anime · Season",+ "bangumi_media": "Anime",+ "cheese_episode": "Course · Lesson",+ "cheese_season": "Course",+ "space": "Creator channel",+ "favlist": "Favorites",+ "collection": "Collection",+ "series": "Series",+ "popular": "Weekly Popular",+ "watch_later": "Watch Later",+ "history": "History",+ "festival": "Event page"+ },+ "qn": {+ "8k": "8K",+ "dolby_vision": "Dolby Vision",+ "hdr": "HDR",+ "4k": "4K",+ "1080p60": "1080p60",+ "1080p_plus": "1080p+",+ "ai": "AI Upscale",+ "1080p": "1080p",+ "720p": "720p",+ "480p": "480p",+ "360p": "360p",+ "unknown": "Unknown"+ },+ "codec": {+ "avc": "H.264 / AVC",+ "hevc": "H.265 / HEVC",+ "av1": "AV1",+ "unknown": "Unknown"+ },+ "audio": {+ "hires": "Hi-Res Lossless",+ "dolby_atmos": "Dolby Atmos",+ "192k": "192 kbps",+ "132k": "132 kbps",+ "64k": "64 kbps",+ "unknown": "Unknown"+ },+ "badge": {+ "charging_exclusive": "Sponsor-only",+ "preview": "Preview",+ "paid_locked": "Paid",+ "partial_preview": "Trial",+ "pgc": "Series",+ "collab": "Collab",+ "expired": "Expired"+ },+ "phase": {+ "preview": "Reading qualities",+ "connecting": "Connecting to CDN",+ "downloading": "Downloading",+ "muxing": "Muxing",+ "done": "Done"+ },+ "preview": {+ "loading": "Reading available qualities...",+ "auto": "Auto",+ "quality": "Quality",+ "codec": "Codec",+ "audio": "Audio",+ "no_account_hint": "Sign in to Bilibili to unlock 4K, HDR, Hi-Res Lossless and Dolby.",+ "premium_hint": "Some qualities here require a 大会员 (premium) subscription on Bilibili."+ },+ "notice": {+ "session_expired_title": "Session expired",+ "session_expired_body": "Your Bilibili session has expired. Sign in again to keep downloading at premium quality.",+ "session_expired_action": "Sign in again",+ "session_expired_dismiss": "Later"+ }+ }+ },+ "errors": {+ "bilibili": {+ "network_failed": "Network error while reaching Bilibili",+ "http_status": "Unexpected response from Bilibili",+ "invalid_json": "Bilibili returned malformed data",+ "api_code": "Bilibili rejected the request",+ "not_logged_in": "Sign in to Bilibili to continue",+ "geo_blocked": "Not available in your region",+ "rate_limited": "Bilibili is rate-limiting requests — try again later",+ "premium_required": "Premium (大会员) required for this quality",+ "content_unavailable": "Content unavailable",+ "cookie_missing": "Bilibili cookies missing",+ "cancelled": "Cancelled"+ },+ "login_required": "Login required — use browser cookies or try another URL",+ "rate_limited": "Too many requests (429) — try again later",+ "access_denied": "Access denied (403) — video may be private or region-restricted",+ "extraction_failed": "Extraction failed — update yt-dlp or try again",+ "format_unavailable": "Requested format not available",+ "video_unavailable": "Video unavailable or removed",+ "video_private": "This video is private",+ "copyright_blocked": "Blocked due to copyright",+ "geo_restricted": "Not available in your region",+ "connection_timeout": "Connection timed out — check your internet",+ "ffmpeg_missing": "FFmpeg not found — install it in Settings",+ "unsupported_url": "Unsupported URL — check the link",+ "page_access_failed": "Could not access the page — check the link and connection",+ "no_formats": "No video formats found for this link",+ "cookie_database": "Browser cookie access failed. Download will continue without authentication.",+ "tiktok_blocked": "TikTok is temporarily blocking requests. Try again in a few minutes.",+ "download_timeout": "Download timed out. Check your internet connection.",+ "size_mismatch": "Downloaded file size doesn't match. Try again.",+ "disk_full": "Write error — your disk may be full.",+ "path_too_long": "Download folder path is too long ({{current}}/{{limit}} chars). Choose a shorter folder.",+ "console_encoding": "Console encoding issue (non-UTF-8 locale). Update yt-dlp in Settings → Dependencies, or run \"chcp 65001\" in a terminal and reopen the app.",+ "extractor_broken": "The site extractor is broken. Update yt-dlp in Settings → Dependencies, then retry.",+ "output_missing": "Download finished, but no file appeared in the folder (or it's empty). Check disk space and antivirus exclusions, then try again."+ },+ "debug": {+ "title": "Activity Log",+ "enable": "Activity log",+ "enable_desc": "See what OmniGet is doing behind the scenes",+ "filter_all": "All",+ "filter_downloads": "Downloads",+ "filter_network": "Network",+ "filter_auth": "Authentication",+ "filter_system": "System",+ "filter_convert": "Convert",+ "filter_errors": "Errors only",+ "copy_report": "Copy report",+ "report_copied": "Diagnostic report copied to clipboard",+ "clear": "Clear",+ "no_entries": "No activity yet. Start a download to see events here.",+ "open_panel": "Open activity log",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."+ },+ "p2p": {+ "send_file": "Send File",+ "send_title": "Send File via P2P",+ "send_description": "Send any file to another OmniGet user. A share code will be generated — the receiver pastes it in the omnibox to download.",+ "select_file": "Select File",+ "share_code": "Share Code",+ "click_to_copy": "Click to copy",+ "share_hint": "Share this code with the receiver",+ "code_copied": "Code copied to clipboard",+ "waiting_for_receiver": "Waiting for receiver...",+ "transferring": "Transferring...",+ "transfer_complete": "Transfer complete",+ "send_failed": "Send failed",+ "try_again": "Try Again",+ "pause": "Pause",+ "resume": "Resume",+ "paused": "Paused",+ "receive_title": "Incoming P2P Transfer",+ "receive_description": "Someone wants to send you a file. Accept to start downloading.",+ "accept_transfer": "Accept & Download",+ "reject_transfer": "Decline",+ "searching_hint": "Connecting to relay server..."+ },+ "mascot": {+ "idle": "Paste a link or search to get started!|What are we downloading today?|Ready when you are!",+ "detecting": "Hmm, let me check this...|Analyzing the link...|One sec...",+ "detected": "Got it! Ready when you are!|Found it! Let's go?|All set!",+ "preparing": "Setting things up...|Almost ready...|Preparing your download...",+ "search": "Here's what I found!|Take a look!|Check these out!",+ "error": "Oops, something went wrong. Wanna try again?|That didn't work. Let's try again?|Hmm, something broke...",+ "complete": "All done!|Download complete!|Got it for you!",+ "amazed": "Wow, your first download! 🎉|There it is — your first one!|Saved! Welcome aboard!",+ "downloading": "Downloading now...|Working on it!|Getting your files...",+ "stalled": "Hmm, this is taking a while...|Hang tight, still working...|The connection seems slow...",+ "queue": "Waiting in line...|Patience, almost there...|Your turn is coming!"+ },+ "courses": {+ "title": "Courses",+ "search_placeholder": "Search platforms...",+ "not_connected": "Not connected",+ "connection_failed": "Connection failed",+ "connected_as": "Connected as {{email}}",+ "back": "Back to Courses",+ "coming_soon": "Coming soon",+ "update_plugin_hint": "Update the Courses plugin for the best experience.",+ "update_plugin_for_platform": "This platform requires an updated Courses plugin. Check the Marketplace for updates.",+ "search_btn": "Search",+ "no_search_results": "No results found.",+ "login_with_browser": "Login with Browser",+ "browser": "Browser",+ "browser_hint": "A browser window will open for you to log in. After logging in, your session will be detected automatically.",+ "otp_check_email": "Check your email for the verification code.",+ "otp_code_label": "Verification Code",+ "verify_code": "Verify Code"+ },+ "hotmart": {+ "title": "Hotmart",+ "login": "Sign in",+ "logout": "Sign out",+ "checking_session": "Checking session...",+ "logged_as": "Logged in as {{email}}",+ "email_label": "Email",+ "email_placeholder": "[email protected]",+ "password_label": "Password",+ "password_placeholder": "Your password",+ "authenticating": "Authenticating...",+ "courses_title": "Your Courses",+ "loading_courses": "Loading courses...",+ "courses_error": "Failed to load courses",+ "no_courses": "No courses found in this account.",+ "course_count": "{{count}} courses",+ "course_count_one": "{{count}} course",+ "page_of": "Page {{current}} of {{total}}",+ "free": "Free",+ "download_btn": "Download",+ "downloading": "Downloading...",+ "downloaded": "Downloaded",+ "download_retry": "Error — Retry",+ "cancel_download": "Cancel",+ "unavailable": "Unavailable",+ "external_platform": "External platform",+ "choose_folder": "Choose download folder",+ "refresh": "Refresh",+ "unknown_error": "Unknown error",+ "captcha_detected": "Captcha detected — please solve it in the login window."+ },+ "torrent": {+ "open_file": "Open .torrent"+ },+ "udemy": {+ "title": "Udemy",+ "login": "Sign in",+ "logout": "Sign out",+ "checking_session": "Checking session...",+ "logged_as": "Logged in as {{email}}",+ "email_label": "Email",+ "email_placeholder": "[email protected]",+ "authenticating": "Signing in...",+ "waiting_code": "A 6-digit code was sent to your email. Please enter it in the login window.",+ "waiting_code_title": "Check your email",+ "courses_title": "Your Courses",+ "loading_courses": "Loading courses...",+ "courses_error": "Failed to load courses",+ "no_courses": "No courses found in this account.",+ "course_count": "{{count}} courses",+ "course_count_one": "{{count}} course",+ "page_of": "Page {{current}} of {{total}}",+ "download_btn": "Download",+ "downloading": "Downloading...",+ "downloaded": "Downloaded",+ "download_retry": "Error — Retry",+ "choose_folder": "Choose download folder",+ "refresh": "Refresh",+ "unknown_error": "Unknown error",+ "lectures": "{{count}} lectures",+ "login_email_tab": "Email (Udemy.com)",+ "login_cookies_tab": "Cookies (Enterprise)",+ "cookies_instructions": "For Udemy Business/Enterprise accounts (e.g. company.udemy.com), export your cookies from the browser using an extension like \"Get cookies.txt locally\" in JSON format, then paste or load the file here.",+ "cookies_placeholder": "Paste cookie JSON here...",+ "cookies_load_file": "Load JSON file",+ "cookies_login": "Sign in with Cookies",+ "logged_as_enterprise": "Logged in as {{email}} ({{portal}}.udemy.com)",+ "upload_file": "Upload file"+ },+ "notifications": {+ "title": "Notifications",+ "close": "Close",+ "filter_label": "Filter",+ "filter_unread": "Unread",+ "filter_all": "All",+ "dismiss_all": "Clear all",+ "dismiss_all_aria": "Clear all notifications",+ "empty_unread": "All caught up!",+ "empty_all": "No notifications",+ "loading": "Loading…",+ "dismiss": "Dismiss",+ "unread_indicator": "Unread",+ "new_lesson_fallback": "New lesson",+ "bell_aria": "Notifications ({{count}} unread)",+ "badge_aria": "{{count}} new notifications",+ "time_now": "now",+ "time_min": "{{n}}min",+ "time_hour": "{{n}}h",+ "time_day": "{{n}}d",+ "inline_section_aria": "New lessons",+ "inline_count_one": "{{n}} new lesson",+ "inline_count_other": "{{n}} new lessons",+ "inline_unread_tag_one": "{{n}} unread",+ "inline_unread_tag_other": "{{n}} unread",+ "inline_dismiss_all": "Dismiss all"+ },+ "study": {+ "common": {+ "loading": "Loading...",+ "error": "Error",+ "save": "Save",+ "saving": "Saving...",+ "cancel": "Cancel",+ "create": "Create",+ "clear": "Clear",+ "delete": "Delete",+ "edit": "Edit",+ "close": "Close",+ "copy": "Copy",+ "copied": "Copied!",+ "retry": "Retry",+ "refresh": "Refresh",+ "search": "Search",+ "all": "All",+ "empty": "Nothing here yet",+ "confirm": "Are you sure?",+ "dismiss": "Dismiss",+ "go_home": "Back"+ },+ "about": {+ "eyebrow": "omniget · open-source",+ "short_pitch": "Open-source on GitHub",+ "long_pitch": "Studying isn't just PDFs. It's books, podcasts, lessons, scribbled notes in between. omniget bundles all of it — without losing your flow switching windows.",+ "cta_github": "See on GitHub"+ },+ "hub": {+ "title": "Study",+ "subtitle": "Turn your downloaded courses into a deliberate practice loop.",+ "library": "Library",+ "music": "Music",+ "focus": "Focus",+ "progress": "Progress",+ "achievements": "Achievements",+ "anki": "Anki",+ "notes": "Notes",+ "read": "Read",+ "settings": "Settings",+ "visited_recent": "Recently visited",+ "recently_added": "Recently added",+ "new": "new",+ "now": "Now",+ "continue_title": "Continue course",+ "continue_cta": "Resume",+ "review_title": "Review cards",+ "review_count": "{{n}} cards due",+ "review_cta": "Review",+ "review_empty": "Nothing due today",+ "focus_title": "Focus session",+ "focus_hint": "25 min · deep focus",+ "focus_cta": "Start",+ "explore": "Explore",+ "streak_label": "days",+ "streak_none": "No streak",+ "goal_met": "Daily goal reached",+ "greeting_morning": "Good morning",+ "greeting_afternoon": "Good afternoon",+ "greeting_evening": "Good evening",+ "secondary_review": "{{n}} cards to review",+ "secondary_continue": "Resume {{title}}",+ "secondary_resume_book": "Keep reading {{title}}",+ "secondary_focus": "Start a focus session",+ "secondary_explore": "Browse library",+ "review_subtitle": "cards due today",+ "focus_hint_default": "25 min · deep focus",+ "made_by": "Made by:"+ },+ "search": {+ "placeholder": "Search courses, lessons, notes, flashcards...",+ "courses": "Courses",+ "lessons": "Lessons",+ "notes": "Notes",+ "no_results": "No results for \"{{term}}\"",+ "hint": "Press Ctrl+K to open · Esc to close"+ },+ "palette": {+ "aria_modes": "Palette modes",+ "tab_search": "Search",+ "tab_jump": "Jump to",+ "tab_action": "Actions",+ "heading_shortcuts": "Shortcuts",+ "heading_recent_pages": "Recent pages",+ "heading_actions": "Actions",+ "empty_pages": "No pages yet.",+ "shortcut_daily": "Today's daily",+ "shortcut_journal_history": "Journal history",+ "shortcut_graph": "Graph",+ "shortcut_templates": "Templates",+ "aria_xp_progress": "{{pct}}% to level {{level}}",+ "action_create_page_label": "Create page",+ "action_create_page_hint": "New blank page",+ "action_open_daily_label": "Open today's daily",+ "action_open_templates_label": "Open templates",+ "action_open_graph_label": "Open graph",+ "action_open_graph_hint": "Graph visualization",+ "action_rebuild_fts_label": "Rebuild search (FTS)",+ "action_rebuild_fts_hint": "Rebuild full-text index",+ "action_export_graph_label": "Export graph (JSON)",+ "action_export_graph_hint": "Download notes-graph.json",+ "action_open_settings_label": "Open settings",+ "action_vacuum_label": "Compact database (vacuum)",+ "action_vacuum_hint": "SQLite maintenance"+ },+ "music": {+ "title": "Music",+ "subtitle": "Your tracks, albums and playlists.",+ "library_title": "Library",+ "favorites_title": "Favorites",+ "favorites_subtitle": "Tracks you marked with ❤",+ "favorites_empty": "Nothing favorited yet. Mark a track to start.",+ "add_root": "Add folder",+ "add_root_cta": "Add music folder",+ "clear_covers": "Reset covers",+ "clear_covers_hint": "Wipes the cover cache and forces re-extraction on next scan",+ "clear_covers_confirm": "Delete all cached covers? Next scan will re-extract them.",+ "clear_covers_done": "{{files}} files deleted · {{tracks}} tracks reset",+ "diagnostics": "Diagnostics",+ "diagnostics_hint": "Shows current cover state (paths, sizes, counts) — useful when thumbs don't show",+ "diagnostics_title": "Cover diagnostics",+ "scan_now": "Scan",+ "scanning": "Scanning…",+ "scan_done": "{{added}} added · {{updated}} updated · {{removed}} removed",+ "root_added": "Folder added: {{path}}",+ "empty_no_roots_title": "Your music library is empty",+ "empty_no_roots_body": "Point to a folder with your audio files. MP3, FLAC, M4A, OGG, OPUS — all common formats. Nothing is copied or moved.",+ "empty_no_tracks_title": "Ready to scan",+ "empty_no_tracks_body": "Folders are configured but we haven't scanned yet. Click below to index your tracks.",+ "shelf_continue_empty": "Nothing unfinished here. Play something to pick it up later.",+ "shelf_recent": "Recently played",+ "shelf_recent_empty": "Your listening story starts with the next track you play.",+ "diag_metrics_title": "YouTube metrics",+ "diag_refresh": "Refresh",+ "diag_metrics_reset": "Reset metrics",+ "diag_loading": "Loading…",+ "diag_metrics_empty": "No data yet. Play some tracks to gather telemetry.",+ "diag_metrics_endpoint": "Endpoint",+ "diag_metrics_success": "Success",+ "diag_metrics_fail": "Failures",+ "diag_metrics_last_error": "Last error",+ "diag_potoken_title": "PoToken",+ "diag_potoken_engine": "JS engine",+ "diag_potoken_snapshot": "Snapshot",+ "diag_potoken_minting": "Mint",+ "diag_potoken_minting_active": "Active",+ "diag_potoken_minting_pending": "Pending (multi-week)",+ "diag_potoken_visitor": "Visitor token",+ "diag_potoken_visitor_expired": "Expired",+ "diag_potoken_visitor_active": "Active — expires in {{seconds}}s",+ "diag_potoken_visitor_active_unknown": "Active",+ "diag_potoken_visitor_none": "No token",+ "diag_potoken_cache_count": "Cached tokens",+ "diag_potoken_last_generated": "Generated at",+ "diag_loop_title": "Loop extension (YouTube cookies)",+ "diag_loop_missing": "Cookie file not found.",+ "diag_loop_missing_hint": "Install the Loop browser extension and export cookies to the path shown.",+ "diag_loop_no_youtube": "File present but no YouTube cookies.",+ "diag_loop_no_youtube_hint": "Open youtube.com in your browser with the Loop extension installed and sign in. Cookies show up here automatically.",+ "diag_loop_ready": "YouTube cookies ready.",+ "retry": "Try again",+ "speed_dial_search": "Search",+ "speed_dial_library": "Library",+ "speed_dial_playlists": "Playlists",+ "speed_dial_favorites": "Favorites",+ "speed_dial_history": "History",+ "speed_dial_trending": "Trending",+ "speed_dial_albums": "Albums",+ "speed_dial_artists": "Artists",+ "speed_dial_genres": "Genres",+ "shelf_recent_albums": "Recently added",+ "shelf_recent_albums_empty": "Point to a music folder in the menu to scan your albums.",+ "shelf_artists": "Artists",+ "shelf_artists_empty": "No artists indexed yet.",+ "explore_youtube_cta": "Explore on YouTube",+ "explore_youtube_cta_body": "Discoveries, charts, new releases, and subscriptions.",+ "pull_to_refresh_hint": "Release to refresh",+ "pull_to_refresh_release": "Refreshing…",+ "loading": "Loading…",+ "play_count_today": "Pick up where you left off",+ "history_empty_title": "Your history starts when you play something",+ "history_empty_cta": "Search on YouTube",+ "back": "Back",+ "play_all": "Play all",+ "shuffle_play": "Shuffle",+ "save_playlist": "Save",+ "share": "Share",+ "share_copied": "Link copied",+ "expandable_more": "show more",+ "expandable_less": "show less",+ "album_loading_error": "Couldn't load this album.",+ "playlist_loading_error": "Couldn't load this playlist.",+ "album_empty": "This album has no available tracks.",+ "playlist_empty": "This playlist is empty.",+ "eyebrow_playlist": "Playlist",+ "tab_songs": "Songs",+ "tab_videos": "Videos",+ "tab_about": "About",+ "shuffle_radio": "Shuffle radio",+ "no_description": "No description.",+ "my_playlists_title": "My playlists",+ "my_playlists_subtitle": "Your local lists built from YouTube tracks.",+ "my_playlists_empty_title": "No playlists yet",+ "my_playlists_empty_body": "Create one to organize your way — nothing leaves your machine.",+ "my_playlists_create": "New playlist",+ "my_playlists_create_title": "Create playlist",+ "my_playlists_form_name": "Name",+ "my_playlists_form_name_placeholder": "e.g. To study",+ "my_playlists_form_description": "Description (optional)",+ "my_playlists_form_save": "Create",+ "my_playlists_form_cancel": "Cancel",+ "my_playlists_delete_confirm_title": "Delete playlist?",+ "my_playlists_delete_confirm_body": "The {{count}} tracks stay on YouTube — only your local list disappears.",+ "my_playlists_delete_confirm_empty": "Your local list disappears. This can't be undone.",+ "my_playlists_delete_confirm_action": "Delete playlist",+ "my_playlists_delete_confirm_cancel": "Cancel",+ "my_playlists_rename_aria": "Rename playlist",+ "my_playlists_settings_aria": "Playlist actions",+ "my_playlists_open_aria": "Open playlist",+ "remove_from_playlist": "Remove from playlist",+ "remove_from_playlist_aria": "Remove {{title}} from playlist",+ "add_to_playlist": "Add to playlist",+ "add_to_playlist_modal_title": "Add from YouTube",+ "add_to_playlist_search_placeholder": "Search a video to add…",+ "add_to_playlist_search_short": "Type at least 2 characters.",+ "add_to_playlist_close": "Close",+ "add_to_playlist_added": "Added to playlist",+ "rename_inline_placeholder": "Playlist name",+ "tracks_count_n": "{{count}} tracks",+ "track_count_one": "1 track",+ "playlist_empty_cta": "Add from YouTube",+ "shelf_spotify_recent": "Spotify · Recently played",+ "shelf_soundcloud_likes": "SoundCloud · Your likes",+ "history_filter_all": "All",+ "empty_results": "Your library is empty — import a folder or connect a source from the side menu.",+ "empty_search_no_results": "No matching tracks — try another search.",+ "empty_album": "This album is empty.",+ "shelf_continue": "Continue listening",+ "shelf_albums": "Albums",+ "shelf_added": "Recently added",+ "shelf_most_played": "Most played",+ "see_all": "See all",+ "tracks_count": "{{count}} tracks",+ "eyebrow_album": "Album",+ "play": "Play",+ "pause": "Pause",+ "prev": "Previous",+ "next": "Next",+ "shuffle": "Shuffle",+ "repeat": "Repeat",+ "favorite": "Favorite",+ "unfavorite": "Unfavorite",+ "player_aria": "Music player",+ "seek_aria": "Playback position",+ "tab_tracks": "Tracks",+ "tab_albums": "Albums",+ "tab_artists": "Artists",+ "search_placeholder": "Search title, artist, album…",+ "nav_home": "Home",+ "nav_library": "Library",+ "nav_favorites": "Favorites",+ "nav_genres": "Genres",+ "nav_activity": "Activity",+ "nav_history": "History",+ "queue_clear": "Clear",+ "eq_title": "Equalizer",+ "eq_enable": "Enable equalizer",+ "eq_preset": "Preset",+ "eq_reset": "Reset",+ "crossfade_label": "Crossfade",+ "crossfade_off": "Off",+ "normalization_label": "Volume normalization",+ "normalization_hint": "Match perceived loudness across tracks (uses YouTube loudnessDb when available).",+ "skip_silence_label": "Skip silence",+ "skip_silence_hint": "Auto-skip silent passages longer than 1.5s. Useful for podcasts.",+ "listen_together_title": "Listen together",+ "listen_together_intro": "Share what you're listening to in real time with a friend. Connect to a WebSocket relay and create or join a room with a short code.",+ "listen_together_relay_url": "Relay URL",+ "listen_together_relay_hint": "Your own ws:// or wss:// relay (see omniget-listen-relay).",+ "listen_together_name": "Your display name",+ "listen_together_create": "Create a room",+ "listen_together_join": "Join",+ "listen_together_connecting": "Connecting…",+ "listen_together_room": "Room",+ "listen_together_copied": "copied!",+ "listen_together_role_host": "Host",+ "listen_together_role_guest": "Guest",+ "listen_together_members": "Members",+ "listen_together_you": "(you)",+ "listen_together_chat": "Chat",+ "listen_together_chat_empty": "No messages yet — say hi!",+ "listen_together_chat_placeholder": "Type a message…",+ "listen_together_send": "Send",+ "listen_together_leave": "Leave room",+ "sleep_timer_title": "Sleep timer",+ "sleep_timer_active": "Active",+ "sleep_timer_presets": "Presets",+ "sleep_timer_minutes_short": "min",+ "sleep_timer_minutes": "minutes",+ "sleep_timer_custom": "Custom",+ "sleep_timer_apply": "Apply",+ "sleep_timer_other": "Other",+ "sleep_timer_end_of_track": "Stop after current track",+ "sleep_timer_cancel": "Cancel",+ "eq_preset_flat": "Flat",+ "eq_preset_bass": "Bass",+ "eq_preset_vocal": "Vocal",+ "eq_preset_treble": "Treble",+ "eq_preset_rock": "Rock",+ "eq_preset_pop": "Pop",+ "eq_preset_classical": "Classical",+ "eq_preset_electronic": "Electronic",+ "eq_preset_custom": "Custom",+ "genres_title": "Genres",+ "genres_subtitle": "Browse by music genre detected in your files.",+ "no_genres": "No genres found. Tracks need a genre tag.",+ "eyebrow_genre": "Genre",+ "albums_count": "{{count}} albums",+ "artists_count": "{{count}} artists",+ "activity_title": "Your activity",+ "activity_subtitle": "What you listened, when, how much.",+ "no_activity": "No activity in this period yet. Play some tracks to start seeing stats.",+ "period_7d": "7 days",+ "period_30d": "30 days",+ "period_90d": "90 days",+ "period_1y": "1 year",+ "period_all": "All time",+ "total_plays": "Plays",+ "total_listened": "Time listened",+ "unique_tracks": "Unique tracks",+ "top_tracks": "Top tracks",+ "top_artists": "Top artists",+ "top_albums": "Top albums",+ "top_genres": "Top genres",+ "empty": "Empty",+ "lyrics_title": "Lyrics",+ "lyrics_loading": "Fetching lyrics…",+ "lyrics_not_found": "No lyrics available",+ "lyrics_lrclib_hint": "You can paste lyrics manually in .lrc format",+ "lyrics_no_track": "No track playing",+ "lyrics_refresh": "Fetch again",+ "lyrics_retry": "Try again",+ "lyrics_source": "Source: {{source}}",+ "lyrics_error": "Failed to fetch lyrics",+ "lyrics_error_hint": "Music keeps playing — you can try again anytime",+ "lyrics_add_manual": "Add lyrics",+ "lyrics_paste_title": "Paste lyrics manually",+ "lyrics_paste_placeholder": "Paste the contents of a .lrc file here",+ "lyrics_paste_hint": "Accepts LRC format with [mm:ss.xx] timestamps. At least one synced line is required.",+ "lyrics_paste_save": "Save lyrics",+ "lyrics_paste_invalid": "No timestamped lines found — check the format",+ "lyrics_paste_cancel": "Cancel",+ "lyrics_translation_show": "Show translation",+ "lyrics_translation_hide": "Hide translation",+ "lyrics_translation_loading": "Translating lyrics…",+ "lyrics_translation_skipped_pt": "Lyrics already in Portuguese",+ "lyrics_translation_no_translator": "Translation not configured",+ "lyrics_translation_no_translator_hint": "Open Settings → Music → Lyrics to pick a translator",+ "lyrics_translation_error": "Translation failed — you can try again",+ "lyrics_translation_edited_badge": "✎ community",+ "lyrics_translation_edit_placeholder": "Rewrite this line",+ "lyrics_translation_edit_save": "Save",+ "lyrics_translation_edit_cancel": "Cancel",+ "lyrics_translation_available_hint": "Translation available 🌐",+ "lyrics_translation_attribution": "Translated via {{translator}}",+ "player_resolving": "Resolving track…",+ "player_error_network": "No connection right now.",+ "player_error_auth_expired": "Session expired — refreshing.",+ "player_error_track_unavailable": "Track was pulled from the source.",+ "player_error_region_blocked": "Blocked in your region.",+ "player_error_unsupported_format": "Format we can't play here.",+ "player_error_format_unavailable": "This video needs YouTube login. Open youtube.com in a browser with the Loop extension and sign in to your account.",+ "player_error_unknown": "Something went sideways.",+ "player_action_retry": "Try again",+ "player_action_skip": "Skip",+ "player_action_refresh": "Refresh",+ "player_action_configure": "Configure",+ "player_auto_skip_label": "Skip automatically next time",+ "player_dismiss_error": "Dismiss",+ "translation_settings_title": "Lyrics translation",+ "translation_settings_translator_label": "Translator",+ "translation_settings_translator_libretranslate": "LibreTranslate (self-hosted)",+ "translation_settings_translator_deepl": "DeepL (your API key)",+ "translation_settings_translator_none": "Off",+ "translation_settings_libretranslate_url_label": "LibreTranslate endpoint",+ "translation_settings_libretranslate_url_hint": "e.g. http://localhost:5000 — leave empty to disable",+ "translation_settings_deepl_key_label": "DeepL API key",+ "translation_settings_deepl_key_hint": "Get one at deepl.com/account. Free tier covers ~150 lyrics/month",+ "translation_settings_deepl_key_set": "Key saved (reveal/edit)",+ "translation_settings_target_lang_label": "Target language",+ "translation_settings_show_label": "Show translation by default",+ "translation_settings_saved": "Settings saved",+ "n_selected": "{{count}} selected",+ "selection_aria": "Selection actions",+ "queued_count": "{{count}} queued",+ "favorited_count": "{{count}} favorited",+ "add_to_queue": "Add to queue",+ "ctx_show_in_folder": "Open folder",+ "ctx_show_failed": "Could not open folder",+ "nav_download": "Download",+ "nav_spotify": "Spotify",+ "nav_soundcloud": "SoundCloud",+ "ytdlp_title": "Download audio",+ "ytdlp_subtitle": "Paste a URL (YouTube, SoundCloud, Bandcamp, anything yt-dlp supports). Will convert to audio in your library.",+ "ytdlp_url": "URL",+ "ytdlp_target": "Save to",+ "ytdlp_format": "Format",+ "ytdlp_no_roots": "Add a music folder first",+ "ytdlp_start": "Download",+ "ytdlp_downloading": "Downloading…",+ "ytdlp_done": "Download complete. Library refreshed.",+ "ytdlp_log": "Log",+ "ytdlp_missing_title": "yt-dlp not found",+ "ytdlp_missing_body": "Install yt-dlp and make sure it's on your system PATH (https://github.com/yt-dlp/yt-dlp). On Windows: winget install yt-dlp.yt-dlp.",+ "ytdlp_bin": "yt-dlp: {{path}}",+ "tab_queue": "Queue",+ "tab_lyrics": "Lyrics",+ "tab_info": "Info",+ "tab_chapters": "Chapters",+ "chapters_empty": "No chapters available",+ "video_mode_toggle": "Video mode",+ "video_mode_only_youtube": "Video only available for YouTube tracks",+ "expand_video": "Open fullscreen video",+ "watch_title": "Watch",+ "watch_video_unavailable": "Video unavailable for this track",+ "watch_back": "Back to music",+ "info_no_track": "Play a track to see details",+ "field_album": "Album",+ "field_year": "Year",+ "field_genre": "Genre",+ "field_duration": "Duration",+ "field_bitrate": "Bitrate",+ "field_samplerate": "Sample rate",+ "field_plays": "Plays",+ "lastfm_title": "Last.fm",+ "lastfm_intro": "Connect your Last.fm account to scrobble what you play. You'll need to create a free API app.",+ "lastfm_step1_title": "Create an API app",+ "lastfm_step1_desc": "Go to Last.fm and create an application. You'll get an API key and a shared secret.",+ "lastfm_step2_title": "Paste credentials",+ "lastfm_step2_desc": "Paste the API key and shared secret from the app you created.",+ "lastfm_save_keys": "Save credentials",+ "lastfm_keys_saved": "Credentials saved",+ "lastfm_step3_title": "Authorize access",+ "lastfm_step3_desc": "Opens Last.fm in your browser to approve. Then come back and click Finalize.",+ "lastfm_authorize": "Authorize with Last.fm",+ "lastfm_authorize_pending": "Approve access on the Last.fm page that opened, then click Finalize:",+ "lastfm_open_auth": "Open approval page",+ "lastfm_finalize": "Finalize connection",+ "lastfm_connected": "Connected as {{username}}",+ "lastfm_connected_as": "Connected as {{username}}",+ "lastfm_connected_hint": "Tracks played for over 30s scrobble to your account. Now playing updates in real time.",+ "lastfm_enable_scrobble": "Auto-scrobble",+ "lastfm_disconnect": "Disconnect",+ "lastfm_disconnect_confirm": "Delete credentials and disconnect?",+ "lastfm_disconnected": "Disconnected",+ "dl_hero_title": "Paste a URL or search",+ "dl_hero_sub": "YouTube, SoundCloud, Bandcamp, anything yt-dlp supports. Becomes audio in your library.",+ "dl_quality": "Quality",+ "dl_quality_best": "Best available",+ "dl_idle_hint": "Paste a track or album URL, or search by title. Ctrl+V auto-detects.",+ "dl_detecting": "Detecting…",+ "dl_searching": "Searching…",+ "dl_search_empty": "No results found.",+ "dl_unsupported": "Site not recognized. Try pasting the direct track URL.",+ "dl_preparing": "Starting download…",+ "dl_download_audio": "Download audio",+ "dl_started": "Download started",+ "dl_recent": "Recent downloads",+ "batch_done": "{{ok}} started, {{fail}} failed",+ "music_theme_title": "Music theme",+ "music_theme_subtitle": "Customize music section colors. Saved separately from the global app theme.",+ "music_theme_preset": "Preset",+ "music_theme_accent": "Accent color",+ "music_theme_save": "Save theme",+ "music_theme_reset": "Restore default",+ "music_theme_preset_default": "Default",+ "music_theme_preset_indigo": "Indigo",+ "music_theme_preset_spotify": "Spotify",+ "music_theme_preset_purple": "Purple",+ "music_theme_preset_amber": "Amber",+ "music_theme_preset_custom": "Custom",+ "music_theme_use_dominant": "Use current cover color",+ "music_theme_dominant_off": "Fixed color",+ "music_theme_dominant_on": "Auto (cover color)",+ "music_theme_reduce_motion": "Reduce animations",+ "music_theme_reduce_motion_auto": "Follow system",+ "music_theme_reduce_motion_off": "Animations on",+ "music_theme_reduce_motion_on": "Always reduce",+ "music_theme_reduce_motion_hint": "Disables transitions and animations in the music section, independent of the global system setting.",+ "now_playing_title": "Now playing",+ "youtube_live": "LIVE",+ "youtube_error_generic": "Something went wrong talking to YouTube",+ "youtube_error_retry": "Try again",+ "youtube_error_audio_only": "Audio only",+ "youtube_error_details": "Technical details",+ "youtube_error_hide_details": "Hide details",+ "now_playing_close": "Back",+ "now_playing_tab_lyrics": "Lyrics",+ "now_playing_tab_queue": "Up next",+ "now_playing_tab_previous": "Previous",+ "now_playing_lyrics_empty": "No lyrics available.",+ "now_playing_lyrics_error": "Couldn't load lyrics. Try again.",+ "now_playing_lyrics_retry": "Try again",+ "now_playing_lyrics_show_translation": "Show translation",+ "now_playing_lyrics_hide_translation": "Hide translation",+ "now_playing_lyrics_plain_note": "Unsynced lyrics",+ "now_playing_lyrics_sync_earlier": "Lyrics earlier",+ "now_playing_lyrics_sync_later": "Lyrics later",+ "now_playing_lyrics_sync_reset": "Reset sync",+ "now_playing_queue_empty": "Queue is empty — click any track to start.",+ "now_playing_previous_empty": "Nothing played in this session yet.",+ "now_playing_no_track": "No track playing right now.",+ "now_playing_open": "Open fullscreen",+ "rpc_title": "Discord Rich Presence",+ "rpc_intro": "Shows what you're listening to on your Discord profile. Needs Discord open on the machine.",+ "rpc_connected": "Connected",+ "rpc_disconnected": "Disconnected",+ "rpc_enable": "Show activity on Discord",+ "rpc_advanced": "Advanced settings",+ "rpc_appid_hint": "Application ID from your Discord Developer Portal app. Default is the omniget \"Loop\" app.",+ "rpc_large_image": "Large image key",+ "rpc_image_hint": "Asset name (Rich Presence Assets) uploaded on Discord Dev Portal. Without it, activity shows without icon.",+ "rpc_save": "Save",+ "rpc_saved": "Settings saved",+ "rpc_test": "Test connection",+ "rpc_test_ok": "Connected!",+ "rpc_test_fail": "Failed (Discord not running or invalid app ID)",+ "rpc_discord_running": "Discord must be running on the machine (desktop client, not browser).",+ "rpc_music_section": "How the track appears",+ "rpc_show_cover": "Show album cover",+ "rpc_show_cover_hint": "When on, the current track's cover shows as the large image. Local covers only render if you have the asset uploaded to Discord Dev Portal.",+ "rpc_show_buttons": "Show buttons",+ "rpc_show_buttons_hint": "Adds two buttons: \"Play now\" (opens the track at its source) and \"View on GitHub\".",+ "rpc_update_interval": "Update every (seconds)",+ "rpc_update_interval_hint": "Update frequency during playback. Min 2s, max 30s. Discord rate-limits to 5 updates/20s.",+ "nav_youtube": "YouTube",+ "yt_title": "YouTube Music",+ "yt_subtitle": "Import playlists from YouTube and YouTube Music. Streams on demand — no download.",+ "yt_intro": "Paste any YouTube or YouTube Music playlist link. For private playlists (including \"Likes\"), point to the browser you're logged into.",+ "yt_step1_title": "Which browser to pull cookies from?",+ "yt_step1_desc": "For private playlists and your Library, omniget needs cookies from the browser you're signed into. Without cookies, only public playlists work.",+ "yt_browser_micro": "yt-dlp reads cookies straight from your browser. Nothing leaves your machine — it's all local.",+ "yt_browser_saved": "{{browser}} cookies configured",+ "yt_step2_title": "Import a playlist",+ "yt_step2_desc": "Paste the link, omniget imports the track list. Playback streams on demand — nothing is downloaded.",+ "yt_import": "Import",+ "yt_imported": "{{title}}: {{count}} tracks imported",+ "yt_lm_label": "Likes (Liked Music)",+ "yt_playlist_label": "YouTube Music playlist",+ "yt_yt_playlist_label": "YouTube video playlist",+ "yt_add_playlist": "Add playlist",+ "yt_empty_title": "No playlists yet",+ "yt_empty_body": "Hook up a YouTube or YouTube Music playlist to see your tracks here alongside your local files.",+ "yt_setup": "Set up YouTube",+ "yt_refresh": "Re-import",+ "yt_refreshed": "Refreshed: {{count}} tracks",+ "yt_remove": "Remove",+ "yt_remove_confirm": "Remove this playlist from your library? (The YouTube playlist stays intact.)",+ "yt_search_placeholder": "Search YouTube Music — songs, artists, albums…",+ "yt_recs_for": "Because you played: {{name}}",+ "yt_download": "Download",+ "yt_download_started": "Download started",+ "sc_title": "SoundCloud",+ "sc_signin_heading": "Connect to SoundCloud",+ "sc_signin_body": "Sign in to SoundCloud in your browser — the OmniGet extension grabs the cookies automatically. Then come back and refresh.",+ "sc_open_in_browser": "Open SoundCloud in browser",+ "sc_already_signed_in": "I'm signed in, refresh",+ "sc_search": "Search",+ "sc_refresh": "Refresh",+ "sc_logout": "Sign out",+ "sc_loading": "Loading…",+ "sc_status_client_id": "client_id",+ "sc_status_oauth": "oauth",+ "sc_import_url": "Import by URL",+ "sc_import_url_title": "Import from a SoundCloud URL",+ "sc_import_url_desc": "Paste any link to a track, playlist or artist — we'll figure out the rest.",+ "sc_import_url_placeholder": "https://soundcloud.com/…",+ "sc_import_action": "Import",+ "sc_import_invalid": "That doesn't look like a SoundCloud URL.",+ "sc_import_failed": "Could not resolve that URL: {{error}}",+ "sc_import_success": "Imported \"{{title}}\"",+ "sc_section_continue": "Pick up where you left off",+ "sc_section_stream": "From people you follow",+ "sc_section_recommended": "Because you liked {{name}}",+ "sc_section_likes": "Your likes ({{count}})",+ "sc_section_playlists": "Your playlists",+ "sc_section_following": "Following",+ "sc_followers_count": "{{count}} followers",+ "sc_track_count": "{{count}} tracks",+ "sc_download_track": "Download track",+ "sc_download_all": "Download all ({{count}})",+ "sc_download_started": "Download queued",+ "sc_download_bulk_progress": "Downloading {{current}} of {{total}}",+ "sc_download_bulk_done": "Finished — {{success}} downloaded, {{failed}} failed",+ "sc_go_plus_badge": "Go+",+ "sc_go_plus_unavailable_hint": "Higher quality streams require a SoundCloud Go+ account. Standard MP3 still works without it.",+ "sc_empty_likes_title": "No likes yet",+ "sc_empty_likes_body": "Hearts you give on SoundCloud show up here.",+ "sc_empty_likes_action": "Search music",+ "sc_empty_playlists_title": "No playlists yet",+ "sc_empty_playlists_body": "Create or import a playlist on soundcloud.com — it'll show here on next refresh.",+ "sc_empty_following_title": "Not following anyone yet",+ "sc_empty_state_logged_out_action": "Take me to SoundCloud",+ "sc_load_more": "Load more",+ "sc_show_count": "Showing {{shown}} of {{total}}",+ "sc_skeleton_loading": "Pulling your library…",+ "sc_offline_for_focus": "Save offline so it plays even with no internet",+ "sc_recommended_seed_fallback": "your taste",+ "yt_eyebrow": "YouTube Music",+ "yt_state_authed": "Connected",+ "yt_state_anon": "Not connected",+ "yt_auth_title": "Connect to your account",+ "yt_auth_desc": "To pull your private library (Likes, your playlists), paste 2 cookies from the browser where you're logged into YouTube Music.",+ "yt_auth_how": "How to get the cookies",+ "yt_auth_step1": "Open music.youtube.com in Chrome/Edge/Firefox where you're logged in.",+ "yt_auth_step2": "F12 → Application/Storage tab → Cookies → music.youtube.com",+ "yt_auth_step3": "Copy the value of __Secure-3PAPISID and paste in the first field.",+ "yt_auth_step4": "In Network tab, click any request, copy the whole Cookie: header and paste in the second field.",+ "yt_cookie_full": "Full cookie header",+ "yt_cookie_hint": "Paste the entire Cookie: header from any request to music.youtube.com.",+ "yt_save_auth": "Save credentials",+ "yt_auth_saved": "Credentials saved",+ "yt_disconnect": "Disconnect",+ "yt_disconnect_confirm": "Delete saved credentials?",+ "yt_disconnected": "Disconnected",+ "yt_visitor_ok": "Visitor data refreshed",+ "yt_sync_title": "Sync my library",+ "yt_sync_desc": "Imports Liked Music + all your playlists in one batch. Runs in the background. Tracks show up in Library / Albums / Artists alongside your local files.",+ "yt_sync_now": "Sync now",+ "yt_syncing": "Syncing…",+ "yt_sync_starting": "Starting…",+ "yt_sync_liked": "Fetching Liked Music…",+ "yt_sync_playlists": "Fetching {{total}} playlists…",+ "yt_sync_done": "Synced: {{playlists}} playlists, {{tracks}} tracks",+ "yt_ext_import": "Import from extension",+ "yt_ext_hint": "Pulls YouTube cookies straight from the omniget browser extension. No F12, no copy-paste.",+ "yt_ext_imported": "{{count}} cookies imported from extension",+ "yt_ext_empty": "No cookies captured yet. Open music.youtube.com in your browser with the omniget extension active, then try again.",+ "yt_ext_no_sapisid": "Cookies found but no __Secure-3PAPISID. Sign in to YouTube Music and try again.",+ "yt_ext_no_file": "Cookie file doesn't exist. Extension never sent anything — check: (1) omniget host running, (2) extension active, (3) Native Messaging registered. Expected at: {{path}}",+ "yt_ext_no_youtube": "File exists ({{age}}) but only has cookies for: {{domains}}. Open music.youtube.com in browser, wait 3s, try again.",+ "yt_ext_no_sapisid_detail": "{{count}} cookies imported ({{age}}) but none is __Secure-3PAPISID. Sign in to YouTube Music.",+ "yt_ext_imported_detail": "{{count}} cookies imported ({{age}})",+ "yt_or_manual": "or manually",+ "quality_title": "Audio quality",+ "quality_short": "Quality",+ "quality_intro": "Pick how downloaded music is encoded. You can change anytime — this only affects new downloads.",+ "quality_current": "Current: {{label}}",+ "quality_saved": "Quality set to {{label}}",+ "quality_group_recommended": "Recommended",+ "quality_group_compact": "Save space",+ "quality_group_high": "High quality",+ "quality_group_lossless": "Lossless (audiophile)",+ "quality_hint_mp3_128": "Smallest files · ~3 MB per song · basic quality",+ "quality_hint_mp3_192": "Balanced · ~5 MB per song · plays everywhere",+ "quality_hint_mp3_320": "MP3 at max · ~7 MB per song · maximum compatibility",+ "quality_hint_aac_192": "Sounds great, small files, plays everywhere · ~5 MB per song",+ "quality_hint_aac_256": "Premium lossy · ~6 MB per song · transparent quality",+ "quality_hint_opus_160": "Most efficient · ~4 MB per song · may not play on older devices",+ "quality_hint_flac": "Lossless · keeps source file size",+ "quality_hint_flac_cd": "Lossless CD quality · ~30 MB per song",+ "quality_hint_flac_hires": "Studio quality · 24-bit/96 kHz · ~80 MB per song",+ "quality_hint_wav": "Uncompressed PCM · ~50 MB per song · largest files",+ "sources_title": "Music sources",+ "sources_short": "Sources",+ "sources_subtitle": "Where to look for tracks",+ "sources_intro": "When you ask omniget to fetch a song by name, it tries these sources in order. Drag with arrows to reorder.",+ "source_status_connected": "Connected",+ "source_status_not_connected": "Not connected",+ "source_status_unavailable": "Coming soon",+ "source_connect": "Connect",+ "source_inactive_header": "Not in rotation",+ "source_reset_default": "Restore default order",+ "source_move_up": "Move up",+ "source_move_down": "Move down",+ "qobuz_title": "Qobuz",+ "qobuz_state_connected": "Connected",+ "qobuz_state_disconnected": "Not connected",+ "qobuz_intro": "Connect your Qobuz account to get lossless tracks (FLAC up to 24-bit/192 kHz). Requires an active Qobuz subscription.",+ "qobuz_email_label": "Qobuz email",+ "qobuz_password_label": "Password",+ "qobuz_pwd_show": "Show password",+ "qobuz_pwd_hide": "Hide password",+ "qobuz_privacy": "Stored locally on your device only. Never sent to omniget servers.",+ "qobuz_connect": "Connect",+ "qobuz_connecting": "Connecting…",+ "qobuz_connected": "Connected to Qobuz",+ "qobuz_disconnected": "Disconnected from Qobuz",+ "qobuz_disconnect": "Disconnect",+ "qobuz_disconnect_confirm": "Remove saved Qobuz credentials?",+ "qobuz_signed_in_as": "Signed in as",+ "qobuz_connected_hint": "Qobuz is now in the source pool. Use the Sources panel to control its priority.",+ "qobuz_test_again": "Test connection",+ "qobuz_testing": "Testing…",+ "qobuz_test_ok": "Qobuz login works",+ "qobuz_test_failed": "Qobuz test failed: {{error}}",+ "nav_aria": "Music navigation",+ "sidebar_hint_title": "Tip",+ "sidebar_hint_body": "Music keeps playing while you navigate between Courses, Notes and other sections.",+ "nav_search": "Search",+ "playlists_section": "Playlists",+ "playlists_title": "Playlists",+ "playlists_empty_title": "You have no playlists yet",+ "playlists_empty_body": "Create a playlist to group your favorite tracks and listen in sequence.",+ "new_playlist": "New playlist",+ "playlist_name_placeholder": "Playlist name…",+ "no_playlists_yet": "No playlists yet.",+ "added_to_playlist": "Added to \"{{name}}\"",+ "playlist_duplicate": "Already in \"{{name}}\"",+ "created_playlist_with_track": "\"{{name}}\" created and track added",+ "playlist_empty_title": "Playlist is empty",+ "playlist_empty_body": "Add tracks via the ⊕ menu on any track row.",+ "playlist_not_found": "Playlist not found.",+ "playlist_deleted": "Playlist deleted",+ "click_to_rename": "Click to rename",+ "delete_playlist": "Delete playlist",+ "delete_confirm_title": "Delete playlist?",+ "delete_confirm_msg": "Playlist \"{{name}}\" will be deleted. Tracks remain in your library.",+ "delete_confirm": "Delete",+ "refresh_covers_action": "Refresh covers",+ "refresh_covers_title": "Refresh track covers?",+ "refresh_covers_body": "We'll fetch one cover per track from YouTube for the {{count}} tracks in this playlist. Should take a few seconds.",+ "refresh_covers_hint": "Existing covers for tracks with a known YouTube ID will be replaced.",+ "refresh_covers_confirm": "Refresh now",+ "refresh_covers_progress": "Updating covers — {{current}} / {{total}}",+ "refresh_covers_done": "{{updated}} cover(s) updated · {{skipped}} skipped",+ "transcode_eyebrow": "Tools",+ "transcode_title": "Batch transcode video → audio",+ "transcode_lead": "Convert a folder of downloaded videos into audio files. Each output keeps the per-video thumbnail as cover.",+ "transcode_pick_input": "Pick folder with videos",+ "transcode_pick_output": "Pick output folder",+ "transcode_input_label": "Input folder",+ "transcode_input_placeholder": "Folder with .mp4 / .mkv / .webm files",+ "transcode_output_label": "Output folder (optional)",+ "transcode_output_placeholder": "Defaults to input folder",+ "transcode_format_label": "Output format",+ "transcode_quality_label": "Bitrate",+ "transcode_browse": "Pick…",+ "transcode_start": "Start transcode",+ "transcode_starting": "Starting…",+ "transcode_cancel": "Cancel transcode",+ "transcode_missing_input": "Pick an input folder first.",+ "transcode_state_running": "Transcoding…",+ "transcode_state_done": "Done",+ "transcode_state_cancelled": "Cancelled",+ "transcode_eta": "ETA",+ "transcode_done": "{{current}} of {{total}} files transcoded",+ "transcode_cancelled": "Transcode cancelled",+ "nav_transcode": "Transcode",+ "eyebrow_artist": "Artist",+ "discography": "Discography",+ "queue_title": "Queue",+ "queue_aria": "Playback queue",+ "queue_empty": "Queue is empty — click any track to start.",+ "queue_toggle": "Toggle queue",+ "search_hint": "Type a track title, artist or album.",+ "exit": "Exit",+ "featured_album": "Featured album",+ "by": "By",+ "start_listening": "Start listening",+ "open_album": "Open album",+ "shelf_listen_now": "Listen now",+ "shelf_top_artists": "Top Artists",+ "jump_back_in": "Jump back in",+ "albums_empty": "No albums found.",+ "artists_empty": "No artists found.",+ "sort_added": "Added",+ "sort_name": "Name A→Z",+ "sort_year": "Year",+ "sort_track_count": "Most tracks",+ "manage_folders": "Manage folders",+ "roots_title": "Music folders",+ "roots_hint": "Folders we scan for audio. Disable one to ignore without deleting from disk. Removing here does not delete any file.",+ "roots_empty": "You haven't added any music folder yet.",+ "root_missing": "missing",+ "root_remove": "Remove",+ "root_removed": "Folder removed: {{path}}",+ "nav_albums": "Albums",+ "nav_artists": "Artists",+ "nav_playlists": "Playlists",+ "local_search_hint": "Type a title, artist or album to search your local library.",+ "history_now": "now",+ "history_unplayable": "Couldn't play that entry — track isn't available anymore.",+ "history_clear_confirm_yt": "This will erase your entire YouTube history. Continue?",+ "history_clear_confirm_local": "This will erase your entire local history. Continue?",+ "history_clear": "Clear",+ "history_title": "History",+ "history_title_yt": "YouTube history",+ "history_empty_title_yt": "Your YouTube history starts when you play something",+ "history_empty_cta_yt": "Search YouTube",+ "history_empty_title_local": "Your history starts when you play something from your library",+ "history_empty_cta_local": "Search library",+ "history_filter_local": "Local",+ "history_filter_spotify": "Spotify",+ "history_filter_soundcloud": "SoundCloud",+ "history_filter_aria": "Filter by source",+ "history_remove_aria": "Remove from history",+ "history_entries_removed": "entries removed",+ "youtube": {+ "shelf_group": "From YouTube",+ "shelf_charts": "Music charts",+ "shelf_charts_empty": "Charts are out of reach right now. Try in a bit.",+ "shelf_new_releases": "New releases",+ "shelf_new_releases_empty": "No new releases right now. Come back tomorrow.",+ "shelf_moods_and_genres": "Moods & genres",+ "moods_empty": "Moods unavailable right now. Try in a bit.",+ "shelf_trending": "Trending now",+ "shelf_trending_error": "YouTube is unreachable right now. Try again in a few minutes.",+ "shelf_quick_picks": "For you",+ "shelf_quick_picks_empty": "We're still learning your taste. Play a few tracks to get started.",+ "shelf_daily_discover": "Daily discover",+ "shelf_daily_discover_empty": "Play a track you like and we'll suggest what could come next.",+ "shelf_continue_watching": "Keep watching",+ "shelf_continue_watching_empty": "Nothing to resume yet. Play something to start.",+ "shelf_subscriptions": "Subscriptions",+ "shelf_subscriptions_empty": "Follow a channel to see new uploads here.",+ "explore_title": "Explore",+ "explore_tagline": "Find new music without committing to anything.",+ "back_to_explore": "Back to Explore",+ "mood_loading_error": "Couldn't load this mood. Try again.",+ "mood_empty": "This mood has no playlists right now. Maybe later.",+ "hub_title": "YouTube",+ "hub_tagline": "YouTube music and videos in one place.",+ "search_filter_aria": "Filter results",+ "search_filter_all": "All",+ "search_filter_music": "Music",+ "search_filter_videos": "Videos",+ "search_filter_channels": "Channels",+ "search_filter_playlists": "Playlists",+ "search_sort_aria": "Sort results",+ "search_sort_relevance": "Relevance",+ "search_sort_recent": "Most recent",+ "search_sort_views": "Most viewed",+ "search_history_label": "Recent searches",+ "search_history_clear": "Clear history",+ "search_history_remove_aria": "Remove \"{{query}}\" from history",+ "subscribers_count_label": "subscribers",+ "creator_by": "By {{name}}",+ "channel_subscribe": "Subscribe",+ "channel_subscribed": "Subscribed",+ "channel_unsubscribe_aria": "Unsubscribe",+ "channel_no_items": "Nothing here yet.",+ "search_placeholder": "Search YouTube…",+ "search_hint": "Start typing to find videos, channels and playlists.",+ "connect_title": "Connect your YouTube account",+ "connect_body": "Your library, subscriptions and what you were watching show up here after you connect. Without an account, only Search and Explore work (anonymous).",+ "connect_step_missing_label": "How to connect",+ "connect_step_missing": "Install the Loop extension in your browser and export cookies to the path below. Come back — the app detects automatically.",+ "connect_step_no_youtube_label": "Almost there",+ "connect_step_no_youtube": "Loop is installed but you haven't signed in to YouTube in your browser. Open youtube.com and log in — cookies will appear here automatically.",+ "connect_cta_setup": "Set up connection",+ "connect_cta_anon": "Browse anonymously",+ "connect_footnote": "Cookies stay on your computer — nothing is sent to our servers.",+ "anon_speed_dial_aria": "Anonymous YouTube access"+ },+ "spotify_connected": "Connected to Spotify",+ "spotify_auth_failed": "Authentication failed",+ "spotify_library_updated": "Library updated",+ "spotify_auth_waiting": "Waiting for authorization in the browser. Come back after you accept.",+ "spotify_disconnected": "Disconnected from Spotify",+ "spotify_play_via_yt": "Playing via YouTube (Free mode)",+ "spotify_search_aria": "Search on Spotify",+ "spotify_search_label": "Search",+ "spotify_refresh_label": "Refresh",+ "spotify_prev_aria": "Previous",+ "spotify_next_aria": "Next"+ },+ "library": {+ "title": "Library",+ "subtitle": "Your courses, videos and PDFs in one place.",+ "empty_browse_title": "Your library is still empty",+ "empty_browse_description": "Point to your course folders or import videos from Telegram. Nothing is copied or moved.",+ "empty_add_folder_title": "Add a video folder",+ "empty_add_folder_desc": "Point to where your courses already are. No copy, no move.",+ "empty_add_folder_cta": "Choose folder",+ "empty_telegram_title": "Import from Telegram",+ "empty_telegram_desc": "Download videos straight from channels you've joined.",+ "empty_telegram_cta": "Connect",+ "pinned_strip_aria": "Pinned folders",+ "pin_action": "Pin",+ "pin_action_active": "Pinned",+ "pin_action_title": "Pin this folder",+ "unpin_action": "Unpin",+ "unpin_action_title": "Unpin this folder",+ "pin_failed": "Pin failed: {{msg}}",+ "unpin_failed": "Unpin failed: {{msg}}",+ "siblings_aria": "Sibling folders",+ "siblings_empty": "No sibling folders",+ "view_mode_aria": "View mode",+ "view_mode_grid": "Grid",+ "view_mode_list": "List",+ "back_toast": "Back to {{folder}}",+ "address_bar_placeholder": "Paste or type a path…",+ "address_bar_open": "Edit path",+ "new_folder": "New folder",+ "new_folder_placeholder": "Folder name",+ "ctx_open": "Open",+ "ctx_rename": "Rename",+ "ctx_delete": "Delete (Trash)",+ "ctx_show_in_explorer": "Show in file manager",+ "delete_confirm_title": "Move to Trash?",+ "delete_confirm_msg_folder": "The folder \"{{name}}\" and everything inside will be moved to the system Trash.",+ "delete_confirm_msg_file": "\"{{name}}\" will be moved to the system Trash.",+ "delete_confirm_btn": "Move to Trash",+ "delete_toast_done": "\"{{name}}\" moved to Trash",+ "last_watched_label": "Last watched",+ "roots_button_hint": "Folders the library scans for courses and videos",+ "empty_with_roots_one": "Detected 1 configured folder but no courses indexed yet.",+ "empty_with_roots_other": "Detected {{count}} configured folders but no courses indexed yet.",+ "empty_with_roots_cta": "Rescan now",+ "pin_added_toast": "\"{{name}}\" pinned",+ "pin_removed_toast": "Pin removed",+ "root_missing_label": "missing",+ "root_missing_hint": "Drive unplugged? Folder deleted? Reconnect or remove here.",+ "mode_telegram_disconnected_suffix": "(not connected)",+ "browse_sort_label": "Sort",+ "browse_sort_name_asc": "Name A→Z",+ "browse_sort_name_desc": "Name Z→A",+ "browse_sort_size_desc": "Size",+ "browse_sort_recent": "Modified",+ "selection_count_one": "1 selected",+ "selection_count_other": "{{count}} selected",+ "selection_clear": "Clear selection",+ "selection_delete": "Delete selected",+ "selection_delete_confirm_title": "Delete {{count}} item(s)?",+ "selection_delete_confirm_msg": "Items will be moved to the system Trash. You can restore from there if you change your mind.",+ "selection_delete_done": "{{count}} item(s) moved to Trash",+ "selection_delete_partial": "{{ok}} OK · {{fail}} failed",+ "open_in_new_tab": "Open in new tab",+ "tab_close": "Close tab",+ "tab_new": "New tab",+ "empty": "No courses indexed yet. Run a scan from Settings.",+ "error_loading_notes": "Couldn't load your notes. Try reloading or contact support if it persists.",+ "health_title": "Library health",+ "health_ok": "Everything's where it should be.",+ "health_banner_one": "1 file needs your attention",+ "health_banner_many": "{{count}} files need your attention",+ "health_banner_part_empty": "{{count}} empty",+ "health_banner_part_missing": "{{count}} missing",+ "health_banner_part_orphan": "{{count}} orphan",+ "health_banner_cta": "Review",+ "health_banner_aria": "Open library health report",+ "health_zero_byte": "Empty videos",+ "health_zero_byte_hint": "These didn't finish downloading. Re-download the course, or delete the empty file and rescan.",+ "health_missing": "Missing videos",+ "health_missing_hint": "Tracked in the database but not on disk — usually moved or deleted outside the app. Cleanup only removes entries when the course folder still exists, so unmounted drives are safe.",+ "health_orphan_desc": "Orphan description.html",+ "health_orphan_hint": "Folders with description text but no video. Often a scraped \"free preview\" that didn't download, or a text-only lesson the scanner skipped.",+ "health_checking": "Checking…",+ "health_recheck": "Re-check",+ "cleanup_busy": "Cleaning…",+ "filters": "Filters",+ "filter_status": "Status",+ "filter_playlist": "Playlist",+ "filter_tags": "Tags",+ "all_courses": "All courses",+ "manage_playlists": "Manage playlists →",+ "clear_filters": "clear",+ "tags_hint": "Click → include · Shift+Click → exclude",+ "loading_more": "Loading more courses…",+ "status_all": "All",+ "status_in_progress": "In progress",+ "status_not_started": "Not started",+ "status_completed": "Completed",+ "status_aria": "Status",+ "cleanup_btn": "Clean orphan entries",+ "cleanup_orphan_delete": "Delete file",+ "cleanup_confirm_title": "Clean missing-video entries",+ "cleanup_confirm_message": "Will remove {{count}} lesson(s) whose video file no longer exists on disk. Courses whose entire folder is gone are preserved (likely an unmounted drive). Courses left with no lessons are removed too. No files are deleted from disk.",+ "cleanup_done": "{{lessons}} lesson(s) removed · {{courses}} course(s) removed · {{kept}} preserved (unmounted drive)",+ "cleanup_force_btn": "Force (include courses with missing folders)",+ "cleanup_force_hint": "Use this if you renamed/deleted folders intentionally. WARNING: disconnected external drives will be wiped too.",+ "cleanup_force_confirm_title": "Force full cleanup",+ "cleanup_force_confirm_message": "Will remove ALL {{count}} entries, INCLUDING courses whose entire folder no longer exists on disk. Use only if you're sure folders were renamed/deleted and this isn't a disconnected external drive. Orphan courses are removed too. No files are deleted from disk.",+ "notes_pages_section": "Pages",+ "notes_page_not_found": "not found",+ "notes_no_references": "No references yet.",+ "notes_no_pages": "No pages yet.",+ "notes_new_page": "New page",+ "notes_rename_page": "Rename page",+ "notes_filter_pages": "Filter pages…",+ "notes_page_name_placeholder": "Page name",+ "notes_journal_history": "Journal history",+ "notes_history_recent": "Recent history",+ "notes_no_open_page": "No page open. Create or select one in the sidebar.",+ "search_placeholder": "Search courses...",+ "sort_label": "Sort",+ "sort_title": "Name",+ "sort_recent": "Recently added",+ "sort_progress": "Progress",+ "sort_name": "Name",+ "sort_added": "Added",+ "sort_last_watched": "Last watched",+ "favorites_only": "Favorites only",+ "lessons_count": "{{count}} lesson(s)",+ "progress_pct": "{{pct}}% complete",+ "favorite_on": "Unfavorite",+ "favorite_off": "Favorite",+ "platform": "Platform",+ "status": "Status",+ "status_new": "New",+ "status_empty": "Empty",+ "has_gaps": "Has gaps",+ "has_notes": "Has notes",+ "has_cards": "Has cards",+ "no_platforms": "Set a platform on a course to filter here.",+ "more_filters": "More filters",+ "tag": "Tag",+ "tags": "Tags",+ "tag_add": "Add tag…",+ "reset": "Reset",+ "view_grid": "Grid",+ "view_list": "List",+ "lessons": "lessons",+ "notes": "notes",+ "gap": "gap",+ "recent": "Recent",+ "history": "History",+ "history_empty": "No recent activity",+ "mode_browse": "Folders & files",+ "mode_courses": "My courses",+ "browse_empty": "Empty folder.",+ "videos": "videos",+ "roots": "Library roots",+ "loose_lessons": "Loose lessons",+ "kind_all": "All",+ "kind_course": "Courses",+ "kind_media": "Videos",+ "kind_media_badge": "Video",+ "favorite": "Favorite",+ "resume": "Resume",+ "roots_button": "Where to look",+ "roots_add_btn": "Add folder",+ "roots_remove": "Remove",+ "roots_remove_tooltip": "Remove this folder",+ "roots_default": "Default",+ "roots_empty": "No folders configured.",+ "roots_hint": "Toggle folders on or off to include them in scans.",+ "rescan_now": "Rescan now",+ "rescanning": "Scanning...",+ "rescan_ok": "{{courses}} course(s), {{lessons}} lesson(s)",+ "browse_empty_roots": "Add a folder to get started.",+ "browse_breadcrumb_root": "Roots",+ "videos_count": "{{count}} video(s)",+ "video": "Video",+ "folder": "Folder",+ "back": "Back",+ "watch_title": "Watching",+ "watch_back": "Back to library",+ "watch_not_found": "No video selected.",+ "watch_file_missing": "File not found.",+ "mode_telegram": "Import from Telegram",+ "telegram": {+ "plugin_missing_title": "Telegram plugin not found",+ "plugin_missing_body": "Install the Telegram plugin from the marketplace to access your chats here.",+ "connected_as": "Connected as {{phone}}",+ "coming_soon": "Telegram browser coming soon — auth is wired up.",+ "auth": {+ "title": "Connect Telegram",+ "subtitle": "Sign in to browse your chats and media.",+ "tab_qr": "QR code",+ "tab_phone": "Phone",+ "qr_hint_scan": "Open Telegram › Settings › Devices › Link Desktop Device",+ "qr_expires_in": "Refreshes in {{sec}}s",+ "phone_input": "Phone number (E.164)",+ "code_input": "Code",+ "send_code": "Send code",+ "code_resend": "Resend",+ "password_title": "Two-step verification",+ "password_hint": "Hint: {{hint}}"+ },+ "chats_title": "Your Telegram chats",+ "chats_subtitle": "Open a chat to browse its media.",+ "chats_empty": "No chats yet.",+ "chat_empty": "No media of this type in this chat.",+ "chat_type_private": "Private",+ "chat_type_group": "Group",+ "chat_type_channel": "Channel",+ "crumb_root": "Telegram",+ "filter_all": "All",+ "filter_photo": "Photos",+ "filter_video": "Videos",+ "filter_document": "Documents",+ "filter_audio": "Audio",+ "filter_gif": "GIFs",+ "filter_round_video": "Round videos",+ "filter_round_voice": "Voice",+ "filter_photo_video": "Photos+Videos",+ "filter_chat_photos": "Chat photos",+ "downloads_view_panel": "Open downloads panel",+ "album_title": "Album",+ "album_prev": "Previous",+ "album_next": "Next",+ "album_indicator": "Album ({{n}} items)",+ "folder_autoscan": "Scan chats for drive folders",+ "folder_autoscan_desc": "Find channels marked with [og] in title or [telegram-drive-folder] in description.",+ "folder_autoscan_running": "Scanning chats…",+ "folder_autoscan_result": "{{n}} channels detected as drive folders",+ "folder_autoscan_none": "No drive folders detected.",+ "keymap_title": "Keyboard shortcuts",+ "keymap_search": "Focus search",+ "keymap_clear": "Clear / dismiss",+ "keymap_nav": "Navigate",+ "keymap_open": "Open",+ "keymap_open_player": "Open in player",+ "keymap_select_all": "Select all visible",+ "keymap_delete": "Delete selection",+ "keymap_play_pause": "Play / pause",+ "keymap_help": "Show this help",+ "keymap_next_prev": "Next / previous item",+ "keymap_fullscreen": "Toggle fullscreen",+ "keymap_close": "Close player",+ "keymap_volume": "Volume up / down",+ "keymap_mute": "Mute / unmute",+ "keymap_seek": "Seek 10s back / forward",+ "output_dir_pick": "Choose folder…",+ "output_dir_reset": "Use default",+ "crumb_clear_search": "Clear search",+ "delete_done_local": "{{n}} item(s) removed locally",+ "delete_done_revoke": "{{n}} item(s) deleted for everyone (irreversible)",+ "smart_yt-courses": "YouTube courses",+ "load_more": "Load more",+ "downloads": {+ "title": "Downloads",+ "empty": "No downloads yet.",+ "download": "Download",+ "no_output_dir": "Output folder not configured.",+ "clear_finished": "Clear finished",+ "toggle": "Toggle downloads panel",+ "status_queued": "Queued",+ "status_downloading": "Downloading",+ "status_done": "Done",+ "status_error": "Error",+ "status_cancelled": "Cancelled",+ "open_in_reader": "Open in reader"+ },+ "search_chats": "Filter chats by title…",+ "search_chats_empty": "No chats match.",+ "search_media": "Filter by file name…",+ "search_media_empty": "No items match the filter.",+ "search_server": "Search server",+ "clear_server_search": "Clear server search",+ "favorites": "Favorites",+ "favorites_empty": "No favorites yet. Star items inside a chat to pin them here.",+ "favorites_count_suffix": "items",+ "bookmark": "Add to favorites",+ "unbookmark": "Remove from favorites",+ "selected": "{{n}} selected",+ "select_all_visible": "Select all",+ "bulk_download": "Download",+ "bulk_bookmark": "Favorite",+ "clear_selection": "Clear selection",+ "smart_pdfs": "PDFs",+ "smart_videos": "Videos",+ "smart_audios": "Audios",+ "smart_images": "Images",+ "smart_untagged": "Untagged",+ "smart_empty": "No favorites match this folder. Star items to populate it.",+ "tag_add": "Add tag",+ "tag_add_short": "tag",+ "tag_remove": "Remove tag",+ "tag_placeholder": "tag…",+ "status_connected": "Connected",+ "status_checking": "Checking…",+ "status_disconnected": "Disconnected",+ "settings_title": "Telegram settings",+ "settings_output_dir": "Download folder",+ "settings_prune_cache": "Clear thumbnail cache",+ "settings_logout": "Disconnect",+ "saved_messages": "Saved Messages",+ "saved_messages_hint": "Your personal stash",+ "verified": "Verified",+ "muted": "Muted",+ "pinned": "Pinned",+ "ctx_open": "Open chat",+ "ctx_mark_read": "Mark as read",+ "ctx_pin": "Pin to top",+ "ctx_unpin": "Unpin",+ "ctx_mute": "Mute notifications",+ "ctx_unmute": "Unmute notifications",+ "tabs_label": "Chat filters",+ "tab_all": "All",+ "tab_unread": "Unread",+ "tab_private": "Personal",+ "tab_group": "Groups",+ "tab_channel": "Channels",+ "tab_folder": "Drives",+ "online": "Online",+ "player_pip": "Picture-in-picture",+ "flood_wait_hint": "Telegram asked us to wait before more requests",+ "list_trimmed_hint": "Showing first {{shown}} of {{total}} chats. Use search to find specific ones.",+ "auto_resume_downloads": "Auto-resume downloads",+ "auto_resume_downloads_hint": "On app start, resume downloads that were in progress.",+ "thumb_cache_limit": "Thumbnail cache limit",+ "bulk_confirm_threshold": "Confirm bulk actions above",+ "bulk_confirm_threshold_unit": "items",+ "player_not_playable": "This media type can't be played inline.",+ "player_kbd_hint": "Esc close · J/↓ next · K/↑ previous",+ "filter_webpage": "Links",+ "webpage_open_external": "Open in browser",+ "allow_remote_delete": "Allow remote delete",+ "allow_remote_delete_hint": "Lets the bulk delete button erase messages from Telegram. Off by default.",+ "bulk_delete": "Delete",+ "bulk_copy": "Copy",+ "bulk_move": "Move",+ "move_needs_delete_perm": "Enable \"Allow remote delete\" in settings to move (move = copy + delete original).",+ "delete_confirm_title": "Delete remote messages?",+ "delete_confirm_body": "{{n}} messages will be deleted from Telegram. Cannot be undone.",+ "move_to": "Move to…",+ "copy_to": "Copy to…",+ "upload_files": "Upload",+ "upload_hint": "Send files to this chat",+ "kbd_help": "Open this help",+ "kbd_esc": "Close player / clear selection",+ "kbd_click": "Open player",+ "kbd_ctrl_click": "Toggle selection",+ "kbd_shift_click": "Range selection",+ "kbd_ctrl_a": "Select all visible",+ "kbd_next": "Next item (player)",+ "kbd_prev": "Previous item (player)",+ "kbd_space": "Play/pause native control",+ "title_edit_hint": "Double-click to edit caption",+ "player_book_hint": "PDF/EPUB — download to read in the embedded reader.",+ "load_more_chats": "Load more chats",+ "refreshing_in_background": "Updating list…",+ "create_folder": "New folder",+ "create_folder_title": "Create new folder",+ "create_folder_hint": "Creates a private Telegram channel marked as a course folder.",+ "create_folder_placeholder": "Folder name (e.g. Linear Algebra)",+ "chats_empty_hint": "Create your first folder to start hosting courses on Telegram.",+ "folder_rename": "Rename",+ "folder_delete": "Delete",+ "folder_rename_title": "Rename folder",+ "folder_delete_title": "Delete folder?",+ "folder_delete_body": "The Telegram channel will be removed permanently along with all uploads. Cannot be undone.",+ "drop_to_upload_title": "Drop to upload",+ "drop_to_upload_hint": "Files will be sent to {{chat}}",+ "watched": "Watched",+ "resume_at": "Resume at {{time}}",+ "player_speed": "Playback speed"+ },+ "home_continue_title": "Continue where you left off",+ "home_continue_eyebrow": "Recent",+ "home_continue_empty": "No courses in progress yet. Start a lesson to see it here.",+ "home_continue_next": "Next: {{title}}",+ "home_continue_current": "On: {{title}}",+ "home_news_title": "With updates",+ "home_news_eyebrow": "New lessons",+ "home_news_count_one": "{{count}} new lesson",+ "home_news_count_other": "{{count}} new lessons",+ "home_recently_title": "Recently added",+ "home_recently_eyebrow": "New",+ "home_platform_eyebrow": "Platform",+ "home_subject_eyebrow": "Subject",+ "home_empty_title": "Your library is empty",+ "home_empty_desc": "Add a folder with courses to begin.",+ "home_empty_cta": "Add courses folder",+ "home_load_error": "Failed to load library: {{error}}",+ "view_home": "Home",+ "view_catalog": "Catalog",+ "platform_generic": "Other platforms"+ },+ "player": {+ "title": "Player",+ "placeholder": "Select a lesson from the library to start."+ },+ "course": {+ "back": "Back to library",+ "continue": "Continue watching",+ "start": "Start course",+ "lessons_total": "{{count}} lessons",+ "progress": "{{completed}} of {{total}} completed ({{pct}}%)",+ "no_lessons": "No lessons found for this course.",+ "loose_lessons": "Lessons",+ "mark_complete": "Mark as complete",+ "mark_incomplete": "Mark as not watched",+ "search_placeholder": "Search lessons...",+ "resume_label": "Resume from here"+ },+ "attachments": {+ "title": "Attachments ({{count}})"+ },+ "lesson": {+ "progress_label": "Lesson progress",+ "back_to_course": "Back to course",+ "next": "Next lesson",+ "prev": "Previous lesson",+ "mark_complete": "Mark as complete",+ "completed": "Completed",+ "loading": "Loading video...",+ "no_video": "Video file not found on disk.",+ "autoplay_title": "Next up",+ "autoplay_in": "Playing next in {{seconds}}s...",+ "autoplay_play_now": "Play now",+ "autoplay_cancel": "Cancel autoplay",+ "autoplay_last": "You finished the last lesson.",+ "speed": "Speed",+ "theater_on": "Exit theater mode",+ "theater_off": "Theater mode",+ "theater_hint": "Hide sidebar and panels (T)",+ "description_title": "Description",+ "clip": "Clip last 60s",+ "clip_loading": "Clipping…",+ "clip_done": "Clip saved",+ "clip_failed": "Clip failed",+ "clip_no_video": "Video not loaded yet",+ "clip_aria": "Save last 60 seconds as clip"+ },+ "notes": {+ "title": "Notes",+ "placeholder": "Notes you take while studying will appear here.",+ "empty": "No notes yet. Take one while watching a lesson.",+ "add_placeholder": "Write a note... (markdown supported)",+ "quick_placeholder": "Quick note at {{time}} — press Enter to save",+ "add": "Add note",+ "save": "Save",+ "cancel": "Cancel",+ "edit": "Edit",+ "delete": "Delete",+ "confirm_delete": "Delete this note?",+ "jump_to": "Jump to {{time}}",+ "panel_title": "Notes for this lesson",+ "at_time": "at {{time}}",+ "no_timestamp": "No timestamp",+ "quick_note_hint": "Press N while watching to capture a note at the current time.",+ "recent": "Recent notes",+ "loading": "Loading notes...",+ "course_col": "Course",+ "lesson_col": "Lesson",+ "body_col": "Note",+ "search_placeholder": "Search your notes...",+ "tab_recent": "Recent",+ "tab_daily": "Daily review",+ "cal_today": "Today",+ "cal_selected": "{{date}} — {{count}} note(s)",+ "empty_day": "No notes on this day.",+ "new": "New note",+ "preview": "Preview",+ "convert": "Convert to flashcard",+ "export_md": "Export .md",+ "export_pdf": "Export PDF",+ "to_flashcard": "→ Flashcard",+ "pick_deck": "Deck...",+ "empty_front": "(untitled)",+ "editor_placeholder": "Write in Markdown + LaTeX (use $...$ and $$...$$)",+ "select_or_new": "Select a note or create a new one.",+ "filter": {+ "all": "All",+ "notes": "Notes",+ "bookmarks": "Bookmarks"+ },+ "read_mode": "Read",+ "edit_mode": "Edit",+ "open_menu": "More options",+ "menu_label": "Note options",+ "delete_title": "Delete note?",+ "delete_body": "The note will be removed permanently. Cannot be undone.",+ "toggle_preview": "Preview",+ "export_menu": "Export…",+ "untitled": "(untitled)",+ "scope_global": "Unlinked",+ "scope_course": "Course",+ "scope_module": "Module",+ "scope_lesson": "Lesson"+ },+ "achievements": {+ "title": "Achievements",+ "subtitle": "Local XP — no leaderboard, no social comparison",+ "loading": "Loading…",+ "level_tag": "Level",+ "to_next": "to level {{next}}",+ "level_progress": "{{pct}}% to next level",+ "history_title": "Recent XP history",+ "history_empty": "Nothing here yet. Study something to start earning XP.",+ "reset_title": "Reset gamification",+ "reset_desc": "Clears XP, achievements, and counters. Does not affect course progress.",+ "reset_confirm_title": "Reset gamification",+ "reset_confirm_message": "XP, level, achievements, and counters will be cleared. This action cannot be undone.",+ "minutes_ago": "{{n}} min ago",+ "hours_ago": "{{n}} h ago",+ "day_ago": "{{n}} day ago",+ "days_ago": "{{n}} days ago",+ "filter_all": "All",+ "filter_xp": "XP",+ "filter_lessons": "Lessons",+ "filter_focus": "Focus",+ "filter_streak": "Streak",+ "tier_bronze": "bronze",+ "tier_silver": "silver",+ "tier_gold": "gold",+ "unlocked_prefix": "unlocked",+ "reset_done": "Reset done",+ "reset_confirm_label": "Reset",+ "filter_aria": "Category filters",+ "tree_link": "Tree",+ "charts_link": "Charts",+ "label_xp_100": "First 100 XP",+ "label_xp_500": "500 XP",+ "label_xp_1000": "Thousand XP",+ "label_xp_5000": "5k XP",+ "label_xp_10000": "10k XP",+ "label_lessons_1": "First lesson",+ "label_lessons_10": "10 lessons",+ "label_lessons_50": "50 lessons",+ "label_lessons_100": "100 lessons",+ "label_focus_60": "1h focused",+ "label_focus_600": "10h focused",+ "label_focus_6000": "100h focused",+ "label_streak_3": "3 days in a row",+ "label_streak_7": "1-week streak",+ "label_streak_30": "30-day streak",+ "label_streak_100": "100-day streak",+ "desc_xp_100": "Earn 100 XP studying",+ "desc_xp_500": "Earn 500 XP",+ "desc_xp_1000": "1000 XP milestone",+ "desc_xp_5000": "Five thousand XP collected",+ "desc_xp_10000": "Ten thousand XP — you're dedicated",+ "desc_lessons_1": "Complete your first lesson",+ "desc_lessons_10": "Complete 10 lessons",+ "desc_lessons_50": "Half-century of lessons",+ "desc_lessons_100": "A hundred lessons completed",+ "desc_focus_60": "60 minutes of focus collected",+ "desc_focus_600": "600 minutes of focus collected",+ "desc_focus_6000": "6000 minutes of focus — rare discipline",+ "desc_streak_3": "Maintain streak for 3 days",+ "desc_streak_7": "7 consecutive days studying",+ "desc_streak_30": "A whole month of consistency",+ "desc_streak_100": "Habit of steel"+ },+ "focus": {+ "title": "Focus",+ "placeholder": "Pomodoro and deep-work sessions live here.",+ "intent_label": "What's this session for?",+ "intent_prefix": "Studying",+ "intent_placeholder": "thesis, calculus exam, sales certification...",+ "intent_hint": "Shows up on your Discord if RPC is on. Leave empty if you'd rather not.",+ "intent_for": "studying",+ "rpc_default": "Focus session",+ "preset_pomodoro": "Pomodoro",+ "preset_short_break": "Short break",+ "preset_long_break": "Long break",+ "preset_deep": "Deep work",+ "preset_long": "Deep work (50/10)",+ "preset_custom": "Stopwatch",+ "start": "Start",+ "stop": "Stop",+ "running": "Active",+ "no_session": "No active session. Pick a preset to begin.",+ "elapsed": "{{minutes}} min",+ "today": "Today",+ "this_week": "This week",+ "history": "Session history",+ "history_empty": "No sessions yet. Start one to build the streak.",+ "no_history": "No sessions yet.",+ "minutes_unit": "min",+ "min": "min",+ "break_toast": "Break time! Take 5.",+ "done_toast": "Session finished: {{minutes}} min",+ "pomodoro": "Pomodoro (min)",+ "short_break": "Short break (min)",+ "long_break": "Long break (min)",+ "cycles": "Cycles until long break",+ "deep": "Deep work",+ "notify_end": "Notify on end",+ "notify_sound": "Sound alert",+ "auto_pause_player": "Auto-pause player",+ "daily_target": "Daily target (min)",+ "weekly_target": "Days per week",+ "today_progress": "Today",+ "interrupt": "Interrupt",+ "start_now": "Start now",+ "interrupted": "interrupted",+ "cycles_today": "Cycles today: {{count}}",+ "settings_title": "Timer preferences",+ "min_per_week": " min/wk",+ "auto_start": {+ "breaks": "Auto-start breaks",+ "focus": "Auto-start focus",+ "cycles_until_long_break": "Cycles until long break"+ },+ "notifications": {+ "title": "Notifications",+ "enable": "Browser notification",+ "sound": "End-of-cycle sound",+ "sound_volume": "Volume",+ "permission_denied": "Permission denied in browser",+ "unsupported": "Notifications not supported in this browser"+ },+ "cycle_end": {+ "focus_done": "Focus done",+ "break_done": "Break done",+ "long_break_done": "Long break done",+ "body": "Come back when you're ready"+ },+ "hero_title": "Start",+ "hero_subtitle": "Pick a subject and a preset to begin.",+ "page_subtitle": "Focused sessions with Pomodoro or deep work",+ "stats_subjects": "Active subjects",+ "stats_today": "Today",+ "stats_week": "This week",+ "today_session": "{{n}} session · {{min}} min",+ "today_sessions": "{{n}} sessions · {{min}} min",+ "config_cycles": "Cycles and breaks",+ "config_sounds": "Sounds and notifications",+ "config_autostart": "Auto-start",+ "stop_title": "Interrupt session?",+ "stop_body": "The session will be marked as interrupted and won't count towards stats.",+ "stop_confirm": "Interrupt",+ "active_preset_label": "In focus",+ "session_ended": "Session ended",+ "settings_saving": "saving…",+ "settings_saved": "saved ✓",+ "acc_cycles_title": "Cycles",+ "acc_cycles_summary": "{{focus}}min focus · {{break}}min break · {{cycles}}× until long break",+ "acc_cycles_focus": "Focus (min)",+ "acc_cycles_short": "Short break (min)",+ "acc_cycles_long": "Long break (min)",+ "acc_cycles_count": "Cycles before long break",+ "acc_breaks_title": "Breaks & auto-start",+ "acc_breaks_auto_yes": "auto-pause",+ "acc_breaks_auto_no": "manual",+ "acc_breaks_focus_yes": "auto-resume",+ "acc_breaks_focus_no": "manual",+ "acc_breaks_player_yes": "pauses player",+ "acc_breaks_player_no": "ignores player",+ "acc_breaks_check_breaks": "Auto-start breaks after focus",+ "acc_breaks_check_focus": "Auto-resume focus after break",+ "acc_breaks_check_player": "Pause video during focus break",+ "acc_sounds_title": "Sounds & notification",+ "acc_sounds_notify_on": "notification ON",+ "acc_sounds_notify_off": "silent",+ "acc_sounds_sound_on": "sound {{n}}%",+ "acc_sounds_sound_off": "no sound",+ "acc_sounds_check_notify": "Notify on cycle end",+ "acc_sounds_check_sound": "Play sound on end",+ "acc_sounds_volume": "Volume ({{n}}%)",+ "unlimited_aria": "unlimited"+ },+ "subjects": {+ "title": "Subjects",+ "new": "New",+ "name": "Name",+ "color": "Color",+ "weekly_minutes": "Weekly goal (min)",+ "edit": "Edit subject",+ "empty": "No subjects yet",+ "archive": "Archive",+ "unarchive": "Unarchive",+ "archived_label": "Archived",+ "active": "Active subject",+ "none": "None",+ "confirm_delete": "Delete this subject?",+ "progress_today": "Subjects today",+ "field": {+ "name": "Name",+ "color": "Color",+ "weekly_target": "Weekly target (min)",+ "daily_targets": "Daily targets (min)",+ "daily_sum": "Weekly sum",+ "distribute_equally": "Distribute equally"+ },+ "day": {+ "mon": "Mon",+ "tue": "Tue",+ "wed": "Wed",+ "thu": "Thu",+ "fri": "Fri",+ "sat": "Sat",+ "sun": "Sun"+ },+ "progress": {+ "status_not_started": "Not started",+ "status_in_progress": "In progress",+ "status_reached": "Goal reached",+ "status_exceeded": "Goal exceeded"+ }+ },+ "progress": {+ "title": "Progress",+ "placeholder": "Streak, daily activity and milestones.",+ "no_data": "No progress yet — watch a lesson to get started.",+ "streak": "Streak",+ "streak_unit": "day",+ "streak_unit_plural": "days",+ "today_lessons": "Lessons today",+ "today_minutes": "Focus minutes today",+ "lessons_done": "Lessons completed",+ "courses_done": "Courses completed",+ "courses_completed": "Courses completed",+ "lessons_completed_total": "Total lessons completed",+ "heatmap_title": "Last 90 days",+ "heatmap_empty": "No activity yet. Complete a lesson to light it up.",+ "goal_daily": "Daily goal",+ "goal_lessons": "{{current}} / {{target}} lessons",+ "goal_minutes": "{{current}} / {{target}} focus minutes",+ "goal_hit": "Goal hit!",+ "goal_missed": "Keep going",+ "legend_less": "Less",+ "legend_more": "More",+ "read_title": "Reading",+ "read_streak": "Reading streak",+ "read_today": "Today",+ "read_week": "This week",+ "read_total": "All time",+ "read_active": "Currently reading",+ "minutes_per_week": "Minutes per week",+ "cards_per_day": "Lessons per day",+ "time_by_subject": "Time by subject",+ "retention": "Card pool",+ "new": "New",+ "learning": "Learning",+ "review": "Review",+ "no_subjects": "No subjects defined",+ "page_subtitle": "Your study pace and goals",+ "period_today": "Today",+ "period_7d": "7d",+ "period_30d": "30d",+ "period_90d": "90d",+ "hero_today": "Today",+ "daily_goal_pct": "of daily goal",+ "stat_lessons": "Lessons",+ "stat_cards": "Cards",+ "stat_minutes": "Focus (min)",+ "stat_streak": "Streak",+ "heatmap_hint": "Last {{n}} days · click for daily notes",+ "chart_explore_library": "Browse library",+ "chart_review_weak": "Review weak cards",+ "chart_adjust_goals": "Adjust goals",+ "streak_best": "best: {{n}}",+ "chart_time_per_course": "Time per course",+ "chart_time_per_course_empty": "No time logged in this period.",+ "chart_time_period_days": "last {{n}} days",+ "chart_activity_by_hour": "Activity by hour",+ "chart_activity_hint": "sum of focus · 24h",+ "chart_activity_empty": "No activity in the last {{n}} days.",+ "chart_subject": "By subject",+ "chart_subject_unit": "focus minutes",+ "chart_subject_empty": "Create subjects and assign sessions to see the breakdown.",+ "chart_subject_unassigned": "No subject",+ "retention_title": "Retention (Anki)",+ "retention_method": "FSRS-5",+ "retention_stub_before": "Real retention will come from the Anki cross-DB query. For now, open",+ "retention_link": "Anki Stats →",+ "retention_stub_after": "to see retention, interval distribution, and review history.",+ "recent_achievements": "Recent achievements",+ "view_all": "View all →",+ "time_today": "today",+ "time_yesterday": "yesterday",+ "time_days_ago": "{{n}} days ago",+ "time_months_ago": "{{n}} months ago",+ "time_years_ago": "{{n}} years ago",+ "ach_label_xp_100": "100 XP collected",+ "ach_label_xp_500": "500 XP collected",+ "ach_label_xp_1000": "1,000 XP collected",+ "ach_label_xp_5000": "5,000 XP collected",+ "ach_label_xp_10000": "10,000 XP collected",+ "ach_label_lessons_1": "First lesson",+ "ach_label_lessons_10": "10 lessons completed",+ "ach_label_lessons_50": "50 lessons completed",+ "ach_label_lessons_100": "100 lessons completed",+ "ach_label_focus_60": "1 hour of focus",+ "ach_label_focus_600": "10 hours of focus",+ "ach_label_focus_6000": "100 hours of focus",+ "ach_label_streak_3": "3-day streak",+ "ach_label_streak_7": "1-week streak",+ "ach_label_streak_30": "30-day streak",+ "ach_label_streak_100": "100-day streak"+ },+ "settings": {+ "title": "Settings",+ "placeholder": "Plugin preferences and library rescan.",+ "tab_diagnostic": "Diagnostic",+ "saving": "Saving…",+ "saved": "Saved",+ "categories_aria": "Categories",+ "library_section": "Library",+ "rescan": "Rescan library",+ "rescan_desc": "Walk the downloads folder again and refresh courses, modules and lessons.",+ "rescan_running": "Scanning...",+ "rescan_done": "Found {{courses}} course(s) and {{lessons}} lesson(s) in {{ms}} ms.",+ "rescan_error": "Rescan failed: {{message}}",+ "stats_section": "Library stats",+ "stat_courses": "Courses",+ "stat_lessons": "Lessons",+ "stat_completed": "Completed",+ "stat_notes": "Notes",+ "stat_decks": "Decks",+ "stat_flashcards": "Flashcards",+ "stat_focus": "Focus sessions",+ "backup_section": "Backup & restore",+ "export": "Export data",+ "export_desc": "Download a JSON snapshot with courses, notes, flashcards, progress and focus history.",+ "export_button": "Export JSON",+ "exporting": "Exporting...",+ "import": "Import data",+ "import_desc": "Restore from a previously exported JSON file. Existing rows with matching IDs are overwritten.",+ "import_button": "Choose file...",+ "importing": "Importing...",+ "import_replace": "Wipe current data before import (destructive)",+ "import_done": "Imported {{courses}} courses, {{lessons}} lessons, {{notes}} notes, {{flashcards}} flashcards."+ },+ "read": {+ "title": "Read",+ "subtitle": "Library of books, PDFs and documents.",+ "empty": "No books yet. Add folders and click Rescan.",+ "scan_now": "Rescan now",+ "scanning": "Scanning...",+ "scan_done": "{{added}} added · {{updated}} updated · {{found}} found",+ "open": "Open",+ "back_to_library": "Back to library",+ "no_book": "No book selected.",+ "loading_page": "Loading page...",+ "file_missing": "File not found on disk.",+ "format_pdf": "PDF",+ "format_epub": "EPUB",+ "format_djvu": "DJVU",+ "format_mobi": "MOBI",+ "format_azw3": "AZW3",+ "format_fb2": "FB2",+ "format_cbz": "CBZ",+ "format_cbr": "CBR",+ "format_txt": "TXT",+ "format_rtf": "RTF",+ "format_html": "HTML",+ "format_unknown": "File",+ "filter_all": "All",+ "filter_reading": "Reading",+ "filter_finished": "Finished",+ "filter_favorites": "Favorites",+ "search_placeholder": "Search books...",+ "sort_last_opened": "Last opened",+ "sort_added": "Added",+ "sort_title": "Title",+ "sort_author": "Author",+ "page_count": "{{count}} pages",+ "progress_pct": "{{pct}}% read",+ "not_started": "Not started",+ "in_progress": "Reading",+ "finished": "Finished",+ "collections_title": "Collections",+ "collection_new": "New collection",+ "collection_name": "Collection name",+ "no_collections": "No collections.",+ "soon": "Reader under construction. For now, files open in the default app.",+ "open_external": "Open in default app",+ "loading_book": "Loading book…",+ "txt_load_more": "Load more",+ "page_of": "{{current}} of {{total}}",+ "prev_page": "Previous page",+ "next_page": "Next page",+ "go_to": "Go to page",+ "zoom_in": "Zoom in",+ "zoom_out": "Zoom out",+ "fit_width": "Fit width",+ "manga_rtl": "Manga mode (right to left)",+ "outline_title": "Outline",+ "outline_empty": "No outline for this book.",+ "pdfium_missing": "pdfium.dll not found. Run scripts/fetch-pdfium.ps1.",+ "unsupported_format": "Format {{format}} is not yet supported in the internal reader. Use 'Open in default app'.",+ "search_title": "Search",+ "search_input": "Search in book…",+ "search_no_hits": "No results.",+ "search_hits_count": "{{n}} result(s)",+ "bookmarks_title": "Bookmarks",+ "bookmarks_empty": "No bookmarks. Press B to mark current page.",+ "add_bookmark": "Bookmark page",+ "remove_bookmark": "Remove bookmark",+ "panel_outline": "Outline",+ "panel_bookmarks": "Bookmarks",+ "panel_search": "Search",+ "highlight_save": "Highlight",+ "highlight_delete": "Remove highlight",+ "color_yellow": "Yellow",+ "color_green": "Green",+ "color_pink": "Pink",+ "color_blue": "Blue",+ "panel_highlights": "Highlights",+ "highlights_empty": "Select text on the page and pick a color.",+ "menu": "More options",+ "export_md": "Export annotations (.md)",+ "export_md_v2": "Export rich markdown (v2)",+ "export_json": "Export annotations (.json)",+ "export_pdf_burn_in": "Export annotated PDF",+ "export_pdf_ok": "Annotated PDF · {{highlights}} highlights · {{bookmarks}} bookmarks · {{notes}} notes · {{inks}} inks",+ "export_pdf_only": "PDF format only",+ "export_ok": "Exported to {{path}}",+ "export_failed": "Export failed: {{err}}",+ "import_json": "Import annotations (.json)",+ "import_ok": "{{imported}} imported · {{skipped}} duplicates · {{errors}} errors",+ "import_failed": "Import failed: {{err}}",+ "bulk_export_btn": "Export all (.md)",+ "bulk_export_hint": "Export markdown v2 for every book into a folder",+ "bulk_export_done": "{{written}} books exported · {{skipped}} skipped · {{kb}} KB",+ "ink_toggle": "Pen mode",+ "ink_undo": "Undo last ink",+ "ink_color_black": "Black",+ "ink_color_red": "Red",+ "ink_color_blue": "Blue",+ "chapter": "Chapter",+ "chapter_of": "Ch {{current}} of {{total}}",+ "prev_chapter": "Previous chapter",+ "next_chapter": "Next chapter",+ "no_outline": "No outline available.",+ "theme_label": "Theme",+ "theme_default": "Default",+ "theme_day": "E-ink day",+ "theme_night": "E-ink night",+ "theme_sepia": "Sepia",+ "effects_label": "Effects",+ "effect_paper": "Paper filter",+ "effect_cursor": "Reading line",+ "reading_style": "Reading style",+ "focus_mode": "Focus mode (F)",+ "format_all": "All formats",+ "roots_btn": "Folders ({{count}})",+ "roots_title": "Book folders",+ "roots_hint": "Choose where to look for books. Scanner walks these folders recursively and ignores dotfolders.",+ "roots_empty": "No folders yet. Add one below.",+ "roots_add_btn": "Add folder",+ "roots_rescan": "Scan now",+ "empty_no_roots_title": "No folders configured",+ "empty_no_roots_hint": "Add a folder with books to start scanning. Courses and books use separate roots.",+ "empty_no_roots_cta": "Choose folders",+ "folder_label": "Folder",+ "folder_all": "All folders",+ "scan_removed": "removed {{n}} missing",+ "view_scroll": "Continuous scroll",+ "view_paged": "Paged view",+ "tags_edit": "Edit tags",+ "delete_book_title": "Delete book",+ "delete_book_confirm": "\"{{title}}\" will be permanently deleted from disk and removed from your library. This cannot be undone.",+ "delete_book_done": "\"{{title}}\" deleted from disk",+ "delete_book_done_missing": "File was already gone — \"{{title}}\" removed from the library",+ "delete_book_failed": "Could not delete book: {{err}}",+ "enrich_metadata": "Enrich metadata",+ "enrich_search_btn": "Search OpenLibrary",+ "enrich_search_hint": "Looks up by current title + author. Picks best match from OpenLibrary.",+ "enrich_apply_hint": "Pick which fields to overwrite:",+ "enrich_apply_btn": "Apply",+ "tags_empty": "No tags yet.",+ "tags_input_placeholder": "type tag and press Enter",+ "tags_add_btn": "Add tag",+ "collections_btn": "Collections ({{count}})",+ "collections_hint": "Group books across folders. Open a collection from the dropdown above to add or remove books.",+ "collections_empty": "No collections yet.",+ "collection_create": "New collection",+ "collection_create_prompt": "Collection name?",+ "collection_rename": "Rename",+ "collection_delete_confirm": "Delete collection \"{{name}}\"? Books stay; only the grouping is removed.",+ "collection_label": "Collection",+ "collection_all": "All books",+ "collection_add_book": "Add to active collection",+ "collection_remove_book": "Remove from active collection",+ "typo_title": "Typography",+ "typo_font": "Font",+ "typo_size": "Size",+ "typo_line": "Line height",+ "typo_justify": "Alignment",+ "typo_justify_left": "Left",+ "typo_justify_full": "Justify",+ "typo_reset": "Reset to defaults",+ "manga_nav_btn": "Manga",+ "manga_title": "Manga",+ "manga_subtitle": "Manga, manhwa, manhua, webtoons and other Japanese-style serialized comics.",+ "series_empty_title": "No manga detected",+ "series_empty_hint": "Add folders with CBZ/CBR files or unpacked chapter folders, then scan.",+ "series_scan_done": "{{found}} titles · {{added}} new",+ "series_count_chapters": "{{current}}/{{total}} ch",+ "series_chapters": "Chapters",+ "series_start_reading": "Start reading",+ "series_continue_reading": "Continue reading",+ "back_to_manga": "Back to manga",+ "back_to_manga_detail": "Back to chapter list",+ "clean_orphans_btn": "Clean orphans",+ "clean_orphans_hint": "Remove DB rows pointing to files that no longer exist or that became series chapters.",+ "orphans_cleared": "Removed {{missing}} missing · {{member}} now in manga · {{junk}} junk (LICENSE/README/tiny)",+ "manga_clean_orphans_btn": "Clean missing folders",+ "manga_clean_orphans_hint": "Remove local series whose folder no longer exists.",+ "manga_orphans_cleared": "Removed {{n}} missing folder(s)",+ "manga_clear_remote_btn": "Clear tracked",+ "manga_clear_remote_confirm": "Delete all manga tracked from MangaDex? Local series stay.",+ "manga_remote_cleared": "Removed {{n}} tracked manga",+ "manga_clear_all_btn": "Clear ALL",+ "manga_clear_all_confirm": "Delete every manga from the library, including local? This cannot be undone.",+ "manga_all_cleared": "Removed {{n}} manga",+ "mark_read": "Mark as read",+ "mark_unread": "Mark as unread",+ "spread_toggle": "Double page",+ "entry_empty": "No pages found in this chapter.",+ "kind_comic": "Comic",+ "kind_manga": "Manga",+ "kind_manhwa": "Manhwa",+ "kind_manhua": "Manhua",+ "kind_webcomic": "Webcomic",+ "kind_light_novel": "Light Novel",+ "discover_nav": "Discover",+ "discover_title": "Discover series",+ "discover_subtitle": "Search MangaDex and add to your library.",+ "discover_source": "Source",+ "discover_search_placeholder": "Search by title…",+ "discover_empty": "No results. Try another search.",+ "track_btn": "+ Track",+ "tracking": "Adding…",+ "tracked_ok": "Tracked. {{count}} new chapters ({{total}} total)",+ "discover_source_all": "★ All enabled sources (global)",+ "discover_global_summary": "{{alive}}/{{total}} sources responded · {{items}} items total",+ "discover_global_failed": "{{n}} source(s) failed",+ "book_discover_nav": "Books online",+ "book_discover_title": "Discover books",+ "book_discover_subtitle": "Search public domain libraries and download free ebooks straight into your library.",+ "book_search_placeholder": "Search by title, author…",+ "book_download_btn": "+ Download",+ "book_downloading": "Downloading…",+ "book_download_ok": "Downloaded ({{format}}). Added to library.",+ "book_already_in_library": "Already in your library.",+ "book_results_count": "{{n}} results",+ "book_page_label": "Page {{current}}",+ "book_metadata_only": "Metadata only",+ "book_borrow_only": "Borrow on archive.org",+ "book_borrow_only_hint": "This book is under Controlled Digital Lending. Free download is not available; borrowing requires an archive.org account.",+ "annas_manage_link": "Advanced sources (Alt Library)",+ "annas_title": "Alt Library — advanced source",+ "annas_subtitle": "Shadow-library metasearch. Disabled by default. Jurisdiction-dependent.",+ "annas_warning_title": "Legal & safety notice",+ "annas_warning_body1": "Alt Library aggregates mirrors of LibGen, Z-Library, Sci-Hub and other shadow libraries. Material there may be copyrighted.",+ "annas_warning_body2": "The legality of accessing, downloading or distributing that content varies per country. In some jurisdictions (Palau, for example) personal use is permitted; in others it is not. You are solely responsible for checking your own laws.",+ "annas_warning_body3": "omniget-study merely provides a programmable HTTP client. Enabling this source downloads content that YOU chose to request. Keep your own compliance.",+ "annas_status": "Source status",+ "annas_acked_at": "Warning acknowledged on {{date}}",+ "annas_not_acked": "Warning not yet acknowledged — enabling requires confirmation.",+ "annas_on": "Active",+ "annas_enable_btn": "Enable source",+ "annas_disable_btn": "Disable",+ "annas_enabled": "Alt Library enabled.",+ "annas_disabled": "Alt Library disabled.",+ "annas_log_title": "Log mirrors tried",+ "annas_log_hint": "Optional local log of which domains/mirrors each download used. Stored locally only.",+ "annas_domains_title": "Mirror domains",+ "annas_domains_hint": "One per line. Try in order on each request. Reset to clear to defaults.",+ "annas_domains_save": "Save domains",+ "annas_domains_revert": "Revert",+ "annas_domains_saved": "Domains saved.",+ "annas_reset_title": "Reset everything",+ "annas_reset_hint": "Clears acknowledgement, disables source, restores default domains. Does NOT remove already-downloaded files.",+ "annas_reset_btn": "Reset Alt Library settings",+ "annas_reset_confirm": "Reset all Alt Library settings? Source will be disabled and require re-acknowledgement.",+ "annas_reset_done": "Settings reset.",+ "annas_warning_modal_title": "Before enabling Alt Library",+ "annas_warning_modal_line1": "This source scrapes shadow libraries.",+ "annas_warning_modal_line2": "Most content there is copyrighted. Downloading it may be legal in your jurisdiction, grey-area, or outright illegal — verify with your local laws.",+ "annas_warning_modal_line3": "omniget-study does not host content. All downloads go through mirrors YOU configure and YOU trigger.",+ "annas_warning_modal_line4": "Tick the box below if you understand and accept personal responsibility for your usage.",+ "annas_warning_ack_label": "I understand. I take full responsibility for my use in my jurisdiction.",+ "annas_warning_cancel": "Cancel",+ "annas_warning_confirm": "Enable Alt Library",+ "search_notes_btn": "Search notes",+ "downloads_btn": "Downloads",+ "enrich_no_results": "No results. Try editing the book title first.",+ "enrich_done": "✓ Metadata updated",+ "enrich_field_title": "Title:",+ "enrich_field_author": "Author:",+ "enrich_field_publisher": "Publisher:",+ "enrich_field_cover": "Cover (download)"+ },+ "bulk": {+ "select_all": "Select all",+ "selected": "selected",+ "mark_completed": "Mark completed",+ "mark_uncompleted": "Unmark",+ "mark_module_completed": "Module completed",+ "mark_module_uncompleted": "Unmark module",+ "mark_course_completed": "Course completed",+ "mark_course_uncompleted": "Unmark course",+ "marked_completed": "{{count}} lesson(s) marked completed",+ "marked_uncompleted": "{{count}} lesson(s) unmarked",+ "undo": "Undo"+ },+ "goals": {+ "title": "Goals",+ "weekly": "Weekly",+ "monthly": "Monthly",+ "metric": {+ "minutes": "Minutes",+ "lessons": "Lessons",+ "cards": "Cards"+ }+ },+ "export": {+ "all_md": "Export .md",+ "all_hint": "Export all filtered notes as .md",+ "ok": "{{count}} note(s) exported"+ },+ "bookmark": {+ "add": "Mark",+ "add_hint": "Add bookmark at current time (B)",+ "seek_hint": "Jump to this point",+ "default_label": "{{time}}"+ },+ "stats": {+ "chart": {+ "time_per_course": "Time per course (last 30 days)",+ "empty": "No data for period"+ }+ },+ "empty": {+ "library_hint": "Download a course via Courses plugin or set the folder in Settings.",+ "notes_hint": "Create a note during playback or via Ctrl+Shift+N.",+ "subjects_hint": "Add subjects to distribute weekly goals."+ },+ "maintenance": {+ "title": "{{feature}} under maintenance",+ "lead": "We're polishing this section. The rest of Study works normally — this part will be back soon.",+ "eta_label": "ETA",+ "back_to_study": "Back to Study",+ "open_library": "Open Library",+ "feature_notes": "Notes",+ "feature_anki": "Anki",+ "feature_focus": "Focus",+ "feature_progress": "Progress",+ "feature_achievements": "Achievements",+ "detail_notes": "Block-based editor (Tiptap), backlinks, graph view and templates still being polished.",+ "detail_anki": "Internal Anki client (FSRS-5, sync, .apkg) is being finalized.",+ "detail_focus": "Pomodoro timer, focus history and Discord presence are being reworked.",+ "detail_progress": "Charts, streaks and weekly goals are being rebuilt for accuracy.",+ "detail_achievements": "XP, badges and the achievements tree are being polished.",+ "home_banner_title": "Some study features are under maintenance",+ "home_banner_body": "Focus, Progress, Achievements and Notes are temporarily unavailable while we polish them. The rest of OmniGet works normally."+ },+ "library_health": {+ "removed_toast": "Removed: {{name}}",+ "remove_failed_toast": "Failed to remove: {{msg}}",+ "no_issues_toast": "Library has no issues",+ "issues_found_toast": "{{count}} issue(s) found",+ "verify_failed_toast": "Failed to verify library: {{msg}}"+ }+ },+ "tracking": {+ "title": "Package tracking",+ "subtitle_summary": "{{count}} package(s) · {{in_transit}} in transit",+ "subtitle_empty": "Track packages from Brazilian carriers.",+ "privacy_show_title": "Show codes",+ "privacy_hide_title": "Hide codes (streamer mode)",+ "privacy_button": "Private",+ "refresh_all": "Refresh all",+ "refresh_all_busy": "Refreshing…",+ "refresh_all_title": "Refresh every package",+ "add_button": "+ Add",+ "search_placeholder": "Search by code, alias or status…",+ "tab": {+ "all": "All",+ "in_transit": "In transit",+ "awaiting": "Awaiting",+ "delivered": "Delivered",+ "delayed": "Delayed",+ "archived": "Archived"+ },+ "empty": {+ "none_title": "No packages tracked",+ "none_desc": "Add a tracking code to follow deliveries.",+ "none_cta": "Add first package",+ "in_transit": "No packages in transit.",+ "awaiting": "No packages awaiting pickup.",+ "delivered": "No packages delivered yet.",+ "delayed": "No delayed packages.",+ "archived": "No archived packages.",+ "nothing": "Nothing here.",+ "search": "No packages match \"{{query}}\"."+ },+ "card": {+ "delivered": "Delivered",+ "days_one": "1 day in transit",+ "days_other": "{{count}} days in transit",+ "no_events": "No events",+ "awaiting_first": "Awaiting first update…",+ "archived_label": "Archived"+ },+ "rel": {+ "now": "now",+ "minutes": "{{count}} min ago",+ "hours": "{{count}} h ago"+ },+ "menu": {+ "refresh": "Refresh",+ "refreshing": "Refreshing…",+ "copy_code": "Copy code",+ "rename": "Rename",+ "unarchive": "Unarchive",+ "remove": "Remove"+ },+ "loading": "Loading…",+ "error_prefix": "Error",+ "toast": {+ "added": "Package added, refreshing…",+ "copied": "Code copied",+ "copy_failed": "Couldn't copy",+ "refresh_failed": "Couldn't refresh ({{error}})",+ "offline": "No internet — refresh postponed",+ "refresh_done": "Refresh complete",+ "package_removed": "Package removed",+ "archived": "Package archived",+ "unarchived": "Package unarchived",+ "cpf_updated": "CPF updated",+ "status_changed": "{{code}}: {{status}}"+ },+ "rename_prompt": "Package alias",+ "add_dialog": {+ "title": "Add package",+ "close": "Close",+ "code_label": "Tracking code *",+ "code_placeholder": "e.g. AB123456789BR",+ "alias_label": "Alias (optional)",+ "alias_placeholder": "e.g. New sneakers",+ "cpf_label": "Recipient's CPF *",+ "cpf_placeholder": "000.000.000-00",+ "cpf_hint": "Carrier requires CPF for lookup.",+ "detecting": "Detecting carrier…",+ "detected": "Carrier: {{carrier}}",+ "requires_cpf_suffix": "· CPF required",+ "error_code_required": "Enter the tracking code.",+ "error_cpf_required": "This carrier requires a CPF.",+ "cancel": "Cancel",+ "submit": "Save",+ "submitting": "Saving…"+ },+ "remove_dialog": {+ "title": "Remove package",+ "question": "Are you sure you want to remove {{name}}?",+ "sub": "The tracked events will also be deleted.",+ "cancel": "Cancel",+ "confirm": "Remove",+ "confirming": "Removing…",+ "close": "Close"+ },+ "archive_prompt": {+ "title": "Package delivered 🎉",+ "body": "Want to archive this package? It leaves the active list but the history is kept.",+ "keep": "No, keep it",+ "archive": "Archive"+ },+ "detail": {+ "back": "← Tracking",+ "not_found_title": "Package not found",+ "not_found_body": "This package may have been removed.",+ "not_found_back": "Back to list",+ "awaiting_first": "Awaiting first update",+ "refresh_failed_title": "Last refresh failed.",+ "retry": "Try again",+ "archived_pill": "Archived",+ "delivered_pill": "Delivered",+ "days_one_pill": "1 day in transit",+ "days_other_pill": "{{count}} days in transit",+ "action": {+ "refresh": "Refresh",+ "refreshing": "Refreshing…",+ "rename": "Rename",+ "add_cpf": "Add CPF",+ "archive": "Archive",+ "unarchive": "Unarchive",+ "remove": "Remove"+ },+ "meta": {+ "code": "Code",+ "cpf": "CPF",+ "route": "Route",+ "posted_at": "Posted on",+ "updated": "Updated",+ "copy_code_title": "Copy code",+ "edit": "Edit"+ },+ "cpf_dialog": {+ "title_add": "Add CPF",+ "title_edit": "Edit CPF",+ "label": "Recipient's CPF",+ "placeholder": "000.000.000-00",+ "hint": "Leave empty to remove.",+ "cancel": "Cancel",+ "submit": "Save",+ "submitting": "Saving…",+ "close": "Close"+ },+ "history": {+ "title": "History",+ "empty": "No events recorded yet."+ }+ },+ "status": {+ "preadvice": "Order created",+ "picked_up": "Posted",+ "in_transit": "In transit",+ "in_warehouse": "At distribution center",+ "customs": "In customs clearance",+ "customs_held": "Held at customs",+ "customs_cleared": "Released by customs",+ "out_for_delivery": "Out for delivery",+ "awaiting_pickup": "Awaiting pickup",+ "delivered": "Delivered",+ "delivery_failure": "Delivery attempt failed",+ "delayed": "Delayed",+ "returning_to_sender": "Returning to sender",+ "returned_to_sender": "Returned to sender",+ "damaged": "Damaged",+ "unknown": "Unknown status"+ },+ "carrier": {+ "unknown": "Unknown"+ },+ "settings": {+ "title": "Settings",+ "subtitle": "Notification preferences for package tracking.",+ "notifications_label": "Notify me about status changes",+ "notifications_hint": "Send a system notification when a package moves to a new stage (e.g. out for delivery, delivered).",+ "test_notification": "Send test notification",+ "test_busy": "Sending…",+ "test_toast_sent": "Test notification sent",+ "test_failed": "Couldn't send notification",+ "permission_denied_toast": "Notifications are disabled at the system level. Enable them in your OS settings.",+ "permission_denied_banner": "System notifications are disabled",+ "permission_denied_hint": "Allow notifications for Omniget in your operating system settings to receive package updates.",+ "request_permission": "Request permission"+ },+ "notification": {+ "title_template": "{{code}}: {{status}}",+ "body_fallback": "Status updated",+ "test_title": "Tracking notifications are working",+ "test_body": "You will see notifications like this when your packages move."+ }+ }+}diff --git a/src/lib/i18n/es.json b/src/lib/i18n/es.jsonindex 43c465a9..ca04c0c6 100644--- a/src/lib/i18n/es.json+++ b/src/lib/i18n/es.json@@ -41,7 +41,32 @@"downloads": "Descargas","marketplace": "Marketplace","settings": "Configuración",- "about": "Acerca de"+ "about": "Acerca de",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Herramientas",@@ -346,11 +371,24 @@"path_too_long": "La ruta de esta carpeta es larga ({{current}}/{{limit}} caracteres). Las descargas con nombres largos pueden fallar — elige una carpeta más corta.","choose_folder": "Elegir","always_ask_path": "Preguntar siempre dónde guardar",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Calidad de vídeo",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Límite de velocidad de descarga","speed_limit_desc": "Limita la tasa de descarga. Déjalo vacío para sin límite.","speed_limit_unlimited": "Sin límite","skip_existing": "Saltar archivos existentes",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Descargar adjuntos","download_descriptions": "Guardar descripciones","embed_metadata": "Incrustar metadatos",@@ -467,6 +505,12 @@},"dependencies": {"title": "Dependencias",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "no encontrado","install": "Instalar","update": "Actualizar",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Descargas simultáneas","max_concurrent_downloads_desc": "Máximo de descargas a la vez","max_concurrent_segments": "Trozos descargados en paralelo en streams HLS (avanzado)",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Trozos descargados en paralelo (avanzado)","concurrent_fragments_desc": "Cuántos trozos del archivo descarga yt-dlp a la vez por vídeo","max_retries": "Reintentos por segmento",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Pausa entre descargas (ms)","stagger_delay_desc": "Retardo antes de iniciar la próxima descarga simultánea",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Restablecer valores por defecto","reset_confirm": "¿Estás seguro? Toda la configuración se restablecerá.","torrent_listen_port": "Puerto de escucha de torrent",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Manual cookie","twitter_manual_cookie_desc": "If a download fails, you can paste a manual Cookie header here and try again. This is not limited to Twitter/X. Example: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Apariencia","cat_typography": "Tipografía","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "Red","cat_advanced": "Avanzado","search_placeholder": "Buscar en configuración...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Muestra tu actividad en tu perfil de Discord. El cronómetro sigue corriendo entre actividades, nunca se reinicia.",@@ -1233,7 +1293,8 @@"report_copied": "Informe de diagnóstico copiado al portapapeles","clear": "Limpiar","no_entries": "Aún no hay actividad. Empieza una descarga para ver eventos aquí.",- "open_panel": "Abrir registro de actividad"+ "open_panel": "Abrir registro de actividad",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Enviar archivo",diff --git a/src/lib/i18n/fr.json b/src/lib/i18n/fr.jsonindex 27f20b57..92ed3488 100644--- a/src/lib/i18n/fr.json+++ b/src/lib/i18n/fr.json@@ -41,7 +41,32 @@"downloads": "Téléchargements","marketplace": "Marketplace","settings": "Paramètres",- "about": "À propos"+ "about": "À propos",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Outils",@@ -346,11 +371,24 @@"path_too_long": "Le chemin de ce dossier est long ({{current}}/{{limit}} caractères). Les téléchargements avec des noms longs peuvent échouer — choisissez un dossier plus court.","choose_folder": "Choisir","always_ask_path": "Toujours demander où enregistrer",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Qualité vidéo",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Limite de vitesse","speed_limit_desc": "Limite le débit de téléchargement. Laissez vide pour aucune limite.","speed_limit_unlimited": "Aucune limite","skip_existing": "Ignorer les fichiers existants",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Télécharger les pièces jointes","download_descriptions": "Enregistrer les descriptions","embed_metadata": "Intégrer les métadonnées",@@ -467,6 +505,12 @@},"dependencies": {"title": "Dépendances",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "non trouvé","install": "Installer","update": "Mettre à jour",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Téléchargements simultanés","max_concurrent_downloads_desc": "Nombre maximum de téléchargements simultanés","max_concurrent_segments": "Segments simultanés",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Fragments simultanés","concurrent_fragments_desc": "Téléchargements parallèles de fragments par vidéo (yt-dlp)","max_retries": "Tentatives par segment",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Délai d'espacement (ms)","stagger_delay_desc": "Délai entre le démarrage des téléchargements simultanés",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Réinitialiser les paramètres","reset_confirm": "Êtes-vous sûr ? Tous les paramètres seront réinitialisés.","torrent_listen_port": "Port d’écoute torrent",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Cookie manuel","twitter_manual_cookie_desc": "Si un téléchargement échoue, vous pouvez coller ici un en-tête Cookie manuel et réessayer. Ce n'est pas limité à Twitter/X. Exemple : sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "Typographie","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "Reseau","cat_advanced": "Avance","search_placeholder": "Rechercher des paramètres...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Affiche votre activite sur votre profil Discord. Le chronometre continue d'une activite a l'autre.",@@ -1233,7 +1293,8 @@"report_copied": "Rapport de diagnostic copié dans le presse-papiers","clear": "Effacer","no_entries": "Aucune activité pour le moment. Lancez un téléchargement pour voir les événements ici.",- "open_panel": "Ouvrir le journal d'activité"+ "open_panel": "Ouvrir le journal d'activité",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Envoyer un fichier",diff --git a/src/lib/i18n/index.ts b/src/lib/i18n/index.tsindex ae1bb728..8c2c5cd2 100644--- a/src/lib/i18n/index.ts+++ b/src/lib/i18n/index.ts@@ -1,63 +1,63 @@-import i18n from "sveltekit-i18n";--type Payload = [payload?: Record<string, unknown>];--const config = {- loaders: [-- {- locale: "en",- key: "",- loader: async () => (await import("./en.json")).default,- },- {- locale: "ru",- key: "",- loader: async () => (await import("./ru.json")).default,- },- {- locale: "el",- key: "",- loader: async () => (await import("./el.json")).default,- },- {- locale: "pt",- key: "",- loader: async () => (await import("./pt.json")).default,- },- {- locale: "zh",- key: "",- loader: async () => (await import("./zh.json")).default,- },- {- locale: "zh-TW",- key: "",- loader: async () => (await import("./zh-TW.json")).default,- },- {- locale: "ja",- key: "",- loader: async () => (await import("./ja.json")).default,- },- {- locale: "it",- key: "",- loader: async () => (await import("./it.json")).default,- },- {- locale: "fr",- key: "",- loader: async () => (await import("./fr.json")).default,- },- {- locale: "es",- key: "",- loader: async () => (await import("./es.json")).default,- },- ],-};--export const defaultLocale = "en";--export const { t, locale, locales, loading, loadTranslations } = new i18n<Payload>(config);+import i18n from "sveltekit-i18n";++type Payload = [payload?: Record<string, unknown>];++const config = {+ loaders: [++ {+ locale: "en",+ key: "",+ loader: async () => (await import("./en.json")).default,+ },+ {+ locale: "ru",+ key: "",+ loader: async () => (await import("./ru.json")).default,+ },+ {+ locale: "el",+ key: "",+ loader: async () => (await import("./el.json")).default,+ },+ {+ locale: "pt",+ key: "",+ loader: async () => (await import("./pt.json")).default,+ },+ {+ locale: "zh",+ key: "",+ loader: async () => (await import("./zh.json")).default,+ },+ {+ locale: "zh-TW",+ key: "",+ loader: async () => (await import("./zh-TW.json")).default,+ },+ {+ locale: "ja",+ key: "",+ loader: async () => (await import("./ja.json")).default,+ },+ {+ locale: "it",+ key: "",+ loader: async () => (await import("./it.json")).default,+ },+ {+ locale: "fr",+ key: "",+ loader: async () => (await import("./fr.json")).default,+ },+ {+ locale: "es",+ key: "",+ loader: async () => (await import("./es.json")).default,+ },+ ],+};++export const defaultLocale = "en";++export const { t, locale, locales, loading, loadTranslations } = new i18n<Payload>(config);diff --git a/src/lib/i18n/it.json b/src/lib/i18n/it.jsonindex e717d1e0..c6a2264b 100644--- a/src/lib/i18n/it.json+++ b/src/lib/i18n/it.json@@ -41,7 +41,32 @@"downloads": "Download","marketplace": "Marketplace","settings": "Impostazioni",- "about": "Info"+ "about": "Info",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Strumenti",@@ -346,11 +371,24 @@"path_too_long": "Il percorso di questa cartella è lungo ({{current}}/{{limit}} caratteri). I download con nomi lunghi possono fallire — scegli una cartella più breve.","choose_folder": "Scegli","always_ask_path": "Chiedi sempre dove salvare",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Qualità video",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Limite di velocità","speed_limit_desc": "Limita la velocità di download. Lascia vuoto per nessun limite.","speed_limit_unlimited": "Nessun limite","skip_existing": "Salta file esistenti",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Scarica allegati","download_descriptions": "Salva descrizioni","embed_metadata": "Incorpora metadati",@@ -467,6 +505,12 @@},"dependencies": {"title": "Dipendenze",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "non trovato","install": "Installa","update": "Aggiorna",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Download simultanei","max_concurrent_downloads_desc": "Numero massimo di download simultanei","max_concurrent_segments": "Segmenti simultanei",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Frammenti simultanei","concurrent_fragments_desc": "Download paralleli di frammenti per video (yt-dlp)","max_retries": "Tentativi per segmento",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Ritardo di avvio (ms)","stagger_delay_desc": "Ritardo tra l'avvio di download simultanei",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Ripristina predefiniti","reset_confirm": "Sei sicuro? Tutte le impostazioni verranno ripristinate.","torrent_listen_port": "Porta di ascolto torrent",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Cookie manuale","twitter_manual_cookie_desc": "Se un download fallisce, puoi incollare qui un header Cookie manuale e riprovare. Non è limitato a Twitter/X. Esempio: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "Tipografia","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "Rete","cat_advanced": "Avanzato","search_placeholder": "Cerca impostazioni...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Mostra la tua attività sul profilo Discord. Il timer non si resetta passando da un'attività all'altra.",@@ -1233,7 +1293,8 @@"report_copied": "Rapporto diagnostico copiato negli appunti","clear": "Cancella","no_entries": "Nessuna attività. Avvia un download per visualizzare gli eventi qui.",- "open_panel": "Apri registro attività"+ "open_panel": "Apri registro attività",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Invia file",diff --git a/src/lib/i18n/ja.json b/src/lib/i18n/ja.jsonindex e5e3072c..29506e6d 100644--- a/src/lib/i18n/ja.json+++ b/src/lib/i18n/ja.json@@ -41,7 +41,32 @@"downloads": "ダウンロード","marketplace": "マーケットプレイス","settings": "設定",- "about": "このアプリについて"+ "about": "このアプリについて",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "ツール",@@ -346,11 +371,24 @@"path_too_long": "このフォルダのパスが長すぎます({{current}}/{{limit}} 文字)。ファイル名が長いとダウンロードが失敗することがあります — もっと短いフォルダを選んでください。","choose_folder": "選択","always_ask_path": "保存先を毎回確認する",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "動画の画質",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "ダウンロード速度制限","speed_limit_desc": "ダウンロード速度の上限。空欄で無制限。","speed_limit_unlimited": "無制限","skip_existing": "既存のファイルをスキップ",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "添付ファイルをダウンロード","download_descriptions": "説明を保存","embed_metadata": "メタデータを埋め込む",@@ -467,6 +505,12 @@},"dependencies": {"title": "依存関係",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "見つかりません","install": "インストール","update": "更新",@@ -542,11 +586,22 @@"max_concurrent_downloads": "同時ダウンロード数","max_concurrent_downloads_desc": "最大同時ダウンロード数","max_concurrent_segments": "同時セグメント数",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "同時フラグメント数","concurrent_fragments_desc": "動画あたりの並列フラグメントダウンロード数(yt-dlp)","max_retries": "セグメントあたりの再試行回数",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "開始遅延 (ms)","stagger_delay_desc": "同時ダウンロード開始間の遅延時間",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "既定値にリセット","reset_confirm": "本当によろしいですか?すべての設定がリセットされます。","torrent_listen_port": "Torrent待ち受けポート",@@ -566,6 +621,10 @@"twitter_manual_cookie": "手動Cookie","twitter_manual_cookie_desc": "ダウンロードに失敗した場合、ここに手動のCookieヘッダーを貼り付けて再試行できます。Twitter/Xに限定されません。例: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "タイポグラフィ","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "ネットワーク","cat_advanced": "詳細","search_placeholder": "設定を検索...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Discord プロフィールにアクティビティを表示します。アクティビティを切り替えてもタイマーはリセットされません。",@@ -1233,7 +1293,8 @@"report_copied": "診断レポートをクリップボードにコピーしました","clear": "クリア","no_entries": "まだアクティビティがありません。ダウンロードを開始するとここにイベントが表示されます。",- "open_panel": "アクティビティログを開く"+ "open_panel": "アクティビティログを開く",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "ファイルを送信",diff --git a/src/lib/i18n/keys.ts b/src/lib/i18n/keys.tsindex 375a4c49..2124f1f6 100644--- a/src/lib/i18n/keys.ts+++ b/src/lib/i18n/keys.ts@@ -67,6 +67,18 @@ export type TranslationKeys =| 'changelog.empty'| 'changelog.title'+ | 'command_palette.action_downloads'+ | 'command_palette.action_paste'+ | 'command_palette.action_settings'+ | 'command_palette.close'+ | 'command_palette.empty'+ | 'command_palette.group_action'+ | 'command_palette.group_nav'+ | 'command_palette.navigate'+ | 'command_palette.open'+ | 'command_palette.placeholder'+ | 'command_palette.select'+| 'common.cancel'| 'common.clear'| 'common.close'@@ -154,6 +166,7 @@ export type TranslationKeys =| 'debug.filter_system'| 'debug.no_entries'| 'debug.open_panel'+ | 'debug.open_panel_desc'| 'debug.report_copied'| 'debug.title'@@ -313,6 +326,12 @@ export type TranslationKeys =| 'hints.omnibox'| 'hints.telegram'+ | 'home.inspector_title'+ | 'home.mode_batch'+ | 'home.mode_p2p'+ | 'home.mode_torrent'+ | 'home.mode_url'+| 'hotmart.authenticating'| 'hotmart.cancel_download'| 'hotmart.captcha_detected'@@ -407,9 +426,14 @@ export type TranslationKeys =| 'mascot.stalled'| 'nav.about'+ | 'nav.collapse_plugins'| 'nav.downloads'+ | 'nav.expand_plugins'| 'nav.home'| 'nav.marketplace'+ | 'nav.section_app'+ | 'nav.section_plugins'+ | 'nav.section_primary'| 'nav.settings'| 'notifications.badge_aria'@@ -698,11 +722,22 @@ export type TranslationKeys =| 'settings.advanced.max_concurrent_downloads'| 'settings.advanced.max_concurrent_downloads_desc'| 'settings.advanced.max_concurrent_segments'+ | 'settings.advanced.max_concurrent_segments_desc'| 'settings.advanced.max_retries'+ | 'settings.advanced.max_retries_desc'| 'settings.advanced.prevent_sleep'| 'settings.advanced.prevent_sleep_desc'| 'settings.advanced.reset'| 'settings.advanced.reset_confirm'+ | 'settings.advanced.reset_desc'+ | 'settings.advanced.section_debug'+ | 'settings.advanced.section_debug_desc'+ | 'settings.advanced.section_expert'+ | 'settings.advanced.section_expert_desc'+ | 'settings.advanced.section_performance'+ | 'settings.advanced.section_performance_desc'+ | 'settings.advanced.section_torrent'+ | 'settings.advanced.section_torrent_desc'| 'settings.advanced.stagger_delay'| 'settings.advanced.stagger_delay_desc'| 'settings.advanced.title'@@ -920,6 +955,10 @@ export type TranslationKeys =| 'settings.cookies.time_years'| 'settings.cookies.title'| 'settings.cookies.via_label'+ | 'settings.dependencies.col_action'+ | 'settings.dependencies.col_name'+ | 'settings.dependencies.col_status'+ | 'settings.dependencies.col_version'| 'settings.dependencies.filter_all_files'| 'settings.dependencies.filter_pdfium'| 'settings.dependencies.install'@@ -931,12 +970,15 @@ export type TranslationKeys =| 'settings.dependencies.pick_dialog_title'| 'settings.dependencies.set_file_failed'| 'settings.dependencies.show_folder'+ | 'settings.dependencies.status_installed'+ | 'settings.dependencies.status_missing'| 'settings.dependencies.system_font_suffix'| 'settings.dependencies.title'| 'settings.dependencies.update'| 'settings.dependencies.update_success'| 'settings.dependencies.variant_aria'| 'settings.download.always_ask_path'+ | 'settings.download.always_ask_path_desc'| 'settings.download.auto_download_on_paste'| 'settings.download.auto_download_on_paste_desc'| 'settings.download.bilibili_cdn_desc'@@ -1035,7 +1077,18 @@ export type TranslationKeys =| 'settings.download.sb_mode_desc'| 'settings.download.sb_mode_mark'| 'settings.download.sb_mode_remove'+ | 'settings.download.section_clipboard_hotkeys'+ | 'settings.download.section_clipboard_hotkeys_desc'+ | 'settings.download.section_output'+ | 'settings.download.section_output_desc'+ | 'settings.download.section_per_platform'+ | 'settings.download.section_per_platform_desc'+ | 'settings.download.section_quality'+ | 'settings.download.section_quality_desc'+ | 'settings.download.section_subtitles'+ | 'settings.download.section_subtitles_desc'| 'settings.download.skip_existing'+ | 'settings.download.skip_existing_desc'| 'settings.download.speed_limit'| 'settings.download.speed_limit_desc'| 'settings.download.speed_limit_unlimited'@@ -1045,10 +1098,12 @@ export type TranslationKeys =| 'settings.download.translate_metadata'| 'settings.download.translate_metadata_desc'| 'settings.download.video_quality'+ | 'settings.download.video_quality_desc'| 'settings.download.what_to_also_save'| 'settings.download.youtube_specific'| 'settings.download.youtube_sponsorblock'| 'settings.download.youtube_sponsorblock_desc'+ | 'settings.drill_back'| 'settings.general.hints_restored'| 'settings.general.reset_hints'| 'settings.general.reset_hints_desc'@@ -1058,6 +1113,10 @@ export type TranslationKeys =| 'settings.general.start_with_system'| 'settings.general.start_with_system_desc'| 'settings.general.title'+ | 'settings.group_advanced'+ | 'settings.group_general'+ | 'settings.group_integrations'+ | 'settings.group_media'| 'settings.proxy.enabled'| 'settings.proxy.host'| 'settings.proxy.password'diff --git a/src/lib/i18n/pt.json b/src/lib/i18n/pt.jsonindex bcf2f47d..8c8a1097 100644--- a/src/lib/i18n/pt.json+++ b/src/lib/i18n/pt.json@@ -41,7 +41,32 @@"downloads": "Downloads","marketplace": "Marketplace","settings": "Configurações",- "about": "Sobre"+ "about": "Sobre",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Ferramentas",@@ -346,11 +371,24 @@"path_too_long": "O caminho desta pasta está longo ({{current}}/{{limit}} caracteres). Downloads com nomes longos podem falhar — escolha uma pasta mais curta.","choose_folder": "Escolher","always_ask_path": "Sempre perguntar onde salvar",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Qualidade de vídeo",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Limite de velocidade","speed_limit_desc": "Limita a taxa de download. Deixe vazio para sem limite.","speed_limit_unlimited": "Sem limite","skip_existing": "Pular arquivos existentes",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Baixar anexos","download_descriptions": "Salvar descrições","embed_metadata": "Embutir metadados",@@ -467,6 +505,12 @@},"dependencies": {"title": "Dependências",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "não encontrado","install": "Instalar","update": "Atualizar",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Downloads simultâneos","max_concurrent_downloads_desc": "Máximo de downloads ao mesmo tempo","max_concurrent_segments": "Pedaços baixados em paralelo para streams HLS (avançado)",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Pedaços baixados em paralelo (avançado)","concurrent_fragments_desc": "Quantos pedaços do arquivo o yt-dlp baixa ao mesmo tempo por vídeo","max_retries": "Tentativas por segmento",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Pausa entre cada download (ms)","stagger_delay_desc": "Atraso antes de iniciar o próximo download simultâneo",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Restaurar padrões","reset_confirm": "Tem certeza? Todas as configurações serão restauradas.","torrent_listen_port": "Porta de escuta torrent",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Cookie manual","twitter_manual_cookie_desc": "Se um download falhar, você pode colar aqui um cabeçalho Cookie manual e tentar novamente. Não está limitado ao Twitter/X. Exemplo: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Aparência","cat_typography": "Tipografia","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "Rede","cat_advanced": "Avancado","search_placeholder": "Buscar configurações...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Mostra sua atividade no perfil do Discord. O timer não reseta ao trocar de atividade.",@@ -1233,7 +1293,8 @@"report_copied": "Relatório de diagnóstico copiado","clear": "Limpar","no_entries": "Nenhuma atividade ainda. Inicie um download para ver eventos aqui.",- "open_panel": "Abrir registro de atividade"+ "open_panel": "Abrir registro de atividade",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Enviar Arquivo",diff --git a/src/lib/i18n/ru.json b/src/lib/i18n/ru.jsonindex 7be27316..309260d8 100644--- a/src/lib/i18n/ru.json+++ b/src/lib/i18n/ru.json@@ -41,7 +41,32 @@"downloads": "Загрузки","marketplace": "Маркетплейс","settings": "Настройки",- "about": "О программе"+ "about": "О программе",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "Инструменты",@@ -346,11 +371,24 @@"path_too_long": "Путь к папке слишком длинный ({{current}}/{{limit}} символов). Загрузки с длинными именами файлов могут не удаться — выберите более короткую папку.","choose_folder": "Выбрать","always_ask_path": "Всегда спрашивать, куда сохранять",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "Качество видео",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "Ограничение скорости загрузки","speed_limit_desc": "Ограничить скорость загрузки. Оставьте пустым для безлимита.","speed_limit_unlimited": "Безлимит","skip_existing": "Пропускать существующие файлы",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "Скачивать вложения","download_descriptions": "Сохранять описания","embed_metadata": "Встраивать метаданные",@@ -467,6 +505,12 @@},"dependencies": {"title": "Зависимости",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "не найдено","install": "Установить","update": "Обновить",@@ -542,11 +586,22 @@"max_concurrent_downloads": "Параллельных загрузок","max_concurrent_downloads_desc": "Максимум одновременных загрузок","max_concurrent_segments": "Количество частей, загружаемых параллельно для HLS (дополнительно)",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "Частей, загружаемых параллельно (дополнительно)","concurrent_fragments_desc": "Сколько фрагментов файла yt-dlp загружает одновременно для одного видео","max_retries": "Повторов на сегмент",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "Пауза между каждой загрузкой (мс)","stagger_delay_desc": "Задержка перед началом следующей параллельной загрузки",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "Сбросить настройки по умолчанию","reset_confirm": "Вы уверены? Все настройки будут сброшены.","torrent_listen_port": "Порт для прослушивания торрентов",@@ -566,6 +621,10 @@"twitter_manual_cookie": "Ручной Cookie","twitter_manual_cookie_desc": "Если загрузка не удаётся, вы можете вставить сюда заголовок Cookie вручную и повторить попытку. Не ограничивается Twitter/X. Пример: sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Внешний вид","cat_typography": "Типографика","cat_plugins": "Плагины",@@ -573,6 +632,7 @@"cat_network": "Сеть","cat_advanced": "Дополнительно","search_placeholder": "Поиск по настройкам…",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "Показывать вашу активность в профиле Discord. Таймер идёт непрерывно, никогда не сбрасывается.",@@ -1233,7 +1293,8 @@"report_copied": "Диагностический отчёт скопирован в буфер обмена","clear": "Очистить","no_entries": "Пока нет активности. Начните загрузку, чтобы увидеть события.",- "open_panel": "Открыть журнал активности"+ "open_panel": "Открыть журнал активности",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "Отправить файл",diff --git a/src/lib/i18n/zh-TW.json b/src/lib/i18n/zh-TW.jsonindex 242bf5b9..97fd5777 100644--- a/src/lib/i18n/zh-TW.json+++ b/src/lib/i18n/zh-TW.json@@ -41,7 +41,32 @@"downloads": "下載","marketplace": "插件市场","settings": "設定",- "about": "關於"+ "about": "關於",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "工具",@@ -346,11 +371,24 @@"path_too_long": "此資料夾路徑過長({{current}}/{{limit}} 個字元)。檔名較長時下載可能失敗 — 請選擇更短的資料夾。","choose_folder": "選擇","always_ask_path": "每次都詢問儲存位置",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "影片品質",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "下載速度限制","speed_limit_desc": "限制下載速率。留空表示不限速。","speed_limit_unlimited": "不限速","skip_existing": "略過已存在的檔案",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "下載附件","download_descriptions": "儲存描述","embed_metadata": "嵌入中繼資料",@@ -467,6 +505,12 @@},"dependencies": {"title": "相依元件",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "找不到","install": "安裝","update": "更新",@@ -542,11 +586,22 @@"max_concurrent_downloads": "同時下載數","max_concurrent_downloads_desc": "可同時進行的下載數量上限","max_concurrent_segments": "同時區段數",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "同時片段數","concurrent_fragments_desc": "每部影片的平行片段下載數 (yt-dlp)","max_retries": "每個區段的重試次數",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "啟動延遲 (ms)","stagger_delay_desc": "開始並行下載之間的延遲",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "重設為預設值","reset_confirm": "確定要重設嗎?所有設定都會恢復為預設值。","torrent_listen_port": "Torrent 監聽連接埠",@@ -566,6 +621,10 @@"twitter_manual_cookie": "手動 Cookie","twitter_manual_cookie_desc": "如果下載失敗,您可以在此貼上手動的 Cookie 標頭並重試。不限於 Twitter/X。範例:sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "排版","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "网络","cat_advanced": "高级","search_placeholder": "搜尋設定...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "在 Discord 個人資料上顯示您的活動。切換活動時計時器不會重置。",@@ -1233,7 +1293,8 @@"report_copied": "診斷報告已複製到剪貼簿","clear": "清除","no_entries": "目前沒有任何活動。開始下載後,事件會顯示在這裡。",- "open_panel": "開啟活動記錄"+ "open_panel": "開啟活動記錄",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "傳送檔案",diff --git a/src/lib/i18n/zh.json b/src/lib/i18n/zh.jsonindex 229ed244..ccd13d7c 100644--- a/src/lib/i18n/zh.json+++ b/src/lib/i18n/zh.json@@ -41,7 +41,32 @@"downloads": "下载","marketplace": "插件市场","settings": "设置",- "about": "关于"+ "about": "关于",+ "section_primary": "Main",+ "section_app": "App",+ "section_plugins": "Plugins",+ "expand_plugins": "Expand plugins",+ "collapse_plugins": "Collapse plugins"+ },+ "command_palette": {+ "open": "Search",+ "placeholder": "Go to page or run an action…",+ "empty": "No results",+ "navigate": "navigate",+ "select": "select",+ "close": "close",+ "group_nav": "Navigate",+ "group_action": "Actions",+ "action_paste": "Paste URL from clipboard",+ "action_downloads": "Open downloads",+ "action_settings": "Open settings"+ },+ "home": {+ "mode_url": "URL",+ "mode_batch": "Batch",+ "mode_torrent": "Torrent",+ "mode_p2p": "P2P",+ "inspector_title": "Download options"},"tools": {"tab": "工具",@@ -346,11 +371,24 @@"path_too_long": "此文件夹路径过长({{current}}/{{limit}} 个字符)。文件名较长时下载可能失败 — 请选择更短的文件夹。","choose_folder": "选择","always_ask_path": "每次都询问保存位置",+ "always_ask_path_desc": "Show a save dialog for every download.","video_quality": "视频质量",+ "video_quality_desc": "Default quality when you don't pick one in the omnibox.","speed_limit": "下载速度限制","speed_limit_desc": "限制下载速率。留空表示不限速。","speed_limit_unlimited": "不限速","skip_existing": "跳过已有文件",+ "skip_existing_desc": "Don't re-download files that already exist in the output folder.",+ "section_output": "Output",+ "section_output_desc": "Where files are saved and how they are named.",+ "section_quality": "Quality & format",+ "section_quality_desc": "Default video quality and yt-dlp presets.",+ "section_subtitles": "Subtitles & extras",+ "section_subtitles_desc": "Subtitles, thumbnails, and metadata saved alongside media.",+ "section_clipboard_hotkeys": "Clipboard & hotkeys",+ "section_clipboard_hotkeys_desc": "Paste detection and global shortcuts.",+ "section_per_platform": "Per-platform options",+ "section_per_platform_desc": "YouTube, courses, and Bilibili-specific settings.","download_attachments": "下载附件","download_descriptions": "保存描述","embed_metadata": "嵌入元数据",@@ -467,6 +505,12 @@},"dependencies": {"title": "依赖项",+ "col_name": "Name",+ "col_version": "Version",+ "col_status": "Status",+ "col_action": "Action",+ "status_installed": "Installed",+ "status_missing": "Missing","not_found": "未找到","install": "安装","update": "更新",@@ -542,11 +586,22 @@"max_concurrent_downloads": "并发下载数","max_concurrent_downloads_desc": "最大同时下载数","max_concurrent_segments": "并发分段数",+ "max_concurrent_segments_desc": "Parallel HLS segment fetches per stream. Leave default unless you know what you're doing.","concurrent_fragments": "并发分片数","concurrent_fragments_desc": "每个视频的并行分片下载数(yt-dlp)","max_retries": "每段重试次数",+ "max_retries_desc": "How many times to retry a failed segment before giving up.","stagger_delay": "错峰延迟(毫秒)","stagger_delay_desc": "启动并发下载之间的延迟时间",+ "section_performance": "Performance",+ "section_performance_desc": "Concurrency, retries, and system behavior while downloading.",+ "section_torrent": "Network & torrent",+ "section_torrent_desc": "BitTorrent listen port, trackers, and router port forwarding.",+ "section_expert": "Expert options",+ "section_expert_desc": "Browser cookies and User-Agent overrides. Most users should leave these empty.",+ "section_debug": "Debug",+ "section_debug_desc": "Developer tools and diagnostics. Off by default.",+ "reset_desc": "Restore all settings to factory defaults.","reset": "恢复默认","reset_confirm": "确定要恢复吗?所有设置将被重置。","torrent_listen_port": "Torrent 监听端口",@@ -566,6 +621,10 @@"twitter_manual_cookie": "手动 Cookie","twitter_manual_cookie_desc": "如果下载失败,您可以在此粘贴手动的 Cookie 标头并重试。不限于 Twitter/X。示例:sessionid=...; csrftoken=...; auth_token=..."},+ "group_general": "General",+ "group_media": "Media",+ "group_integrations": "Integrations",+ "group_advanced": "Advanced","cat_appearance": "Appearance","cat_typography": "排版","cat_plugins": "Plugins",@@ -573,6 +632,7 @@"cat_network": "网络","cat_advanced": "高级","search_placeholder": "搜索设置...",+ "drill_back": "Back","rpc": {"title": "Discord Rich Presence","desc": "在 Discord 个人资料上显示您的活动。切换活动时计时器不会重置。",@@ -1233,7 +1293,8 @@"report_copied": "诊断报告已复制到剪贴板","clear": "清除","no_entries": "暂无活动记录。开始下载即可在此查看事件。",- "open_panel": "打开活动日志"+ "open_panel": "打开活动日志",+ "open_panel_desc": "Opens the live activity log panel in About → Debug."},"p2p": {"send_file": "发送文件",diff --git a/src/lib/nav-config.ts b/src/lib/nav-config.tsindex 31345c79..079f884e 100644--- a/src/lib/nav-config.ts+++ b/src/lib/nav-config.ts@@ -4,7 +4,7 @@ export interface NavItem {label?: string;icon: string;iconSvg?: string;- group: "primary" | "secondary";+ group: "primary" | "app" | "plugins" | "secondary";badge?: "downloads";pluginId?: string;order?: number;@@ -13,7 +13,7 @@ export interface NavItem {export const CORE_NAV_ITEMS: NavItem[] = [{ href: "/", labelKey: "nav.home", icon: "home", group: "primary", order: 10 },{ href: "/downloads", labelKey: "nav.downloads", icon: "downloads", group: "primary", badge: "downloads", order: 20 },- { href: "/marketplace", labelKey: "nav.marketplace", icon: "marketplace", group: "primary", order: 30 },- { href: "/settings", labelKey: "nav.settings", icon: "settings", group: "primary", order: 40 },- { href: "/about", labelKey: "nav.about", icon: "about", group: "secondary", order: 999 },+ { href: "/marketplace", labelKey: "nav.marketplace", icon: "marketplace", group: "app", order: 30 },+ { href: "/settings", labelKey: "nav.settings", icon: "settings", group: "app", order: 40 },+ { href: "/about", labelKey: "nav.about", icon: "about", group: "app", order: 50 },];diff --git a/src/lib/stores/command-palette-store.svelte.ts b/src/lib/stores/command-palette-store.svelte.tsnew file mode 100644index 00000000..e0e3bb39--- /dev/null+++ b/src/lib/stores/command-palette-store.svelte.ts@@ -0,0 +1,65 @@+export type CommandPaletteItem = {+ id: string;+ label: string;+ group: string;+ keywords?: string;+ action: () => void;+};++let open = $state(false);+let query = $state("");+let selectedIndex = $state(0);+let items = $state<CommandPaletteItem[]>([]);++export function openCommandPalette() {+ open = true;+ query = "";+ selectedIndex = 0;+}++export function closeCommandPalette() {+ open = false;+ query = "";+ selectedIndex = 0;+}++export function isCommandPaletteOpen(): boolean {+ return open;+}++export function getCommandPaletteQuery(): string {+ return query;+}++export function setCommandPaletteQuery(value: string) {+ query = value;+ selectedIndex = 0;+}++export function getCommandPaletteItems(): CommandPaletteItem[] {+ return items;+}++export function setCommandPaletteItems(next: CommandPaletteItem[]) {+ items = next;+}++export function getCommandPaletteSelectedIndex(): number {+ return selectedIndex;+}++export function setCommandPaletteSelectedIndex(index: number) {+ selectedIndex = index;+}++export function moveCommandPaletteSelection(delta: number, filteredCount: number) {+ if (filteredCount <= 0) return;+ selectedIndex = (selectedIndex + delta + filteredCount) % filteredCount;+}++export function runCommandPaletteSelected(filtered: CommandPaletteItem[]) {+ const item = filtered[selectedIndex];+ if (!item) return;+ closeCommandPalette();+ item.action();+}diff --git a/src/lib/stores/settings-store.svelte.ts b/src/lib/stores/settings-store.svelte.tsindex ac0ba7eb..16aedf9d 100644--- a/src/lib/stores/settings-store.svelte.ts+++ b/src/lib/stores/settings-store.svelte.ts@@ -1,243 +1,243 @@-import { invoke } from "@tauri-apps/api/core";--export type AppSettings = {- schema_version: number;- appearance: {- theme: string;- language: string;- };- download: {- default_output_dir: string;- always_ask_path: boolean;- video_quality: string;- skip_existing: boolean;- download_attachments: boolean;- download_descriptions: boolean;- embed_metadata: boolean;- embed_thumbnail: boolean;- clipboard_detection: boolean;- auto_download_on_paste: boolean;- filename_template: string;- organize_by_platform: boolean;- download_subtitles: boolean;- include_auto_subtitles: boolean;- caption_locale: string;- keep_vtt: boolean;- continuous_lecture_numbers: boolean;- translate_metadata: boolean;- youtube_sponsorblock: boolean;- sponsorblock_mode: string;- sponsorblock_categories: string[];- split_by_chapters: boolean;- live_from_start: boolean;- speed_limit: string;- hotkey_enabled: boolean;- hotkey_binding: string;- clip_hotkey_enabled?: boolean;- clip_hotkey_binding?: string;- music_hotkey_enabled: boolean;- music_hotkey_binding: string;- music_audio_format: string;- copy_to_clipboard_on_hotkey: boolean;- extra_ytdlp_flags?: string[];- cookie_file: string;- always_use_managed_cookies: boolean;- bilibili_danmaku_enabled: boolean;- bilibili_danmaku_format: string;- bilibili_container: string;- bilibili_nfo_enabled: boolean;- bilibili_cover_sidecar: boolean;- bilibili_cover_format: string;- bilibili_naming_video: string;- bilibili_naming_multi_part: string;- bilibili_naming_bangumi: string;- bilibili_naming_cheese: string;- bilibili_naming_collection: string;- bilibili_cdn_hosts: string;- bilibili_cdn_prefer_alternatives: boolean;- bilibili_preferred_qn: number;- bilibili_preferred_codec: number;- bilibili_preferred_audio_qn: number;- };- proxy?: {- enabled?: boolean;- proxy_type?: string;- host?: string;- port?: number;- username?: string;- password?: string;- };- advanced: {- max_concurrent_segments: number;- max_retries: number;- max_concurrent_downloads: number;- concurrent_fragments: number;- stagger_delay_ms: number;- torrent_listen_port: number;- torrent_auto_trackers: boolean;- torrent_upnp: boolean;- prevent_sleep: boolean;- cookies_from_browser: string;- twitter_manual_cookie: string;- user_agent: string;- };- telegram: {- concurrent_downloads: number;- fix_file_extensions: boolean;- };- rpc: {- enabled: boolean;- app_id: string;- large_image_key: string;- };- onboarding_completed: boolean;- start_with_system: boolean;- start_minimized: boolean;- legal_acknowledged?: boolean;- last_download_options?: {- mode?: "auto" | "audio" | "mute" | null;- quality?: string | null;- };- typography?: TypographySettings;-};--export type TypographySettings = {- font_display: string;- font_body: string;- font_mono: string;- line_height_base: number;- spacing_scale: number;- preset_name: string | null;-};--const TYPOGRAPHY_DEFAULTS: TypographySettings = {- font_display: "Bricolage Grotesque Variable",- font_body: "Inter",- font_mono: "IBM Plex Mono",- line_height_base: 1.55,- spacing_scale: 1.0,- preset_name: "omniget-default",-};--const SPACING_BASE_PX: Record<string, number> = {- "--space-1": 4,- "--space-2": 8,- "--space-3": 12,- "--space-4": 16,- "--space-5": 24,- "--space-6": 32,- "--space-7": 48,- "--space-8": 64,- "--space-9": 96,-};--function fontStack(fontDisplay: string): string {- const display = fontDisplay.trim();- if (display === "Bricolage Grotesque Variable") {- return `'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif`;- }- if (display === "Inter") {- return `'Inter', 'DM Sans', ui-sans-serif, system-ui, sans-serif`;- }- if (display === "DM Sans") {- return `'DM Sans', 'Inter', ui-sans-serif, system-ui, sans-serif`;- }- if (display === "IBM Plex Mono") {- return `'IBM Plex Mono', ui-monospace, monospace`;- }- if (display === "system-ui") {- return `system-ui, -apple-system, BlinkMacSystemFont, sans-serif`;- }- return `'${display}', ui-sans-serif, system-ui, sans-serif`;-}--function bodyFontStack(fontBody: string): string {- const body = fontBody.trim();- if (body === "Inter") {- return `'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;- }- if (body === "DM Sans") {- return `'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;- }- if (body === "Bricolage Grotesque Variable") {- return `'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif`;- }- if (body === "IBM Plex Mono") {- return `'IBM Plex Mono', ui-monospace, monospace`;- }- if (body === "system-ui") {- return `system-ui, -apple-system, BlinkMacSystemFont, sans-serif`;- }- return `'${body}', ui-sans-serif, system-ui, sans-serif`;-}--function monoFontStack(fontMono: string): string {- const mono = fontMono.trim();- if (mono === "IBM Plex Mono") {- return `'IBM Plex Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Courier New', monospace`;- }- return `'${mono}', ui-monospace, 'Courier New', monospace`;-}--function applyTypography(typo: TypographySettings | undefined) {- if (typeof document === "undefined") return;- const t = typo ?? TYPOGRAPHY_DEFAULTS;- const root = document.documentElement.style;- root.setProperty("--font-display", fontStack(t.font_display));- root.setProperty("--font-body", bodyFontStack(t.font_body));- root.setProperty("--font-mono", monoFontStack(t.font_mono));- root.setProperty("--leading-base", String(t.line_height_base));- const scale = typeof t.spacing_scale === "number" ? t.spacing_scale : 1.0;- if (Math.abs(scale - 1.0) > 0.001) {- for (const [key, base] of Object.entries(SPACING_BASE_PX)) {- root.setProperty(key, `${(base * scale).toFixed(2)}px`);- }- } else {- for (const key of Object.keys(SPACING_BASE_PX)) {- root.removeProperty(key);- }- }-}--let settings = $state<AppSettings | null>(null);--function applyTheme(theme: string) {- if (typeof document === "undefined") return;-- if (theme === "system") {- const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;- document.documentElement.setAttribute("data-theme", prefersDark ? "dark" : "light");- } else {- document.documentElement.setAttribute("data-theme", theme);- }-}--export function getSettings(): AppSettings | null {- return settings;-}--export async function loadSettings(): Promise<AppSettings> {- const result = await invoke<AppSettings>("get_settings");- settings = result;- applyTheme(result.appearance.theme);- applyTypography(result.typography);- return result;-}--export async function updateSettings(partial: Record<string, unknown>): Promise<AppSettings> {- const result = await invoke<AppSettings>("update_settings", {- partial: JSON.stringify(partial),- });- settings = result;- applyTheme(result.appearance.theme);- applyTypography(result.typography);- return result;-}--export async function resetSettings(): Promise<AppSettings> {- const result = await invoke<AppSettings>("reset_settings");- settings = result;- applyTheme(result.appearance.theme);- applyTypography(result.typography);- return result;-}+import { invoke } from "@tauri-apps/api/core";++export type AppSettings = {+ schema_version: number;+ appearance: {+ theme: string;+ language: string;+ };+ download: {+ default_output_dir: string;+ always_ask_path: boolean;+ video_quality: string;+ skip_existing: boolean;+ download_attachments: boolean;+ download_descriptions: boolean;+ embed_metadata: boolean;+ embed_thumbnail: boolean;+ clipboard_detection: boolean;+ auto_download_on_paste: boolean;+ filename_template: string;+ organize_by_platform: boolean;+ download_subtitles: boolean;+ include_auto_subtitles: boolean;+ caption_locale: string;+ keep_vtt: boolean;+ continuous_lecture_numbers: boolean;+ translate_metadata: boolean;+ youtube_sponsorblock: boolean;+ sponsorblock_mode: string;+ sponsorblock_categories: string[];+ split_by_chapters: boolean;+ live_from_start: boolean;+ speed_limit: string;+ hotkey_enabled: boolean;+ hotkey_binding: string;+ clip_hotkey_enabled?: boolean;+ clip_hotkey_binding?: string;+ music_hotkey_enabled: boolean;+ music_hotkey_binding: string;+ music_audio_format: string;+ copy_to_clipboard_on_hotkey: boolean;+ extra_ytdlp_flags?: string[];+ cookie_file: string;+ always_use_managed_cookies: boolean;+ bilibili_danmaku_enabled: boolean;+ bilibili_danmaku_format: string;+ bilibili_container: string;+ bilibili_nfo_enabled: boolean;+ bilibili_cover_sidecar: boolean;+ bilibili_cover_format: string;+ bilibili_naming_video: string;+ bilibili_naming_multi_part: string;+ bilibili_naming_bangumi: string;+ bilibili_naming_cheese: string;+ bilibili_naming_collection: string;+ bilibili_cdn_hosts: string;+ bilibili_cdn_prefer_alternatives: boolean;+ bilibili_preferred_qn: number;+ bilibili_preferred_codec: number;+ bilibili_preferred_audio_qn: number;+ };+ proxy?: {+ enabled?: boolean;+ proxy_type?: string;+ host?: string;+ port?: number;+ username?: string;+ password?: string;+ };+ advanced: {+ max_concurrent_segments: number;+ max_retries: number;+ max_concurrent_downloads: number;+ concurrent_fragments: number;+ stagger_delay_ms: number;+ torrent_listen_port: number;+ torrent_auto_trackers: boolean;+ torrent_upnp: boolean;+ prevent_sleep: boolean;+ cookies_from_browser: string;+ twitter_manual_cookie: string;+ user_agent: string;+ };+ telegram: {+ concurrent_downloads: number;+ fix_file_extensions: boolean;+ };+ rpc: {+ enabled: boolean;+ app_id: string;+ large_image_key: string;+ };+ onboarding_completed: boolean;+ start_with_system: boolean;+ start_minimized: boolean;+ legal_acknowledged?: boolean;+ last_download_options?: {+ mode?: "auto" | "audio" | "mute" | null;+ quality?: string | null;+ };+ typography?: TypographySettings;+};++export type TypographySettings = {+ font_display: string;+ font_body: string;+ font_mono: string;+ line_height_base: number;+ spacing_scale: number;+ preset_name: string | null;+};++const TYPOGRAPHY_DEFAULTS: TypographySettings = {+ font_display: "Bricolage Grotesque Variable",+ font_body: "Inter",+ font_mono: "IBM Plex Mono",+ line_height_base: 1.55,+ spacing_scale: 1.0,+ preset_name: "omniget-default",+};++const SPACING_BASE_PX: Record<string, number> = {+ "--space-1": 4,+ "--space-2": 8,+ "--space-3": 12,+ "--space-4": 16,+ "--space-5": 24,+ "--space-6": 32,+ "--space-7": 48,+ "--space-8": 64,+ "--space-9": 96,+};++function fontStack(fontDisplay: string): string {+ const display = fontDisplay.trim();+ if (display === "Bricolage Grotesque Variable") {+ return `'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif`;+ }+ if (display === "Inter") {+ return `'Inter', 'DM Sans', ui-sans-serif, system-ui, sans-serif`;+ }+ if (display === "DM Sans") {+ return `'DM Sans', 'Inter', ui-sans-serif, system-ui, sans-serif`;+ }+ if (display === "IBM Plex Mono") {+ return `'IBM Plex Mono', ui-monospace, monospace`;+ }+ if (display === "system-ui") {+ return `system-ui, -apple-system, BlinkMacSystemFont, sans-serif`;+ }+ return `'${display}', ui-sans-serif, system-ui, sans-serif`;+}++function bodyFontStack(fontBody: string): string {+ const body = fontBody.trim();+ if (body === "Inter") {+ return `'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;+ }+ if (body === "DM Sans") {+ return `'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;+ }+ if (body === "Bricolage Grotesque Variable") {+ return `'Bricolage Grotesque Variable', 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif`;+ }+ if (body === "IBM Plex Mono") {+ return `'IBM Plex Mono', ui-monospace, monospace`;+ }+ if (body === "system-ui") {+ return `system-ui, -apple-system, BlinkMacSystemFont, sans-serif`;+ }+ return `'${body}', ui-sans-serif, system-ui, sans-serif`;+}++function monoFontStack(fontMono: string): string {+ const mono = fontMono.trim();+ if (mono === "IBM Plex Mono") {+ return `'IBM Plex Mono', 'DejaVu Sans Mono', 'Liberation Mono', 'Courier New', monospace`;+ }+ return `'${mono}', ui-monospace, 'Courier New', monospace`;+}++function applyTypography(typo: TypographySettings | undefined) {+ if (typeof document === "undefined") return;+ const t = typo ?? TYPOGRAPHY_DEFAULTS;+ const root = document.documentElement.style;+ root.setProperty("--font-display", fontStack(t.font_display));+ root.setProperty("--font-body", bodyFontStack(t.font_body));+ root.setProperty("--font-mono", monoFontStack(t.font_mono));+ root.setProperty("--leading-base", String(t.line_height_base));+ const scale = typeof t.spacing_scale === "number" ? t.spacing_scale : 1.0;+ if (Math.abs(scale - 1.0) > 0.001) {+ for (const [key, base] of Object.entries(SPACING_BASE_PX)) {+ root.setProperty(key, `${(base * scale).toFixed(2)}px`);+ }+ } else {+ for (const key of Object.keys(SPACING_BASE_PX)) {+ root.removeProperty(key);+ }+ }+}++let settings = $state<AppSettings | null>(null);++function applyTheme(theme: string) {+ if (typeof document === "undefined") return;++ if (theme === "system") {+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;+ document.documentElement.setAttribute("data-theme", prefersDark ? "dark" : "light");+ } else {+ document.documentElement.setAttribute("data-theme", theme);+ }+}++export function getSettings(): AppSettings | null {+ return settings;+}++export async function loadSettings(): Promise<AppSettings> {+ const result = await invoke<AppSettings>("get_settings");+ settings = result;+ applyTheme(result.appearance.theme);+ applyTypography(result.typography);+ return result;+}++export async function updateSettings(partial: Record<string, unknown>): Promise<AppSettings> {+ const result = await invoke<AppSettings>("update_settings", {+ partial: JSON.stringify(partial),+ });+ settings = result;+ applyTheme(result.appearance.theme);+ applyTypography(result.typography);+ return result;+}++export async function resetSettings(): Promise<AppSettings> {+ const result = await invoke<AppSettings>("reset_settings");+ settings = result;+ applyTheme(result.appearance.theme);+ applyTypography(result.typography);+ return result;+}diff --git a/src/lib/style/macos-shell.css b/src/lib/style/macos-shell.cssnew file mode 100644index 00000000..b66b6d77--- /dev/null+++ b/src/lib/style/macos-shell.css@@ -0,0 +1,626 @@+[data-shell="mac"] {+ --sidebar-width: 220px; --titlebar-height: 44px;+ --toolbar-height: 44px;+ --inspector-width: 320px;++ --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;+ --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;++ --radius-xs: 4px;+ --radius-sm: 6px;+ --radius-md: 8px;+ --radius-lg: 10px;+}++[data-shell="mac"][data-theme="light"],+[data-shell="mac"][data-theme="catppuccin-latte"],+[data-shell="mac"][data-theme="eink-day"],+[data-shell="mac"][data-theme="eink-sepia"],+[data-shell="mac"][data-theme="nyxvamp-radiance"] {+ --sidebar-bg: #EBEBED;+ --sidebar-highlight: #E0E0E4;+ --content-border: #D1D1D6;+ --primary: #F5F5F7;+ --secondary: #1D1D1F;+ --tertiary: #8E8E93;+ --accent: #007AFF;+ --button: #FFFFFF;+ --button-hover: #F0F0F2;+ --button-press: #E5E5EA;+ --button-elevated: #FFFFFF;+ --button-elevated-hover: #F5F5F7;+ --input-bg: #FFFFFF;+ --input-border: #D1D1D6;+ --cta: #007AFF;+ --on-cta: #FFFFFF;+}++[data-shell="mac"][data-theme="dark"],+[data-shell="mac"][data-theme="system"] {+ color-scheme: dark;+}++[data-shell="mac"][data-theme="dark"],+[data-shell="mac"]:not([data-theme="light"]):not([data-theme="catppuccin-latte"]):not([data-theme="eink-day"]):not([data-theme="eink-sepia"]):not([data-theme="nyxvamp-radiance"]) {+ --sidebar-bg: #252527;+ --sidebar-highlight: #2C2C2E;+ --content-border: #38383A;+ --primary: #1C1C1E;+ --secondary: #F5F5F7;+ --tertiary: #8E8E93;+ --accent: #0A84FF;+ --button: #2C2C2E;+ --button-hover: #3A3A3C;+ --button-press: #48484A;+ --button-elevated: #2C2C2E;+ --button-elevated-hover: #3A3A3C;+ --input-bg: #1C1C1E;+ --input-border: #48484A;+ --cta: #0A84FF;+ --on-cta: #FFFFFF;+}++.mac-shell {+ display: flex;+ flex-direction: column;+ height: 100vh;+ overflow: hidden;+ background: var(--bg);+}++.mac-shell-body {+ display: flex;+ flex: 1;+ min-height: 0;+ overflow: hidden;+}++.mac-titlebar {+ display: flex;+ align-items: center;+ height: var(--titlebar-height);+ padding: 0 var(--space-4);+ padding-left: calc(var(--space-4) + 78px);+ border-bottom: 1px solid var(--border);+ background: var(--bg);+ flex-shrink: 0;+ -webkit-app-region: drag;+ user-select: none;+}++.mac-titlebar-title {+ font-size: var(--text-md);+ font-weight: 600;+ color: var(--text);+ letter-spacing: -0.01em;+}++.mac-titlebar-actions {+ margin-left: auto;+ display: flex;+ align-items: center;+ gap: var(--space-2);+ -webkit-app-region: no-drag;+}++.mac-toolbar {+ display: flex;+ align-items: center;+ gap: var(--space-3);+ min-height: var(--toolbar-height);+ padding: var(--space-2) var(--space-5);+ border-bottom: 1px solid var(--border);+ background: var(--surface);+ flex-shrink: 0;+}++.mac-content {+ flex: 1;+ overflow-y: auto;+ padding: var(--space-4);+ min-width: 0;+}++.mac-content--home {+ padding: var(--space-3);+ display: flex;+ flex-direction: column;+ min-height: 0;+}++.mac-content--pane {+ padding: 0;+ display: flex;+ flex-direction: column;+ min-height: 0;+ overflow: hidden;+}++.mac-source-list {+ width: var(--sidebar-width);+ min-width: var(--sidebar-width);+ display: flex;+ flex-direction: column;+ background: var(--sidebar-bg);+ border-right: 1px solid var(--border);+ padding: var(--space-3) var(--space-2);+ overflow-y: auto;+ flex-shrink: 0;+}++.mac-nav-section {+ margin-bottom: var(--space-3);+}++.mac-nav-section-header {+ display: flex;+ align-items: center;+ justify-content: space-between;+ padding: var(--space-1) var(--space-3);+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.04em;+ text-transform: uppercase;+ color: var(--text-dim);+}++.mac-nav-item {+ display: flex;+ align-items: center;+ gap: var(--space-3);+ padding: 6px var(--space-3);+ border-radius: var(--radius-sm);+ color: var(--text);+ font-size: var(--text-base);+ font-weight: 500;+ text-decoration: none;+ transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);+ position: relative;+}++@media (hover: hover) {+ .mac-nav-item:hover {+ background: var(--sidebar-highlight);+ }+}++.mac-nav-item.active {+ background: color-mix(in srgb, var(--accent) 18%, transparent);+ color: var(--accent);+}++.mac-nav-item:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+}++.mac-nav-label {+ flex: 1;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.mac-nav-badge {+ min-width: 18px;+ height: 18px;+ padding: 0 5px;+ font-size: 11px;+ font-weight: 600;+ line-height: 18px;+ text-align: center;+ color: var(--on-accent);+ background: var(--accent);+ border-radius: var(--radius-full);+}++.mac-plugins-toggle {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 22px;+ height: 22px;+ border: none;+ background: transparent;+ color: var(--text-dim);+ border-radius: var(--radius-xs);+ cursor: pointer;+ padding: 0;+}++@media (hover: hover) {+ .mac-plugins-toggle:hover {+ background: var(--sidebar-highlight);+ color: var(--text);+ }+}++.mac-segmented {+ display: inline-flex;+ padding: 2px;+ background: var(--surface-mut);+ border-radius: var(--radius-md);+ border: 1px solid var(--border);+}++.mac-segmented-btn {+ padding: 5px 12px;+ font-size: var(--text-sm);+ font-weight: 500;+ border: none;+ background: transparent;+ color: var(--text-muted);+ border-radius: calc(var(--radius-md) - 2px);+ cursor: pointer;+ transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);+}++.mac-segmented-btn.active {+ background: var(--surface);+ color: var(--text);+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);+}++.mac-inspector {+ width: var(--inspector-width);+ min-width: var(--inspector-width);+ border-left: 1px solid var(--border);+ background: var(--surface);+ overflow-y: auto;+ padding: var(--space-4);+ flex-shrink: 0;+}++.mac-command-backdrop {+ position: fixed;+ inset: 0;+ background: color-mix(in srgb, var(--bg) 40%, transparent);+ backdrop-filter: blur(12px);+ -webkit-backdrop-filter: blur(12px);+ z-index: 200;+ display: flex;+ align-items: flex-start;+ justify-content: center;+ padding-top: 18vh;+}++.mac-command-palette {+ width: min(560px, calc(100vw - 48px));+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: var(--radius-lg);+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);+ overflow: hidden;+}++.mac-command-input-row {+ display: flex;+ align-items: center;+ gap: var(--space-3);+ padding: var(--space-3) var(--space-4);+ border-bottom: 1px solid var(--border);+}++.mac-command-input {+ flex: 1;+ border: none;+ background: transparent;+ font-size: var(--text-md);+ color: var(--text);+ outline: none;+}++.mac-command-input::placeholder {+ color: var(--text-dim);+}++.mac-command-list {+ max-height: 320px;+ overflow-y: auto;+ padding: var(--space-2);+}++.mac-command-item {+ display: flex;+ align-items: center;+ gap: var(--space-3);+ width: 100%;+ padding: 8px var(--space-3);+ border: none;+ background: transparent;+ border-radius: var(--radius-sm);+ color: var(--text);+ font-size: var(--text-base);+ text-align: left;+ cursor: pointer;+}++@media (hover: hover) {+ .mac-command-item:hover {+ background: color-mix(in srgb, var(--accent) 12%, transparent);+ }+}++.mac-command-item.selected {+ background: color-mix(in srgb, var(--accent) 18%, transparent);+}++.mac-command-footer {+ display: flex;+ gap: var(--space-4);+ padding: var(--space-2) var(--space-4);+ border-top: 1px solid var(--border);+ font-size: 11px;+ color: var(--text-dim);+}++.mac-kbd {+ display: inline-flex;+ align-items: center;+ padding: 1px 5px;+ border-radius: 4px;+ background: var(--surface-mut);+ border: 1px solid var(--border);+ font-size: 10px;+ font-family: var(--font-mono);+}++.settings-mac {+ display: flex;+ flex-direction: column;+ flex: 1;+ min-height: 0;+ gap: 0;+}++.settings-mac-sidebar {+ width: 200px;+ flex-shrink: 0;+ padding: var(--space-2);+ border-right: 1px solid var(--border);+ overflow-y: auto;+}++.settings-mac-body {+ display: flex;+ flex: 1;+ min-height: 0;+ overflow: hidden;+}++.settings-mac-cat {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-2);+ width: 100%;+ text-align: left;+ padding: 6px var(--space-3);+ border: none;+ background: transparent;+ border-radius: var(--radius-sm);+ font-size: var(--text-base);+ color: var(--text);+ cursor: pointer;+}++.settings-mac-cat-label {+ flex: 1;+ min-width: 0;+}++.settings-mac-cat.search-match {+ color: var(--accent);+ font-weight: 600;+}++.settings-cat-match-count {+ flex-shrink: 0;+ min-width: 1.25rem;+ padding: 0 6px;+ font-size: 11px;+ font-weight: 600;+ line-height: 1.4;+ text-align: center;+ border-radius: 999px;+ background: color-mix(in srgb, var(--accent) 20%, transparent);+ color: var(--accent);+}++.settings-mac-cat.active {+ background: color-mix(in srgb, var(--accent) 18%, transparent);+ color: var(--accent);+ font-weight: 600;+}++.settings-mac-nav-group {+ margin-bottom: var(--space-3);+}++.settings-mac-nav-group:last-child {+ margin-bottom: 0;+}++.settings-mac-nav-group .mac-nav-section-header {+ padding-left: var(--space-2);+ padding-right: var(--space-2);+}++.settings-mac-content {+ flex: 1;+ min-width: 0;+ padding: var(--space-4);+ overflow-y: auto;+}++.downloads-mac.downloads-page {+ max-width: none;+ margin: 0;+ padding: var(--space-4);+ gap: var(--space-3);+ flex: 1;+ min-height: 0;+}++.downloads-mac .downloads-header {+ gap: var(--space-3);+}++.downloads-mac .downloads-header:not(:has(.downloads-stats)) {+ justify-content: flex-end;+}++.downloads-mac .downloads-stats {+ font-size: var(--text-sm);+ color: var(--text-muted);+}++.downloads-mac .filter-pills {+ width: fit-content;+ max-width: 100%;+}++.downloads-mac-empty {+ flex: 1;+ min-height: 0;+ padding: var(--space-6) var(--space-4);+ gap: var(--space-4);+}++.downloads-mac .downloads-empty {+ min-height: 0;+ flex: 1;+ padding: var(--space-6) 0;+}++.downloads-table-wrap {+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ overflow: hidden;+ background: var(--surface);+}++.downloads-table {+ width: 100%;+ border-collapse: collapse;+ font-size: var(--text-sm);+}++.downloads-table th {+ text-align: left;+ padding: 8px var(--space-3);+ font-weight: 600;+ color: var(--text-muted);+ background: var(--surface-mut);+ border-bottom: 1px solid var(--border);+ font-size: 11px;+ text-transform: uppercase;+ letter-spacing: 0.03em;+}++.downloads-table td {+ padding: 10px var(--space-3);+ border-bottom: 1px solid var(--border);+ color: var(--text);+ vertical-align: middle;+}++.downloads-table tr:last-child td {+ border-bottom: none;+}++@media (hover: hover) {+ .downloads-table tbody tr:hover {+ background: color-mix(in srgb, var(--accent) 6%, transparent);+ }+}++.home-mac {+ display: flex;+ flex-direction: column;+ gap: var(--space-3);+ width: 100%;+ flex: 1;+ min-height: 0;+}++.home-mac-workspace {+ display: flex;+ flex: 0 1 auto;+ gap: 0;+ min-width: 0;+ min-height: 0;+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ overflow: visible;+ background: var(--surface);+}++.home-mac-hero {+ flex-shrink: 0;+ width: 132px;+ padding: var(--space-5) var(--space-3) var(--space-4);+ border-right: 1px solid var(--border);+ display: flex;+ align-items: flex-start;+ justify-content: center;+ background: color-mix(in srgb, var(--surface) 92%, var(--bg));+ overflow: visible;+}++.home-mac-hero .mascot-bubble {+ max-width: 100%;+ font-size: var(--text-xs);+ padding: var(--space-1) var(--space-2);+ line-height: 1.35;+}++.home-mac-main {+ flex: 1;+ min-width: 0;+ min-height: 0;+ padding: var(--space-4);+ display: flex;+ flex-direction: column;+ gap: var(--space-3);+ overflow-y: auto;+}++@media (max-width: 900px) {+ .home-mac-workspace {+ flex-direction: column;+ }++ .home-mac-hero {+ width: 100%;+ border-right: none;+ border-bottom: 1px solid var(--border);+ padding: var(--space-3);+ justify-content: flex-start;+ }++ .mac-inspector {+ width: 100%;+ min-width: 0;+ border-left: none;+ border-top: 1px solid var(--border);+ }+}++@media (max-width: 860px) {+ .mac-source-list {+ width: 72px;+ min-width: 72px;+ }++ .mac-nav-label,+ .mac-nav-section-header {+ display: none;+ }++ .mac-nav-item {+ justify-content: center;+ padding: 8px;+ }+}diff --git a/src/lib/style/settings.css b/src/lib/style/settings.cssindex d20f0617..bfde3b5e 100644--- a/src/lib/style/settings.css+++ b/src/lib/style/settings.css@@ -1,10 +1,45 @@+ .settings-mac-body {+ display: flex;+ gap: 0;+ min-height: 0;+ flex: 1;+ overflow: hidden;+ }++ .settings-mac .settings-search-row {+ margin-bottom: var(--space-3);+ }++ .downloads-mac .download-item {+ border-bottom: 1px solid var(--border);+ border-radius: 0;+ box-shadow: none;+ }++ .downloads-mac .downloads-list {+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ overflow: hidden;+ background: var(--surface);+ }+.settings {display: flex;flex-direction: column;- align-items: center;+ align-items: stretch;min-height: calc(100vh - var(--padding) * 4);padding-top: var(--padding);gap: var(--padding);+ width: 100%;+ max-width: none;+ }++ .settings.settings-mac {+ align-items: stretch;+ min-height: 0;+ flex: 1;+ padding: var(--space-4);+ gap: var(--space-3);}.settings > :global(*) {@@ -12,11 +47,16 @@max-width: 560px;}+ .settings.settings-mac > :global(*) {+ max-width: none;+ }+.settings-loading {display: flex;align-items: center;justify-content: center;- min-height: calc(100vh - var(--padding) * 4);+ flex: 1;+ min-height: 12rem;}.settings-search-row {@@ -39,6 +79,14 @@border-color: var(--blue);}+ .settings-content :global(mark.settings-search-hit) {+ padding: 0 1px;+ border-radius: 2px;+ background: color-mix(in srgb, var(--accent) 28%, transparent);+ color: inherit;+ font-weight: 600;+ }+.category-tabs.searching {opacity: 0.5;pointer-events: auto;@@ -71,6 +119,444 @@gap: calc(var(--padding) / 2);}+ .settings-section-head {+ display: flex;+ flex-direction: column;+ gap: 2px;+ padding-top: var(--space-4);+ margin-top: var(--space-2);+ border-top: 1px solid var(--border);+ }++ .settings-section-head:first-child {+ border-top: none;+ padding-top: 0;+ margin-top: 0;+ }++ .settings-section-head .section-title {+ margin-bottom: 0;+ }++ .settings-section-hint {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--text-dim, var(--gray));+ margin: 0 0 var(--space-2) 0;+ line-height: 1.4;+ }++ .platform-subhead {+ font-size: 13px;+ font-weight: 600;+ color: var(--text);+ margin: var(--space-3) 0 var(--space-2) 0;+ }++ .platform-subhead:first-child {+ margin-top: 0;+ }++ .preset-grid {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ gap: 8px;+ }++ @media (max-width: 720px) {+ .preset-grid {+ grid-template-columns: 1fr;+ }+ }++ .preset-card {+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ gap: 4px;+ padding: 10px 12px;+ border: 1px solid var(--border);+ border-radius: var(--radius-md, 6px);+ background: var(--surface);+ color: var(--text);+ cursor: pointer;+ text-align: left;+ transition: border-color 0.12s ease, background 0.12s ease;+ }++ @media (hover: hover) {+ .preset-card:hover {+ border-color: var(--accent);+ }+ }++ .preset-card.active {+ border-color: var(--accent);+ background: color-mix(in srgb, var(--accent) 12%, var(--surface));+ }++ .preset-label {+ font-weight: 600;+ font-size: 0.9rem;+ }++ .preset-desc {+ font-size: 0.78rem;+ color: var(--text-dim, var(--gray));+ }++ .sb-chips {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+ padding: 4px 0 8px;+ }++ .sb-chip {+ padding: 5px 12px;+ border: 1px solid var(--border);+ border-radius: 999px;+ background: var(--surface);+ color: var(--text-muted, var(--text));+ font: inherit;+ font-size: 12px;+ cursor: pointer;+ transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;+ }++ @media (hover: hover) {+ .sb-chip:hover {+ border-color: var(--accent);+ }+ }++ .sb-chip.on {+ border-color: var(--accent);+ background: color-mix(in srgb, var(--accent) 16%, var(--surface));+ color: var(--text);+ }++ .sb-chip:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }++ .ghost-btn {+ padding: 6px 12px;+ border-radius: 8px;+ border: 1px solid var(--border);+ background: transparent;+ color: var(--text);+ font-size: 0.85rem;+ cursor: pointer;+ }++ @media (hover: hover) {+ .ghost-btn:hover {+ background: color-mix(in oklab, var(--text) 6%, transparent);+ }+ }++ .naming-block {+ padding: 14px 16px 4px;+ display: flex;+ flex-direction: column;+ gap: 10px;+ }++ .naming-row {+ display: flex;+ flex-direction: column;+ gap: 4px;+ }++ .naming-label {+ font-size: 0.78rem;+ color: var(--text-dim, var(--gray));+ }++ .naming-input {+ padding: 6px 10px;+ border-radius: 6px;+ border: 1px solid var(--border);+ background: var(--surface);+ color: var(--text);+ font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;+ font-size: 0.8rem;+ }++ .naming-input:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ border-color: var(--accent);+ }++ .naming-help {+ font-size: 0.72rem;+ color: var(--text-dim, var(--gray));+ margin: 4px 0 0;+ line-height: 1.4;+ }++ .path-warning {+ display: flex;+ align-items: flex-start;+ gap: 6px;+ margin-top: 6px;+ color: var(--warning);+ font-size: 12px;+ line-height: 1.4;+ }++ .path-warning svg {+ flex-shrink: 0;+ margin-top: 1px;+ }++ .speed-limit {+ display: flex;+ align-items: center;+ gap: 6px;+ }++ .downloads-speed-input {+ width: 88px;+ padding: 6px 8px;+ background: var(--surface);+ color: var(--text);+ border: 1px solid var(--border);+ border-radius: var(--border-radius, 6px);+ font: inherit;+ text-align: right;+ }++ .downloads-speed-input:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }++ .settings-disclosure > summary {+ cursor: pointer;+ list-style: none;+ display: flex;+ flex-direction: column;+ gap: 2px;+ padding-top: var(--space-4);+ margin-top: var(--space-2);+ border-top: 1px solid var(--border);+ }++ .settings-disclosure > summary::-webkit-details-marker {+ display: none;+ }++ .settings-disclosure > summary::before {+ content: "▸";+ display: inline-block;+ margin-right: 6px;+ transition: transform 0.15s ease;+ color: var(--text-dim, var(--gray));+ }++ .settings-disclosure[open] > summary::before {+ transform: rotate(90deg);+ }++ .settings-disclosure-hint {+ margin: 0 0 var(--space-2) 1.1em;+ }++ .settings-disclosure-nested > summary {+ border-top: none;+ padding-top: var(--space-2);+ margin-top: var(--space-2);+ font-size: var(--text-base);+ }++ .settings-drill-list {+ display: flex;+ flex-direction: column;+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ overflow: hidden;+ background: var(--surface);+ }++ .settings-drill-item {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-3);+ width: 100%;+ padding: 12px var(--space-4);+ border: none;+ border-bottom: 1px solid var(--border);+ background: transparent;+ text-align: left;+ cursor: pointer;+ color: var(--text);+ transition: background var(--duration-fast) var(--ease-out);+ }++ .settings-drill-item:last-child {+ border-bottom: none;+ }++ @media (hover: hover) {+ .settings-drill-item:hover {+ background: color-mix(in srgb, var(--accent) 8%, transparent);+ }+ }++ .settings-drill-item:focus-visible {+ outline: var(--focus-ring);+ outline-offset: -2px;+ }++ .settings-drill-item-text {+ display: flex;+ flex-direction: column;+ gap: 2px;+ min-width: 0;+ flex: 1;+ }++ .settings-drill-item-title {+ font-size: 14.5px;+ font-weight: 600;+ color: var(--text);+ }++ .settings-drill-item-hint {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--text-dim, var(--gray));+ line-height: 1.35;+ }++ .settings-drill-item-chevron {+ flex-shrink: 0;+ font-size: 18px;+ font-weight: 300;+ color: var(--text-dim, var(--gray));+ line-height: 1;+ }++ .settings-drill-back {+ display: flex;+ flex-direction: column;+ gap: var(--space-2);+ margin-bottom: var(--space-3);+ }++ .settings-drill-back-btn {+ display: inline-flex;+ align-items: center;+ gap: 2px;+ align-self: flex-start;+ padding: 4px 8px 4px 4px;+ border: none;+ background: transparent;+ color: var(--accent);+ font-size: 13px;+ font-weight: 500;+ cursor: pointer;+ border-radius: var(--radius-sm);+ }++ @media (hover: hover) {+ .settings-drill-back-btn:hover {+ background: color-mix(in srgb, var(--accent) 10%, transparent);+ }+ }++ .settings-drill-back-btn:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }++ .settings-drill-back-chevron {+ font-size: 20px;+ line-height: 1;+ }++ .settings-drill-back-head .section-title {+ margin-bottom: 0;+ }++ .settings-drill-spacer {+ height: var(--space-3);+ }++ .settings-subsection-head {+ font-size: 13px;+ font-weight: 600;+ color: var(--text);+ margin: var(--space-3) 0 var(--space-2) 0;+ }++ .settings-subsection-head:first-child {+ margin-top: 0;+ }++ .deps-table-wrap {+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ overflow: hidden;+ background: var(--surface);+ }++ .deps-table {+ width: 100%;+ border-collapse: collapse;+ font-size: 13px;+ }++ .deps-table thead {+ background: color-mix(in srgb, var(--text) 4%, var(--surface));+ }++ .deps-table th {+ padding: 8px 12px;+ text-align: left;+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.03em;+ text-transform: uppercase;+ color: var(--text-dim, var(--gray));+ border-bottom: 1px solid var(--border);+ }++ .deps-table th.deps-col-action {+ text-align: right;+ }++ .deps-table :global(.deps-table-row) {+ border-bottom: 1px solid var(--border);+ }++ .deps-table :global(.deps-table-row:last-child) {+ border-bottom: none;+ }++ .deps-table :global(td) {+ padding: 10px 12px;+ vertical-align: middle;+ }++ .deps-table :global(.deps-cell-action) {+ text-align: right;+ width: 42%;+ }++ .deps-table :global(.deps-cell-version) {+ white-space: nowrap;+ }++ .deps-table :global(.deps-cell-status) {+ white-space: nowrap;+ }+.card {background: var(--surface);box-shadow: var(--elev-1);@@ -505,6 +991,32 @@padding: 0 var(--padding) var(--padding);}+ .more-themes-toggle {+ display: block;+ width: calc(100% - var(--padding) * 2);+ margin: 0 var(--padding) var(--padding);+ padding: 8px 12px;+ text-align: left;+ font-size: 13px;+ font-weight: 500;+ color: var(--accent);+ background: transparent;+ border: 1px dashed var(--border);+ border-radius: var(--radius-sm);+ cursor: pointer;+ }++ @media (hover: hover) {+ .more-themes-toggle:hover {+ background: color-mix(in srgb, var(--accent) 8%, transparent);+ }+ }++ .more-themes-toggle:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }+.more-themes > summary {cursor: pointer;padding: 8px 4px;diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelteindex ddea2b98..6acdf026 100644--- a/src/routes/+layout.svelte+++ b/src/routes/+layout.svelte@@ -1,580 +1,433 @@-<script lang="ts">- import "../app.css";- import "$lib/style/queue-kinds.css";- import { page } from "$app/state";- import { goto } from "$app/navigation";- import { onMount } from "svelte";- import { invoke } from "@tauri-apps/api/core";- import { listen } from "@tauri-apps/api/event";- import { initDownloadListener } from "$lib/stores/download-listener";- import { getCounts } from "$lib/stores/download-store.svelte";- import { getSettings } from "$lib/stores/settings-store.svelte";- import { queueExternalPrefill, type ExternalUrlEvent } from "$lib/stores/external-url-store.svelte";- import Toast from "$components/toast/Toast.svelte";- import DebugPanel from "$components/debug/DebugPanel.svelte";- import BilibiliSessionExpiredBanner from "$lib/components/BilibiliSessionExpiredBanner.svelte";- import { refreshUpdateInfo } from "$lib/stores/update-store.svelte";- import { startClipboardMonitor, stopClipboardMonitor } from "$lib/stores/clipboard-monitor";- import { initChangelog } from "$lib/stores/changelog-store.svelte";- import ChangelogDialog from "$components/dialog/ChangelogDialog.svelte";- import ConfirmCloseDialog from "$components/dialog/ConfirmCloseDialog.svelte";- import ShortcutsDialog from "$components/dialog/ShortcutsDialog.svelte";- import BandwidthPill from "$lib/study-components/BandwidthPill.svelte";- import NotificationBell from "$lib/study-components/shelves/NotificationBell.svelte";- import { studySettingsGet, studyLibraryVacuum } from "$lib/study-bridge";- import LegalDialog from "$components/dialog/LegalDialog.svelte";- import RecoveryDialog from "$components/dialog/RecoveryDialog.svelte";- import OnboardingWizard from "$components/onboarding/OnboardingWizard.svelte";- import { needsOnboarding } from "$lib/stores/onboarding-store.svelte";- import { isYtdlpAvailable, isDepsChecked, refreshYtdlpStatus } from "$lib/stores/dependency-store.svelte";- import { showToast } from "$lib/stores/toast-store.svelte";- import { ensureTrackerNotifications } from "$lib/tracker-notifications.svelte";- import { t, locale } from "$lib/i18n";- import { get } from "svelte/store";- import { CORE_NAV_ITEMS, type NavItem } from "$lib/nav-config";- import {- STUDY_FOCUS_ENABLED,- STUDY_PROGRESS_ENABLED,- STUDY_ACHIEVEMENTS_ENABLED,- STUDY_NOTES_ENABLED,- } from "$lib/study-feature-flags";- import type { Snippet } from "svelte";-- let pluginNavItems = $state<NavItem[]>([]);-- let allNav = $derived([...CORE_NAV_ITEMS, ...pluginNavItems].sort((a, b) => (a.order ?? 50) - (b.order ?? 50)));- let primaryNav = $derived(allNav.filter((item) => item.group === "primary"));- let secondaryNav = $derived(allNav.filter((item) => item.group === "secondary"));-- let ytdlpDismissed = $state(false);- let ytdlpMissing = $derived(isDepsChecked() && !isYtdlpAvailable());- let showOnboarding = $derived(needsOnboarding());-- let counts = $derived(getCounts());- let badgeLabel = $derived(counts.badge > 99 ? "99+" : String(counts.badge));- let settings = $derived(getSettings());-- function handleExternalUrlEvent(event: Omit<ExternalUrlEvent, "id">) {- if (event.action === "prefill") {- queueExternalPrefill(event);- showToast("info", $t("toast.external_url_ready"));- if (page.url.pathname !== "/") {- goto("/");- }- return;- }-- if (event.action === "queued") {- showToast("success", $t("toast.external_url_queued"));- }- }-- $effect(() => {- if (settings?.download.clipboard_detection) {- startClipboardMonitor();- } else {- stopClipboardMonitor();- }- return () => {- stopClipboardMonitor();- };- });-- let { children }: { children: Snippet } = $props();-- const VACUUM_LAST_RUN_KEY = "study.library.auto_vacuum.last_run";-- async function checkAutoVacuum() {- try {- const settings = await studySettingsGet();- const enabled = settings.library?.auto_vacuum ?? true;- if (!enabled) return;- const intervalDays = settings.library?.auto_vacuum_interval_days ?? 30;- const intervalMs = intervalDays * 86400 * 1000;- const last = Number(localStorage.getItem(VACUUM_LAST_RUN_KEY) ?? "0");- const now = Date.now();- if (now - last < intervalMs) return;- const result = await studyLibraryVacuum();- localStorage.setItem(VACUUM_LAST_RUN_KEY, String(now));- const total =- (result.seek_logs_deleted ?? 0)- + (result.notifications_deleted ?? 0)- + (result.recents_deleted ?? 0);- if (total > 0) {- console.info(`[study] auto-vacuum: ${total} items cleaned`, result);- }- } catch (e) {- console.warn("auto-vacuum failed", e);- }- }-- onMount(() => {- let cleanup: (() => void) | undefined;- let unlistenExternal: (() => void) | undefined;- let unlistenChannels: (() => void) | undefined;- initDownloadListener().then((fn) => (cleanup = fn));- setTimeout(() => void checkAutoVacuum(), 5000);- void ensureTrackerNotifications();- import("$lib/rpc").then(({ rpcSyncIdleStats }) => rpcSyncIdleStats());-- invoke<{ id: string; enabled: boolean; nav: { route: string; label: Record<string, string>; icon_svg: string | null; group: string; order: number }[] }[]>("list_plugins")- .then((plugins) => {- const items: NavItem[] = [];- for (const p of plugins) {- if (!p.enabled) continue;- for (const n of p.nav) {- if (n.route === "/study/focus" && !STUDY_FOCUS_ENABLED) continue;- if (n.route === "/study/progress" && !STUDY_PROGRESS_ENABLED) continue;- if (n.route === "/study/achievements" && !STUDY_ACHIEVEMENTS_ENABLED) continue;- if (n.route === "/study/notes" && !STUDY_NOTES_ENABLED) continue;- items.push({- href: n.route,- label: n.label[get(locale)] || n.label["en"] || p.id,- icon: "plugin",- iconSvg: n.icon_svg || undefined,- group: n.group === "primary" ? "primary" : "secondary",- pluginId: p.id,- order: n.order,- });- }- }- pluginNavItems = items;- })- .catch(() => {});- listen<Omit<ExternalUrlEvent, "id">>("external-url", (event) => {- handleExternalUrlEvent(event.payload);- }).then((fn) => {- unlistenExternal = fn;- invoke<Omit<ExternalUrlEvent, "id">[]>("register_external_frontend")- .then((events) => {- for (const event of events) {- handleExternalUrlEvent(event);- }- })- .catch(() => {});- });- listen<{ channel_title: string; auto_download: boolean; videos: unknown[] }>(- "channel-new-videos",- (event) => {- const p = event.payload;- const count = p.videos?.length ?? 0;- if (count <= 0) return;- showToast(- "info",- $t(- p.auto_download- ? "toast.channel_new_auto"- : "toast.channel_new",- { channel: p.channel_title, count },- ) as string,- );- },- ).then((fn) => {- unlistenChannels = fn;- });- refreshUpdateInfo();- initChangelog();- refreshYtdlpStatus();-- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");- const handleChange = () => {- const s = getSettings();- if (s?.appearance.theme === "system") {- document.documentElement.setAttribute("data-theme", mediaQuery.matches ? "dark" : "light");- }- };- mediaQuery.addEventListener("change", handleChange);-- return () => {- cleanup?.();- unlistenExternal?.();- unlistenChannels?.();- mediaQuery.removeEventListener("change", handleChange);- };- });-- function isActive(href: string): boolean {- if (href === "/") return page.url.pathname === "/";- return page.url.pathname.startsWith(href);- }-</script>--<div class="layout">- <nav class="sidebar">- {#each primaryNav as item}- {@const itemTitle = item.label || (item.labelKey ? $t(item.labelKey) : '')}- <a- href={item.href}- class="nav-item"- class:active={isActive(item.href)}- title={itemTitle}- >- <span class="indicator"></span>- <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">- {#if item.iconSvg}- {#each item.iconSvg.split(' M').map((d, i) => i === 0 ? d : 'M' + d) as pathD}- <path d={pathD} />- {/each}- {:else if item.icon === "home"}- <path d="M3 12L12 3l9 9" />- <path d="M5 10v9a1 1 0 001 1h3v-5h6v5h3a1 1 0 001-1v-9" />- {:else if item.icon === "downloads"}- <path d="M12 3v12m0 0l-4-4m4 4l4-4" />- <path d="M4 17v2a1 1 0 001 1h14a1 1 0 001-1v-2" />- {:else if item.icon === "marketplace"}- <path d="M3 21h18" />- <path d="M3 7v1a3 3 0 0 0 6 0V7" />- <path d="M9 7v1a3 3 0 0 0 6 0V7" />- <path d="M15 7v1a3 3 0 0 0 6 0V7" />- <path d="M3 7h18l-1.5-4H4.5z" />- <path d="M5 21V10" />- <path d="M19 21V10" />- {:else if item.icon === "settings"}- <path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />- <circle cx="12" cy="12" r="3" />- {:else}- <circle cx="12" cy="12" r="10" />- <path d="M12 8v4m0 4h.01" />- {/if}- </svg>- <span class="nav-label">{itemTitle}</span>- {#if item.badge === "downloads" && counts.badge > 0}- <span class="badge">{badgeLabel}</span>- {/if}- </a>- {/each}-- {#if secondaryNav.length > 0}- <div class="nav-divider"></div>- {/if}-- {#each secondaryNav as item}- {@const itemTitle = item.label || (item.labelKey ? $t(item.labelKey) : '')}- <a- href={item.href}- class="nav-item"- class:active={isActive(item.href)}- title={itemTitle}- >- <span class="indicator"></span>- <svg viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">- {#if item.iconSvg}- {#each item.iconSvg.split(' M').map((d, i) => i === 0 ? d : 'M' + d) as pathD}- <path d={pathD} />- {/each}- {:else if item.icon === "about"}- <circle cx="12" cy="12" r="10" />- <path d="M12 16v-4m0-4h.01" />- {:else}- <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />- {/if}- </svg>- <span class="nav-label">{itemTitle}</span>- </a>- {/each}- </nav>-- <main class="content">- {#if ytdlpMissing && !ytdlpDismissed}- <div class="ytdlp-banner">- <span class="ytdlp-banner-text">{$t('common.ytdlp_missing')}</span>- <button class="button ytdlp-banner-link" onclick={() => goto('/settings#dependencies')}>- {$t('common.go_to_settings')}- </button>- <button class="ytdlp-banner-close" onclick={() => ytdlpDismissed = true} aria-label={$t('common.close')}>- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">- <path d="M18 6L6 18M6 6l12 12" />- </svg>- </button>- </div>- {/if}- {@render children()}- </main>-</div>--<div class="bandwidth-pill-mount">- <BandwidthPill />-</div>--<div class="notification-bell-mount">- <NotificationBell />-</div>--<Toast />-<DebugPanel />-<BilibiliSessionExpiredBanner />-<ChangelogDialog />-<ConfirmCloseDialog />-<ShortcutsDialog />-<LegalDialog />-<RecoveryDialog />-{#if showOnboarding}- <OnboardingWizard />-{/if}--<style>- .layout {- display: flex;- height: 100vh;- overflow: hidden;- }-- .bandwidth-pill-mount {- position: fixed;- bottom: 12px;- right: 12px;- z-index: 50;- pointer-events: none;- }- .notification-bell-mount {- position: fixed;- top: 16px;- right: 16px;- z-index: 60;- }-- .sidebar {- width: var(--sidebar-width);- min-width: var(--sidebar-width);- height: 100vh;- background: var(--sidebar-bg);- display: flex;- flex-direction: column;- align-items: center;- padding-top: var(--padding);- gap: 4px;- }-- .nav-item {- position: relative;- width: 60px;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 2px;- padding: 6px 0;- border-radius: var(--radius-md);- color: var(--text-dim);- transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);- }-- .nav-label {- font-size: 9px;- font-weight: 500;- line-height: 1;- text-align: center;- max-width: 100%;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- }-- @media (hover: hover) {- .nav-item:hover {- color: var(--text);- background-color: var(--surface-hi);- }- }-- .nav-item:active {- background-color: var(--surface-hi);- }-- .nav-item:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);- }-- .nav-item.active {- color: var(--accent);- background-color: var(--accent-soft);- }-- @media (prefers-reduced-motion: reduce) {- .nav-item {- transition: none;- }- }-- .nav-divider {- width: 24px;- height: 1px;- background: var(--content-border);- margin: 6px 0;- flex-shrink: 0;- }-- .indicator {- position: absolute;- left: -8px;- width: 3px;- height: 0;- background: var(--accent);- border-radius: 0 2px 2px 0;- transition: height var(--duration-base) var(--ease-out);- }-- .nav-item.active .indicator {- height: 24px;- }-- @media (prefers-reduced-motion: reduce) {- .indicator {- transition: none;- }- }-- .badge {- position: absolute;- top: 4px;- right: 2px;- min-width: 16px;- height: 16px;- padding: 0 var(--space-1);- font-size: var(--text-xs);- font-weight: 600;- line-height: 16px;- text-align: center;- color: var(--on-accent);- background: var(--accent);- border-radius: var(--radius-full);- pointer-events: none;- box-shadow: 0 0 0 2px var(--sidebar-bg);- }-- .content {- flex: 1;- overflow-y: auto;- padding: calc(var(--padding) * 2);- box-shadow: inset 1px 0 0 0 var(--content-border);- }-- .ytdlp-banner {- display: flex;- align-items: center;- gap: 10px;- padding: 10px 14px;- margin-bottom: var(--padding);- background: var(--warning);- color: var(--on-warning);- border-radius: var(--border-radius);- font-size: 12.5px;- font-weight: 500;- }-- .ytdlp-banner-text {- flex: 1;- }-- .ytdlp-banner-link {- background: color-mix(in srgb, var(--warning) 80%, black);- color: var(--on-warning);- border: none;- font-size: 12px;- padding: 4px 10px;- border-radius: calc(var(--border-radius) - 4px);- cursor: pointer;- white-space: nowrap;- box-shadow: none;- }-- @media (hover: hover) {- .ytdlp-banner-link:hover {- background: color-mix(in srgb, var(--warning) 65%, black);- }- }-- .ytdlp-banner-close {- background: none;- border: none;- color: #000;- cursor: pointer;- padding: 2px;- opacity: 0.6;- display: flex;- align-items: center;- }-- @media (hover: hover) {- .ytdlp-banner-close:hover {- opacity: 1;- }- }-- @media (max-width: 535px) {- .layout {- grid-template-columns: unset;- grid-template-rows: 1fr auto;- }-- .sidebar {- width: 100%;- height: auto;- flex-direction: row;- position: fixed;- bottom: 0;- left: 0;- right: 0;- padding: 0;- padding-left: var(--safe-area-left);- padding-right: var(--safe-area-right);- padding-bottom: var(--safe-area-bottom);- border-top: 1px solid var(--content-border);- overflow-x: auto;- overflow-y: hidden;- gap: 0;- }-- .sidebar::after {- content: "";- position: absolute;- right: 0;- top: 0;- bottom: 0;- width: 32px;- pointer-events: none;- background: linear-gradient(to right, transparent 0%, var(--sidebar-bg) 100%);- }-- .nav-item {- width: auto;- height: 44px;- padding: 0 calc(var(--padding) * 1.5);- flex-shrink: 0;- }-- .nav-divider {- width: 1px;- height: 24px;- margin: 0 4px;- }-- .indicator {- position: absolute;- bottom: -8px;- left: 50%;- transform: translateX(-50%);- width: 20px;- height: 3px;- border-radius: 0 0 2px 2px;- }-- .nav-item.active .indicator {- width: 20px;- height: 3px;- }-- .content {- padding: calc(var(--padding) * 2);- padding-bottom: var(--mobile-nav-clearance);- order: -1;- }- }-- @media (prefers-reduced-motion: reduce) {- .indicator {- transition: none;- }- }-</style>+<script lang="ts">+ import "../app.css";+ import "$lib/style/queue-kinds.css";+ import { page } from "$app/state";+ import { goto } from "$app/navigation";+ import { onMount } from "svelte";+ import { invoke } from "@tauri-apps/api/core";+ import { listen } from "@tauri-apps/api/event";+ import { initDownloadListener } from "$lib/stores/download-listener";+ import { getCounts } from "$lib/stores/download-store.svelte";+ import { getSettings } from "$lib/stores/settings-store.svelte";+ import { queueExternalPrefill, type ExternalUrlEvent } from "$lib/stores/external-url-store.svelte";+ import Toast from "$components/toast/Toast.svelte";+ import AppSidebar from "$components/shell/AppSidebar.svelte";+ import AppToolbar from "$components/shell/AppToolbar.svelte";+ import CommandPalette from "$components/shell/CommandPalette.svelte";+ import { setCommandPaletteItems } from "$lib/stores/command-palette-store.svelte";+ import { refreshUpdateInfo } from "$lib/stores/update-store.svelte";+ import { startClipboardMonitor, stopClipboardMonitor } from "$lib/stores/clipboard-monitor";+ import { initChangelog } from "$lib/stores/changelog-store.svelte";+ import { needsOnboarding } from "$lib/stores/onboarding-store.svelte";+ import { isYtdlpAvailable, isDepsChecked, refreshYtdlpStatus } from "$lib/stores/dependency-store.svelte";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import { ensureTrackerNotifications } from "$lib/tracker-notifications.svelte";+ import { t, locale } from "$lib/i18n";+ import { get } from "svelte/store";+ import { CORE_NAV_ITEMS, type NavItem } from "$lib/nav-config";+ import {+ STUDY_FOCUS_ENABLED,+ STUDY_PROGRESS_ENABLED,+ STUDY_ACHIEVEMENTS_ENABLED,+ STUDY_NOTES_ENABLED,+ } from "$lib/study-feature-flags";+ import type { Snippet } from "svelte";+ import type { Component } from "svelte";++ let pluginNavItems = $state<NavItem[]>([]);++ let allNav = $derived([...CORE_NAV_ITEMS, ...pluginNavItems].sort((a, b) => (a.order ?? 50) - (b.order ?? 50)));+ let primaryNav = $derived(allNav.filter((item) => item.group === "primary"));+ let appNav = $derived(allNav.filter((item) => item.group === "app"));+ let pluginNav = $derived(allNav.filter((item) => item.group === "plugins"));++ let ytdlpDismissed = $state(false);+ let ytdlpMissing = $derived(isDepsChecked() && !isYtdlpAvailable());+ let showOnboarding = $derived(needsOnboarding());++ let counts = $derived(getCounts());+ let badgeLabel = $derived(counts.badge > 99 ? "99+" : String(counts.badge));+ let settings = $derived(getSettings());++ let isStudyRoute = $derived(page.url.pathname.startsWith("/study"));+ let isCoreRoute = $derived(+ page.url.pathname === "/" ||+ page.url.pathname.startsWith("/downloads") ||+ page.url.pathname.startsWith("/settings") ||+ page.url.pathname.startsWith("/marketplace") ||+ page.url.pathname.startsWith("/about"),+ );++ let DebugPanel = $state<Component | null>(null);+ let OnboardingWizard = $state<Component | null>(null);+ let BandwidthPill = $state<Component | null>(null);+ let NotificationBell = $state<Component | null>(null);+ let ChangelogDialog = $state<Component | null>(null);+ let ConfirmCloseDialog = $state<Component | null>(null);+ let ShortcutsDialog = $state<Component | null>(null);+ let LegalDialog = $state<Component | null>(null);+ let RecoveryDialog = $state<Component | null>(null);+ let BilibiliSessionExpiredBanner = $state<Component | null>(null);++ function handleExternalUrlEvent(event: Omit<ExternalUrlEvent, "id">) {+ if (event.action === "prefill") {+ queueExternalPrefill(event);+ showToast("info", $t("toast.external_url_ready"));+ if (page.url.pathname !== "/") {+ goto("/");+ }+ return;+ }++ if (event.action === "queued") {+ showToast("success", $t("toast.external_url_queued"));+ }+ }++ function reloadPluginNav() {+ invoke<{ id: string; enabled: boolean; nav: { route: string; label: Record<string, string>; icon_svg: string | null; group: string; order: number }[] }[]>("list_plugins")+ .then((plugins) => {+ const items: NavItem[] = [];+ for (const p of plugins) {+ if (!p.enabled) continue;+ for (const n of p.nav) {+ if (n.route === "/study/focus" && !STUDY_FOCUS_ENABLED) continue;+ if (n.route === "/study/progress" && !STUDY_PROGRESS_ENABLED) continue;+ if (n.route === "/study/achievements" && !STUDY_ACHIEVEMENTS_ENABLED) continue;+ if (n.route === "/study/notes" && !STUDY_NOTES_ENABLED) continue;+ items.push({+ href: n.route,+ label: n.label[get(locale)] || n.label["en"] || p.id,+ icon: "plugin",+ iconSvg: n.icon_svg || undefined,+ group: "plugins",+ pluginId: p.id,+ order: n.order,+ });+ }+ }+ pluginNavItems = items;+ buildCommandPaletteItems();+ })+ .catch(() => {});+ }++ function buildCommandPaletteItems() {+ const navItems = [...CORE_NAV_ITEMS, ...pluginNavItems].map((item) => ({+ id: `nav-${item.href}`,+ label: item.label || (item.labelKey ? get(t)(item.labelKey) : item.href),+ group: get(t)("command_palette.group_nav"),+ keywords: item.href,+ action: () => goto(item.href),+ }));++ setCommandPaletteItems([+ ...navItems,+ {+ id: "action-paste",+ label: get(t)("command_palette.action_paste"),+ group: get(t)("command_palette.group_action"),+ keywords: "clipboard url paste",+ action: () => goto("/"),+ },+ {+ id: "action-downloads",+ label: get(t)("command_palette.action_downloads"),+ group: get(t)("command_palette.group_action"),+ keywords: "queue",+ action: () => goto("/downloads"),+ },+ {+ id: "action-settings",+ label: get(t)("command_palette.action_settings"),+ group: get(t)("command_palette.group_action"),+ keywords: "preferences",+ action: () => goto("/settings"),+ },+ ]);+ }++ $effect(() => {+ if (settings?.download.clipboard_detection) {+ startClipboardMonitor();+ } else {+ stopClipboardMonitor();+ }+ return () => {+ stopClipboardMonitor();+ };+ });++ $effect(() => {+ document.documentElement.setAttribute("data-shell", "mac");+ void $locale;+ buildCommandPaletteItems();+ });++ let { children }: { children: Snippet } = $props();++ const VACUUM_LAST_RUN_KEY = "study.library.auto_vacuum.last_run";++ async function checkAutoVacuum() {+ try {+ const { studySettingsGet, studyLibraryVacuum } = await import("$lib/study-bridge");+ const studySettings = await studySettingsGet();+ const enabled = studySettings.library?.auto_vacuum ?? true;+ if (!enabled) return;+ const intervalDays = studySettings.library?.auto_vacuum_interval_days ?? 30;+ const intervalMs = intervalDays * 86400 * 1000;+ const last = Number(localStorage.getItem(VACUUM_LAST_RUN_KEY) ?? "0");+ const now = Date.now();+ if (now - last < intervalMs) return;+ const result = await studyLibraryVacuum();+ localStorage.setItem(VACUUM_LAST_RUN_KEY, String(now));+ const total =+ (result.seek_logs_deleted ?? 0)+ + (result.notifications_deleted ?? 0)+ + (result.recents_deleted ?? 0);+ if (total > 0) {+ console.info(`[study] auto-vacuum: ${total} items cleaned`, result);+ }+ } catch (e) {+ console.warn("auto-vacuum failed", e);+ }+ }++ onMount(() => {+ let cleanup: (() => void) | undefined;+ let unlistenExternal: (() => void) | undefined;+ let unlistenChannels: (() => void) | undefined;+ initDownloadListener().then((fn) => (cleanup = fn));+ setTimeout(() => void checkAutoVacuum(), 5000);+ void ensureTrackerNotifications();+ import("$lib/rpc").then(({ rpcSyncIdleStats }) => rpcSyncIdleStats());++ void import("$components/dialog/ChangelogDialog.svelte").then((m) => { ChangelogDialog = m.default; });+ void import("$components/dialog/ConfirmCloseDialog.svelte").then((m) => { ConfirmCloseDialog = m.default; });+ void import("$components/dialog/ShortcutsDialog.svelte").then((m) => { ShortcutsDialog = m.default; });+ void import("$components/dialog/LegalDialog.svelte").then((m) => { LegalDialog = m.default; });+ void import("$components/dialog/RecoveryDialog.svelte").then((m) => { RecoveryDialog = m.default; });+ void import("$lib/components/BilibiliSessionExpiredBanner.svelte").then((m) => { BilibiliSessionExpiredBanner = m.default; });+ if (showOnboarding) {+ void import("$components/onboarding/OnboardingWizard.svelte").then((m) => { OnboardingWizard = m.default; });+ }+ void import("$components/debug/DebugPanel.svelte").then((m) => { DebugPanel = m.default; });++ reloadPluginNav();+ listen("plugins-changed", () => { reloadPluginNav(); });+ listen<Omit<ExternalUrlEvent, "id">>("external-url", (event) => {+ handleExternalUrlEvent(event.payload);+ }).then((fn) => {+ unlistenExternal = fn;+ invoke<Omit<ExternalUrlEvent, "id">[]>("register_external_frontend")+ .then((events) => {+ for (const event of events) {+ handleExternalUrlEvent(event);+ }+ })+ .catch(() => {});+ });+ listen<{ channel_title: string; auto_download: boolean; videos: unknown[] }>(+ "channel-new-videos",+ (event) => {+ const p = event.payload;+ const count = p.videos?.length ?? 0;+ if (count <= 0) return;+ showToast(+ "info",+ $t(+ p.auto_download+ ? "toast.channel_new_auto"+ : "toast.channel_new",+ { channel: p.channel_title, count },+ ) as string,+ );+ },+ ).then((fn) => {+ unlistenChannels = fn;+ });+ refreshUpdateInfo();+ initChangelog();+ refreshYtdlpStatus();++ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");+ const handleChange = () => {+ const s = getSettings();+ if (s?.appearance.theme === "system") {+ document.documentElement.setAttribute("data-theme", mediaQuery.matches ? "dark" : "light");+ }+ };+ mediaQuery.addEventListener("change", handleChange);++ return () => {+ cleanup?.();+ unlistenExternal?.();+ unlistenChannels?.();+ mediaQuery.removeEventListener("change", handleChange);+ };+ });++ $effect(() => {+ if (isStudyRoute) {+ void import("$lib/study-components/BandwidthPill.svelte").then((m) => { BandwidthPill = m.default; });+ void import("$lib/study-components/shelves/NotificationBell.svelte").then((m) => { NotificationBell = m.default; });+ } else {+ BandwidthPill = null;+ NotificationBell = null;+ }+ });+</script>++<div class="mac-shell">+ <AppToolbar />+ <div class="mac-shell-body">+ <AppSidebar+ {primaryNav}+ {appNav}+ {pluginNav}+ {badgeLabel}+ badgeCount={counts.badge}+ />+ <main+ class="mac-content"+ class:mac-content--home={page.url.pathname === "/"}+ class:mac-content--pane={+ page.url.pathname.startsWith("/settings") ||+ page.url.pathname.startsWith("/downloads")+ }+ >+ {#if ytdlpMissing && !ytdlpDismissed && isCoreRoute}+ <div class="ytdlp-banner">+ <span class="ytdlp-banner-text">{$t('common.ytdlp_missing')}</span>+ <button class="button ytdlp-banner-link" onclick={() => goto('/settings#dependencies')}>+ {$t('common.go_to_settings')}+ </button>+ <button class="ytdlp-banner-close" onclick={() => ytdlpDismissed = true} aria-label={$t('common.close')}>+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">+ <path d="M18 6L6 18M6 6l12 12" />+ </svg>+ </button>+ </div>+ {/if}+ {@render children()}+ </main>+ </div>+</div>++<CommandPalette />++{#if isStudyRoute && BandwidthPill}+ <div class="bandwidth-pill-mount">+ <BandwidthPill />+ </div>+{/if}++{#if isStudyRoute && NotificationBell}+ <div class="notification-bell-mount">+ <NotificationBell />+ </div>+{/if}++<Toast />+{#if DebugPanel}+ <DebugPanel />+{/if}+{#if BilibiliSessionExpiredBanner}+ <BilibiliSessionExpiredBanner />+{/if}+{#if ChangelogDialog}+ <ChangelogDialog />+{/if}+{#if ConfirmCloseDialog}+ <ConfirmCloseDialog />+{/if}+{#if ShortcutsDialog}+ <ShortcutsDialog />+{/if}+{#if LegalDialog}+ <LegalDialog />+{/if}+{#if RecoveryDialog}+ <RecoveryDialog />+{/if}+{#if showOnboarding && OnboardingWizard}+ <OnboardingWizard />+{/if}++<style>+ .bandwidth-pill-mount {+ position: fixed;+ bottom: 12px;+ right: 12px;+ z-index: 50;+ pointer-events: none;+ }++ .notification-bell-mount {+ position: fixed;+ top: calc(var(--titlebar-height) + 8px);+ right: 16px;+ z-index: 60;+ }++ .ytdlp-banner {+ display: flex;+ align-items: center;+ gap: 10px;+ padding: 10px 14px;+ margin-bottom: var(--padding);+ background: color-mix(in srgb, var(--warning) 18%, var(--surface));+ color: color-mix(in srgb, var(--warning) 82%, var(--text));+ border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--border));+ border-radius: var(--border-radius);+ font-size: 12.5px;+ font-weight: 500;+ }++ :global([data-theme="light"]) .ytdlp-banner,+ :global([data-theme="catppuccin-latte"]) .ytdlp-banner,+ :global([data-theme="eink-day"]) .ytdlp-banner,+ :global([data-theme="eink-sepia"]) .ytdlp-banner,+ :global([data-theme="nyxvamp-radiance"]) .ytdlp-banner {+ color: var(--on-warning);+ }++ .ytdlp-banner-text {+ flex: 1;+ }++ .ytdlp-banner-link {+ background: var(--warning);+ color: #fff;+ border: none;+ font-size: 12px;+ padding: 4px 10px;+ border-radius: calc(var(--border-radius) - 4px);+ cursor: pointer;+ white-space: nowrap;+ box-shadow: none;+ }++ @media (hover: hover) {+ .ytdlp-banner-link:hover {+ background: color-mix(in srgb, var(--warning) 65%, black);+ }+ }++ .ytdlp-banner-close {+ background: none;+ border: none;+ color: inherit;+ cursor: pointer;+ padding: 2px;+ opacity: 0.7;+ display: flex;+ align-items: center;+ }++ @media (hover: hover) {+ .ytdlp-banner-close:hover {+ opacity: 1;+ }+ }+</style>diff --git a/src/routes/+page.svelte b/src/routes/+page.svelteindex 6a19051e..0f167023 100644--- a/src/routes/+page.svelte+++ b/src/routes/+page.svelte@@ -1,1996 +1,1870 @@-<script lang="ts">- import { invoke } from "@tauri-apps/api/core";- import { open } from "@tauri-apps/plugin-dialog";- import { goto } from "$app/navigation";- import { onMount } from "svelte";- import SupportedServices from "$components/services/SupportedServices.svelte";- import OmniboxInput from "$components/omnibox/OmniboxInput.svelte";- import BilibiliPreviewExtras from "$components/omnibox/BilibiliPreviewExtras.svelte";- import DownloadModeSelector from "$components/omnibox/DownloadModeSelector.svelte";- import QualityPicker from "$components/omnibox/QualityPicker.svelte";- import FormatSelector from "$components/omnibox/FormatSelector.svelte";- import CookieAccountPicker from "$components/omnibox/CookieAccountPicker.svelte";- import OmniboxAdvanced from "$components/omnibox/OmniboxAdvanced.svelte";- import MediaPreview from "$components/omnibox/MediaPreview.svelte";- import BatchDownload from "$components/omnibox/BatchDownload.svelte";- import SearchResults from "$components/omnibox/SearchResults.svelte";- import P2pSendDialog from "$components/p2p/P2pSendDialog.svelte";- import P2pReceiveDialog from "$components/p2p/P2pReceiveDialog.svelte";- import HomeHero from "$components/home/HomeHero.svelte";- // Mascot is consumed by HomeHero; keep direct import path live for backward compat if needed- import { getDownloads, formatBytes } from "$lib/stores/download-store.svelte";- import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";- import { showToast } from "$lib/stores/toast-store.svelte";- import { onClipboardUrl } from "$lib/stores/clipboard-monitor";- import { getMediaPreview, clearMediaPreview } from "$lib/stores/media-preview-store.svelte";- import { clearPendingExternalPrefill, getPendingExternalPrefill, type ExternalUrlEvent } from "$lib/stores/external-url-store.svelte";- import { getOmniboxDraftUrl, setOmniboxDraftUrl } from "$lib/stores/omnibox-draft-store.svelte";- import { t } from "$lib/i18n";- import { translateBackendError } from "$lib/error-translate";- import { platformDisplayName } from "$lib/platform-display-names";- import { STUDY_MAINTENANCE_NOTICE } from "$lib/study-feature-flags";-- type PlatformInfo = {- platform: string;- supported: boolean;- content_id: string | null;- content_type: string | null;- };-- type DownloadStarted = {- id: number;- title: string;- };-- type FormatInfo = {- format_id: string;- ext: string;- resolution: string | null;- width: number | null;- height: number | null;- fps: number | null;- vcodec: string | null;- acodec: string | null;- filesize: number | null;- tbr: number | null;- has_video: boolean;- has_audio: boolean;- format_note: string | null;- };-- type SearchResult = {- id: string;- title: string;- author: string;- duration: number | null;- thumbnail_url: string | null;- url: string;- platform: string;- };-- type OmniState =- | { kind: "idle" }- | { kind: "detecting" }- | { kind: "detected"; info: PlatformInfo }- | { kind: "unsupported" }- | { kind: "preparing"; platform: string }- | { kind: "batch"; urls: string[] }- | { kind: "searching" }- | { kind: "search-results"; results: SearchResult[] }- | { kind: "search-empty" }- | { kind: "error"; message: string; originalUrl: string; platform: string };-- let url = $state(getOmniboxDraftUrl());- let omniState = $state<OmniState>({ kind: "idle" });- let debounceTimer = $state<ReturnType<typeof setTimeout> | null>(null);- let downloadMode = $state<"auto" | "audio" | "mute">("auto");- let selectedQuality = $state("best");- let clipStart = $state("");- let clipEnd = $state("");- let scheduleAt = $state("");- let scheduleStop = $state("");- let playlistEntries = $state<{ index: number; title: string; url: string }[]>([]);- let selectedPlaylistItems = $state<Set<number>>(new Set());- let playlistLoading = $state(false);- let torrentEntries = $state<{ index: number; path: string; size_bytes: number }[]>([]);- let selectedTorrentFiles = $state<Set<number>>(new Set());- let torrentLoading = $state(false);- let selectedFormatId = $state<string | null>(null);- let formats = $state<FormatInfo[]>([]);- let loadingFormats = $state(false);- let formatError = $state<string | null>(null);- let formatFetchGeneration = $state(0);- let referer = $state("");-- type CookieAccount = {- slug: string;- alias: string;- captured_at_ms: number;- cookie_count: number;- last_used_at_ms: number | null;- };- let cookieAccounts = $state<CookieAccount[]>([]);- let selectedCookieSlug = $state<string | null>(null);- let cookieHint = $state<"stale" | "expired" | null>(null);- let advancedMode = $state(false);- const STUDY_NOTICE_DISMISS_KEY = "omniget.study_maintenance_notice_dismissed_v1";- let studyNoticeDismissed = $state(- typeof localStorage !== "undefined"- && localStorage.getItem(STUDY_NOTICE_DISMISS_KEY) === "1"- );- function dismissStudyNotice() {- studyNoticeDismissed = true;- try { localStorage.setItem(STUDY_NOTICE_DISMISS_KEY, "1"); } catch {}- }- let mediaPreview = $derived(getMediaPreview());- let pendingExternalPrefill = $derived(getPendingExternalPrefill());- let previewImageLoading = $state(true);- let showP2pSendDialog = $state(false);- let p2pReceiveCode = $state<string | null>(null);- let p2pReceiveUrl = $state("");- let externalNotice = $state<ExternalUrlEvent | null>(null);- let lastExternalPrefillId = $state<number | null>(null);- let pendingAutoDownload = $state(false);-- onMount(() => {- onClipboardUrl((detectedUrl) => {- if (omniState.kind === "preparing") return;- url = detectedUrl;- const settings = getSettings();- const autoDownload = !!(settings?.download.auto_download_on_paste && settings?.download.clipboard_detection);- pendingAutoDownload = autoDownload;- handleInput();- showToast("info", $t(autoDownload ? "toast.auto_download_started" : "toast.clipboard_url_detected"));- });- if (url.trim()) {- queueMicrotask(() => handleInput());- }- return () => {- onClipboardUrl(null);- };- });-- $effect(() => {- setOmniboxDraftUrl(url);- });-- const AUTO_DOWNLOAD_DELAY_MS = 2000;-- $effect(() => {- if (!pendingAutoDownload) return;- if (omniState.kind === "detected") {- const info = omniState.info;- if (info.platform === "hotmart" || info.platform === "p2p") {- pendingAutoDownload = false;- return;- }- pendingAutoDownload = false;- const snapshotUrl = url;- setTimeout(() => {- if (url === snapshotUrl && omniState.kind === "detected") {- handleAction();- }- }, AUTO_DOWNLOAD_DELAY_MS);- } else if (- omniState.kind === "unsupported" ||- omniState.kind === "error" ||- omniState.kind === "batch" ||- omniState.kind === "search-results" ||- omniState.kind === "search-empty" ||- omniState.kind === "idle"- ) {- pendingAutoDownload = false;- }- });-- const STALL_THRESHOLD = 30_000;- let downloads = $derived(getDownloads());- let stallTick = $state(0);- let lastCompletionAt = $state(0);- let firstCompletionOfSession = $state(false);- let completionSeenIds = new Set<string | number>();-- $effect(() => {- for (const [id, item] of downloads.entries()) {- if (item.status === "complete" && !completionSeenIds.has(id)) {- completionSeenIds.add(id);- lastCompletionAt = Date.now();- if (!firstCompletionOfSession) {- firstCompletionOfSession = true;- }- break;- }- }- });-- $effect(() => {- const interval = setInterval(() => { stallTick++; }, 5000);- return () => clearInterval(interval);- });--- $effect(() => {- if (mediaPreview) {- previewImageLoading = true;- }- });-- $effect(() => {- const incoming = pendingExternalPrefill;- if (!incoming || incoming.id === lastExternalPrefillId) {- return;- }-- lastExternalPrefillId = incoming.id;- clearPendingExternalPrefill(incoming.id);- externalNotice = incoming;-- if (incoming.action !== "prefill") {- return;- }-- url = incoming.url;- if (getSettings()?.download.auto_download_on_paste) {- pendingAutoDownload = true;- }- handleInput();- });-- let mascotEmotion = $derived.by((): "idle" | "downloading" | "error" | "stalled" | "queue" | "complete" | "amazed" => {- void stallTick;-- if (lastCompletionAt > 0 && Date.now() - lastCompletionAt < 5000) {- return firstCompletionOfSession && completionSeenIds.size === 1 ? "amazed" : "complete";- }-- if (omniState.kind === "preparing") return "downloading";- if (omniState.kind === "error") return "error";-- let hasActiveDownloading = false;- let hasActiveStalled = false;- let hasItems = false;- for (const item of downloads.values()) {- hasItems = true;- if (item.status === "downloading") {- hasActiveDownloading = true;- const elapsed = Date.now() - item.lastUpdateAt;- if (elapsed > STALL_THRESHOLD) {- hasActiveStalled = true;- }- }- }-- if (hasActiveStalled) return "stalled";- if (hasActiveDownloading) return "downloading";- if (hasItems) return "queue";- return "idle";- });-- let mascotCompact = $derived(omniState.kind !== "idle");-- function pickRandom(raw: string): string {- if (raw.includes("|")) {- const opts = raw.split("|");- return opts[Math.floor(Math.random() * opts.length)];- }- return raw;- }-- let lastBubbleKey = $state("");- let bubbleText = $state("");-- $effect(() => {- let key: string;- if (mascotEmotion === "amazed") key = "amazed";- else if (mascotEmotion === "complete") key = "complete";- else if (mascotEmotion === "queue") key = "queue";- else if (mascotEmotion === "downloading") key = "downloading";- else if (mascotEmotion === "stalled") key = "stalled";- else {- switch (omniState.kind) {- case "idle": key = "idle"; break;- case "detecting": key = "detecting"; break;- case "detected": key = "detected"; break;- case "preparing": key = "preparing"; break;- case "searching":- case "search-results": key = "search"; break;- case "error": key = "error"; break;- default: key = ""; break;- }- }- if (key && key !== lastBubbleKey) {- lastBubbleKey = key;- bubbleText = pickRandom($t(`mascot.${key}`));- } else if (!key) {- lastBubbleKey = "";- bubbleText = "";- }- });-- let showLoopIcon = $derived(- omniState.kind === "detected" ||- omniState.kind === "preparing" ||- omniState.kind === "batch"- );-- let showOmnibox = $derived(- omniState.kind === "idle" ||- omniState.kind === "detecting" ||- omniState.kind === "detected" ||- omniState.kind === "unsupported" ||- omniState.kind === "batch" ||- omniState.kind === "searching" ||- omniState.kind === "search-results" ||- omniState.kind === "search-empty"- );-- function isUrl(value: string): boolean {- return value.startsWith("http://") || value.startsWith("https://") || value.startsWith("magnet:") || value.startsWith("p2p:") || value.endsWith(".torrent");- }-- function isValidTimeBound(v: string): boolean {- return /^(\d+:)?\d{1,2}:\d{1,2}(\.\d+)?$|^\d+(\.\d+)?$/.test(v.trim());- }-- function buildTimeRange(): string | null {- const s = clipStart.trim();- const e = clipEnd.trim();- if (!s && !e) return null;- if (s && !isValidTimeBound(s)) return null;- if (e && !isValidTimeBound(e)) return null;- return `${s || "0"}-${e || "inf"}`;- }-- function toEpochMs(v: string): number | null {- if (!v) return null;- const ms = new Date(v).getTime();- if (Number.isNaN(ms)) return null;- return ms;- }-- function setSchedulePreset(kind: "1h" | "tonight" | "1d") {- const d = new Date();- if (kind === "1h") d.setHours(d.getHours() + 1);- else if (kind === "1d") d.setDate(d.getDate() + 1);- else {- d.setHours(22, 0, 0, 0);- if (d.getTime() < Date.now()) d.setDate(d.getDate() + 1);- }- const pad = (n: number) => String(n).padStart(2, "0");- scheduleAt = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;- }-- function handleInput() {- if (debounceTimer) clearTimeout(debounceTimer);- clearMediaPreview();- clipStart = "";- clipEnd = "";- scheduleAt = "";- scheduleStop = "";- cookieHint = null;- playlistEntries = [];- selectedPlaylistItems = new Set();- playlistLoading = false;- torrentEntries = [];- selectedTorrentFiles = new Set();- torrentLoading = false;- const currentSettings = getSettings();- const saved = currentSettings?.last_download_options;- const savedMode = saved?.mode;- const settingsQuality = currentSettings?.download.video_quality;- selectedQuality = settingsQuality && typeof settingsQuality === "string"- ? settingsQuality- : "best";- downloadMode = savedMode === "audio" || savedMode === "mute" ? savedMode : "auto";- selectedFormatId = null;- formats = [];- loadingFormats = false;- formatError = null;- formatFetchGeneration++;- referer = "";-- const trimmed = url.trim();- if (!trimmed) {- omniState = { kind: "idle" };- return;- }-- const urls = trimmed.split(/[\s\n]+/).filter(isUrl);-- if (urls.length > 1) {- omniState = { kind: "batch", urls };- return;- }-- if (isUrl(trimmed)) {- omniState = { kind: "detecting" };- if (getSettings()?.download.auto_download_on_paste) {- pendingAutoDownload = true;- }- debounceTimer = setTimeout(() => {- detectPlatform(trimmed);- }, 500);- return;- }-- if (trimmed.length >= 2) {- omniState = { kind: "searching" };- debounceTimer = setTimeout(() => {- performSearch(trimmed);- }, 600);- } else {- omniState = { kind: "idle" };- }- }-- async function detectPlatform(value: string) {- try {- const result = await invoke<PlatformInfo>("detect_platform", { url: value });- if (result.supported) {- omniState = { kind: "detected", info: result };- invoke("prefetch_media_info", { url: value }).catch(() => {});- loadCookieAccounts(value);- if (result.content_type === "playlist") {- loadPlaylistEntries(value);- }- if (isTorrentUrl(value)) {- loadTorrentContents(value);- }- } else {- omniState = { kind: "unsupported" };- }- } catch {- omniState = { kind: "unsupported" };- }- }-- async function loadPlaylistEntries(targetUrl: string) {- playlistEntries = [];- selectedPlaylistItems = new Set();- playlistLoading = true;- try {- const entries = await invoke<{ index: number; title: string; url: string }[]>(- "playlist_entries",- { url: targetUrl }- );- playlistEntries = entries;- selectedPlaylistItems = new Set(entries.map((e) => e.index));- } catch {- playlistEntries = [];- } finally {- playlistLoading = false;- }- }-- function togglePlaylistItem(idx: number) {- const next = new Set(selectedPlaylistItems);- if (next.has(idx)) next.delete(idx);- else next.add(idx);- selectedPlaylistItems = next;- }-- function selectAllPlaylist() {- selectedPlaylistItems = new Set(playlistEntries.map((e) => e.index));- }-- function selectNonePlaylist() {- selectedPlaylistItems = new Set();- }-- function isTorrentUrl(value: string): boolean {- const v = value.trim().toLowerCase();- return v.startsWith("magnet:") || v.endsWith(".torrent");- }-- async function loadTorrentContents(targetUrl: string) {- torrentEntries = [];- selectedTorrentFiles = new Set();- torrentLoading = true;- try {- const entries = await invoke<{ index: number; path: string; size_bytes: number }[]>(- "torrent_contents",- { url: targetUrl }- );- torrentEntries = entries;- selectedTorrentFiles = new Set(entries.map((e) => e.index));- } catch {- torrentEntries = [];- } finally {- torrentLoading = false;- }- }-- function toggleTorrentFile(idx: number) {- const next = new Set(selectedTorrentFiles);- if (next.has(idx)) next.delete(idx);- else next.add(idx);- selectedTorrentFiles = next;- }-- function selectAllTorrent() {- selectedTorrentFiles = new Set(torrentEntries.map((e) => e.index));- }-- function selectNoneTorrent() {- selectedTorrentFiles = new Set();- }-- async function loadCookieAccounts(targetUrl: string) {- try {- const result = await invoke<{ domain: string; accounts: CookieAccount[] }>(- "cookies_accounts_for_url",- { url: targetUrl }- );- const accounts = result.accounts.slice().sort((a, b) => {- const lhs = a.last_used_at_ms ?? a.captured_at_ms;- const rhs = b.last_used_at_ms ?? b.captured_at_ms;- return rhs - lhs;- });- cookieAccounts = accounts;- selectedCookieSlug = accounts[0]?.slug ?? null;- cookieHint = null;- if (accounts.length > 0) {- try {- const h = await invoke<{ items: { domain: string; slug: string; status: string }[] }>(- "cookies_health"- );- const slug = selectedCookieSlug ?? "_default";- const item =- h.items.find((it) => it.domain === result.domain && it.slug === slug) ??- h.items.find((it) => it.domain === result.domain);- if (item && item.status !== "fresh") {- cookieHint = item.status === "expired" ? "expired" : "stale";- }- } catch {}- }- } catch {- cookieAccounts = [];- selectedCookieSlug = null;- cookieHint = null;- }- }-- async function performSearch(query: string) {- try {- const results = await invoke<SearchResult[]>("search_videos", {- query,- platform: "youtube",- maxResults: 6,- });- if (url.trim() !== query) return;- if (results.length > 0) {- omniState = { kind: "search-results", results };- } else {- omniState = { kind: "search-empty" };- }- } catch {- if (url.trim() === query) {- omniState = { kind: "search-empty" };- }- }- }-- function selectSearchResult(result: SearchResult) {- url = result.url;- omniState = { kind: "detecting" };- detectPlatform(result.url);- }-- function getContentTypeLabel(contentType: string | null): string {- if (!contentType) return $t("omnibox.content_type.unknown");- const key = `omnibox.content_type.${contentType}`;- const result = $t(key);- if (result === key) return $t("omnibox.content_type.unknown");- return result;- }--- async function loadFormats() {- if (loadingFormats) return;- if (formats.length > 0) {- formats = [];- selectedFormatId = null;- formatError = null;- return;- }- const targetUrl = url.trim();- if (!targetUrl) {- formatError = $t("omnibox.formats_error");- return;- }- loadingFormats = true;- formatError = null;- const gen = ++formatFetchGeneration;- try {- const result = await invoke<FormatInfo[]>("get_media_formats", { url: targetUrl });- if (gen !== formatFetchGeneration) return;- formats = result;- if (result.length === 0) {- formatError = $t("omnibox.no_formats");- }- } catch (e: any) {- if (gen !== formatFetchGeneration) return;- formats = [];- const msg = typeof e === "string" ? e : e.message ?? "";- formatError = msg ? translateBackendError(msg, $t) : $t("omnibox.formats_error");- } finally {- loadingFormats = false;- }- }-- function selectFormat(formatId: string) {- selectedFormatId = formatId;- }-- function clearFormatSelection() {- selectedFormatId = null;- }-- function presetBest() {- selectedFormatId = null;- downloadMode = "auto";- selectedQuality = "best";- }-- function presetMusic() {- selectedFormatId = null;- downloadMode = "audio";- }-- function persistLastDownloadOptions() {- const saved = getSettings()?.last_download_options;- const nextMode = downloadMode;- if (saved?.mode === nextMode) return;- updateSettings({- last_download_options: {- mode: nextMode,- quality: saved?.quality ?? "best",- },- }).catch(() => {});- }-- async function handleAction() {- if (omniState.kind !== "detected") return;- const info = omniState.info;-- if (info.platform === "hotmart") {- goto(`/courses?platform=${encodeURIComponent(info.platform)}`);- return;- }-- if (info.platform === "p2p") {- const trimmed = url.trim();- const code = trimmed.replace(/^p2p:/, "");- p2pReceiveUrl = trimmed;- p2pReceiveCode = code;- return;- }-- const isPlaylist = info.content_type === "playlist" && playlistEntries.length > 0;- if (isPlaylist && selectedPlaylistItems.size === 0) {- showToast("error", $t("omnibox.playlist_none_selected") as string);- return;- }-- const isTorrent = torrentEntries.length > 0;- if (isTorrent && selectedTorrentFiles.size === 0) {- showToast("error", $t("omnibox.torrent_none_selected") as string);- return;- }-- const settings = getSettings();- let outputDir = settings?.download.default_output_dir ?? "";-- if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {- const selected = await open({- directory: true,- title: $t("settings.download.default_output_dir"),- });- if (!selected) return;- outputDir = selected;- }-- const currentUrl = url.trim();- const platform = info.platform;- omniState = { kind: "preparing", platform };- url = "";-- try {- await invoke<DownloadStarted>("download_from_url", {- url: currentUrl,- outputDir,- downloadMode: downloadMode === "auto" ? null : downloadMode,- quality: selectedQuality,- formatId: selectedFormatId,- referer: referer.trim() || null,- cookieSlug: selectedCookieSlug,- timeRange: buildTimeRange(),- playlistItems: isPlaylist ? [...selectedPlaylistItems] : null,- torrentFiles: isTorrent ? [...selectedTorrentFiles] : null,- scheduledAt: toEpochMs(scheduleAt),- stopAt: toEpochMs(scheduleStop),- });- persistLastDownloadOptions();- omniState = { kind: "idle" };- } catch (e: any) {- const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");- omniState = {- kind: "error",- message: msg,- originalUrl: currentUrl,- platform,- };- }- }-- async function handleBatchDownload() {- if (omniState.kind !== "batch") return;- const batchUrls = omniState.urls;-- const settings = getSettings();- let outputDir = settings?.download.default_output_dir ?? "";-- if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {- const selected = await open({- directory: true,- title: $t("settings.download.default_output_dir"),- });- if (!selected) return;- outputDir = selected;- }-- omniState = { kind: "idle" };- url = "";-- const results = await Promise.allSettled(- batchUrls.map(u => invoke<DownloadStarted>("download_from_url", {- url: u,- outputDir,- downloadMode: downloadMode === "auto" ? null : downloadMode,- quality: selectedQuality,- formatId: null,- referer: null,- cookieSlug: null,- }))- );-- const queued = results.filter(r => r.status === "fulfilled").length;- if (queued > 0) {- showToast("info", $t("omnibox.batch_queued", { count: queued }));- persistLastDownloadOptions();- }- }-- function handleRetry() {- if (omniState.kind !== "error") return;- url = omniState.originalUrl;- omniState = { kind: "detecting" };- detectPlatform(url.trim());- }-- async function handleP2pAccept() {- const currentUrl = p2pReceiveUrl;- p2pReceiveCode = null;- p2pReceiveUrl = "";-- const settings = getSettings();- let outputDir = settings?.download.default_output_dir ?? "";-- if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {- const selected = await open({- directory: true,- title: $t("settings.download.default_output_dir"),- });- if (!selected) return;- outputDir = selected;- }-- omniState = { kind: "preparing", platform: "p2p" };- url = "";-- try {- await invoke("download_from_url", {- url: currentUrl,- outputDir,- downloadMode: null,- quality: "best",- formatId: null,- referer: null,- cookieSlug: null,- });- omniState = { kind: "idle" };- } catch (e: any) {- const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");- omniState = { kind: "error", message: msg, originalUrl: currentUrl, platform: "p2p" };- }- }-- function handleP2pReject() {- p2pReceiveCode = null;- p2pReceiveUrl = "";- }-- async function openTorrentFile() {- const selected = await open({- title: "Select .torrent file",- filters: [{ name: "Torrent", extensions: ["torrent"] }],- multiple: false,- });- if (selected && typeof selected === "string") {- url = selected;- handleInput();- }- }-- async function openBatchFile() {- const selected = await open({- title: $t("omnibox.batch_file_title"),- filters: [{ name: "Text", extensions: ["txt"] }],- multiple: false,- });- if (!selected || typeof selected !== "string") return;- try {- const urls = await invoke<string[]>("parse_batch_file", { path: selected });- if (urls.length === 0) {- showToast("info", $t("omnibox.batch_file_empty"));- return;- }- if (urls.length === 1) {- url = urls[0];- handleInput();- return;- }- url = urls.join("\n");- omniState = { kind: "batch", urls };- } catch (e: any) {- const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");- showToast("error", msg);- }- }-- function handleDismiss() {- clearMediaPreview();- omniState = { kind: "idle" };- url = "";- }-</script>--<div class="home">- {#if STUDY_MAINTENANCE_NOTICE && !studyNoticeDismissed}- <div class="study-maintenance-banner" role="status">- <div class="study-maintenance-text">- <strong>{$t("study.maintenance.home_banner_title")}</strong>- <span>{$t("study.maintenance.home_banner_body")}</span>- </div>- <button- type="button"- class="study-maintenance-dismiss"- onclick={dismissStudyNotice}- aria-label={$t('common.close')}- >- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <path d="M18 6L6 18M6 6l12 12" />- </svg>- </button>- </div>- {/if}-- <HomeHero- emotion={mascotEmotion}- compact={mascotCompact}- bubbleText={bubbleText || undefined}- celebrate={mascotEmotion === "amazed"}- />-- <div class="omnibox-area">- <div class="mode-toggle-row">- <button- type="button"- class="mode-toggle-btn"- class:active={!advancedMode}- onclick={() => { advancedMode = false; }}- >- {$t('omnibox.mode_normal')}- </button>- <button- type="button"- class="mode-toggle-btn"- class:active={advancedMode}- onclick={() => { advancedMode = true; }}- >- {$t('omnibox.mode_advanced')}- </button>- </div>-- {#if advancedMode}- <OmniboxAdvanced />- {:else}- {#if externalNotice}- <div class="feedback-card feedback-enter external-url-card">- <div class="card-row">- <svg class="card-status-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <path d="M12 5v14" />- <path d="M5 12h14" />- </svg>- <span class="card-title">{$t('omnibox.external_url_ready')}</span>- <button class="dismiss-btn" onclick={() => { externalNotice = null; }} aria-label={$t('common.close')}>- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <path d="M18 6L6 18M6 6l12 12" />- </svg>- </button>- </div>- <div class="card-row">- <span class="card-subtext external-url-text">{externalNotice.url}</span>- </div>- </div>- {/if}-- {#if showLoopIcon}- <img- src="/loop.png"- alt=""- width="40"- height="40"- class="loop-icon"- class:loop-bounce={omniState.kind === "detected" || omniState.kind === "batch"}- class:loop-pulse={omniState.kind === "preparing"}- />- {/if}-- {#if omniState.kind === "detecting"}- <div class="feedback feedback-enter">- <span class="feedback-spinner"></span>- </div>-- {:else if omniState.kind === "detected"}- <div class="feedback feedback-enter" data-supported="true">- <span class="feedback-text">- {platformDisplayName(omniState.info.platform)}- {#if omniState.info.content_type}- <span class="feedback-sep">·</span>- {getContentTypeLabel(omniState.info.content_type)}- {/if}- </span>- </div>- {/if}-- {#if showOmnibox}- <OmniboxInput bind:url onInput={handleInput} />- {/if}-- {#if omniState.kind === "detected"}- <MediaPreview bind:mediaPreview bind:imageLoading={previewImageLoading} />-- {#if omniState.info.content_type === "playlist"}- <div class="playlist-picker">- <div class="playlist-head">- <span class="playlist-count">- {$t('omnibox.playlist_selected', { selected: selectedPlaylistItems.size, total: playlistEntries.length })}- </span>- {#if !playlistLoading && playlistEntries.length > 0}- <div class="playlist-bulk">- <button type="button" class="playlist-link" onclick={selectAllPlaylist}>{$t('omnibox.playlist_all')}</button>- <button type="button" class="playlist-link" onclick={selectNonePlaylist}>{$t('omnibox.playlist_none')}</button>- </div>- {/if}- </div>- {#if playlistLoading}- <div class="playlist-status"><span class="feedback-spinner"></span> {$t('omnibox.playlist_loading')}</div>- {:else if playlistEntries.length === 0}- <span class="playlist-status">{$t('omnibox.playlist_empty')}</span>- {:else}- <ul class="playlist-list">- {#each playlistEntries as entry (entry.index)}- <li>- <label class="playlist-item">- <input- type="checkbox"- checked={selectedPlaylistItems.has(entry.index)}- onchange={() => togglePlaylistItem(entry.index)}- />- <span class="playlist-idx">{entry.index}.</span>- <span class="playlist-title">{entry.title}</span>- </label>- </li>- {/each}- </ul>- {/if}- </div>- {/if}-- {#if torrentLoading || torrentEntries.length > 0}- <div class="playlist-picker">- <div class="playlist-head">- <span class="playlist-count">- {$t('omnibox.torrent_selected', { selected: selectedTorrentFiles.size, total: torrentEntries.length })}- </span>- {#if !torrentLoading && torrentEntries.length > 0}- <div class="playlist-bulk">- <button type="button" class="playlist-link" onclick={selectAllTorrent}>{$t('omnibox.playlist_all')}</button>- <button type="button" class="playlist-link" onclick={selectNoneTorrent}>{$t('omnibox.playlist_none')}</button>- </div>- {/if}- </div>- {#if torrentLoading}- <div class="playlist-status"><span class="feedback-spinner"></span> {$t('omnibox.torrent_loading')}</div>- {:else}- <ul class="playlist-list">- {#each torrentEntries as entry (entry.index)}- <li>- <label class="playlist-item">- <input- type="checkbox"- checked={selectedTorrentFiles.has(entry.index)}- onchange={() => toggleTorrentFile(entry.index)}- />- <span class="playlist-title">{entry.path}</span>- <span class="torrent-size">{formatBytes(entry.size_bytes)}</span>- </label>- </li>- {/each}- </ul>- {/if}- </div>- {/if}-- {#if cookieHint}- <p class="cookie-hint" class:expired={cookieHint === "expired"} role="status">- <svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">- <path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" />- <line x1="12" y1="9" x2="12" y2="13" />- <line x1="12" y1="17" x2="12.01" y2="17" />- </svg>- <span>- {cookieHint === "expired"- ? $t("omnibox.cookie_hint_expired")- : $t("omnibox.cookie_hint_stale")}- </span>- <button type="button" class="cookie-hint-link" onclick={() => goto("/settings?tab=cookies")}>- {$t("omnibox.cookie_hint_action")}- </button>- </p>- {/if}-- {#if omniState.info.platform === "hotmart"}- <button class="button action-btn" onclick={handleAction}>- {$t('omnibox.go_to_hotmart')}- </button>- {:else}- {@const playlistBlocked = omniState.info.content_type === "playlist" && playlistEntries.length > 0 && selectedPlaylistItems.size === 0}- {@const torrentBlocked = torrentEntries.length > 0 && selectedTorrentFiles.size === 0}- {#if omniState.info.platform === "bilibili"}- <BilibiliPreviewExtras {url} accountSlug={selectedCookieSlug && selectedCookieSlug !== "_anonymous" ? selectedCookieSlug : null} />- {/if}- <button class="download-primary-btn" disabled={playlistBlocked || torrentBlocked} onclick={handleAction}>- {$t('omnibox.download')}- </button>-- {#if omniState.info.platform !== "direct_file"}- <details class="options-panel">- <summary class="options-toggle">{$t('omnibox.options')}</summary>- <div class="options-content">- <DownloadModeSelector bind:downloadMode onChange={() => { selectedFormatId = null; }} />- <QualityPicker bind:selectedQuality selectedFormatId />- {#if cookieAccounts.length > 1}- <CookieAccountPicker accounts={cookieAccounts} bind:selectedSlug={selectedCookieSlug} />- {/if}-- <details class="options-panel">- <summary class="options-toggle">{$t('omnibox.advanced')}</summary>- <div class="options-content">- {#if omniState.info.platform === "vimeo" || omniState.info.platform === "generic"}- <div class="referer-input-wrapper">- <label class="referer-label" for="referer-input">{$t('omnibox.referer_label')}</label>- <input- id="referer-input"- class="referer-input"- type="text"- placeholder={$t('omnibox.referer_placeholder')}- bind:value={referer}- spellcheck="false"- />- </div>- {/if}-- {#if omniState.info.content_type !== "playlist"}- <div class="timerange-wrapper">- <span class="timerange-label">{$t('omnibox.timerange_label')}</span>- <div class="timerange-inputs">- <input- class="timerange-input"- type="text"- placeholder={$t('omnibox.timerange_start')}- bind:value={clipStart}- spellcheck="false"- inputmode="numeric"- aria-label={$t('omnibox.timerange_start') as string}- />- <span class="timerange-sep" aria-hidden="true">—</span>- <input- class="timerange-input"- type="text"- placeholder={$t('omnibox.timerange_end')}- bind:value={clipEnd}- spellcheck="false"- inputmode="numeric"- aria-label={$t('omnibox.timerange_end') as string}- />- </div>- <span class="timerange-hint">{$t('omnibox.timerange_hint')}</span>- </div>- {/if}-- <div class="timerange-wrapper">- <span class="timerange-label">{$t('omnibox.schedule_label')}</span>- <div class="schedule-presets">- <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('1h')}>{$t('omnibox.schedule_1h')}</button>- <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('tonight')}>{$t('omnibox.schedule_tonight')}</button>- <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('1d')}>{$t('omnibox.schedule_1d')}</button>- {#if scheduleAt || scheduleStop}- <button type="button" class="schedule-preset" onclick={() => { scheduleAt = ""; scheduleStop = ""; }}>{$t('omnibox.schedule_clear')}</button>- {/if}- </div>- <div class="timerange-inputs">- <input- class="timerange-input schedule-input"- type="datetime-local"- bind:value={scheduleAt}- aria-label={$t('omnibox.schedule_start') as string}- />- <span class="timerange-sep" aria-hidden="true">—</span>- <input- class="timerange-input schedule-input"- type="datetime-local"- bind:value={scheduleStop}- aria-label={$t('omnibox.schedule_stop') as string}- />- </div>- <span class="timerange-hint">{$t('omnibox.schedule_hint')}</span>- </div>-- <FormatSelector- platform={omniState.info.platform}- isPlaylist={omniState.info.content_type === "playlist"}- bind:formats- bind:selectedFormatId- {loadingFormats}- {formatError}- onLoadFormats={loadFormats}- onSelectFormat={selectFormat}- onClearFormat={clearFormatSelection}- onPresetBest={presetBest}- onPresetMusic={presetMusic}- />- </div>- </details>- </div>- </details>- {/if}- {/if}-- {:else if omniState.kind === "batch"}- <BatchDownload count={omniState.urls.length} onDownload={handleBatchDownload} />-- {:else if omniState.kind === "searching"}- <div class="feedback feedback-enter">- <span class="feedback-spinner"></span>- <span class="feedback-text search-hint">{$t('omnibox.searching')}</span>- </div>-- {:else if omniState.kind === "search-results"}- <SearchResults results={omniState.results} onSelect={selectSearchResult} />-- {:else if omniState.kind === "search-empty"}- <div class="feedback feedback-enter" data-supported="false">- <svg class="feedback-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <circle cx="11" cy="11" r="8" />- <path d="M21 21l-4.35-4.35" />- </svg>- <span class="feedback-text">{$t('omnibox.search_empty')}</span>- </div>-- {:else if omniState.kind === "unsupported"}- <div class="feedback feedback-enter" data-supported="false">- <svg class="feedback-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <circle cx="12" cy="12" r="10" />- <path d="M12 8v4m0 4h.01" />- </svg>- <span class="feedback-text">{$t('omnibox.unsupported')}</span>- </div>-- {:else if omniState.kind === "preparing"}- <div class="feedback-card feedback-enter">- <div class="card-row">- <span class="feedback-spinner"></span>- <span class="card-text">{$t('omnibox.preparing')}</span>- </div>- </div>-- {:else if omniState.kind === "error"}- <div class="feedback-card feedback-enter" data-status="error">- <div class="card-row">- <svg class="card-status-icon error" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <circle cx="12" cy="12" r="10" />- <path d="M12 8v4m0 4h.01" />- </svg>- <span class="card-title card-error-text">{omniState.message}</span>- <button class="dismiss-btn" onclick={handleDismiss} aria-label={$t('common.close')}>- <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <path d="M18 6L6 18M6 6l12 12" />- </svg>- </button>- </div>- <div class="card-row card-actions">- <span class="card-subtext">{$t('omnibox.error')}</span>- <button class="button card-action-btn" onclick={handleRetry}>- {$t('omnibox.retry')}- </button>- </div>- </div>- {/if}- {/if}- </div>-- {#if showP2pSendDialog}- <P2pSendDialog onClose={() => { showP2pSendDialog = false; }} />- {/if}-- {#if p2pReceiveCode}- <P2pReceiveDialog- code={p2pReceiveCode}- onAccept={handleP2pAccept}- onReject={handleP2pReject}- />- {/if}-- {#if omniState.kind === "idle"}- <SupportedServices />- {/if}-- <div class="quick-actions">- <button class="quick-action-btn" onclick={() => { showP2pSendDialog = true; }}>- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <path d="M22 2L11 13" />- <path d="M22 2L15 22 11 13 2 9z" />- </svg>- {$t("p2p.send_file")}- </button>- <button class="quick-action-btn" onclick={openTorrentFile}>- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <circle cx="12" cy="12" r="3" />- <circle cx="5" cy="6" r="2" />- <circle cx="19" cy="6" r="2" />- <path d="M9.5 10.5L6.5 7.5" />- <path d="M14.5 10.5l3-3" />- </svg>- {$t("torrent.open_file")}- </button>- <button class="quick-action-btn" onclick={openBatchFile}>- <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">- <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />- <polyline points="14 2 14 8 20 8" />- <line x1="8" y1="13" x2="16" y2="13" />- <line x1="8" y1="17" x2="16" y2="17" />- </svg>- {$t("omnibox.batch_file_open")}- </button>- </div>-- <div class="terms-note">- {$t('terms_note.agreement')}- <a href="/about/terms" class="terms-link">{$t('terms_note.link')}</a>- </div>-</div>--<style>- .home {- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- min-height: calc(100vh - var(--space-7));- gap: var(--space-6);- padding: var(--space-5) var(--space-3);- }-- .study-maintenance-banner {- display: flex;- align-items: center;- gap: var(--space-2);- width: 100%;- max-width: 640px;- padding: 8px 12px;- background: color-mix(in oklab, var(--secondary) 8%, transparent);- border: 1px solid color-mix(in oklab, var(--secondary) 18%, transparent);- border-radius: var(--border-radius);- color: var(--secondary);- font-size: 12px;- line-height: 1.4;- }-- .study-maintenance-text {- display: flex;- flex-direction: column;- gap: 1px;- flex: 1;- min-width: 0;- }-- .study-maintenance-text strong {- font-weight: 500;- font-size: 12.5px;- color: var(--text);- }-- .study-maintenance-text span {- color: var(--secondary);- font-size: 11.5px;- }-- .study-maintenance-dismiss {- background: transparent;- border: none;- padding: 4px;- margin: -4px;- border-radius: 4px;- color: var(--secondary);- cursor: pointer;- display: flex;- align-items: center;- justify-content: center;- opacity: 0.55;- transition: opacity 0.15s ease, background 0.15s ease;- }-- .study-maintenance-dismiss:hover {- opacity: 1;- background: color-mix(in oklab, var(--text) 6%, transparent);- }-- .omnibox-area {- display: flex;- flex-direction: column;- align-items: center;- gap: var(--space-3);- width: 100%;- max-width: 640px;- }-- .mode-toggle-row {- display: inline-flex;- background: var(--button);- border-radius: var(--border-radius);- padding: 3px;- gap: 2px;- margin-bottom: 4px;- }- .mode-toggle-btn {- padding: 5px 14px;- font-size: 11.5px;- font-weight: 500;- color: var(--gray);- background: transparent;- border: none;- border-radius: calc(var(--border-radius) - 3px);- cursor: pointer;- }- .mode-toggle-btn.active {- background: var(--cta);- color: var(--on-cta);- }- .mode-toggle-btn:not(.active):hover {- color: var(--secondary);- background: var(--button-elevated);- }-- .loop-icon {- pointer-events: none;- border-radius: 10px;- user-select: none;- }-- .loop-bounce {- animation: loopBounce 400ms cubic-bezier(0.34, 1.56, 0.64, 1);- }-- @keyframes loopBounce {- 0% {- opacity: 0;- transform: scale(0.6) translateY(6px);- }- 60% {- opacity: 1;- transform: scale(1.08) translateY(-2px);- }- 100% {- transform: scale(1) translateY(0);- }- }-- .loop-pulse {- animation: loopPulse 1.8s ease-in-out infinite;- }-- @keyframes loopPulse {- 0%, 100% {- opacity: 1;- transform: scale(1);- }- 50% {- opacity: 0.7;- transform: scale(0.95);- }- }-- .feedback {- display: flex;- align-items: center;- gap: calc(var(--padding) / 2);- }-- .feedback-icon {- flex-shrink: 0;- pointer-events: none;- }-- .feedback[data-supported="true"] {- color: var(--green);- }-- .feedback[data-supported="false"] {- color: var(--gray);- }-- .feedback-text {- font-size: 12.5px;- font-weight: 500;- }-- .feedback-sep {- opacity: 0.5;- margin: 0 2px;- }-- .feedback-spinner {- width: 16px;- height: 16px;- border: 2px solid var(--input-border);- border-top-color: var(--secondary);- border-radius: 50%;- animation: spin 0.8s linear infinite;- }-- @keyframes spin {- to {- transform: rotate(360deg);- }- }-- .feedback-enter {- animation: feedbackEnter 300ms cubic-bezier(0.34, 1.56, 0.64, 1);- }-- @keyframes feedbackEnter {- from {- opacity: 0;- transform: scale(0.9);- }- to {- opacity: 1;- transform: scale(1);- }- }-- .download-primary-btn {- background: var(--cta);- color: var(--on-cta);- font-size: 15px;- font-weight: 500;- padding: 12px 32px;- border-radius: var(--border-radius);- border: none;- cursor: pointer;- width: 100%;- max-width: 300px;- transition: background 150ms;- }-- @media (hover: hover) {- .download-primary-btn:hover {- background: var(--cta-hover);- }- }-- .download-primary-btn:active {- background: var(--cta-press);- }-- .download-primary-btn:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);- }-- .download-primary-btn:disabled {- opacity: 0.5;- cursor: not-allowed;- }-- .playlist-picker {- width: 100%;- display: flex;- flex-direction: column;- gap: 8px;- padding: 10px 12px;- background: var(--button);- border: 1px solid var(--input-border);- border-radius: var(--border-radius);- }-- .playlist-head {- display: flex;- align-items: center;- justify-content: space-between;- gap: 8px;- }-- .playlist-count {- font-size: 12.5px;- font-weight: 500;- color: var(--secondary);- }-- .playlist-bulk {- display: flex;- gap: 10px;- }-- .playlist-link {- background: none;- border: none;- padding: 0;- font: inherit;- font-size: 12px;- color: var(--accent);- cursor: pointer;- }-- .playlist-link:hover {- text-decoration: underline;- }-- .playlist-status {- display: flex;- align-items: center;- gap: 6px;- font-size: 12.5px;- color: var(--gray);- }-- .playlist-list {- list-style: none;- margin: 0;- padding: 0;- max-height: 220px;- overflow-y: auto;- display: flex;- flex-direction: column;- gap: 2px;- }-- .playlist-item {- display: flex;- align-items: center;- gap: 8px;- padding: 5px 4px;- border-radius: calc(var(--border-radius) - 3px);- cursor: pointer;- font-size: 13px;- color: var(--secondary);- }-- .playlist-item:hover {- background: var(--button-elevated);- }-- .playlist-idx {- color: var(--gray);- font-variant-numeric: tabular-nums;- flex-shrink: 0;- }-- .playlist-title {- flex: 1;- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- }-- .torrent-size {- margin-left: auto;- flex-shrink: 0;- padding-left: 8px;- color: var(--gray);- font-variant-numeric: tabular-nums;- }-- .options-panel {- width: 100%;- }-- .options-toggle {- font-size: 12.5px;- font-weight: 500;- color: var(--gray);- cursor: pointer;- list-style: none;- text-align: center;- padding: 4px 0;- user-select: none;- }-- .options-toggle::-webkit-details-marker {- display: none;- }-- .options-toggle::marker {- content: "";- }-- @media (hover: hover) {- .options-toggle:hover {- color: var(--secondary);- }- }-- .options-content {- display: flex;- flex-direction: column;- gap: var(--padding);- padding-top: var(--padding);- width: 100%;- }-- .referer-input-wrapper {- display: flex;- flex-direction: column;- gap: 4px;- }-- .referer-label {- font-size: 12.5px;- font-weight: 500;- color: var(--gray);- }-- .referer-input {- padding: 6px var(--padding);- font-size: 13px;- background: var(--button);- border: 1px solid var(--input-border);- border-radius: calc(var(--border-radius) - 2px);- color: var(--secondary);- }-- .referer-input::placeholder {- color: var(--gray);- }-- .referer-input:focus-visible {- border-color: var(--secondary);- outline: none;- }-- .timerange-wrapper {- display: flex;- flex-direction: column;- gap: 4px;- }-- .timerange-label {- font-size: 12.5px;- font-weight: 500;- color: var(--gray);- }-- .timerange-inputs {- display: flex;- align-items: center;- gap: 8px;- }-- .timerange-input {- width: 96px;- padding: 6px var(--padding);- font-size: 13px;- background: var(--button);- border: 1px solid var(--input-border);- border-radius: calc(var(--border-radius) - 2px);- color: var(--secondary);- text-align: center;- }-- .timerange-input::placeholder {- color: var(--gray);- }-- .timerange-input:focus-visible {- border-color: var(--secondary);- outline: none;- }-- .timerange-sep {- color: var(--gray);- }-- .timerange-hint {- font-size: 11.5px;- color: var(--gray);- }-- .schedule-presets {- display: flex;- flex-wrap: wrap;- gap: 6px;- margin-bottom: 6px;- }-- .schedule-preset {- padding: 4px 10px;- font-size: 12px;- background: var(--button);- border: 1px solid var(--input-border);- border-radius: calc(var(--border-radius) - 2px);- color: var(--text);- cursor: pointer;- }-- .schedule-preset:hover {- background: var(--button-elevated);- }-- .schedule-input {- width: auto;- flex: 1;- min-width: 0;- }-- .cookie-hint {- display: flex;- align-items: center;- gap: 6px;- margin: 0;- font-size: 12px;- color: #f4a72b;- }- .cookie-hint.expired {- color: #e0564f;- }- .cookie-hint svg {- flex-shrink: 0;- }- .cookie-hint-link {- background: none;- border: 0;- padding: 0;- font: inherit;- font-size: 12px;- color: var(--accent);- cursor: pointer;- text-decoration: underline;- text-underline-offset: 2px;- }- .cookie-hint-link:hover {- filter: brightness(1.15);- }-- .action-btn {- display: flex;- align-items: center;- justify-content: center;- gap: 6px;- padding: var(--padding) calc(var(--padding) * 2);- font-size: 14.5px;- font-weight: 500;- background: var(--button);- border: none;- border-radius: var(--border-radius);- color: var(--button-text);- cursor: pointer;- box-shadow: var(--button-box-shadow);- }-- @media (hover: hover) {- .action-btn:hover {- background: var(--button-hover);- }- }-- .action-btn:active {- background: var(--button-press);- }-- .action-btn:disabled {- cursor: default;- }-- .feedback-card {- display: flex;- flex-direction: column;- gap: var(--padding);- padding: var(--padding) calc(var(--padding) * 1.5);- background: var(--button-elevated);- border-radius: var(--border-radius);- border-left: 3px solid var(--blue);- }-- .feedback-card[data-status="error"] {- border-left-color: var(--red);- }-- .external-url-card {- width: 100%;- border-left-color: var(--accent);- }-- .card-row {- display: flex;- align-items: center;- gap: calc(var(--padding) / 2);- }-- .card-text {- font-size: 13px;- font-weight: 500;- color: var(--secondary);- }-- .card-title {- font-size: 13px;- font-weight: 500;- flex: 1;- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- }-- .card-error-text {- color: var(--secondary);- }-- .card-status-icon {- flex-shrink: 0;- pointer-events: none;- color: var(--blue);- }-- .card-status-icon.error {- color: var(--red);- }-- .card-actions {- display: flex;- align-items: center;- justify-content: space-between;- gap: var(--padding);- }-- .card-subtext {- font-size: 11.5px;- font-weight: 500;- color: var(--gray);- }-- .external-url-text {- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- }-- .card-action-btn {- padding: 6px 12px;- font-size: 13px;- }-- .dismiss-btn {- display: flex;- align-items: center;- justify-content: center;- width: 24px;- height: 24px;- background: transparent;- border: none;- cursor: pointer;- color: var(--secondary);- padding: 0;- }-- .search-hint {- color: var(--gray);- }-- .quick-actions {- display: flex;- gap: var(--space-2);- margin-bottom: var(--space-3);- }-- .quick-action-btn {- display: flex;- align-items: center;- gap: var(--space-2);- padding: var(--space-2) var(--space-4);- font-size: var(--text-sm);- border: 1px solid var(--border);- border-radius: var(--radius-sm);- background: var(--surface);- color: var(--text);- cursor: pointer;- transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);- }-- @media (hover: hover) {- .quick-action-btn:hover {- background: var(--surface-hi);- transform: translateY(-1px);- }- }-- .quick-action-btn:active {- transform: scale(0.98);- background: var(--surface-hi);- }-- .quick-action-btn svg {- opacity: 0.7;- flex-shrink: 0;- }-- @media (prefers-reduced-motion: reduce) {- .quick-action-btn {- transition: none;- }- .quick-action-btn:hover,- .quick-action-btn:active {- transform: none;- }- }-- .terms-note {- font-size: 9px;- color: var(--gray);- text-align: center;- opacity: 0.3;- }-- .terms-link {- color: var(--blue);- text-decoration: none;- }-- @media (hover: hover) {- .terms-link:hover {- text-decoration: underline;- }- }-- @media (prefers-reduced-motion: reduce) {- .feedback-enter {- animation: none;- }-- .feedback-spinner {- animation-duration: 1.5s;- }-- .loop-bounce {- animation: none;- }-- .loop-pulse {- animation: none;- }- }-</style>+<script lang="ts">+ import { invoke } from "@tauri-apps/api/core";+ import { open } from "@tauri-apps/plugin-dialog";+ import { goto } from "$app/navigation";+ import { onMount } from "svelte";+ import SupportedServices from "$components/services/SupportedServices.svelte";+ import BilibiliPreviewExtras from "$components/omnibox/BilibiliPreviewExtras.svelte";+ import DownloadModeSelector from "$components/omnibox/DownloadModeSelector.svelte";+ import QualityPicker from "$components/omnibox/QualityPicker.svelte";+ import FormatSelector from "$components/omnibox/FormatSelector.svelte";+ import CookieAccountPicker from "$components/omnibox/CookieAccountPicker.svelte";+ import OmniboxAdvanced from "$components/omnibox/OmniboxAdvanced.svelte";+ import MediaPreview from "$components/omnibox/MediaPreview.svelte";+ import BatchDownload from "$components/omnibox/BatchDownload.svelte";+ import SearchResults from "$components/omnibox/SearchResults.svelte";+ import P2pSendDialog from "$components/p2p/P2pSendDialog.svelte";+ import P2pReceiveDialog from "$components/p2p/P2pReceiveDialog.svelte";+ import HomeHero from "$components/home/HomeHero.svelte";+ import HomeUrlBar from "$components/home/HomeUrlBar.svelte";+ import HomeInspector from "$components/home/HomeInspector.svelte";+ import {+ type OmniState,+ type PlatformInfo,+ type SearchResult,+ type HomeInputMode,+ showInspectorForState,+ showOmniboxForState,+ isUrl,+ } from "$lib/home/omnibox-controller";+ import { getDownloads, formatBytes } from "$lib/stores/download-store.svelte";+ import { getSettings, updateSettings } from "$lib/stores/settings-store.svelte";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import { onClipboardUrl } from "$lib/stores/clipboard-monitor";+ import { getMediaPreview, clearMediaPreview } from "$lib/stores/media-preview-store.svelte";+ import { clearPendingExternalPrefill, getPendingExternalPrefill, type ExternalUrlEvent } from "$lib/stores/external-url-store.svelte";+ import { getOmniboxDraftUrl, setOmniboxDraftUrl } from "$lib/stores/omnibox-draft-store.svelte";+ import { t } from "$lib/i18n";+ import { translateBackendError } from "$lib/error-translate";+ import { platformDisplayName } from "$lib/platform-display-names";+ import { STUDY_MAINTENANCE_NOTICE } from "$lib/study-feature-flags";++ type DownloadStarted = {+ id: number;+ title: string;+ };++ type FormatInfo = {+ format_id: string;+ ext: string;+ resolution: string | null;+ width: number | null;+ height: number | null;+ fps: number | null;+ vcodec: string | null;+ acodec: string | null;+ filesize: number | null;+ tbr: number | null;+ has_video: boolean;+ has_audio: boolean;+ format_note: string | null;+ };+++ let url = $state(getOmniboxDraftUrl());+ let homeInputMode = $state<HomeInputMode>("url");+ let omniState = $state<OmniState>({ kind: "idle" });+ let debounceTimer = $state<ReturnType<typeof setTimeout> | null>(null);+ let downloadMode = $state<"auto" | "audio" | "mute">("auto");+ let selectedQuality = $state("best");+ let clipStart = $state("");+ let clipEnd = $state("");+ let scheduleAt = $state("");+ let scheduleStop = $state("");+ let playlistEntries = $state<{ index: number; title: string; url: string }[]>([]);+ let selectedPlaylistItems = $state<Set<number>>(new Set());+ let playlistLoading = $state(false);+ let torrentEntries = $state<{ index: number; path: string; size_bytes: number }[]>([]);+ let selectedTorrentFiles = $state<Set<number>>(new Set());+ let torrentLoading = $state(false);+ let selectedFormatId = $state<string | null>(null);+ let formats = $state<FormatInfo[]>([]);+ let loadingFormats = $state(false);+ let formatError = $state<string | null>(null);+ let formatFetchGeneration = $state(0);+ let referer = $state("");++ type CookieAccount = {+ slug: string;+ alias: string;+ captured_at_ms: number;+ cookie_count: number;+ last_used_at_ms: number | null;+ };+ let cookieAccounts = $state<CookieAccount[]>([]);+ let selectedCookieSlug = $state<string | null>(null);+ let cookieHint = $state<"stale" | "expired" | null>(null);+ let advancedMode = $state(false);+ const STUDY_NOTICE_DISMISS_KEY = "omniget.study_maintenance_notice_dismissed_v1";+ let studyNoticeDismissed = $state(+ typeof localStorage !== "undefined"+ && localStorage.getItem(STUDY_NOTICE_DISMISS_KEY) === "1"+ );+ function dismissStudyNotice() {+ studyNoticeDismissed = true;+ try { localStorage.setItem(STUDY_NOTICE_DISMISS_KEY, "1"); } catch {}+ }+ let mediaPreview = $derived(getMediaPreview());+ let pendingExternalPrefill = $derived(getPendingExternalPrefill());+ let previewImageLoading = $state(true);+ let showP2pSendDialog = $state(false);+ let p2pReceiveCode = $state<string | null>(null);+ let p2pReceiveUrl = $state("");+ let externalNotice = $state<ExternalUrlEvent | null>(null);+ let lastExternalPrefillId = $state<number | null>(null);+ let pendingAutoDownload = $state(false);++ onMount(() => {+ onClipboardUrl((detectedUrl) => {+ if (omniState.kind === "preparing") return;+ url = detectedUrl;+ const settings = getSettings();+ const autoDownload = !!(settings?.download.auto_download_on_paste && settings?.download.clipboard_detection);+ pendingAutoDownload = autoDownload;+ handleInput();+ showToast("info", $t(autoDownload ? "toast.auto_download_started" : "toast.clipboard_url_detected"));+ });+ if (url.trim()) {+ queueMicrotask(() => handleInput());+ }+ return () => {+ onClipboardUrl(null);+ };+ });++ $effect(() => {+ setOmniboxDraftUrl(url);+ });++ const AUTO_DOWNLOAD_DELAY_MS = 2000;++ $effect(() => {+ if (!pendingAutoDownload) return;+ if (omniState.kind === "detected") {+ const info = omniState.info;+ if (info.platform === "hotmart" || info.platform === "p2p") {+ pendingAutoDownload = false;+ return;+ }+ pendingAutoDownload = false;+ const snapshotUrl = url;+ setTimeout(() => {+ if (url === snapshotUrl && omniState.kind === "detected") {+ handleAction();+ }+ }, AUTO_DOWNLOAD_DELAY_MS);+ } else if (+ omniState.kind === "unsupported" ||+ omniState.kind === "error" ||+ omniState.kind === "batch" ||+ omniState.kind === "search-results" ||+ omniState.kind === "search-empty" ||+ omniState.kind === "idle"+ ) {+ pendingAutoDownload = false;+ }+ });++ const STALL_THRESHOLD = 30_000;+ let downloads = $derived(getDownloads());+ let stallTick = $state(0);+ let lastCompletionAt = $state(0);+ let firstCompletionOfSession = $state(false);+ let completionSeenIds = new Set<string | number>();++ $effect(() => {+ for (const [id, item] of downloads.entries()) {+ if (item.status === "complete" && !completionSeenIds.has(id)) {+ completionSeenIds.add(id);+ lastCompletionAt = Date.now();+ if (!firstCompletionOfSession) {+ firstCompletionOfSession = true;+ }+ break;+ }+ }+ });++ $effect(() => {+ const interval = setInterval(() => { stallTick++; }, 5000);+ return () => clearInterval(interval);+ });+++ $effect(() => {+ if (mediaPreview) {+ previewImageLoading = true;+ }+ });++ $effect(() => {+ const incoming = pendingExternalPrefill;+ if (!incoming || incoming.id === lastExternalPrefillId) {+ return;+ }++ lastExternalPrefillId = incoming.id;+ clearPendingExternalPrefill(incoming.id);+ externalNotice = incoming;++ if (incoming.action !== "prefill") {+ return;+ }++ url = incoming.url;+ if (getSettings()?.download.auto_download_on_paste) {+ pendingAutoDownload = true;+ }+ handleInput();+ });++ let mascotEmotion = $derived.by((): "idle" | "downloading" | "error" | "stalled" | "queue" | "complete" | "amazed" => {+ void stallTick;++ if (lastCompletionAt > 0 && Date.now() - lastCompletionAt < 5000) {+ return firstCompletionOfSession && completionSeenIds.size === 1 ? "amazed" : "complete";+ }++ if (omniState.kind === "preparing") return "downloading";+ if (omniState.kind === "error") return "error";++ let hasActiveDownloading = false;+ let hasActiveStalled = false;+ let hasItems = false;+ for (const item of downloads.values()) {+ hasItems = true;+ if (item.status === "downloading") {+ hasActiveDownloading = true;+ const elapsed = Date.now() - item.lastUpdateAt;+ if (elapsed > STALL_THRESHOLD) {+ hasActiveStalled = true;+ }+ }+ }++ if (hasActiveStalled) return "stalled";+ if (hasActiveDownloading) return "downloading";+ if (hasItems) return "queue";+ return "idle";+ });++ let mascotCompact = $derived(omniState.kind !== "idle");++ function pickRandom(raw: string): string {+ if (raw.includes("|")) {+ const opts = raw.split("|");+ return opts[Math.floor(Math.random() * opts.length)];+ }+ return raw;+ }++ let lastBubbleKey = $state("");+ let bubbleText = $state("");++ $effect(() => {+ let key: string;+ if (mascotEmotion === "amazed") key = "amazed";+ else if (mascotEmotion === "complete") key = "complete";+ else if (mascotEmotion === "queue") key = "queue";+ else if (mascotEmotion === "downloading") key = "downloading";+ else if (mascotEmotion === "stalled") key = "stalled";+ else {+ switch (omniState.kind) {+ case "idle": key = "idle"; break;+ case "detecting": key = "detecting"; break;+ case "detected": key = "detected"; break;+ case "preparing": key = "preparing"; break;+ case "searching":+ case "search-results": key = "search"; break;+ case "error": key = "error"; break;+ default: key = ""; break;+ }+ }+ if (key && key !== lastBubbleKey) {+ lastBubbleKey = key;+ bubbleText = pickRandom($t(`mascot.${key}`));+ } else if (!key) {+ lastBubbleKey = "";+ bubbleText = "";+ }+ });++ let showLoopIcon = $derived(+ omniState.kind === "detected" ||+ omniState.kind === "preparing" ||+ omniState.kind === "batch"+ );++ let showOmnibox = $derived(showOmniboxForState(omniState));+ let showInspector = $derived(showInspectorForState(omniState));++ function isValidTimeBound(v: string): boolean {+ return /^(\d+:)?\d{1,2}:\d{1,2}(\.\d+)?$|^\d+(\.\d+)?$/.test(v.trim());+ }++ function buildTimeRange(): string | null {+ const s = clipStart.trim();+ const e = clipEnd.trim();+ if (!s && !e) return null;+ if (s && !isValidTimeBound(s)) return null;+ if (e && !isValidTimeBound(e)) return null;+ return `${s || "0"}-${e || "inf"}`;+ }++ function toEpochMs(v: string): number | null {+ if (!v) return null;+ const ms = new Date(v).getTime();+ if (Number.isNaN(ms)) return null;+ return ms;+ }++ function setSchedulePreset(kind: "1h" | "tonight" | "1d") {+ const d = new Date();+ if (kind === "1h") d.setHours(d.getHours() + 1);+ else if (kind === "1d") d.setDate(d.getDate() + 1);+ else {+ d.setHours(22, 0, 0, 0);+ if (d.getTime() < Date.now()) d.setDate(d.getDate() + 1);+ }+ const pad = (n: number) => String(n).padStart(2, "0");+ scheduleAt = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}`;+ }++ function handleInput() {+ if (debounceTimer) clearTimeout(debounceTimer);+ clearMediaPreview();+ clipStart = "";+ clipEnd = "";+ scheduleAt = "";+ scheduleStop = "";+ cookieHint = null;+ playlistEntries = [];+ selectedPlaylistItems = new Set();+ playlistLoading = false;+ torrentEntries = [];+ selectedTorrentFiles = new Set();+ torrentLoading = false;+ const currentSettings = getSettings();+ const saved = currentSettings?.last_download_options;+ const savedMode = saved?.mode;+ const settingsQuality = currentSettings?.download.video_quality;+ selectedQuality = settingsQuality && typeof settingsQuality === "string"+ ? settingsQuality+ : "best";+ downloadMode = savedMode === "audio" || savedMode === "mute" ? savedMode : "auto";+ selectedFormatId = null;+ formats = [];+ loadingFormats = false;+ formatError = null;+ formatFetchGeneration++;+ referer = "";++ const trimmed = url.trim();+ if (!trimmed) {+ omniState = { kind: "idle" };+ return;+ }++ const urls = trimmed.split(/[\s\n]+/).filter(isUrl);++ if (urls.length > 1) {+ omniState = { kind: "batch", urls };+ return;+ }++ if (isUrl(trimmed)) {+ omniState = { kind: "detecting" };+ if (getSettings()?.download.auto_download_on_paste) {+ pendingAutoDownload = true;+ }+ debounceTimer = setTimeout(() => {+ detectPlatform(trimmed);+ }, 500);+ return;+ }++ if (trimmed.length >= 2) {+ omniState = { kind: "searching" };+ debounceTimer = setTimeout(() => {+ performSearch(trimmed);+ }, 600);+ } else {+ omniState = { kind: "idle" };+ }+ }++ async function detectPlatform(value: string) {+ try {+ const result = await invoke<PlatformInfo>("detect_platform", { url: value });+ if (result.supported) {+ omniState = { kind: "detected", info: result };+ invoke("prefetch_media_info", { url: value }).catch(() => {});+ loadCookieAccounts(value);+ if (result.content_type === "playlist") {+ loadPlaylistEntries(value);+ }+ if (isTorrentUrl(value)) {+ loadTorrentContents(value);+ }+ } else {+ omniState = { kind: "unsupported" };+ }+ } catch {+ omniState = { kind: "unsupported" };+ }+ }++ async function loadPlaylistEntries(targetUrl: string) {+ playlistEntries = [];+ selectedPlaylistItems = new Set();+ playlistLoading = true;+ try {+ const entries = await invoke<{ index: number; title: string; url: string }[]>(+ "playlist_entries",+ { url: targetUrl }+ );+ playlistEntries = entries;+ selectedPlaylistItems = new Set(entries.map((e) => e.index));+ } catch {+ playlistEntries = [];+ } finally {+ playlistLoading = false;+ }+ }++ function togglePlaylistItem(idx: number) {+ const next = new Set(selectedPlaylistItems);+ if (next.has(idx)) next.delete(idx);+ else next.add(idx);+ selectedPlaylistItems = next;+ }++ function selectAllPlaylist() {+ selectedPlaylistItems = new Set(playlistEntries.map((e) => e.index));+ }++ function selectNonePlaylist() {+ selectedPlaylistItems = new Set();+ }++ function isTorrentUrl(value: string): boolean {+ const v = value.trim().toLowerCase();+ return v.startsWith("magnet:") || v.endsWith(".torrent");+ }++ async function loadTorrentContents(targetUrl: string) {+ torrentEntries = [];+ selectedTorrentFiles = new Set();+ torrentLoading = true;+ try {+ const entries = await invoke<{ index: number; path: string; size_bytes: number }[]>(+ "torrent_contents",+ { url: targetUrl }+ );+ torrentEntries = entries;+ selectedTorrentFiles = new Set(entries.map((e) => e.index));+ } catch {+ torrentEntries = [];+ } finally {+ torrentLoading = false;+ }+ }++ function toggleTorrentFile(idx: number) {+ const next = new Set(selectedTorrentFiles);+ if (next.has(idx)) next.delete(idx);+ else next.add(idx);+ selectedTorrentFiles = next;+ }++ function selectAllTorrent() {+ selectedTorrentFiles = new Set(torrentEntries.map((e) => e.index));+ }++ function selectNoneTorrent() {+ selectedTorrentFiles = new Set();+ }++ async function loadCookieAccounts(targetUrl: string) {+ try {+ const result = await invoke<{ domain: string; accounts: CookieAccount[] }>(+ "cookies_accounts_for_url",+ { url: targetUrl }+ );+ const accounts = result.accounts.slice().sort((a, b) => {+ const lhs = a.last_used_at_ms ?? a.captured_at_ms;+ const rhs = b.last_used_at_ms ?? b.captured_at_ms;+ return rhs - lhs;+ });+ cookieAccounts = accounts;+ selectedCookieSlug = accounts[0]?.slug ?? null;+ cookieHint = null;+ if (accounts.length > 0) {+ try {+ const h = await invoke<{ items: { domain: string; slug: string; status: string }[] }>(+ "cookies_health"+ );+ const slug = selectedCookieSlug ?? "_default";+ const item =+ h.items.find((it) => it.domain === result.domain && it.slug === slug) ??+ h.items.find((it) => it.domain === result.domain);+ if (item && item.status !== "fresh") {+ cookieHint = item.status === "expired" ? "expired" : "stale";+ }+ } catch {}+ }+ } catch {+ cookieAccounts = [];+ selectedCookieSlug = null;+ cookieHint = null;+ }+ }++ async function performSearch(query: string) {+ try {+ const results = await invoke<SearchResult[]>("search_videos", {+ query,+ platform: "youtube",+ maxResults: 6,+ });+ if (url.trim() !== query) return;+ if (results.length > 0) {+ omniState = { kind: "search-results", results };+ } else {+ omniState = { kind: "search-empty" };+ }+ } catch {+ if (url.trim() === query) {+ omniState = { kind: "search-empty" };+ }+ }+ }++ function selectSearchResult(result: SearchResult) {+ url = result.url;+ omniState = { kind: "detecting" };+ detectPlatform(result.url);+ }++ function getContentTypeLabel(contentType: string | null): string {+ if (!contentType) return $t("omnibox.content_type.unknown");+ const key = `omnibox.content_type.${contentType}`;+ const result = $t(key);+ if (result === key) return $t("omnibox.content_type.unknown");+ return result;+ }+++ async function loadFormats() {+ if (loadingFormats) return;+ if (formats.length > 0) {+ formats = [];+ selectedFormatId = null;+ formatError = null;+ return;+ }+ const targetUrl = url.trim();+ if (!targetUrl) {+ formatError = $t("omnibox.formats_error");+ return;+ }+ loadingFormats = true;+ formatError = null;+ const gen = ++formatFetchGeneration;+ try {+ const result = await invoke<FormatInfo[]>("get_media_formats", { url: targetUrl });+ if (gen !== formatFetchGeneration) return;+ formats = result;+ if (result.length === 0) {+ formatError = $t("omnibox.no_formats");+ }+ } catch (e: any) {+ if (gen !== formatFetchGeneration) return;+ formats = [];+ const msg = typeof e === "string" ? e : e.message ?? "";+ formatError = msg ? translateBackendError(msg, $t) : $t("omnibox.formats_error");+ } finally {+ loadingFormats = false;+ }+ }++ function selectFormat(formatId: string) {+ selectedFormatId = formatId;+ }++ function clearFormatSelection() {+ selectedFormatId = null;+ }++ function presetBest() {+ selectedFormatId = null;+ downloadMode = "auto";+ selectedQuality = "best";+ }++ function presetMusic() {+ selectedFormatId = null;+ downloadMode = "audio";+ }++ function persistLastDownloadOptions() {+ const saved = getSettings()?.last_download_options;+ const nextMode = downloadMode;+ if (saved?.mode === nextMode) return;+ updateSettings({+ last_download_options: {+ mode: nextMode,+ quality: saved?.quality ?? "best",+ },+ }).catch(() => {});+ }++ async function handleAction() {+ if (omniState.kind !== "detected") return;+ const info = omniState.info;++ if (info.platform === "hotmart") {+ goto(`/courses?platform=${encodeURIComponent(info.platform)}`);+ return;+ }++ if (info.platform === "p2p") {+ const trimmed = url.trim();+ const code = trimmed.replace(/^p2p:/, "");+ p2pReceiveUrl = trimmed;+ p2pReceiveCode = code;+ return;+ }++ const isPlaylist = info.content_type === "playlist" && playlistEntries.length > 0;+ if (isPlaylist && selectedPlaylistItems.size === 0) {+ showToast("error", $t("omnibox.playlist_none_selected") as string);+ return;+ }++ const isTorrent = torrentEntries.length > 0;+ if (isTorrent && selectedTorrentFiles.size === 0) {+ showToast("error", $t("omnibox.torrent_none_selected") as string);+ return;+ }++ const settings = getSettings();+ let outputDir = settings?.download.default_output_dir ?? "";++ if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {+ const selected = await open({+ directory: true,+ title: $t("settings.download.default_output_dir"),+ });+ if (!selected) return;+ outputDir = selected;+ }++ const currentUrl = url.trim();+ const platform = info.platform;+ omniState = { kind: "preparing", platform };+ url = "";++ try {+ await invoke<DownloadStarted>("download_from_url", {+ url: currentUrl,+ outputDir,+ downloadMode: downloadMode === "auto" ? null : downloadMode,+ quality: selectedQuality,+ formatId: selectedFormatId,+ referer: referer.trim() || null,+ cookieSlug: selectedCookieSlug,+ timeRange: buildTimeRange(),+ playlistItems: isPlaylist ? [...selectedPlaylistItems] : null,+ torrentFiles: isTorrent ? [...selectedTorrentFiles] : null,+ scheduledAt: toEpochMs(scheduleAt),+ stopAt: toEpochMs(scheduleStop),+ });+ persistLastDownloadOptions();+ omniState = { kind: "idle" };+ } catch (e: any) {+ const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");+ omniState = {+ kind: "error",+ message: msg,+ originalUrl: currentUrl,+ platform,+ };+ }+ }++ async function handleBatchDownload() {+ if (omniState.kind !== "batch") return;+ const batchUrls = omniState.urls;++ const settings = getSettings();+ let outputDir = settings?.download.default_output_dir ?? "";++ if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {+ const selected = await open({+ directory: true,+ title: $t("settings.download.default_output_dir"),+ });+ if (!selected) return;+ outputDir = selected;+ }++ omniState = { kind: "idle" };+ url = "";++ const results = await Promise.allSettled(+ batchUrls.map(u => invoke<DownloadStarted>("download_from_url", {+ url: u,+ outputDir,+ downloadMode: downloadMode === "auto" ? null : downloadMode,+ quality: selectedQuality,+ formatId: null,+ referer: null,+ cookieSlug: null,+ }))+ );++ const queued = results.filter(r => r.status === "fulfilled").length;+ if (queued > 0) {+ showToast("info", $t("omnibox.batch_queued", { count: queued }));+ persistLastDownloadOptions();+ }+ }++ function handleRetry() {+ if (omniState.kind !== "error") return;+ url = omniState.originalUrl;+ omniState = { kind: "detecting" };+ detectPlatform(url.trim());+ }++ async function handleP2pAccept() {+ const currentUrl = p2pReceiveUrl;+ p2pReceiveCode = null;+ p2pReceiveUrl = "";++ const settings = getSettings();+ let outputDir = settings?.download.default_output_dir ?? "";++ if ((settings?.download.always_ask_path && !settings?.download.auto_download_on_paste) || !outputDir) {+ const selected = await open({+ directory: true,+ title: $t("settings.download.default_output_dir"),+ });+ if (!selected) return;+ outputDir = selected;+ }++ omniState = { kind: "preparing", platform: "p2p" };+ url = "";++ try {+ await invoke("download_from_url", {+ url: currentUrl,+ outputDir,+ downloadMode: null,+ quality: "best",+ formatId: null,+ referer: null,+ cookieSlug: null,+ });+ omniState = { kind: "idle" };+ } catch (e: any) {+ const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");+ omniState = { kind: "error", message: msg, originalUrl: currentUrl, platform: "p2p" };+ }+ }++ function handleP2pReject() {+ p2pReceiveCode = null;+ p2pReceiveUrl = "";+ }++ async function openTorrentFile() {+ const selected = await open({+ title: "Select .torrent file",+ filters: [{ name: "Torrent", extensions: ["torrent"] }],+ multiple: false,+ });+ if (selected && typeof selected === "string") {+ url = selected;+ handleInput();+ }+ }++ async function openBatchFile() {+ const selected = await open({+ title: $t("omnibox.batch_file_title"),+ filters: [{ name: "Text", extensions: ["txt"] }],+ multiple: false,+ });+ if (!selected || typeof selected !== "string") return;+ try {+ const urls = await invoke<string[]>("parse_batch_file", { path: selected });+ if (urls.length === 0) {+ showToast("info", $t("omnibox.batch_file_empty"));+ return;+ }+ if (urls.length === 1) {+ url = urls[0];+ handleInput();+ return;+ }+ url = urls.join("\n");+ omniState = { kind: "batch", urls };+ } catch (e: any) {+ const msg = typeof e === "string" ? e : e.message ?? $t("omnibox.error");+ showToast("error", msg);+ }+ }++ function handleHomeModeChange(mode: HomeInputMode) {+ if (mode === "p2p") {+ showP2pSendDialog = true;+ } else if (mode === "torrent") {+ void openTorrentFile();+ } else if (mode === "batch") {+ void openBatchFile();+ }+ }++ function handleDismiss() {+ clearMediaPreview();+ omniState = { kind: "idle" };+ url = "";+ }+</script>++<div class="home-mac">+ {#if STUDY_MAINTENANCE_NOTICE && !studyNoticeDismissed}+ <div class="study-maintenance-banner" role="status">+ <div class="study-maintenance-text">+ <strong>{$t("study.maintenance.home_banner_title")}</strong>+ <span>{$t("study.maintenance.home_banner_body")}</span>+ </div>+ <button+ type="button"+ class="study-maintenance-dismiss"+ onclick={dismissStudyNotice}+ aria-label={$t('common.close')}+ >+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <path d="M18 6L6 18M6 6l12 12" />+ </svg>+ </button>+ </div>+ {/if}++ <div class="home-mac-workspace">+ <div class="home-mac-hero">+ <HomeHero+ emotion={mascotEmotion}+ compact={mascotCompact}+ bubbleText={bubbleText || undefined}+ celebrate={mascotEmotion === "amazed"}+ />+ </div>+ <div class="home-mac-main">+ <div class="mode-toggle-row">+ <button+ type="button"+ class="mode-toggle-btn"+ class:active={!advancedMode}+ onclick={() => { advancedMode = false; }}+ >+ {$t('omnibox.mode_normal')}+ </button>+ <button+ type="button"+ class="mode-toggle-btn"+ class:active={advancedMode}+ onclick={() => { advancedMode = true; }}+ >+ {$t('omnibox.mode_advanced')}+ </button>+ </div>++ {#if advancedMode}+ <OmniboxAdvanced />+ {:else}+ {#if externalNotice}+ <div class="feedback-card feedback-enter external-url-card">+ <div class="card-row">+ <svg class="card-status-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 5v14" />+ <path d="M5 12h14" />+ </svg>+ <span class="card-title">{$t('omnibox.external_url_ready')}</span>+ <button class="dismiss-btn" onclick={() => { externalNotice = null; }} aria-label={$t('common.close')}>+ <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M18 6L6 18M6 6l12 12" />+ </svg>+ </button>+ </div>+ <div class="card-row">+ <span class="card-subtext external-url-text">{externalNotice.url}</span>+ </div>+ </div>+ {/if}++ {#if showLoopIcon}+ <img+ src="/loop.png"+ alt=""+ width="40"+ height="40"+ class="loop-icon"+ class:loop-bounce={omniState.kind === "detected" || omniState.kind === "batch"}+ class:loop-pulse={omniState.kind === "preparing"}+ />+ {/if}++ {#if omniState.kind === "detecting"}+ <div class="feedback feedback-enter">+ <span class="feedback-spinner"></span>+ </div>++ {:else if omniState.kind === "detected"}+ <div class="feedback feedback-enter" data-supported="true">+ <span class="feedback-text">+ {platformDisplayName(omniState.info.platform)}+ {#if omniState.info.content_type}+ <span class="feedback-sep">·</span>+ {getContentTypeLabel(omniState.info.content_type)}+ {/if}+ </span>+ </div>+ {/if}++ {#if showOmnibox && homeInputMode === "url"}+ <HomeUrlBar bind:url bind:mode={homeInputMode} onInput={handleInput} onModeChange={handleHomeModeChange} />+ {/if}++ {#if omniState.kind === "batch"}+ <BatchDownload count={omniState.urls.length} onDownload={handleBatchDownload} />++ {:else if omniState.kind === "searching"}+ <div class="feedback feedback-enter">+ <span class="feedback-spinner"></span>+ <span class="feedback-text search-hint">{$t('omnibox.searching')}</span>+ </div>++ {:else if omniState.kind === "search-results"}+ <SearchResults results={omniState.results} onSelect={selectSearchResult} />++ {:else if omniState.kind === "search-empty"}+ <div class="feedback feedback-enter" data-supported="false">+ <svg class="feedback-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <circle cx="11" cy="11" r="8" />+ <path d="M21 21l-4.35-4.35" />+ </svg>+ <span class="feedback-text">{$t('omnibox.search_empty')}</span>+ </div>++ {:else if omniState.kind === "unsupported"}+ <div class="feedback feedback-enter" data-supported="false">+ <svg class="feedback-icon" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <circle cx="12" cy="12" r="10" />+ <path d="M12 8v4m0 4h.01" />+ </svg>+ <span class="feedback-text">{$t('omnibox.unsupported')}</span>+ </div>+ {/if}+ {/if}++ {#if omniState.kind === "idle"}+ <SupportedServices />+ {/if}+ </div>++ <HomeInspector open={showInspector} title={$t('home.inspector_title')}>+ {#if omniState.kind === "detected"}+ <MediaPreview bind:mediaPreview bind:imageLoading={previewImageLoading} />+ {#if omniState.info.content_type === "playlist"}+ <div class="playlist-picker">+ <div class="playlist-head">+ <span class="playlist-count">+ {$t('omnibox.playlist_selected', { selected: selectedPlaylistItems.size, total: playlistEntries.length })}+ </span>+ {#if !playlistLoading && playlistEntries.length > 0}+ <div class="playlist-bulk">+ <button type="button" class="playlist-link" onclick={selectAllPlaylist}>{$t('omnibox.playlist_all')}</button>+ <button type="button" class="playlist-link" onclick={selectNonePlaylist}>{$t('omnibox.playlist_none')}</button>+ </div>+ {/if}+ </div>+ {#if playlistLoading}+ <div class="playlist-status"><span class="feedback-spinner"></span> {$t('omnibox.playlist_loading')}</div>+ {:else if playlistEntries.length === 0}+ <span class="playlist-status">{$t('omnibox.playlist_empty')}</span>+ {:else}+ <ul class="playlist-list">+ {#each playlistEntries as entry (entry.index)}+ <li>+ <label class="playlist-item">+ <input type="checkbox" checked={selectedPlaylistItems.has(entry.index)} onchange={() => togglePlaylistItem(entry.index)} />+ <span class="playlist-idx">{entry.index}.</span>+ <span class="playlist-title">{entry.title}</span>+ </label>+ </li>+ {/each}+ </ul>+ {/if}+ </div>+ {/if}+ {#if torrentLoading || torrentEntries.length > 0}+ <div class="playlist-picker">+ <div class="playlist-head">+ <span class="playlist-count">+ {$t('omnibox.torrent_selected', { selected: selectedTorrentFiles.size, total: torrentEntries.length })}+ </span>+ {#if !torrentLoading && torrentEntries.length > 0}+ <div class="playlist-bulk">+ <button type="button" class="playlist-link" onclick={selectAllTorrent}>{$t('omnibox.playlist_all')}</button>+ <button type="button" class="playlist-link" onclick={selectNoneTorrent}>{$t('omnibox.playlist_none')}</button>+ </div>+ {/if}+ </div>+ {#if torrentLoading}+ <div class="playlist-status"><span class="feedback-spinner"></span> {$t('omnibox.torrent_loading')}</div>+ {:else}+ <ul class="playlist-list">+ {#each torrentEntries as entry (entry.index)}+ <li>+ <label class="playlist-item">+ <input type="checkbox" checked={selectedTorrentFiles.has(entry.index)} onchange={() => toggleTorrentFile(entry.index)} />+ <span class="playlist-title">{entry.path}</span>+ <span class="torrent-size">{formatBytes(entry.size_bytes)}</span>+ </label>+ </li>+ {/each}+ </ul>+ {/if}+ </div>+ {/if}+ {#if cookieHint}+ <p class="cookie-hint" class:expired={cookieHint === "expired"} role="status">+ <span>{cookieHint === "expired" ? $t("omnibox.cookie_hint_expired") : $t("omnibox.cookie_hint_stale")}</span>+ <button type="button" class="cookie-hint-link" onclick={() => goto("/settings?tab=cookies")}>{$t("omnibox.cookie_hint_action")}</button>+ </p>+ {/if}+ {#if omniState.info.platform === "hotmart"}+ <button class="button action-btn" onclick={handleAction}>{$t('omnibox.go_to_hotmart')}</button>+ {:else}+ {@const playlistBlocked = omniState.info.content_type === "playlist" && playlistEntries.length > 0 && selectedPlaylistItems.size === 0}+ {@const torrentBlocked = torrentEntries.length > 0 && selectedTorrentFiles.size === 0}+ {#if omniState.info.platform === "bilibili"}+ <BilibiliPreviewExtras {url} accountSlug={selectedCookieSlug && selectedCookieSlug !== "_anonymous" ? selectedCookieSlug : null} />+ {/if}+ <button class="download-primary-btn" disabled={playlistBlocked || torrentBlocked} onclick={handleAction}>{$t('omnibox.download')}</button>+ {#if omniState.info.platform !== "direct_file"}+ <details class="options-panel">+ <summary class="options-toggle">{$t('omnibox.options')}</summary>+ <div class="options-content">+ <DownloadModeSelector bind:downloadMode onChange={() => { selectedFormatId = null; }} />+ <QualityPicker bind:selectedQuality selectedFormatId />+ {#if cookieAccounts.length > 1}+ <CookieAccountPicker accounts={cookieAccounts} bind:selectedSlug={selectedCookieSlug} />+ {/if}+ <details class="options-panel">+ <summary class="options-toggle">{$t('omnibox.advanced')}</summary>+ <div class="options-content">+ {#if omniState.info.platform === "vimeo" || omniState.info.platform === "generic"}+ <div class="referer-input-wrapper">+ <label class="referer-label" for="referer-input">{$t('omnibox.referer_label')}</label>+ <input id="referer-input" class="referer-input" type="text" placeholder={$t('omnibox.referer_placeholder')} bind:value={referer} spellcheck="false" />+ </div>+ {/if}+ {#if omniState.info.content_type !== "playlist"}+ <div class="timerange-wrapper">+ <span class="timerange-label">{$t('omnibox.timerange_label')}</span>+ <div class="timerange-inputs">+ <input class="timerange-input" type="text" placeholder={$t('omnibox.timerange_start')} bind:value={clipStart} spellcheck="false" inputmode="numeric" aria-label={$t('omnibox.timerange_start') as string} />+ <span class="timerange-sep" aria-hidden="true">—</span>+ <input class="timerange-input" type="text" placeholder={$t('omnibox.timerange_end')} bind:value={clipEnd} spellcheck="false" inputmode="numeric" aria-label={$t('omnibox.timerange_end') as string} />+ </div>+ <span class="timerange-hint">{$t('omnibox.timerange_hint')}</span>+ </div>+ {/if}+ <div class="timerange-wrapper">+ <span class="timerange-label">{$t('omnibox.schedule_label')}</span>+ <div class="schedule-presets">+ <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('1h')}>{$t('omnibox.schedule_1h')}</button>+ <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('tonight')}>{$t('omnibox.schedule_tonight')}</button>+ <button type="button" class="schedule-preset" onclick={() => setSchedulePreset('1d')}>{$t('omnibox.schedule_1d')}</button>+ {#if scheduleAt || scheduleStop}+ <button type="button" class="schedule-preset" onclick={() => { scheduleAt = ""; scheduleStop = ""; }}>{$t('omnibox.schedule_clear')}</button>+ {/if}+ </div>+ <div class="timerange-inputs">+ <input class="timerange-input schedule-input" type="datetime-local" bind:value={scheduleAt} aria-label={$t('omnibox.schedule_start') as string} />+ <span class="timerange-sep" aria-hidden="true">—</span>+ <input class="timerange-input schedule-input" type="datetime-local" bind:value={scheduleStop} aria-label={$t('omnibox.schedule_stop') as string} />+ </div>+ <span class="timerange-hint">{$t('omnibox.schedule_hint')}</span>+ </div>+ <FormatSelector+ platform={omniState.info.platform}+ isPlaylist={omniState.info.content_type === "playlist"}+ bind:formats+ bind:selectedFormatId+ {loadingFormats}+ {formatError}+ onLoadFormats={loadFormats}+ onSelectFormat={selectFormat}+ onClearFormat={clearFormatSelection}+ onPresetBest={presetBest}+ onPresetMusic={presetMusic}+ />+ </div>+ </details>+ </div>+ </details>+ {/if}+ {/if}+ {:else if omniState.kind === "preparing"}+ <div class="feedback-card feedback-enter">+ <div class="card-row">+ <span class="feedback-spinner"></span>+ <span class="card-text">{$t('omnibox.preparing')}</span>+ </div>+ </div>+ {:else if omniState.kind === "error"}+ <div class="feedback-card feedback-enter" data-status="error">+ <div class="card-row">+ <span class="card-title card-error-text">{omniState.message}</span>+ </div>+ <div class="card-row card-actions">+ <button class="button card-action-btn" onclick={handleRetry}>{$t('omnibox.retry')}</button>+ </div>+ </div>+ {/if}+ </HomeInspector>+ </div>++ {#if showP2pSendDialog}+ <P2pSendDialog onClose={() => { showP2pSendDialog = false; }} />+ {/if}++ {#if p2pReceiveCode}+ <P2pReceiveDialog+ code={p2pReceiveCode}+ onAccept={handleP2pAccept}+ onReject={handleP2pReject}+ />+ {/if}++ <div class="terms-note">+ {$t('terms_note.agreement')}+ <a href="/about/terms" class="terms-link">{$t('terms_note.link')}</a>+ </div>+</div>++<style>+ .home-mac {+ width: 100%;+ }++ .study-maintenance-banner {+ display: flex;+ align-items: center;+ gap: var(--space-2);+ width: 100%;+ max-width: 640px;+ padding: 8px 12px;+ background: color-mix(in oklab, var(--secondary) 8%, transparent);+ border: 1px solid color-mix(in oklab, var(--secondary) 18%, transparent);+ border-radius: var(--border-radius);+ color: var(--secondary);+ font-size: 12px;+ line-height: 1.4;+ }++ .study-maintenance-text {+ display: flex;+ flex-direction: column;+ gap: 1px;+ flex: 1;+ min-width: 0;+ }++ .study-maintenance-text strong {+ font-weight: 500;+ font-size: 12.5px;+ color: var(--text);+ }++ .study-maintenance-text span {+ color: var(--secondary);+ font-size: 11.5px;+ }++ .study-maintenance-dismiss {+ background: transparent;+ border: none;+ padding: 4px;+ margin: -4px;+ border-radius: 4px;+ color: var(--secondary);+ cursor: pointer;+ display: flex;+ align-items: center;+ justify-content: center;+ opacity: 0.55;+ transition: opacity 0.15s ease, background 0.15s ease;+ }++ .study-maintenance-dismiss:hover {+ opacity: 1;+ background: color-mix(in oklab, var(--text) 6%, transparent);+ }++ .omnibox-area {+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: var(--space-3);+ width: 100%;+ max-width: 640px;+ }++ .mode-toggle-row {+ display: inline-flex;+ background: var(--button);+ border-radius: var(--border-radius);+ padding: 3px;+ gap: 2px;+ margin-bottom: 4px;+ }+ .mode-toggle-btn {+ padding: 5px 14px;+ font-size: 11.5px;+ font-weight: 500;+ color: var(--gray);+ background: transparent;+ border: none;+ border-radius: calc(var(--border-radius) - 3px);+ cursor: pointer;+ }+ .mode-toggle-btn.active {+ background: var(--cta);+ color: var(--on-cta);+ }+ .mode-toggle-btn:not(.active):hover {+ color: var(--secondary);+ background: var(--button-elevated);+ }++ .loop-icon {+ pointer-events: none;+ border-radius: 10px;+ user-select: none;+ }++ .loop-bounce {+ animation: loopBounce 400ms cubic-bezier(0.34, 1.56, 0.64, 1);+ }++ @keyframes loopBounce {+ 0% {+ opacity: 0;+ transform: scale(0.6) translateY(6px);+ }+ 60% {+ opacity: 1;+ transform: scale(1.08) translateY(-2px);+ }+ 100% {+ transform: scale(1) translateY(0);+ }+ }++ .loop-pulse {+ animation: loopPulse 1.8s ease-in-out infinite;+ }++ @keyframes loopPulse {+ 0%, 100% {+ opacity: 1;+ transform: scale(1);+ }+ 50% {+ opacity: 0.7;+ transform: scale(0.95);+ }+ }++ .feedback {+ display: flex;+ align-items: center;+ gap: calc(var(--padding) / 2);+ }++ .feedback-icon {+ flex-shrink: 0;+ pointer-events: none;+ }++ .feedback[data-supported="true"] {+ color: var(--green);+ }++ .feedback[data-supported="false"] {+ color: var(--gray);+ }++ .feedback-text {+ font-size: 12.5px;+ font-weight: 500;+ }++ .feedback-sep {+ opacity: 0.5;+ margin: 0 2px;+ }++ .feedback-spinner {+ width: 16px;+ height: 16px;+ border: 2px solid var(--input-border);+ border-top-color: var(--secondary);+ border-radius: 50%;+ animation: spin 0.8s linear infinite;+ }++ @keyframes spin {+ to {+ transform: rotate(360deg);+ }+ }++ .feedback-enter {+ animation: feedbackEnter 300ms cubic-bezier(0.34, 1.56, 0.64, 1);+ }++ @keyframes feedbackEnter {+ from {+ opacity: 0;+ transform: scale(0.9);+ }+ to {+ opacity: 1;+ transform: scale(1);+ }+ }++ .download-primary-btn {+ background: var(--cta);+ color: var(--on-cta);+ font-size: 15px;+ font-weight: 500;+ padding: 12px 32px;+ border-radius: var(--border-radius);+ border: none;+ cursor: pointer;+ width: 100%;+ max-width: 300px;+ transition: background 150ms;+ }++ @media (hover: hover) {+ .download-primary-btn:hover {+ background: var(--cta-hover);+ }+ }++ .download-primary-btn:active {+ background: var(--cta-press);+ }++ .download-primary-btn:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }++ .download-primary-btn:disabled {+ opacity: 0.5;+ cursor: not-allowed;+ }++ .playlist-picker {+ width: 100%;+ display: flex;+ flex-direction: column;+ gap: 8px;+ padding: 10px 12px;+ background: var(--button);+ border: 1px solid var(--input-border);+ border-radius: var(--border-radius);+ }++ .playlist-head {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+ }++ .playlist-count {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--secondary);+ }++ .playlist-bulk {+ display: flex;+ gap: 10px;+ }++ .playlist-link {+ background: none;+ border: none;+ padding: 0;+ font: inherit;+ font-size: 12px;+ color: var(--accent);+ cursor: pointer;+ }++ .playlist-link:hover {+ text-decoration: underline;+ }++ .playlist-status {+ display: flex;+ align-items: center;+ gap: 6px;+ font-size: 12.5px;+ color: var(--gray);+ }++ .playlist-list {+ list-style: none;+ margin: 0;+ padding: 0;+ max-height: 220px;+ overflow-y: auto;+ display: flex;+ flex-direction: column;+ gap: 2px;+ }++ .playlist-item {+ display: flex;+ align-items: center;+ gap: 8px;+ padding: 5px 4px;+ border-radius: calc(var(--border-radius) - 3px);+ cursor: pointer;+ font-size: 13px;+ color: var(--secondary);+ }++ .playlist-item:hover {+ background: var(--button-elevated);+ }++ .playlist-idx {+ color: var(--gray);+ font-variant-numeric: tabular-nums;+ flex-shrink: 0;+ }++ .playlist-title {+ flex: 1;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }++ .torrent-size {+ margin-left: auto;+ flex-shrink: 0;+ padding-left: 8px;+ color: var(--gray);+ font-variant-numeric: tabular-nums;+ }++ .options-panel {+ width: 100%;+ }++ .options-toggle {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--gray);+ cursor: pointer;+ list-style: none;+ text-align: center;+ padding: 4px 0;+ user-select: none;+ }++ .options-toggle::-webkit-details-marker {+ display: none;+ }++ .options-toggle::marker {+ content: "";+ }++ @media (hover: hover) {+ .options-toggle:hover {+ color: var(--secondary);+ }+ }++ .options-content {+ display: flex;+ flex-direction: column;+ gap: var(--padding);+ padding-top: var(--padding);+ width: 100%;+ }++ .referer-input-wrapper {+ display: flex;+ flex-direction: column;+ gap: 4px;+ }++ .referer-label {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--gray);+ }++ .referer-input {+ padding: 6px var(--padding);+ font-size: 13px;+ background: var(--button);+ border: 1px solid var(--input-border);+ border-radius: calc(var(--border-radius) - 2px);+ color: var(--secondary);+ }++ .referer-input::placeholder {+ color: var(--gray);+ }++ .referer-input:focus-visible {+ border-color: var(--secondary);+ outline: none;+ }++ .timerange-wrapper {+ display: flex;+ flex-direction: column;+ gap: 4px;+ }++ .timerange-label {+ font-size: 12.5px;+ font-weight: 500;+ color: var(--gray);+ }++ .timerange-inputs {+ display: flex;+ align-items: center;+ gap: 8px;+ }++ .timerange-input {+ width: 96px;+ padding: 6px var(--padding);+ font-size: 13px;+ background: var(--button);+ border: 1px solid var(--input-border);+ border-radius: calc(var(--border-radius) - 2px);+ color: var(--secondary);+ text-align: center;+ }++ .timerange-input::placeholder {+ color: var(--gray);+ }++ .timerange-input:focus-visible {+ border-color: var(--secondary);+ outline: none;+ }++ .timerange-sep {+ color: var(--gray);+ }++ .timerange-hint {+ font-size: 11.5px;+ color: var(--gray);+ }++ .schedule-presets {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+ margin-bottom: 6px;+ }++ .schedule-preset {+ padding: 4px 10px;+ font-size: 12px;+ background: var(--button);+ border: 1px solid var(--input-border);+ border-radius: calc(var(--border-radius) - 2px);+ color: var(--text);+ cursor: pointer;+ }++ .schedule-preset:hover {+ background: var(--button-elevated);+ }++ .schedule-input {+ width: auto;+ flex: 1;+ min-width: 0;+ }++ .cookie-hint {+ display: flex;+ align-items: center;+ gap: 6px;+ margin: 0;+ font-size: 12px;+ color: #f4a72b;+ }+ .cookie-hint.expired {+ color: #e0564f;+ }+ .cookie-hint svg {+ flex-shrink: 0;+ }+ .cookie-hint-link {+ background: none;+ border: 0;+ padding: 0;+ font: inherit;+ font-size: 12px;+ color: var(--accent);+ cursor: pointer;+ text-decoration: underline;+ text-underline-offset: 2px;+ }+ .cookie-hint-link:hover {+ filter: brightness(1.15);+ }++ .action-btn {+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 6px;+ padding: var(--padding) calc(var(--padding) * 2);+ font-size: 14.5px;+ font-weight: 500;+ background: var(--button);+ border: none;+ border-radius: var(--border-radius);+ color: var(--button-text);+ cursor: pointer;+ box-shadow: var(--button-box-shadow);+ }++ @media (hover: hover) {+ .action-btn:hover {+ background: var(--button-hover);+ }+ }++ .action-btn:active {+ background: var(--button-press);+ }++ .action-btn:disabled {+ cursor: default;+ }++ .feedback-card {+ display: flex;+ flex-direction: column;+ gap: var(--padding);+ padding: var(--padding) calc(var(--padding) * 1.5);+ background: var(--button-elevated);+ border-radius: var(--border-radius);+ border-left: 3px solid var(--blue);+ }++ .feedback-card[data-status="error"] {+ border-left-color: var(--red);+ }++ .external-url-card {+ width: 100%;+ border-left-color: var(--accent);+ }++ .card-row {+ display: flex;+ align-items: center;+ gap: calc(var(--padding) / 2);+ }++ .card-text {+ font-size: 13px;+ font-weight: 500;+ color: var(--secondary);+ }++ .card-title {+ font-size: 13px;+ font-weight: 500;+ flex: 1;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }++ .card-error-text {+ color: var(--secondary);+ }++ .card-status-icon {+ flex-shrink: 0;+ pointer-events: none;+ color: var(--blue);+ }++ .card-status-icon.error {+ color: var(--red);+ }++ .card-actions {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--padding);+ }++ .card-subtext {+ font-size: 11.5px;+ font-weight: 500;+ color: var(--gray);+ }++ .external-url-text {+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }++ .card-action-btn {+ padding: 6px 12px;+ font-size: 13px;+ }++ .dismiss-btn {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 24px;+ height: 24px;+ background: transparent;+ border: none;+ cursor: pointer;+ color: var(--secondary);+ padding: 0;+ }++ .search-hint {+ color: var(--gray);+ }++ .quick-actions {+ display: flex;+ gap: var(--space-2);+ margin-bottom: var(--space-3);+ }++ .quick-action-btn {+ display: flex;+ align-items: center;+ gap: var(--space-2);+ padding: var(--space-2) var(--space-4);+ font-size: var(--text-sm);+ border: 1px solid var(--border);+ border-radius: var(--radius-sm);+ background: var(--surface);+ color: var(--text);+ cursor: pointer;+ transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);+ }++ @media (hover: hover) {+ .quick-action-btn:hover {+ background: var(--surface-hi);+ transform: translateY(-1px);+ }+ }++ .quick-action-btn:active {+ transform: scale(0.98);+ background: var(--surface-hi);+ }++ .quick-action-btn svg {+ opacity: 0.7;+ flex-shrink: 0;+ }++ @media (prefers-reduced-motion: reduce) {+ .quick-action-btn {+ transition: none;+ }+ .quick-action-btn:hover,+ .quick-action-btn:active {+ transform: none;+ }+ }++ .terms-note {+ flex-shrink: 0;+ font-size: 9px;+ color: var(--gray);+ text-align: left;+ opacity: 0.35;+ padding: 0 var(--space-1);+ }++ .terms-link {+ color: var(--blue);+ text-decoration: none;+ }++ @media (hover: hover) {+ .terms-link:hover {+ text-decoration: underline;+ }+ }++ @media (prefers-reduced-motion: reduce) {+ .feedback-enter {+ animation: none;+ }++ .feedback-spinner {+ animation-duration: 1.5s;+ }++ .loop-bounce {+ animation: none;+ }++ .loop-pulse {+ animation: none;+ }+ }+</style>diff --git a/src/routes/about/+layout.svelte b/src/routes/about/+layout.svelteindex df33715e..565784fe 100644--- a/src/routes/about/+layout.svelte+++ b/src/routes/about/+layout.svelte@@ -7,30 +7,46 @@let { children }: { children: Snippet } = $props();const ALL_TABS = [- { href: "/about/terms", labelKey: "about.tab.terms" },- { href: "/about/project", labelKey: "about.tab.project" },- { href: "/about/roadmap", labelKey: "about.tab.roadmap" },- { href: "/about/changelog", labelKey: "about.tab.changelog" },- { href: "/about/debug", labelKey: "about.tab.debug" },+ { href: "/about", labelKey: "about.tab.overview", icon: "overview" },+ { href: "/about/changelog", labelKey: "about.tab.changelog", icon: "changelog" },+ { href: "/about/project", labelKey: "about.tab.project", icon: "project" },+ { href: "/about/terms", labelKey: "about.tab.terms", icon: "terms" },+ { href: "/about/debug", labelKey: "about.tab.debug", icon: "debug" },] as const;let visibleTabs = $derived(- isDebugEnabled() ? ALL_TABS : ALL_TABS.filter((t) => t.href !== "/about/debug")+ isDebugEnabled() ? ALL_TABS : ALL_TABS.filter((tab) => tab.href !== "/about/debug"));function isActive(href: string): boolean {- return page.url.pathname === href;+ if (href === "/about") {+ return page.url.pathname === "/about";+ }+ return page.url.pathname === href || page.url.pathname.startsWith(`${href}/`);}</script><div class="about-layout">- <nav class="about-tabs">+ <nav class="about-sidebar" aria-label={$t("nav.about")}>{#each visibleTabs as tab}<ahref={tab.href}- class="about-tab"+ class="about-nav-item"class:active={isActive(tab.href)}>+ <span class="about-nav-icon" aria-hidden="true">+ {#if tab.icon === "overview"}+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>+ {:else if tab.icon === "changelog"}+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>+ {:else if tab.icon === "project"}+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>+ {:else if tab.icon === "terms"}+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>+ {:else}+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>+ {/if}+ </span>{$t(tab.labelKey)}</a>{/each}@@ -44,64 +60,83 @@<style>.about-layout {display: flex;- flex-direction: column;- max-width: 520px;+ gap: calc(var(--padding) * 2);+ max-width: 820px;margin: 0 auto;- padding-top: calc(var(--padding) * 1.5);- gap: calc(var(--padding) * 1.5);+ padding: calc(var(--padding) * 2) calc(var(--padding) * 2) calc(var(--padding) * 4);+ align-items: flex-start;}- .about-tabs {+ .about-sidebar {display: flex;- gap: 4px;- background: var(--surface);- border-radius: var(--radius-md);- padding: 4px;- box-shadow: var(--elev-1);+ flex-direction: column;+ gap: 2px;+ width: 168px;+ flex-shrink: 0;+ position: sticky;+ top: calc(var(--padding) * 2);}- .about-tab {- flex: 1;- text-align: center;+ .about-nav-item {+ display: flex;+ align-items: center;+ gap: var(--space-2);padding: var(--space-2) var(--space-3);font-size: var(--text-sm);font-weight: 500;- color: var(--text-dim);+ color: var(--text-muted);border-radius: var(--radius-sm);- cursor: pointer;- user-select: none;text-decoration: none;transition: color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);}@media (hover: hover) {- .about-tab:hover:not(.active) {+ .about-nav-item:hover:not(.active) {color: var(--text);background: var(--surface-hi);}}- .about-tab.active {+ .about-nav-item.active {background: var(--accent-soft);color: var(--accent);cursor: default;}- @media (prefers-reduced-motion: reduce) {- .about-tab {- transition: none;- }- }-- .about-tab:focus-visible {+ .about-nav-item:focus-visible {outline: var(--focus-ring);outline-offset: var(--focus-ring-offset);}+ .about-nav-icon {+ display: flex;+ align-items: center;+ justify-content: center;+ opacity: 0.85;+ }+.about-content {+ flex: 1;+ min-width: 0;display: flex;flex-direction: column;gap: calc(var(--padding) * 1.5);- padding-bottom: calc(var(--padding) * 3);+ }++ @media (max-width: 640px) {+ .about-layout {+ flex-direction: column;+ }++ .about-sidebar {+ width: 100%;+ position: static;+ flex-direction: row;+ flex-wrap: wrap;+ }++ .about-nav-item {+ flex: 1 1 auto;+ }}</style>diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelteindex ef9eec3c..b482c977 100644--- a/src/routes/about/+page.svelte+++ b/src/routes/about/+page.svelte@@ -16,24 +16,42 @@.join(" · "));+ const cards = [+ { href: "/about/changelog", titleKey: "about.card_changelog_title", descKey: "about.card_changelog_desc" },+ { href: "/about/project", titleKey: "about.card_project_title", descKey: "about.card_project_desc" },+ { href: "/about/terms", titleKey: "about.card_terms_title", descKey: "about.card_terms_desc" },+ ] as const;+async function openAuthorGithub(e: Event) {e.preventDefault();await open("https://github.com/tonhowtf");}</script>-<div class="about-page">- <div class="about-hero">- <img src="/loop.png" alt="Loop" class="about-loop" draggable="false" />- <h1>OmniGet</h1>- <p class="about-tagline">{$t("about.tagline")}</p>- <p class="about-desc">{$t("about.description")}</p>- {#if version}- <span class="about-version">{$t("about.version")} {version}</span>- {/if}- {#if buildDetails}- <span class="about-build">{buildDetails}</span>- {/if}+<div class="about-overview">+ <header class="about-hero">+ <img src="/favicon.png" alt="" class="about-app-icon" width="64" height="64" draggable="false" />+ <div class="about-identity">+ <h1>OmniGet</h1>+ {#if version}+ <span class="about-version">{$t("about.version")} {version}</span>+ {/if}+ <p class="about-tagline">{$t("about.tagline")}</p>+ <p class="about-desc">{$t("about.description")}</p>+ {#if buildDetails}+ <span class="about-build">{buildDetails}</span>+ {/if}+ </div>+ </header>++ <div class="about-cards">+ {#each cards as card}+ <a href={card.href} class="about-card">+ <span class="about-card-title">{$t(card.titleKey)}</span>+ <span class="about-card-desc">{$t(card.descKey)}</span>+ <span class="about-card-chevron" aria-hidden="true">›</span>+ </a>+ {/each}</div><div class="about-external">@@ -51,40 +69,44 @@</a></div>- <p class="about-credit">{$t("about.credit")}</p>-- <a href="https://github.com/tonhowtf" class="about-watermark" onclick={openAuthorGithub} title="@tonhowtf">- @tonhowtf- </a>+ <footer class="about-footer">+ <p class="about-credit">{$t("about.credit")}</p>+ <a href="https://github.com/tonhowtf" class="about-watermark" onclick={openAuthorGithub} title="@tonhowtf">+ @tonhowtf+ </a>+ </footer></div><style>- .about-page {+ .about-overview {display: flex;flex-direction: column;- align-items: center;gap: calc(var(--padding) * 2);- padding: calc(var(--padding) * 3);- text-align: center;}.about-hero {display: flex;- flex-direction: column;- align-items: center;- gap: var(--padding);+ align-items: flex-start;+ gap: var(--space-4);}- .about-loop {- width: 200px;- height: 200px;- border-radius: var(--radius-full);+ .about-app-icon {+ width: 64px;+ height: 64px;+ border-radius: var(--radius-lg);object-fit: cover;- pointer-events: none;- user-select: none;+ box-shadow: var(--elev-1);+ flex-shrink: 0;}- .about-hero h1 {+ .about-identity {+ display: flex;+ flex-direction: column;+ gap: var(--space-1);+ min-width: 0;+ }++ .about-identity h1 {font-family: var(--font-display);font-size: var(--text-display);line-height: var(--leading-display);@@ -103,15 +125,14 @@font-size: var(--text-sm);color: var(--text);margin: 0;- max-width: 360px;+ max-width: 420px;+ line-height: 1.5;}.about-version {font-size: var(--text-xs);color: var(--text-dim);- background: var(--surface);- padding: var(--space-1) var(--space-3);- border-radius: var(--radius-full);+ width: fit-content;}.about-build {@@ -123,10 +144,59 @@user-select: all;}+ .about-cards {+ display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));+ gap: var(--space-3);+ }++ .about-card {+ position: relative;+ display: flex;+ flex-direction: column;+ gap: var(--space-1);+ padding: var(--space-4);+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: var(--radius-md);+ text-decoration: none;+ color: inherit;+ transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);+ }++ @media (hover: hover) {+ .about-card:hover {+ background: var(--surface-hi);+ border-color: color-mix(in srgb, var(--accent) 25%, var(--border));+ }+ }++ .about-card-title {+ font-size: var(--text-sm);+ font-weight: 600;+ color: var(--text);+ }++ .about-card-desc {+ font-size: var(--text-xs);+ color: var(--text-muted);+ line-height: 1.45;+ padding-right: var(--space-4);+ }++ .about-card-chevron {+ position: absolute;+ top: var(--space-4);+ right: var(--space-3);+ font-size: 18px;+ color: var(--text-dim);+ line-height: 1;+ }+.about-external {display: flex;- gap: 12px;- justify-content: center;+ gap: var(--space-3);+ flex-wrap: wrap;}.about-ext-link {@@ -140,48 +210,57 @@color: var(--text);font-size: var(--text-sm);text-decoration: none;- transition: background var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);+ transition: background var(--duration-fast) var(--ease-out);}@media (hover: hover) {.about-ext-link:hover {background: var(--surface-hi);- transform: translateY(-1px);- }- }-- @media (prefers-reduced-motion: reduce) {- .about-ext-link {- transition: background var(--duration-fast) var(--ease-out);- }- .about-ext-link:hover {- transform: none;}}- .about-ext-link svg {- flex-shrink: 0;+ .about-footer {+ display: flex;+ flex-direction: column;+ gap: var(--space-1);+ padding-top: var(--space-2);+ border-top: 1px solid var(--border);}.about-credit {- font-size: 12px;- color: var(--tertiary);+ font-size: var(--text-xs);+ color: var(--text-muted);margin: 0;}.about-watermark {font-size: var(--text-xs);- font-weight: 400;color: var(--text-dim);- opacity: 0.5;+ opacity: 0.6;text-decoration: none;- margin-top: var(--space-3);+ width: fit-content;transition: opacity var(--duration-fast) var(--ease-out);}@media (hover: hover) {.about-watermark:hover {- opacity: 0.9;+ opacity: 1;+ }+ }++ @media (max-width: 520px) {+ .about-cards {+ grid-template-columns: 1fr;+ }++ .about-hero {+ flex-direction: column;+ align-items: center;+ text-align: center;+ }++ .about-desc {+ max-width: none;}}</style>diff --git a/src/routes/about/roadmap/+page.svelte b/src/routes/about/roadmap/+page.sveltedeleted file mode 100644index 588e92e3..00000000--- a/src/routes/about/roadmap/+page.svelte+++ /dev/null@@ -1,153 +0,0 @@-<script lang="ts">- import { open } from "@tauri-apps/plugin-shell";- import { t } from "$lib/i18n";-- const GITHUB_ISSUES_URL = "https://github.com/tonhowtf/omniget/issues";-- async function openIssues() {- await open(GITHUB_ISSUES_URL);- }-</script>--<p class="roadmap-intro">{$t('about.roadmap_intro')}</p>--<section class="card">- <h5 class="card-title">{$t('about.roadmap_platforms_title')}</h5>- <div class="checklist">- <div class="check-item done"><span class="checkbox checked">✓</span> Kiwify</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Teachable</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Kajabi</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Skool</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Pluralsight</div>- <div class="check-item done"><span class="checkbox checked">✓</span> MasterClass</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Rocketseat</div>- <div class="check-item done"><span class="checkbox checked">✓</span> Bilibili</div>- <div class="check-item done"><span class="checkbox checked">✓</span> 30+ course platforms</div>- <div class="check-item"><span class="checkbox"></span> Hubla</div>- </div>-</section>--<section class="card">- <h5 class="card-title">{$t('about.roadmap_features_title')}</h5>- <div class="checklist">- <div class="check-item"><span class="checkbox"></span> {$t('about.roadmap_feature_telegram_multi_account')}</div>- </div>-</section>--<section class="card community-card">- <h5 class="card-title">{$t('about.roadmap_community_title')}</h5>- <p class="card-text">{$t('about.roadmap_community_text')}</p>- <div class="community-links">- <div class="community-row">- <span class="community-label">{$t('about.roadmap_community_discord')}</span>- <span class="community-value">@tonhowtf</span>- </div>- <div class="community-row">- <span class="community-label">{$t('about.roadmap_community_issue')}</span>- <button class="button community-btn" onclick={openIssues}>GitHub Issues</button>- </div>- </div>-</section>--<style>- .roadmap-intro {- font-size: 13px;- font-weight: 400;- line-height: 1.8;- color: var(--gray);- }-- .card {- width: 100%;- background: var(--button);- box-shadow: var(--button-box-shadow);- border-radius: var(--border-radius);- padding: calc(var(--padding) + 4px);- display: flex;- flex-direction: column;- gap: calc(var(--padding) / 2);- }-- .card-title {- color: var(--secondary);- }-- .card-text {- font-size: 13px;- font-weight: 400;- line-height: 1.8;- color: var(--gray);- user-select: text;- }-- .checklist {- display: flex;- flex-direction: column;- gap: 6px;- }-- .check-item {- display: flex;- align-items: center;- gap: calc(var(--padding) / 2);- font-size: 13px;- font-weight: 400;- color: var(--gray);- cursor: default;- }-- .checkbox {- width: 18px;- height: 18px;- display: flex;- align-items: center;- justify-content: center;- border-radius: 4px;- font-size: 11px;- font-weight: 600;- flex-shrink: 0;- border: 1.5px solid var(--input-border);- color: transparent;- }-- .checkbox.checked {- background: var(--green);- border-color: var(--green);- color: #fff;- }-- .check-item.done {- color: var(--secondary);- }-- .community-links {- display: flex;- flex-direction: column;- gap: calc(var(--padding) * 0.75);- }-- .community-row {- display: flex;- align-items: center;- gap: calc(var(--padding) / 2);- flex-wrap: wrap;- }-- .community-label {- font-size: 13px;- font-weight: 400;- color: var(--gray);- }-- .community-value {- font-size: 13px;- font-weight: 500;- color: var(--secondary);- user-select: text;- }-- .community-btn {- font-size: 12.5px;- padding: calc(var(--padding) / 3) calc(var(--padding) * 0.75);- }-</style>diff --git a/src/routes/marketplace/+page.svelte b/src/routes/marketplace/+page.svelteindex d9b0a5e6..9b4bc834 100644--- a/src/routes/marketplace/+page.svelte+++ b/src/routes/marketplace/+page.svelte@@ -133,6 +133,10 @@await invoke("uninstall_plugin", { pluginId: id });plugins = plugins.filter((p) => p.id !== id);delete updates[id];+ const idx = registry.findIndex((p) => p.id === id);+ if (idx >= 0) {+ registry[idx] = { ...registry[idx], installed: false, installed_version: null };+ }} catch (e: any) {const msg = typeof e === "string" ? e : e?.message ?? $t("common.error");showToast("error", msg);@@ -161,6 +165,15 @@try {await invoke("install_plugin_from_registry", { pluginId: id, repo });await refreshPlugins();+ const idx = registry.findIndex((p) => p.id === id);+ if (idx >= 0) {+ const installed = plugins.find((p) => p.id === id);+ registry[idx] = {+ ...registry[idx],+ installed: true,+ installed_version: installed?.version ?? registry[idx].installed_version,+ };+ }} catch (e: any) {const raw = typeof e === "string" ? e : e?.message ?? $t("common.error");const msg = raw.startsWith("NetworkUnreachable|")@@ -181,10 +194,12 @@showToast("error", msg);}}++ let sidebarPlugins = $derived(plugins.filter((p) => p.enabled));+ let hiddenPlugins = $derived(plugins.filter((p) => !p.enabled));</script><div class="marketplace-page">- <h1 class="page-title">{$t("marketplace.title")}</h1><div class="tabs"><button@@ -216,76 +231,23 @@</button></div>{:else}- <div class="plugin-list">- {#each plugins as plugin (plugin.id)}- <div class="plugin-card">- <div class="plugin-header">- <div class="plugin-info">- <span class="plugin-name">{plugin.name}</span>- <span class="plugin-meta">- {$t("marketplace.version", { version: plugin.version })}- {#if plugin.author}- <span class="meta-sep">·</span>- {$t("marketplace.by_author", { author: plugin.author })}- {/if}- </span>- </div>- <div class="plugin-actions">- {#if updates[plugin.id]}- <button- class="update-btn"- disabled={updatingId === plugin.id}- onclick={() => updatePlugin(plugin.id)}- >- {#if updatingId === plugin.id}- {$t("marketplace.browse_loading")}- {:else}- {$t("marketplace.update_available")}- {/if}- </button>- {/if}- <button- class="toggle-btn"- class:enabled={plugin.enabled}- onclick={() => togglePlugin(plugin.id, !plugin.enabled)}- >- {plugin.enabled ? $t("marketplace.enabled") : $t("marketplace.disabled")}- </button>- <button- class="uninstall-btn"- onclick={() => uninstallPlugin(plugin.id)}- >- {$t("marketplace.uninstall")}- </button>- </div>- </div>- {#if updates[plugin.id]}- <span class="update-hint">{$t("marketplace.update_hint", { version: updates[plugin.id].latest_version })}</span>- {/if}- {#if plugin.enabled && !plugin.loaded && plugin.load_error}- {@const incompatible =- plugin.load_error.kind === "abi_mismatch" ||- plugin.load_error.kind === "missing_abi_symbol"}- <div class="load-error" class:incompatible>- <strong>- {incompatible- ? $t("marketplace.plugin_incompatible_title")- : $t("marketplace.plugin_load_failed_title")}- </strong>- <span>- {incompatible- ? $t("marketplace.plugin_incompatible_hint")- : $t("marketplace.plugin_load_failed_hint")}- </span>- <code>{plugin.load_error.message}</code>- </div>- {/if}- {#if plugin.description}- <p class="plugin-desc">{plugin.description}</p>- {/if}- </div>- {/each}- </div>+ <p class="installed-hint">{$t("marketplace.installed_hint")}</p>+ {#if sidebarPlugins.length > 0}+ <h5 class="plugin-section-label">{$t("marketplace.section_in_sidebar")}</h5>+ <div class="plugin-list">+ {#each sidebarPlugins as plugin (plugin.id)}+ {@render installedCard(plugin)}+ {/each}+ </div>+ {/if}+ {#if hiddenPlugins.length > 0}+ <h5 class="plugin-section-label">{$t("marketplace.section_hidden")}</h5>+ <div class="plugin-list">+ {#each hiddenPlugins as plugin (plugin.id)}+ {@render installedCard(plugin)}+ {/each}+ </div>+ {/if}{/if}{:else}@@ -382,14 +344,94 @@{/if}</div>+{#snippet installedCard(plugin: PluginInfo)}+ <div class="plugin-card" class:active-sidebar={plugin.enabled}>+ <div class="plugin-header">+ <div class="plugin-info">+ <div class="plugin-name-row">+ <span class="plugin-name">{plugin.name}</span>+ <span class="status-pill" class:on={plugin.enabled}>+ {plugin.enabled ? $t("marketplace.status_in_sidebar") : $t("marketplace.status_hidden")}+ </span>+ </div>+ <span class="plugin-meta">+ {$t("marketplace.version", { version: plugin.version })}+ {#if plugin.author}+ <span class="meta-sep">·</span>+ {$t("marketplace.by_author", { author: plugin.author })}+ {/if}+ </span>+ </div>+ <div class="plugin-actions">+ {#if updates[plugin.id]}+ <button+ class="update-btn"+ disabled={updatingId === plugin.id}+ onclick={() => updatePlugin(plugin.id)}+ >+ {#if updatingId === plugin.id}+ {$t("marketplace.browse_loading")}+ {:else}+ {$t("marketplace.update_available")}+ {/if}+ </button>+ {/if}+ <div class="sidebar-toggle-row">+ <span class="sidebar-toggle-label">{$t("marketplace.show_in_sidebar")}</span>+ <button+ class="toggle"+ class:on={plugin.enabled}+ role="switch"+ aria-checked={plugin.enabled}+ aria-label={$t("marketplace.show_in_sidebar")}+ onclick={() => togglePlugin(plugin.id, !plugin.enabled)}+ >+ <span class="toggle-knob"></span>+ </button>+ </div>+ <button+ class="uninstall-btn"+ onclick={() => uninstallPlugin(plugin.id)}+ >+ {$t("marketplace.uninstall")}+ </button>+ </div>+ </div>+ {#if updates[plugin.id]}+ <span class="update-hint">{$t("marketplace.update_hint", { version: updates[plugin.id].latest_version })}</span>+ {/if}+ {#if plugin.enabled && !plugin.loaded && plugin.load_error}+ {@const incompatible =+ plugin.load_error.kind === "abi_mismatch" ||+ plugin.load_error.kind === "missing_abi_symbol"}+ <div class="load-error" class:incompatible>+ <strong>+ {incompatible+ ? $t("marketplace.plugin_incompatible_title")+ : $t("marketplace.plugin_load_failed_title")}+ </strong>+ <span>+ {incompatible+ ? $t("marketplace.plugin_incompatible_hint")+ : $t("marketplace.plugin_load_failed_hint")}+ </span>+ <code>{plugin.load_error.message}</code>+ </div>+ {/if}+ {#if plugin.description}+ <p class="plugin-desc">{plugin.description}</p>+ {/if}+ </div>+{/snippet}+<style>.marketplace-page {display: flex;flex-direction: column;gap: calc(var(--padding) * 2);width: 100%;- max-width: 700px;- margin: 0 auto;+ max-width: 720px;+ align-items: stretch;}h1 {@@ -398,15 +440,19 @@}.tabs {- display: flex;+ display: inline-flex;+ align-self: flex-start;gap: 2px;background: var(--button);border-radius: var(--border-radius);padding: 3px;+ width: fit-content;+ max-width: 100%;}.tab {- flex: 1;+ flex: 0 1 auto;+ min-width: 7rem;padding: 8px 16px;font-size: 13px;font-weight: 500;@@ -624,6 +670,102 @@.plugin-actions {flex-shrink: 0;+ display: flex;+ align-items: center;+ gap: var(--space-2);+ flex-wrap: wrap;+ justify-content: flex-end;+ }++ .installed-hint {+ font-size: var(--text-sm);+ color: var(--text-muted);+ line-height: 1.5;+ margin: 0;+ }++ .plugin-section-label {+ font-size: var(--text-xs);+ font-weight: 600;+ letter-spacing: 0.04em;+ text-transform: uppercase;+ color: var(--text-muted);+ margin: 0 0 var(--space-2);+ }++ .plugin-card.active-sidebar {+ background: color-mix(in srgb, var(--accent) 6%, var(--surface));+ }++ .status-pill {+ font-size: 10px;+ font-weight: 600;+ padding: 2px 7px;+ border-radius: var(--radius-full);+ background: var(--surface-hi);+ color: var(--text-muted);+ }++ .status-pill.on {+ background: color-mix(in srgb, var(--accent) 18%, transparent);+ color: var(--accent);+ }++ .sidebar-toggle-row {+ display: flex;+ align-items: center;+ gap: var(--space-2);+ }++ .sidebar-toggle-label {+ font-size: var(--text-xs);+ color: var(--text-muted);+ white-space: nowrap;+ }++ .toggle {+ position: relative;+ width: 44px;+ height: 24px;+ border-radius: var(--radius-full);+ background: var(--surface-hi);+ border: none;+ cursor: pointer;+ padding: 0;+ flex-shrink: 0;+ transition: background var(--duration-base) var(--ease-out);+ }++ .toggle.on {+ background: var(--accent);+ }++ .toggle-knob {+ position: absolute;+ top: 2px;+ left: 2px;+ width: 20px;+ height: 20px;+ border-radius: var(--radius-full);+ background: #fff;+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);+ transition: transform var(--duration-base) var(--ease-out);+ pointer-events: none;+ }++ .toggle.on .toggle-knob {+ transform: translateX(20px);+ }++ .toggle:focus-visible {+ outline: var(--focus-ring);+ outline-offset: var(--focus-ring-offset);+ }++ @media (prefers-reduced-motion: reduce) {+ .toggle, .toggle-knob {+ transition: none;+ }}.install-btn,@@ -704,40 +846,6 @@}}- .toggle-btn {- padding: 6px 14px;- font-size: 12px;- font-weight: 500;- border: none;- border-radius: calc(var(--border-radius) - 2px);- cursor: pointer;- background: var(--button);- color: var(--gray);- box-shadow: var(--button-box-shadow);- }-- .toggle-btn.enabled {- background: var(--cta);- color: var(--on-cta);- box-shadow: none;- }-- @media (hover: hover) {- .toggle-btn:not(.enabled):hover {- background: var(--button-hover);- color: var(--secondary);- }-- .toggle-btn.enabled:hover {- background: var(--cta-hover);- }- }-- .toggle-btn:focus-visible {- outline: var(--focus-ring);- outline-offset: var(--focus-ring-offset);- }-.tag-list {display: flex;flex-wrap: wrap;diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelteindex c677727d..ee278856 100644--- a/src/routes/settings/+page.svelte+++ b/src/routes/settings/+page.svelte@@ -1,445 +1,608 @@-<script lang="ts">- import { invoke } from "@tauri-apps/api/core";- import { open } from "@tauri-apps/plugin-dialog";- import { t, locale, loadTranslations } from "$lib/i18n";- import { getSettings, updateSettings, resetSettings } from "$lib/stores/settings-store.svelte";- import { getUpdateInfo } from "$lib/stores/update-store.svelte";- import { installUpdate } from "$lib/updater";- import { showToast } from "$lib/stores/toast-store.svelte";- import { refreshYtdlpStatus } from "$lib/stores/dependency-store.svelte";- import { isDebugEnabled, setDebugEnabled, setDebugPanelOpen } from "$lib/stores/debug-store.svelte";- import ContextHint from "$components/hints/ContextHint.svelte";- import SettingsPlugins from "$components/settings/SettingsPlugins.svelte";- import SettingsAdvanced from "$components/settings/SettingsAdvanced.svelte";- import SettingsAppearance from "$components/settings/SettingsAppearance.svelte";- import SettingsNetwork from "$components/settings/SettingsNetwork.svelte";- import SettingsDownloads from "$components/settings/SettingsDownloads.svelte";- import SettingsTypography from "$components/settings/SettingsTypography.svelte";- import SettingsBrowserExtension from "$components/settings/SettingsBrowserExtension.svelte";- import SettingsCookies from "$components/settings/SettingsCookies.svelte";- import SettingsChannels from "$components/settings/SettingsChannels.svelte";- import SettingsAI from "$components/settings/SettingsAI.svelte";-- type DependencyStatus = {- name: string;- installed: boolean;- version: string | null;- };-- let settings = $derived(getSettings());- let updateInfo = $derived(getUpdateInfo());- let isWindows = typeof navigator !== "undefined" && navigator.userAgent.includes("Windows");- let resetting = $state(false);- let updating = $state(false);- let deps = $state<DependencyStatus[]>([]);- let installingDep = $state<string | null>(null);-- async function loadDeps() {- try {- deps = await invoke<DependencyStatus[]>("check_dependencies");- } catch {}- }-- async function chooseCookieFile() {- const selected = await open({- title: "Select cookies.txt file",- filters: [{ name: "Cookies", extensions: ["txt"] }],- multiple: false,- });- if (selected && typeof selected === "string") {- await updateSettings({ download: { cookie_file: selected } });- }- }-- async function handleInstallDep(name: string, variant: string | null = null) {- const wasInstalled = deps.find((d) => d.name === name)?.installed ?? false;- installingDep = name;- try {- const version = await invoke<string>("install_dependency", { name, variant, force: wasInstalled });- await loadDeps();- await refreshYtdlpStatus();- showToast(- "success",- $t(- wasInstalled ? "settings.dependencies.update_success" : "settings.dependencies.install_success",- { name, version },- ) as string,- );- } catch (e: any) {- showToast("error", typeof e === "string" ? e : e.message ?? $t("common.error"));- } finally {- installingDep = null;- }- }-- $effect(() => {- if (settings) {- loadDeps();- }- });-- async function handleUpdate() {- updating = true;- try {- await installUpdate();- } catch {- updating = false;- }- }-- async function changeTheme(value: string) {- await updateSettings({ appearance: { theme: value } });- }-- const CORE_THEMES = [- { id: "system", labelKey: "settings.appearance.theme_system", colors: null as string[] | null },- { id: "light", labelKey: null, label: "Light", colors: ["#fafafa", "#1a1a1a", "#E05500"] },- { id: "dark", labelKey: null, label: "Dark", colors: ["#0a0a0a", "#e8e8e8", "#FF7D38"] },- ];- const MORE_THEMES = [- { id: "catppuccin-latte", label: "Catppuccin Latte", colors: ["#eff1f5", "#4c4f69", "#1e66f5"] },- { id: "catppuccin-frappe", label: "Catppuccin Frappé", colors: ["#303446", "#c6d0f5", "#8caaee"] },- { id: "catppuccin-macchiato", label: "Catppuccin Macchiato", colors: ["#24273a", "#cad3f5", "#8aadf4"] },- { id: "catppuccin-mocha", label: "Catppuccin Mocha", colors: ["#1e1e2e", "#cdd6f4", "#89b4fa"] },- { id: "one-dark-pro", label: "One Dark Pro", colors: ["#282c34", "#abb2bf", "#61afef"] },- { id: "dracula", label: "Dracula", colors: ["#22212C", "#F8F8F2", "#9580FF"] },- { id: "nyxvamp-veil", label: "NyxVamp Veil", colors: ["#1E1E2E", "#D9E0EE", "#F28FAD"] },- { id: "nyxvamp-obsidian", label: "NyxVamp Obsidian", colors: ["#000A0F", "#C0C0CE", "#F28FAD"] },- { id: "nyxvamp-radiance", label: "NyxVamp Radiance", colors: ["#F7F7FF", "#1E1E2E", "#9655FF"] },- { id: "eink-day", label: "E-ink Day", colors: ["#f5f2ea", "#1d1d1b", "#2b2b28"] },- { id: "eink-sepia", label: "E-ink Sepia", colors: ["#f0e6d2", "#3f2e20", "#7a4a22"] },- { id: "eink-night", label: "E-ink Night", colors: ["#0a0a0a", "#d4d4d0", "#b0b0ab"] },- ];- const MORE_THEME_IDS = new Set(MORE_THEMES.map((t) => t.id));- let selectedInMore = $derived(MORE_THEME_IDS.has(settings?.appearance?.theme ?? ""));-- async function changeLanguage(e: Event) {- const value = (e.target as HTMLSelectElement).value;- await updateSettings({ appearance: { language: value } });- await loadTranslations(value, "/settings");- locale.set(value);- }-- async function chooseFolder() {- const selected = await open({ directory: true, title: $t("settings.download.default_output_dir") });- if (selected) {- await updateSettings({ download: { default_output_dir: selected } });- }- }-- async function toggleBool(section: string, key: string, current: boolean) {- await updateSettings({ [section]: { [key]: !current } });- }-- async function changeNumber(section: string, key: string, e: Event) {- const value = parseInt((e.target as HTMLInputElement).value, 10);- if (!isNaN(value) && value > 0) {- await updateSettings({ [section]: { [key]: value } });- if (key === "max_concurrent_downloads") {- try {- await invoke("update_max_concurrent", { max: value });- } catch {}- }- }- }-- async function changeQuality(e: Event) {- const value = (e.target as HTMLSelectElement).value;- await updateSettings({ download: { video_quality: value } });- }-- type SettingsCategory = "downloads" | "appearance" | "typography" | "network" | "cookies" | "channels" | "ai" | "plugins" | "advanced";- let activeCategory = $state<SettingsCategory>("downloads");-- let tabApplied = false;- $effect(() => {- if (tabApplied || typeof window === "undefined") return;- tabApplied = true;- const tab = new URLSearchParams(window.location.search).get("tab");- const valid = ["downloads", "appearance", "typography", "network", "cookies", "channels", "ai", "plugins", "advanced"];- if (tab && valid.includes(tab)) {- activeCategory = tab as SettingsCategory;- }- });-- let searchQuery = $state("");- let normalizedQuery = $derived(searchQuery.trim().toLowerCase());- let isSearching = $derived(normalizedQuery.length > 0);-- $effect(() => {- const q = normalizedQuery;- if (typeof document === "undefined") return;- const rows = document.querySelectorAll<HTMLElement>(- ".settings-content .setting-row, .settings-content .section-title",- );- if (!q) {- rows.forEach((row) => {- row.style.display = "";- });- document- .querySelectorAll<HTMLElement>(".settings-content .card")- .forEach((card) => (card.style.display = ""));- document- .querySelectorAll<HTMLElement>(".settings-content .section")- .forEach((section) => (section.style.display = ""));- return;- }- rows.forEach((row) => {- const text = (row.textContent || "").toLowerCase();- row.style.display = text.includes(q) ? "" : "none";- });- document- .querySelectorAll<HTMLElement>(".settings-content .card")- .forEach((card) => {- const hasVisibleRow = Array.from(- card.querySelectorAll<HTMLElement>(".setting-row"),- ).some((r) => r.style.display !== "none");- card.style.display = hasVisibleRow ? "" : "none";- });- document- .querySelectorAll<HTMLElement>(".settings-content .section")- .forEach((section) => {- const titleEl = section.querySelector<HTMLElement>(".section-title");- const hasVisibleCard = Array.from(- section.querySelectorAll<HTMLElement>(".card"),- ).some((c) => c.style.display !== "none");- const hasMatchingTitle =- (titleEl?.textContent || "").toLowerCase().includes(q);- section.style.display = hasVisibleCard || hasMatchingTitle ? "" : "none";- });- });-- let templateInput = $state("");- let templateTimer = $state<ReturnType<typeof setTimeout> | null>(null);- let hotkeyInput = $state("");- let hotkeyTimer = $state<ReturnType<typeof setTimeout> | null>(null);- let hotkeyMode = $state<"record" | "type">("record");- let hotkeyRecording = $state(false);- let proxyHost = $state("");- let proxyUsername = $state("");- let proxyPassword = $state("");- let proxyTimer = $state<ReturnType<typeof setTimeout> | null>(null);-- $effect(() => {- if (settings) {- templateInput = settings.download.filename_template;- hotkeyInput = settings.download.hotkey_binding;- proxyHost = settings.proxy?.host ?? "";- proxyUsername = settings.proxy?.username ?? "";- proxyPassword = settings.proxy?.password ?? "";- }- });-- function previewTemplate(template: string): string {- return template- .replace("%(title).200s", "My Video Title")- .replace("%(title)s", "My Video Title")- .replace("%(id)s", "dQw4w9WgXcQ")- .replace("%(ext)s", "mp4")- .replace("%(uploader)s", "Channel Name")- .replace("%(upload_date)s", "20260217")- .replace("%(resolution)s", "1920x1080")- .replace("%(fps)s", "30")- .replace("%(duration)s", "212");- }-- function handleTemplateInput(e: Event) {- const value = (e.target as HTMLInputElement).value;- templateInput = value;- if (templateTimer) clearTimeout(templateTimer);- templateTimer = setTimeout(async () => {- if (value.trim() && value.includes("%(ext)s")) {- await updateSettings({ download: { filename_template: value } });- }- }, 800);- }-- function handleHotkeyInput(e: Event) {- const value = (e.target as HTMLInputElement).value;- hotkeyInput = value;- if (hotkeyTimer) clearTimeout(hotkeyTimer);- hotkeyTimer = setTimeout(async () => {- if (value.trim()) {- await updateSettings({ download: { hotkey_binding: value } });- }- }, 800);- }-- function mapKeyName(key: string): string | null {- if (key.length === 1 && /[a-zA-Z]/.test(key)) return key.toUpperCase();- if (key.length === 1 && /[0-9]/.test(key)) return key;- if (/^F([1-9]|1[0-2])$/.test(key)) return key;- const map: Record<string, string> = {- " ": "Space", ArrowUp: "Up", ArrowDown: "Down", ArrowLeft: "Left", ArrowRight: "Right",- Enter: "Enter", Tab: "Tab", Escape: "Escape", Backspace: "Backspace", Delete: "Delete",- Home: "Home", End: "End", PageUp: "PageUp", PageDown: "PageDown", Insert: "Insert",- };- return map[key] ?? null;- }-- function handleHotkeyKeyDown(e: KeyboardEvent) {- e.preventDefault();- e.stopPropagation();- if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;- const keyName = mapKeyName(e.key);- if (!keyName) return;- const parts: string[] = [];- if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");- if (e.shiftKey) parts.push("Shift");- if (e.altKey) parts.push("Alt");- parts.push(keyName);- const value = parts.join("+");- hotkeyInput = value;- hotkeyRecording = false;- updateSettings({ download: { hotkey_binding: value } });- }-- async function changeProxyType(e: Event) {- const value = (e.target as HTMLSelectElement).value;- await updateSettings({ proxy: { proxy_type: value } });- }-- function handleProxyHost(e: Event) {- const value = (e.target as HTMLInputElement).value;- proxyHost = value;- if (proxyTimer) clearTimeout(proxyTimer);- proxyTimer = setTimeout(async () => {- await updateSettings({ proxy: { host: value } });- }, 800);- }-- function handleProxyUsername(e: Event) {- const value = (e.target as HTMLInputElement).value;- proxyUsername = value;- if (proxyTimer) clearTimeout(proxyTimer);- proxyTimer = setTimeout(async () => {- await updateSettings({ proxy: { username: value } });- }, 800);- }-- function handleProxyPassword(e: Event) {- const value = (e.target as HTMLInputElement).value;- proxyPassword = value;- if (proxyTimer) clearTimeout(proxyTimer);- proxyTimer = setTimeout(async () => {- await updateSettings({ proxy: { password: value } });- }, 800);- }-- async function handleReset() {- if (!confirm($t("settings.advanced.reset_confirm"))) return;- resetting = true;- try {- await resetSettings();- } catch (e: any) {- showToast("error", typeof e === "string" ? e : e.message ?? $t("common.error"));- } finally {- resetting = false;- }- }-</script>--{#if settings}- <div class="settings">- <h2 class="page-title">{$t('settings.title')}</h2>-- {#if updateInfo.available}- <div class="update-banner">- <span class="update-text">- {#if updating}- {$t('settings.update_downloading')}- {:else}- {$t('settings.update_available', { version: updateInfo.version })}- {/if}- </span>- <button class="update-btn" onclick={handleUpdate} disabled={updating}>- {#if updating}- <span class="update-spinner"></span>- {:else}- {$t('settings.update_button')}- {/if}- </button>- </div>- {/if}-- <div class="settings-search-row">- <input- type="search"- class="settings-search"- placeholder={$t('settings.search_placeholder')}- value={searchQuery}- oninput={(e) => searchQuery = (e.target as HTMLInputElement).value}- spellcheck="false"- aria-label={$t('settings.search_placeholder')}- />- </div>-- <div class="category-tabs" class:searching={isSearching}>- {#each [- ["downloads", "settings.cat_downloads"],- ["appearance", "settings.cat_appearance"],- ["typography", "settings.cat_typography"],- ["network", "settings.cat_network"],- ["cookies", "settings.cat_cookies"],- ["channels", "settings.cat_channels"],- ["ai", "settings.cat_ai"],- ["plugins", "settings.cat_plugins"],- ["advanced", "settings.cat_advanced"],- ] as [cat, key] (cat)}- <button class="cat-tab" class:active={!isSearching && activeCategory === cat} onclick={() => { activeCategory = cat as SettingsCategory; searchQuery = ""; }}>- {$t(key)}- </button>- {/each}- </div>-- <div class="settings-content">-- {#if isSearching || activeCategory === "appearance"}- <SettingsAppearance />- {/if}-- {#if isSearching || activeCategory === "typography"}- <SettingsTypography />- {/if}-- {#if isSearching || activeCategory === "downloads"}- <SettingsDownloads />- {/if}-- {#if isSearching || activeCategory === "plugins"}- <SettingsPlugins- {deps}- {installingDep}- onInstallDep={handleInstallDep}- onRefresh={loadDeps}- />- {/if}-- {#if isSearching || activeCategory === "network"}- <SettingsBrowserExtension />- <SettingsNetwork />- {/if}-- {#if isSearching || activeCategory === "cookies"}- <SettingsCookies />- {/if}-- {#if isSearching || activeCategory === "channels"}- <SettingsChannels />- {/if}-- {#if isSearching || activeCategory === "ai"}- <SettingsAI />- {/if}-- {#if isSearching || activeCategory === "advanced"}- <SettingsAdvanced {resetting} onReset={handleReset} />- {/if}- </div>- </div>-{:else}- <div class="settings-loading">- <span class="spinner"></span>- </div>-{/if}-+<script lang="ts">+ import { tick } from "svelte";+ import { invoke } from "@tauri-apps/api/core";+ import { open } from "@tauri-apps/plugin-dialog";+ import { t, locale, loadTranslations } from "$lib/i18n";+ import { getSettings, updateSettings, resetSettings } from "$lib/stores/settings-store.svelte";+ import { getUpdateInfo } from "$lib/stores/update-store.svelte";+ import { installUpdate } from "$lib/updater";+ import { showToast } from "$lib/stores/toast-store.svelte";+ import { refreshYtdlpStatus } from "$lib/stores/dependency-store.svelte";+ import { isDebugEnabled, setDebugEnabled, setDebugPanelOpen } from "$lib/stores/debug-store.svelte";+ import ContextHint from "$components/hints/ContextHint.svelte";+ import SettingsPlugins from "$components/settings/SettingsPlugins.svelte";+ import SettingsAdvanced from "$components/settings/SettingsAdvanced.svelte";+ import SettingsAppearance from "$components/settings/SettingsAppearance.svelte";+ import SettingsNetwork from "$components/settings/SettingsNetwork.svelte";+ import SettingsDownloads from "$components/settings/SettingsDownloads.svelte";+ import SettingsTypography from "$components/settings/SettingsTypography.svelte";+ import SettingsBrowserExtension from "$components/settings/SettingsBrowserExtension.svelte";+ import SettingsCookies from "$components/settings/SettingsCookies.svelte";+ import SettingsChannels from "$components/settings/SettingsChannels.svelte";+ import SettingsAI from "$components/settings/SettingsAI.svelte";++ type DependencyStatus = {+ name: string;+ installed: boolean;+ version: string | null;+ };++ let settings = $derived(getSettings());+ let updateInfo = $derived(getUpdateInfo());+ let isWindows = typeof navigator !== "undefined" && navigator.userAgent.includes("Windows");+ let resetting = $state(false);+ let updating = $state(false);+ let deps = $state<DependencyStatus[]>([]);+ let installingDep = $state<string | null>(null);++ async function loadDeps() {+ try {+ deps = await invoke<DependencyStatus[]>("check_dependencies");+ } catch {}+ }++ async function chooseCookieFile() {+ const selected = await open({+ title: "Select cookies.txt file",+ filters: [{ name: "Cookies", extensions: ["txt"] }],+ multiple: false,+ });+ if (selected && typeof selected === "string") {+ await updateSettings({ download: { cookie_file: selected } });+ }+ }++ async function handleInstallDep(name: string, variant: string | null = null) {+ const wasInstalled = deps.find((d) => d.name === name)?.installed ?? false;+ installingDep = name;+ try {+ const version = await invoke<string>("install_dependency", { name, variant, force: wasInstalled });+ await loadDeps();+ await refreshYtdlpStatus();+ showToast(+ "success",+ $t(+ wasInstalled ? "settings.dependencies.update_success" : "settings.dependencies.install_success",+ { name, version },+ ) as string,+ );+ } catch (e: any) {+ showToast("error", typeof e === "string" ? e : e.message ?? $t("common.error"));+ } finally {+ installingDep = null;+ }+ }++ $effect(() => {+ if (settings) {+ loadDeps();+ }+ });++ async function handleUpdate() {+ updating = true;+ try {+ await installUpdate();+ } catch {+ updating = false;+ }+ }++ async function changeTheme(value: string) {+ await updateSettings({ appearance: { theme: value } });+ }++ const CORE_THEMES = [+ { id: "system", labelKey: "settings.appearance.theme_system", colors: null as string[] | null },+ { id: "light", labelKey: null, label: "Light", colors: ["#fafafa", "#1a1a1a", "#E05500"] },+ { id: "dark", labelKey: null, label: "Dark", colors: ["#0a0a0a", "#e8e8e8", "#FF7D38"] },+ ];+ const MORE_THEMES = [+ { id: "catppuccin-latte", label: "Catppuccin Latte", colors: ["#eff1f5", "#4c4f69", "#1e66f5"] },+ { id: "catppuccin-frappe", label: "Catppuccin Frappé", colors: ["#303446", "#c6d0f5", "#8caaee"] },+ { id: "catppuccin-macchiato", label: "Catppuccin Macchiato", colors: ["#24273a", "#cad3f5", "#8aadf4"] },+ { id: "catppuccin-mocha", label: "Catppuccin Mocha", colors: ["#1e1e2e", "#cdd6f4", "#89b4fa"] },+ { id: "one-dark-pro", label: "One Dark Pro", colors: ["#282c34", "#abb2bf", "#61afef"] },+ { id: "dracula", label: "Dracula", colors: ["#22212C", "#F8F8F2", "#9580FF"] },+ { id: "nyxvamp-veil", label: "NyxVamp Veil", colors: ["#1E1E2E", "#D9E0EE", "#F28FAD"] },+ { id: "nyxvamp-obsidian", label: "NyxVamp Obsidian", colors: ["#000A0F", "#C0C0CE", "#F28FAD"] },+ { id: "nyxvamp-radiance", label: "NyxVamp Radiance", colors: ["#F7F7FF", "#1E1E2E", "#9655FF"] },+ { id: "eink-day", label: "E-ink Day", colors: ["#f5f2ea", "#1d1d1b", "#2b2b28"] },+ { id: "eink-sepia", label: "E-ink Sepia", colors: ["#f0e6d2", "#3f2e20", "#7a4a22"] },+ { id: "eink-night", label: "E-ink Night", colors: ["#0a0a0a", "#d4d4d0", "#b0b0ab"] },+ ];+ const MORE_THEME_IDS = new Set(MORE_THEMES.map((t) => t.id));+ let selectedInMore = $derived(MORE_THEME_IDS.has(settings?.appearance?.theme ?? ""));++ async function changeLanguage(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ await updateSettings({ appearance: { language: value } });+ await loadTranslations(value, "/settings");+ locale.set(value);+ }++ async function chooseFolder() {+ const selected = await open({ directory: true, title: $t("settings.download.default_output_dir") });+ if (selected) {+ await updateSettings({ download: { default_output_dir: selected } });+ }+ }++ async function toggleBool(section: string, key: string, current: boolean) {+ await updateSettings({ [section]: { [key]: !current } });+ }++ async function changeNumber(section: string, key: string, e: Event) {+ const value = parseInt((e.target as HTMLInputElement).value, 10);+ if (!isNaN(value) && value > 0) {+ await updateSettings({ [section]: { [key]: value } });+ if (key === "max_concurrent_downloads") {+ try {+ await invoke("update_max_concurrent", { max: value });+ } catch {}+ }+ }+ }++ async function changeQuality(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ await updateSettings({ download: { video_quality: value } });+ }++ type SettingsCategory = "downloads" | "appearance" | "typography" | "network" | "cookies" | "channels" | "ai" | "plugins" | "advanced";++ const SETTINGS_NAV_GROUPS: {+ labelKey: string;+ items: [SettingsCategory, string][];+ }[] = [+ {+ labelKey: "settings.group_general",+ items: [+ ["appearance", "settings.cat_appearance"],+ ["typography", "settings.cat_typography"],+ ],+ },+ {+ labelKey: "settings.group_media",+ items: [["downloads", "settings.cat_downloads"]],+ },+ {+ labelKey: "settings.group_integrations",+ items: [+ ["network", "settings.cat_network"],+ ["cookies", "settings.cat_cookies"],+ ["channels", "settings.cat_channels"],+ ["ai", "settings.cat_ai"],+ ["plugins", "settings.cat_plugins"],+ ],+ },+ {+ labelKey: "settings.group_advanced",+ items: [["advanced", "settings.cat_advanced"]],+ },+ ];++ let activeCategory = $state<SettingsCategory>("downloads");++ let tabApplied = false;+ $effect(() => {+ if (tabApplied || typeof window === "undefined") return;+ tabApplied = true;+ const tab = new URLSearchParams(window.location.search).get("tab");+ const valid = ["downloads", "appearance", "typography", "network", "cookies", "channels", "ai", "plugins", "advanced"];+ if (tab && valid.includes(tab)) {+ activeCategory = tab as SettingsCategory;+ }+ });++ let searchQuery = $state("");+ let normalizedQuery = $derived(searchQuery.trim().toLowerCase());+ let isSearching = $derived(normalizedQuery.length > 0);+ let categoryMatchCounts = $state<Partial<Record<SettingsCategory, number>>>({});++ const PANEL_MATCH_SELECTORS =+ ".setting-row, .preset-card, .settings-section-head, .section-title, .deps-table-row";++ function clearSearchHighlights(root: ParentNode) {+ root.querySelectorAll("mark.settings-search-hit").forEach((mark) => {+ const parent = mark.parentNode;+ if (!parent) return;+ parent.replaceChild(document.createTextNode(mark.textContent ?? ""), mark);+ parent.normalize();+ });+ }++ function highlightPlainText(el: HTMLElement, query: string) {+ if (el.children.length > 0) return;+ const text = el.textContent ?? "";+ const lower = text.toLowerCase();+ const idx = lower.indexOf(query);+ if (idx === -1) return;+ const before = text.slice(0, idx);+ const match = text.slice(idx, idx + query.length);+ const after = text.slice(idx + query.length);+ el.textContent = "";+ if (before) el.appendChild(document.createTextNode(before));+ const mark = document.createElement("mark");+ mark.className = "settings-search-hit";+ mark.textContent = match;+ el.appendChild(mark);+ if (after) el.appendChild(document.createTextNode(after));+ }++ function applySearchHighlights(container: HTMLElement, query: string) {+ clearSearchHighlights(container);+ if (!query) return;+ const highlightSelectors =+ ".setting-path, .settings-section-hint, .preset-desc, .preset-label";+ container.querySelectorAll<HTMLElement>(highlightSelectors).forEach((el) => {+ if (el.style.display === "none") return;+ highlightPlainText(el, query);+ });+ container.querySelectorAll<HTMLElement>(".setting-label").forEach((el) => {+ if (el.style.display === "none" || el.children.length > 0) return;+ highlightPlainText(el, query);+ });+ }++ function countPanelMatches(panel: HTMLElement, query: string): number {+ let count = 0;+ panel.querySelectorAll<HTMLElement>(PANEL_MATCH_SELECTORS).forEach((el) => {+ if ((el.textContent ?? "").toLowerCase().includes(query)) count += 1;+ });+ return count;+ }++ function resetSettingsSearchDisplay(content: HTMLElement) {+ content+ .querySelectorAll<HTMLElement>(+ ".setting-row, .section-title, .settings-section-head, .card, .preset-card, .section, .deps-table-row",+ )+ .forEach((el) => {+ el.style.display = "";+ });+ clearSearchHighlights(content);+ categoryMatchCounts = {};+ }++ function applySettingsPanelFilter(content: HTMLElement, query: string) {+ const rows = content.querySelectorAll<HTMLElement>(+ ".setting-row, .section-title, .settings-section-head, .deps-table-row",+ );+ rows.forEach((row) => {+ const text = (row.textContent ?? "").toLowerCase();+ row.style.display = text.includes(query) ? "" : "none";+ });+ content.querySelectorAll<HTMLElement>(".preset-card").forEach((card) => {+ const text = (card.textContent ?? "").toLowerCase();+ card.style.display = text.includes(query) ? "" : "none";+ });+ content.querySelectorAll<HTMLElement>(".card").forEach((card) => {+ const hasVisibleRow = Array.from(+ card.querySelectorAll<HTMLElement>(".setting-row"),+ ).some((r) => r.style.display !== "none");+ card.style.display = hasVisibleRow ? "" : "none";+ });+ content.querySelectorAll<HTMLElement>(".section").forEach((section) => {+ const titleEl = section.querySelector<HTMLElement>(+ ".section-title, .settings-section-head",+ );+ const hasVisibleRow = Array.from(+ section.querySelectorAll<HTMLElement>(".setting-row, .deps-table-row"),+ ).some((r) => r.style.display !== "none");+ const hasVisibleCard = Array.from(+ section.querySelectorAll<HTMLElement>(".card"),+ ).some((c) => c.style.display !== "none");+ const hasVisiblePreset = Array.from(+ section.querySelectorAll<HTMLElement>(".preset-card"),+ ).some((p) => p.style.display !== "none");+ const hasMatchingTitle = (titleEl?.textContent ?? "")+ .toLowerCase()+ .includes(query);+ section.style.display =+ hasVisibleRow || hasVisibleCard || hasVisiblePreset || hasMatchingTitle+ ? ""+ : "none";+ });+ }++ $effect(() => {+ const q = normalizedQuery;+ if (typeof document === "undefined") return;+ let cancelled = false;++ (async () => {+ await tick();+ if (cancelled) return;+ const content = document.querySelector<HTMLElement>(".settings-content");+ if (!content) return;++ if (!q) {+ resetSettingsSearchDisplay(content);+ return;+ }++ if (isSearching) await tick();+ if (cancelled) return;++ applySettingsPanelFilter(content, q);++ const counts: Partial<Record<SettingsCategory, number>> = {};+ content.querySelectorAll<HTMLElement>("[data-settings-cat]").forEach((panel) => {+ const cat = panel.dataset.settingsCat as SettingsCategory | undefined;+ if (!cat) return;+ counts[cat] = countPanelMatches(panel, q);+ });+ categoryMatchCounts = counts;++ applySearchHighlights(content, q);+ })();++ return () => {+ cancelled = true;+ };+ });++ function groupHasSearchMatch(group: (typeof SETTINGS_NAV_GROUPS)[number]): boolean {+ if (!isSearching) return true;+ return group.items.some(([cat]) => (categoryMatchCounts[cat] ?? 0) > 0);+ }++ let templateInput = $state("");+ let templateTimer = $state<ReturnType<typeof setTimeout> | null>(null);+ let hotkeyInput = $state("");+ let hotkeyTimer = $state<ReturnType<typeof setTimeout> | null>(null);+ let hotkeyMode = $state<"record" | "type">("record");+ let hotkeyRecording = $state(false);+ let proxyHost = $state("");+ let proxyUsername = $state("");+ let proxyPassword = $state("");+ let proxyTimer = $state<ReturnType<typeof setTimeout> | null>(null);++ $effect(() => {+ if (settings) {+ templateInput = settings.download.filename_template;+ hotkeyInput = settings.download.hotkey_binding;+ proxyHost = settings.proxy?.host ?? "";+ proxyUsername = settings.proxy?.username ?? "";+ proxyPassword = settings.proxy?.password ?? "";+ }+ });++ function previewTemplate(template: string): string {+ return template+ .replace("%(title).200s", "My Video Title")+ .replace("%(title)s", "My Video Title")+ .replace("%(id)s", "dQw4w9WgXcQ")+ .replace("%(ext)s", "mp4")+ .replace("%(uploader)s", "Channel Name")+ .replace("%(upload_date)s", "20260217")+ .replace("%(resolution)s", "1920x1080")+ .replace("%(fps)s", "30")+ .replace("%(duration)s", "212");+ }++ function handleTemplateInput(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ templateInput = value;+ if (templateTimer) clearTimeout(templateTimer);+ templateTimer = setTimeout(async () => {+ if (value.trim() && value.includes("%(ext)s")) {+ await updateSettings({ download: { filename_template: value } });+ }+ }, 800);+ }++ function handleHotkeyInput(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ hotkeyInput = value;+ if (hotkeyTimer) clearTimeout(hotkeyTimer);+ hotkeyTimer = setTimeout(async () => {+ if (value.trim()) {+ await updateSettings({ download: { hotkey_binding: value } });+ }+ }, 800);+ }++ function mapKeyName(key: string): string | null {+ if (key.length === 1 && /[a-zA-Z]/.test(key)) return key.toUpperCase();+ if (key.length === 1 && /[0-9]/.test(key)) return key;+ if (/^F([1-9]|1[0-2])$/.test(key)) return key;+ const map: Record<string, string> = {+ " ": "Space", ArrowUp: "Up", ArrowDown: "Down", ArrowLeft: "Left", ArrowRight: "Right",+ Enter: "Enter", Tab: "Tab", Escape: "Escape", Backspace: "Backspace", Delete: "Delete",+ Home: "Home", End: "End", PageUp: "PageUp", PageDown: "PageDown", Insert: "Insert",+ };+ return map[key] ?? null;+ }++ function handleHotkeyKeyDown(e: KeyboardEvent) {+ e.preventDefault();+ e.stopPropagation();+ if (["Control", "Shift", "Alt", "Meta"].includes(e.key)) return;+ const keyName = mapKeyName(e.key);+ if (!keyName) return;+ const parts: string[] = [];+ if (e.ctrlKey || e.metaKey) parts.push("CmdOrCtrl");+ if (e.shiftKey) parts.push("Shift");+ if (e.altKey) parts.push("Alt");+ parts.push(keyName);+ const value = parts.join("+");+ hotkeyInput = value;+ hotkeyRecording = false;+ updateSettings({ download: { hotkey_binding: value } });+ }++ async function changeProxyType(e: Event) {+ const value = (e.target as HTMLSelectElement).value;+ await updateSettings({ proxy: { proxy_type: value } });+ }++ function handleProxyHost(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ proxyHost = value;+ if (proxyTimer) clearTimeout(proxyTimer);+ proxyTimer = setTimeout(async () => {+ await updateSettings({ proxy: { host: value } });+ }, 800);+ }++ function handleProxyUsername(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ proxyUsername = value;+ if (proxyTimer) clearTimeout(proxyTimer);+ proxyTimer = setTimeout(async () => {+ await updateSettings({ proxy: { username: value } });+ }, 800);+ }++ function handleProxyPassword(e: Event) {+ const value = (e.target as HTMLInputElement).value;+ proxyPassword = value;+ if (proxyTimer) clearTimeout(proxyTimer);+ proxyTimer = setTimeout(async () => {+ await updateSettings({ proxy: { password: value } });+ }, 800);+ }++ async function handleReset() {+ if (!confirm($t("settings.advanced.reset_confirm"))) return;+ resetting = true;+ try {+ await resetSettings();+ } catch (e: any) {+ showToast("error", typeof e === "string" ? e : e.message ?? $t("common.error"));+ } finally {+ resetting = false;+ }+ }+</script>++{#if settings}+ <div class="settings settings-mac">+ {#if updateInfo.available}+ <div class="update-banner">+ <span class="update-text">+ {#if updating}+ {$t('settings.update_downloading')}+ {:else}+ {$t('settings.update_available', { version: updateInfo.version })}+ {/if}+ </span>+ <button class="update-btn" onclick={handleUpdate} disabled={updating}>+ {#if updating}+ <span class="update-spinner"></span>+ {:else}+ {$t('settings.update_button')}+ {/if}+ </button>+ </div>+ {/if}++ <div class="settings-mac-body">+ <aside class="settings-mac-sidebar">+ <div class="settings-search-row">+ <input+ type="search"+ class="settings-search"+ placeholder={$t('settings.search_placeholder')}+ value={searchQuery}+ oninput={(e) => searchQuery = (e.target as HTMLInputElement).value}+ spellcheck="false"+ aria-label={$t('settings.search_placeholder')}+ />+ </div>+ {#each SETTINGS_NAV_GROUPS as group (group.labelKey)}+ {#if groupHasSearchMatch(group)}+ <div class="settings-mac-nav-group">+ <div class="mac-nav-section-header">{$t(group.labelKey)}</div>+ {#each group.items as [cat, key] (cat)}+ {#if !isSearching || (categoryMatchCounts[cat] ?? 0) > 0}+ <button+ class="settings-mac-cat"+ class:active={!isSearching && activeCategory === cat}+ class:search-match={isSearching && (categoryMatchCounts[cat] ?? 0) > 0}+ onclick={() => { activeCategory = cat; searchQuery = ""; }}+ >+ <span class="settings-mac-cat-label">{$t(key)}</span>+ {#if isSearching && (categoryMatchCounts[cat] ?? 0) > 0}+ <span class="settings-cat-match-count">{categoryMatchCounts[cat]}</span>+ {/if}+ </button>+ {/if}+ {/each}+ </div>+ {/if}+ {/each}+ </aside>++ <div class="settings-mac-content settings-content">++ {#if isSearching || activeCategory === "appearance"}+ <div class="settings-panel" data-settings-cat="appearance">+ <SettingsAppearance searchActive={isSearching} />+ </div>+ {/if}++ {#if isSearching || activeCategory === "typography"}+ <div class="settings-panel" data-settings-cat="typography">+ <SettingsTypography />+ </div>+ {/if}++ {#if isSearching || activeCategory === "downloads"}+ <div class="settings-panel" data-settings-cat="downloads">+ <SettingsDownloads searchActive={isSearching} />+ </div>+ {/if}++ {#if isSearching || activeCategory === "plugins"}+ <div class="settings-panel" data-settings-cat="plugins">+ <SettingsPlugins+ {deps}+ {installingDep}+ onInstallDep={handleInstallDep}+ onRefresh={loadDeps}+ />+ </div>+ {/if}++ {#if isSearching || activeCategory === "network"}+ <div class="settings-panel" data-settings-cat="network">+ <SettingsBrowserExtension />+ <SettingsNetwork />+ </div>+ {/if}++ {#if isSearching || activeCategory === "cookies"}+ <div class="settings-panel" data-settings-cat="cookies">+ <SettingsCookies />+ </div>+ {/if}++ {#if isSearching || activeCategory === "channels"}+ <div class="settings-panel" data-settings-cat="channels">+ <SettingsChannels />+ </div>+ {/if}++ {#if isSearching || activeCategory === "ai"}+ <div class="settings-panel" data-settings-cat="ai">+ <SettingsAI />+ </div>+ {/if}++ {#if isSearching || activeCategory === "advanced"}+ <div class="settings-panel" data-settings-cat="advanced">+ <SettingsAdvanced {resetting} onReset={handleReset} searchActive={isSearching} />+ </div>+ {/if}+ </div>+ </div>+ </div>+{:else}+ <div class="settings-loading">+ <span class="spinner"></span>+ </div>+{/if}+