Add OpenSubtitles subtitle search + download (new Subtitles panel)
New web client (crates/aurora-curator-core/src/web/opensubtitles.rs, 9 tests): search, login, download, and fetch-subtitle-text against OpenSubtitles' REST API. Search only needs a free app-level API key; download additionally needs the end user's own OpenSubtitles account login (username/password -> JWT), since downloads are quota-limited per account. Settings gained three new fields (opensubtitles_api_key/username/password) following the existing TMDB/OMDb credential pattern, with one deliberate exception: the password is never returned to the frontend, only whether one is saved (has_opensubtitles_password), since it's a real account password rather than an API token. New src-tauri/src/subtitles.rs wraps search/download as Tauri commands and writes a downloaded subtitle right next to its video file (Show.S01E01.mkv -> Show.S01E01.en.srt). New src/components/SubtitlesPanel.tsx is the first real screen behind a sidebar entry besides Rename (previously a stub) - load a video, auto-fill the search form from the same local guess_episode/guess_movie Match uses, search, and download with live remaining/allowed quota shown per result. TheTVDB was considered instead but deliberately skipped for now: its v4 API requires either a paid commercial license or a per-end-user paid TheTVDB subscription just to log in, unlike every other source in this app. 144 tests passing (workspace). Updated README (status paragraph, project layout, new "Subtitles" section, roadmap items 5/6/7).
This commit is contained in:
@@ -4,6 +4,7 @@ mod history;
|
||||
mod metadata;
|
||||
mod presets;
|
||||
mod settings;
|
||||
mod subtitles;
|
||||
|
||||
use aurora_curator_core::format::ExpressionFormat;
|
||||
use aurora_curator_core::matching::{self, EpisodeGuess, MovieGuess, ReleaseInfo};
|
||||
@@ -107,6 +108,13 @@ pub fn run() {
|
||||
settings::save_tv_metadata_source,
|
||||
settings::get_movie_metadata_source,
|
||||
settings::save_movie_metadata_source,
|
||||
settings::get_opensubtitles_api_key,
|
||||
settings::save_opensubtitles_api_key,
|
||||
settings::get_opensubtitles_username,
|
||||
settings::has_opensubtitles_password,
|
||||
settings::save_opensubtitles_login,
|
||||
subtitles::search_subtitles,
|
||||
subtitles::download_subtitle,
|
||||
history::list_rename_history,
|
||||
history::undo_rename_batch,
|
||||
presets::list_presets,
|
||||
|
||||
Reference in New Issue
Block a user