import { Anchor, Code, Table } from "@mantine/core"; import { FunctionComponent } from "react"; import { Check, CollapseBox, Layout, Message, Password, Section, Selector, Slider, Text, } from "../components"; import { SubzeroColorModification, SubzeroModification, } from "../utilities/modifications"; import { adaptiveSearchingDelayOption, adaptiveSearchingDeltaOption, antiCaptchaOption, colorOptions, embeddedSubtitlesParserOption, folderOptions, hiExtensionOptions, } from "./options"; interface CommandOption { option: string; description: string; } const commandOptions: CommandOption[] = [ { option: "directory", description: "Full path of the episode file parent directory", }, { option: "episode", description: "Full path of the episode file", }, { option: "episode_name", description: "Filename of the episode without parent directory or extension", }, { option: "subtitles", description: "Full path of the subtitles file", }, { option: "subtitles_language", description: "Language of the subtitles file (may include HI or forced)", }, { option: "subtitles_language_code2", description: "2-letter ISO-639 language code of the subtitles language (may include :hi or :forced)", }, { option: "subtitles_language_code2_dot", description: "2-letter ISO-639 language code of the subtitles language (same as previous but with dot separator instead of colon)", }, { option: "subtitles_language_code3", description: "3-letter ISO-639 language code of the subtitles language (may include :hi or :forced)", }, { option: "subtitles_language_code3_dot", description: "3-letter ISO-639 language code of the subtitles language (same as previous but with dot separator instead of colon)", }, { option: "episode_language", description: "Audio language of the episode file", }, { option: "episode_language_code2", description: "2-letter ISO-639 language code of the episode audio language", }, { option: "episode_language_code3", description: "3-letter ISO-639 language code of the episode audio language", }, { option: "score", description: "Score of the subtitle file", }, { option: "subtitle_id", description: "Provider ID of the subtitle file", }, { option: "series_id", description: "Sonarr series ID (Empty if movie)", }, { option: "episode_id", description: "Sonarr episode ID or Radarr movie ID", }, ]; const commandOptionElements: JSX.Element[] = commandOptions.map((op, idx) => ( {op.option} {op.description} )); const SettingsSubtitlesView: FunctionComponent = () => { return (
Choose the folder you wish to store/read the subtitles k !== "" && k !== "current"} > Schedule a task to upgrade subtitles previously downloaded by Bazarr. Number of days to go back in history to upgrade subtitles Enable or disable upgrade of manually downloaded or translated subtitles. What file extension to use when saving hearing-impaired subtitles to disk (e.g., video.en.sdh.srt).
(v === undefined ? "None" : v) }} options={antiCaptchaOption} > Choose the anti-captcha provider you want to use value === "anti-captcha"} > Anti-Captcha.com value === "death-by-captcha"} > DeathByCaptcha.com
When searching for subtitles, Bazarr will reduce search frequency to limit call to providers. (v === undefined ? "3w" : v) }} options={adaptiveSearchingDelayOption} > In order to reduce search frequency, how many weeks must Bazarr wait after initial search. (v === undefined ? "1w" : v) }} options={adaptiveSearchingDeltaOption} > How often should Bazarr search for subtitles when in adaptive search mode. Search multiple providers at once (Don't choose this on low powered devices) Use embedded subtitles in media files when determining missing ones. Ignores PGS Subtitles in Embedded Subtitles detection. Ignores VobSub Subtitles in Embedded Subtitles detection. Ignores ASS Subtitles in Embedded Subtitles detection. Hide embedded subtitles for languages that are not currently desired. (v === undefined ? "ffprobe" : v), }} options={embeddedSubtitlesParserOption} > Embedded subtitles video parser
Re-encode downloaded Subtitles to UTF8. Should be left enabled in most case. Removes tags, text and characters from subtitles that are meant for hearing impaired people. Removes all possible style tags from the subtitle, such as font, bold, color etc. Fix issues that happen when a subtitle gets converted from bitmap to text through OCR. Fix common and whitespace/punctuation issues in subtitles. Tries to make subtitles that are completely uppercase readable. Adds color to your subtitles (for playback devices/software that don't ship their own color modes; only works for players that support color tags). Reverses the punctuation in right-to-left subtitles for problematic playback devices. Must be 4 digit octal Use the audio track as reference for syncing, instead of using the embedded subtitle. Enable the automatic subtitles synchronization after downloading a subtitles. Do not actually sync the subtitles but generate a .tar.gz file to be able to open an issue for ffsubsync. This file will reside alongside the media file. Enable the post-processing execution after downloading a subtitles. {commandOptionElements}
); }; export default SettingsSubtitlesView;