summaryrefslogtreecommitdiffhomepage
path: root/frontend
diff options
context:
space:
mode:
authormaxwillx <[email protected]>2022-03-14 17:54:36 -0700
committerGitHub <[email protected]>2022-03-14 20:54:36 -0400
commit33a9e512acafe0419d553660c20659d007a23b85 (patch)
treea34a7f0ff8f699ab60c4106197b85a65911613bc /frontend
parent684797d6e454719c458dd3a6aa9e714ca65b0bbf (diff)
downloadbazarr-33a9e512acafe0419d553660c20659d007a23b85.tar.gz
bazarr-33a9e512acafe0419d553660c20659d007a23b85.zip
Added languages profile settings to prevent downloaded subtitles from being converted to srt.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/@types/api.d.ts2
-rw-r--r--frontend/src/@types/form.d.ts1
-rw-r--r--frontend/src/pages/Episodes/table.tsx2
-rw-r--r--frontend/src/pages/Movies/Details/index.tsx2
-rw-r--r--frontend/src/pages/Settings/Languages/modal.tsx13
-rw-r--r--frontend/src/pages/Settings/Languages/table.tsx1
6 files changed, 21 insertions, 0 deletions
diff --git a/frontend/src/@types/api.d.ts b/frontend/src/@types/api.d.ts
index d7391a9ef..75f7c4dfe 100644
--- a/frontend/src/@types/api.d.ts
+++ b/frontend/src/@types/api.d.ts
@@ -35,6 +35,7 @@ declare namespace Language {
items: ProfileItem[];
mustContain: string[];
mustNotContain: string[];
+ originalFormat: boolean | null;
}
}
@@ -252,6 +253,7 @@ interface SearchResultType {
subtitle: any;
uploader?: string;
url?: string;
+ original_format: PythonBoolean;
}
interface ReleaseInfo {
diff --git a/frontend/src/@types/form.d.ts b/frontend/src/@types/form.d.ts
index b681e3a87..44855eafe 100644
--- a/frontend/src/@types/form.d.ts
+++ b/frontend/src/@types/form.d.ts
@@ -72,5 +72,6 @@ declare namespace FormType {
forced: PythonBoolean;
provider: string;
subtitle: any;
+ original_format: PythonBoolean;
}
}
diff --git a/frontend/src/pages/Episodes/table.tsx b/frontend/src/pages/Episodes/table.tsx
index cfd9c2593..7b5582e6f 100644
--- a/frontend/src/pages/Episodes/table.tsx
+++ b/frontend/src/pages/Episodes/table.tsx
@@ -52,6 +52,7 @@ const Table: FunctionComponent<Props> = ({
forced,
provider,
subtitle,
+ original_format,
} = result;
const { sonarrSeriesId: seriesId, sonarrEpisodeId: episodeId } = item;
@@ -64,6 +65,7 @@ const Table: FunctionComponent<Props> = ({
forced,
provider,
subtitle,
+ original_format: original_format,
},
});
},
diff --git a/frontend/src/pages/Movies/Details/index.tsx b/frontend/src/pages/Movies/Details/index.tsx
index 2f3570561..82a053111 100644
--- a/frontend/src/pages/Movies/Details/index.tsx
+++ b/frontend/src/pages/Movies/Details/index.tsx
@@ -60,6 +60,7 @@ const MovieDetailView: FunctionComponent<Props> = ({ match }) => {
forced,
provider,
subtitle,
+ original_format,
} = result;
const { radarrId } = item;
@@ -71,6 +72,7 @@ const MovieDetailView: FunctionComponent<Props> = ({ match }) => {
forced,
provider,
subtitle,
+ original_format,
},
});
},
diff --git a/frontend/src/pages/Settings/Languages/modal.tsx b/frontend/src/pages/Settings/Languages/modal.tsx
index f7fea93cc..61935b251 100644
--- a/frontend/src/pages/Settings/Languages/modal.tsx
+++ b/frontend/src/pages/Settings/Languages/modal.tsx
@@ -34,6 +34,7 @@ function createDefaultProfile(): Language.Profile {
cutoff: null,
mustContain: [],
mustNotContain: [],
+ originalFormat: false,
};
}
@@ -285,6 +286,18 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = (
will be excluded from search results (regex supported).
</Message>
</Input>
+ <Input name="Original Format">
+ <Selector
+ clearable
+ options={[
+ { label: "Enable", value: true },
+ { label: "Disable", value: false },
+ ]}
+ value={current.originalFormat}
+ onChange={(value) => updateProfile("originalFormat", value)}
+ ></Selector>
+ <Message>Download subtitle file without format conversion</Message>
+ </Input>
</BaseModal>
);
};
diff --git a/frontend/src/pages/Settings/Languages/table.tsx b/frontend/src/pages/Settings/Languages/table.tsx
index 7624510f9..13a8ea0b0 100644
--- a/frontend/src/pages/Settings/Languages/table.tsx
+++ b/frontend/src/pages/Settings/Languages/table.tsx
@@ -166,6 +166,7 @@ const Table: FunctionComponent = () => {
cutoff: null,
mustContain: [],
mustNotContain: [],
+ originalFormat: false,
};
showModal("profile", profile);
}}