import { Code, Table } from "@mantine/core";
import { FunctionComponent } from "react";
import {
Check,
CollapseBox,
Layout,
Message,
MultiSelector,
Section,
Selector,
Slider,
Text,
} from "../components";
import {
SubzeroColorModification,
SubzeroModification,
} from "../utilities/modifications";
import {
adaptiveSearchingDelayOption,
adaptiveSearchingDeltaOption,
colorOptions,
embeddedSubtitlesParserOption,
folderOptions,
hiExtensionOptions,
providerOptions,
syncMaxOffsetSecondsOptions,
} 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: "provider",
description: "Provider of the subtitle file",
},
{
option: "uploader",
description: "Uploader of the subtitle file",
},
{
option: "release_info",
description: "Release info for 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"}
>
What file extension to use when saving hearing-impaired subtitles to
disk (e.g., video.en.sdh.srt).
Use embedded subtitles in media files when determining missing ones.
(v === undefined ? "ffprobe" : v),
}}
options={embeddedSubtitlesParserOption}
>
Embedded subtitles video parser
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.
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.
Re-encode downloaded Subtitles to UTF8. Should be left enabled in most
case.
When enabled, Bazarr will skip searching providers for subtitles which
have been searched recently.
(v === undefined ? "3w" : v) }}
options={adaptiveSearchingDelayOption}
>
The delay from the first search to adaptive searching applying.
During this window Bazarr will continue to search for subtitles,
even if they have been searched for recently.
(v === undefined ? "1w" : v) }}
options={adaptiveSearchingDeltaOption}
>
The delay between Bazarr searching for subtitles in adaptive search
mode. If the media has been searched for more recently than this
value, Bazarr will skip searching for subtitles.
Search multiple providers at once (Don't choose this on low powered
devices)
Skip video file hashing during search process to prevent sleeping hard
disk drive from waking-up. On the other hand, this may decrease your
search results scores.
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.
Use the audio track as reference for syncing, instead of using the
embedded subtitle.
If specified, subsync will not attempt to correct a framerate mismatch
between reference and subtitles.
If specified, use golden-section search to try to find the optimal
framerate ratio between video and subtitles.
The max allowed offset seconds for any subtitle segment.
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.
);
};
export default SettingsSubtitlesView;