no log: Fix all non-camelCase variables

pull/2078/head
LASER-Yi 1 year ago
parent ef46ab9261
commit 051d37f96e
No known key found for this signature in database

@ -10,10 +10,10 @@ const Redirector: FunctionComponent = () => {
useEffect(() => {
if (data) {
const { use_sonarr, use_radarr } = data.general;
if (use_sonarr) {
const { use_sonarr: useSonarr, use_radarr: useRadarr } = data.general;
if (useSonarr) {
navigate("/series");
} else if (use_radarr) {
} else if (useRadarr) {
navigate("/movies");
} else {
navigate("/settings/general");

@ -27,6 +27,7 @@ const defaultCutoffOptions: SelectorOption<Language.ProfileItem>[] = [
label: "Any",
value: {
id: anyCutoff,
// eslint-disable-next-line camelcase
audio_exclude: "False",
forced: "False",
hi: "False",
@ -128,6 +129,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
const item: Language.ProfileItem = {
id,
language,
// eslint-disable-next-line camelcase
audio_exclude: "False",
hi: "False",
forced: "False",
@ -213,6 +215,7 @@ const ProfileEditForm: FunctionComponent<Props> = ({
onChange={({ currentTarget: { checked } }) => {
action.mutate(index, {
...item,
// eslint-disable-next-line camelcase
audio_exclude: checked ? "True" : "False",
});
}}

@ -1,3 +1,4 @@
/* eslint-disable camelcase */
import {
useEpisodeAddBlacklist,
useEpisodeHistory,

@ -154,8 +154,8 @@ function ManualSearchView<T extends SupportType>(props: Props<T>) {
{
accessor: "matches",
Cell: (row) => {
const { matches, dont_matches } = row.row.original;
return <StateIcon matches={matches} dont={dont_matches}></StateIcon>;
const { matches, dont_matches: dont } = row.row.original;
return <StateIcon matches={matches} dont={dont}></StateIcon>;
},
},
{

@ -82,6 +82,7 @@ const SubtitleToolView: FunctionComponent<SubtitleToolViewProps> = ({
type,
language: v.code2,
path: v.path,
// eslint-disable-next-line camelcase
raw_language: v,
},
];

@ -75,6 +75,7 @@ const Table: FunctionComponent<Props> = ({ blacklist }) => {
all: false,
form: {
provider: row.original.provider,
// eslint-disable-next-line camelcase
subs_id: value,
},
})}

@ -82,6 +82,7 @@ const Table: FunctionComponent<Props> = ({ blacklist }) => {
all: false,
form: {
provider: row.original.provider,
// eslint-disable-next-line camelcase
subs_id: value,
},
})}

@ -47,7 +47,7 @@ const Table: FunctionComponent<Props> = ({ episodes, profile, disabled }) => {
forced,
provider,
subtitle,
original_format,
original_format: originalFormat,
} = result;
const { sonarrSeriesId: seriesId, sonarrEpisodeId: episodeId } = item;
@ -60,7 +60,8 @@ const Table: FunctionComponent<Props> = ({ episodes, profile, disabled }) => {
forced,
provider,
subtitle,
original_format,
// eslint-disable-next-line camelcase
original_format: originalFormat,
},
});
},
@ -129,12 +130,12 @@ const Table: FunctionComponent<Props> = ({ episodes, profile, disabled }) => {
></Subtitle>
));
let raw_subtitles = episode.subtitles;
let rawSubtitles = episode.subtitles;
if (onlyDesired) {
raw_subtitles = filterSubtitleBy(raw_subtitles, profileItems);
rawSubtitles = filterSubtitleBy(rawSubtitles, profileItems);
}
const subtitles = raw_subtitles.map((val, idx) => (
const subtitles = rawSubtitles.map((val, idx) => (
<Subtitle
key={BuildKey(idx, val.code2, "valid")}
seriesId={seriesId}

@ -1,3 +1,4 @@
/* eslint-disable camelcase */
import { useMovieAddBlacklist, useMovieHistoryPagination } from "@/apis/hooks";
import { MutateAction } from "@/components/async";
import { HistoryIcon } from "@/components/bazarr";

@ -1,3 +1,4 @@
/* eslint-disable camelcase */
import {
useEpisodeAddBlacklist,
useEpisodeHistoryPagination,

@ -61,7 +61,7 @@ const MovieDetailView: FunctionComponent = () => {
forced,
provider,
subtitle,
original_format,
original_format: originalFormat,
} = result;
const { radarrId } = item;
@ -73,7 +73,8 @@ const MovieDetailView: FunctionComponent = () => {
forced,
provider,
subtitle,
original_format,
// eslint-disable-next-line camelcase
original_format: originalFormat,
},
});
},

@ -180,12 +180,12 @@ const Table: FunctionComponent<Props> = ({ movie, profile, disabled }) => {
path: missingText,
})) ?? [];
let raw_subtitles = movie?.subtitles ?? [];
let rawSubtitles = movie?.subtitles ?? [];
if (onlyDesired) {
raw_subtitles = filterSubtitleBy(raw_subtitles, profileItems);
rawSubtitles = filterSubtitleBy(rawSubtitles, profileItems);
}
return [...raw_subtitles, ...missing];
return [...rawSubtitles, ...missing];
}, [movie, onlyDesired, profileItems]);
return (

@ -43,8 +43,8 @@ export function useLatestProfiles() {
const SettingsLanguagesView: FunctionComponent = () => {
const { data: languages } = useLanguages();
const { data: und_audio_languages } = useEnabledLanguages();
const { data: und_embedded_subtitles_languages } = useEnabledLanguages();
const { data: undAudioLanguages } = useEnabledLanguages();
const { data: undEmbeddedSubtitlesLanguages } = useEnabledLanguages();
return (
<Layout name="Languages">
<Section header="Subtitles Language">
@ -83,7 +83,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
settingKey={defaultUndAudioLang}
label="Treat unknown language audio track as (changing this will trigger missing subtitles calculation)"
placeholder="Select languages"
options={und_audio_languages.map((v) => {
options={undAudioLanguages.map((v) => {
return { label: v.name, value: v.code2 };
})}
settingOptions={{
@ -97,7 +97,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
settingKey={defaultUndEmbeddedSubtitlesLang}
label="Treat unknown language embedded subtitles track as (changing this will trigger full subtitles indexation using cache)"
placeholder="Select languages"
options={und_embedded_subtitles_languages.map((v) => {
options={undEmbeddedSubtitlesLanguages.map((v) => {
return { label: v.name, value: v.code2 };
})}
settingOptions={{

@ -37,7 +37,7 @@ const Table: FunctionComponent<Props> = ({ tasks }) => {
{
accessor: "job_running",
Cell: ({ row, value }) => {
const { job_id } = row.original;
const { job_id: jobId } = row.original;
const runTask = useRunTask();
return (
@ -46,7 +46,7 @@ const Table: FunctionComponent<Props> = ({ tasks }) => {
icon={faPlay}
iconProps={{ spin: value }}
mutation={runTask}
args={() => job_id}
args={() => jobId}
></MutateAction>
);
},

@ -3,6 +3,7 @@
import type { Blocker, History, Transition } from "history";
import { useContext, useEffect } from "react";
// eslint-disable-next-line camelcase
import { UNSAFE_NavigationContext } from "react-router-dom";
export function useBlocker(blocker: Blocker, when = true) {

Loading…
Cancel
Save