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(() => { useEffect(() => {
if (data) { if (data) {
const { use_sonarr, use_radarr } = data.general; const { use_sonarr: useSonarr, use_radarr: useRadarr } = data.general;
if (use_sonarr) { if (useSonarr) {
navigate("/series"); navigate("/series");
} else if (use_radarr) { } else if (useRadarr) {
navigate("/movies"); navigate("/movies");
} else { } else {
navigate("/settings/general"); navigate("/settings/general");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save