Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Mar 13, 2024
2 parents a9f438b + 814b1af commit 1c25d12
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 82 deletions.
4 changes: 2 additions & 2 deletions bazarr/radarr/rootfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def check_radarr_rootfolder():
if not os.path.isdir(path_mappings.path_replace_movie(root_path)):
database.execute(
update(TableMoviesRootfolder)
.values(accessible=0, error='This Radarr root directory does not seems to be accessible by Please '
'check path mapping.')
.values(accessible=0, error='This Radarr root directory does not seem to be accessible by Bazarr. '
'Please check path mapping or if directory/drive is online.')
.where(TableMoviesRootfolder.id == item.id))
elif not os.access(path_mappings.path_replace_movie(root_path), os.W_OK):
database.execute(
Expand Down
4 changes: 2 additions & 2 deletions bazarr/sonarr/rootfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def check_sonarr_rootfolder():
if not os.path.isdir(path_mappings.path_replace(root_path)):
database.execute(
update(TableShowsRootfolder)
.values(accessible=0, error='This Sonarr root directory does not seems to be accessible by Bazarr. '
'Please check path mapping.')
.values(accessible=0, error='This Sonarr root directory does not seem to be accessible by Bazarr. '
'Please check path mapping or if directory/drive is online.')
.where(TableShowsRootfolder.id == item.id))
elif not os.access(path_mappings.path_replace(root_path), os.W_OK):
database.execute(
Expand Down
2 changes: 1 addition & 1 deletion custom_libs/subliminal_patch/providers/whisperai.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def __init__(self, endpoint=None, response=None, timeout=None, ffmpeg_path=None,
if not ffmpeg_path:
raise ConfigurationError("ffmpeg path must be provided")

self.endpoint = endpoint
self.endpoint = endpoint.rstrip("/")
self.response = int(response)
self.timeout = int(timeout)
self.session = None
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/forms/ItemEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const ItemEditForm: FunctionComponent<Props> = ({
{...profileOptions}
{...form.getInputProps("profile")}
clearable
label="Languages Profiles"
label="Languages Profile"
></Selector>
<Divider></Divider>
<Group position="right">
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/modals/ManualSearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function ManualSearchView<T extends SupportType>(props: Props<T>) {
},
},
{
Header: "Language",
accessor: "language",
Cell: ({ row: { original }, value }) => {
const lang: Language.Info = {
Expand Down Expand Up @@ -137,14 +138,15 @@ function ManualSearchView<T extends SupportType>(props: Props<T>) {
},
},
{
Header: "Upload",
Header: "Uploader",
accessor: "uploader",
Cell: ({ value }) => {
const { classes } = useTableStyles();
return <Text className={classes.noWrap}>{value ?? "-"}</Text>;
},
},
{
Header: "Match",
accessor: "matches",
Cell: (row) => {
const { matches, dont_matches: dont } = row.row.original;
Expand All @@ -158,6 +160,7 @@ function ManualSearchView<T extends SupportType>(props: Props<T>) {
},
},
{
Header: "Get",
accessor: "subtitle",
Cell: ({ row }) => {
const result = row.original;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Episodes/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ const Table: FunctionComponent<Props> = ({
useEffect(() => {
if (instance.current) {
if (initial) {
// start with all rows collapsed
instance.current.toggleAllRowsExpanded(false);
// expand the last/current season on initial display
instance.current.toggleRowExpanded([`season:${maxSeason}`], true);
// make sure season 0 is collapsed
instance.current.toggleRowExpanded([`season:0`], false);
} else {
if (expand !== undefined) {
instance.current.toggleAllRowsExpanded(expand);
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/History/Movies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const MoviesHistoryView: FunctionComponent = () => {
accessor: "score",
},
{
Header: "Match",
accessor: "matches",
Cell: (row) => {
const { matches, dont_matches: dont } = row.row.original;
Expand Down Expand Up @@ -90,6 +91,7 @@ const MoviesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Info",
accessor: "description",
Cell: ({ value }) => {
return (
Expand All @@ -100,11 +102,12 @@ const MoviesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Upgrade",
accessor: "upgradable",
Cell: (row) => {
if (row.value) {
return (
<TextPopover text="This Subtitles File Is Eligible For An Upgrade.">
<TextPopover text="This Subtitle File Is Eligible For An Upgrade.">
<FontAwesomeIcon size="sm" icon={faRecycle}></FontAwesomeIcon>
</TextPopover>
);
Expand All @@ -114,6 +117,7 @@ const MoviesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Blacklist",
accessor: "blacklisted",
Cell: ({ row, value }) => {
const add = useMovieAddBlacklist();
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/pages/History/Series/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const SeriesHistoryView: FunctionComponent = () => {
accessor: "score",
},
{
Header: "Match",
accessor: "matches",
Cell: (row) => {
const { matches, dont_matches: dont } = row.row.original;
Expand Down Expand Up @@ -106,6 +107,7 @@ const SeriesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Info",
accessor: "description",
Cell: ({ row, value }) => {
return (
Expand All @@ -116,11 +118,12 @@ const SeriesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Upgrade",
accessor: "upgradable",
Cell: (row) => {
if (row.value) {
return (
<TextPopover text="This Subtitles File Is Eligible For An Upgrade.">
<TextPopover text="This Subtitle File Is Eligible For An Upgrade.">
<FontAwesomeIcon size="sm" icon={faRecycle}></FontAwesomeIcon>
</TextPopover>
);
Expand All @@ -130,6 +133,7 @@ const SeriesHistoryView: FunctionComponent = () => {
},
},
{
Header: "Blacklist",
accessor: "blacklisted",
Cell: ({ row, value }) => {
const {
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/pages/Series/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useSeriesModification, useSeriesPagination } from "@/apis/hooks";
import { Action } from "@/components";
import { AudioList } from "@/components/bazarr";
import LanguageProfileName from "@/components/bazarr/LanguageProfile";
import { ItemEditModal } from "@/components/forms/ItemEditForm";
import { useModals } from "@/modules/modals";
Expand Down Expand Up @@ -44,13 +43,6 @@ const SeriesView: FunctionComponent = () => {
);
},
},
{
Header: "Audio",
accessor: "audio_language",
Cell: ({ value }) => {
return <AudioList audios={value}></AudioList>;
},
},
{
Header: "Languages Profile",
accessor: "profileId",
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/Settings/Languages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
<Selector
clearable
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 indexing using cache)"
placeholder="Select languages"
options={undEmbeddedSubtitlesLanguages.map((v) => {
return { label: v.name, value: v.code2 };
Expand All @@ -112,7 +112,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
}}
></Selector>
</Section>
<Section header="Languages Profiles">
<Section header="Languages Profile">
<Table></Table>
</Section>
<Section header="Default Settings">
Expand All @@ -121,7 +121,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
settingKey="settings-general-serie_default_enabled"
></Check>
<Message>
Apply only to Series added to Bazarr after enabling this option.
Will apply only to Series added to Bazarr after enabling this option.
</Message>

<CollapseBox indent settingKey="settings-general-serie_default_enabled">
Expand All @@ -137,7 +137,7 @@ const SettingsLanguagesView: FunctionComponent = () => {
settingKey="settings-general-movie_default_enabled"
></Check>
<Message>
Apply only to Movies added to Bazarr after enabling this option.
Will apply only to Movies added to Bazarr after enabling this option.
</Message>

<CollapseBox indent settingKey="settings-general-movie_default_enabled">
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/pages/Settings/Subtitles/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ export const folderOptions: SelectorOption<string>[] = [

export const embeddedSubtitlesParserOption: SelectorOption<string>[] = [
{
label: "ffprobe (faster)",
label:
"ffprobe (faster than mediainfo. Part of Bazarr installation already)",
value: "ffprobe",
},
{
label:
"mediainfo (slower but may give better results. Must be already installed)",
"mediainfo (slower but may give better results. User must install the mediainfo executable first)",
value: "mediainfo",
},
];
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/System/Announcements/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Table: FunctionComponent<Props> = ({ announcements }) => {
},
},
{
Header: "More info",
Header: "More Info",
accessor: "link",
Cell: ({ value }) => {
if (value) {
Expand Down
98 changes: 51 additions & 47 deletions frontend/src/pages/System/Backups/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { Action, PageTable } from "@/components";
import { useModals } from "@/modules/modals";
import { useTableStyles } from "@/styles";
import { Environment } from "@/utilities";
import { faClock, faHistory, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Anchor, Group, Text } from "@mantine/core";
import { faHistory, faTrash } from "@fortawesome/free-solid-svg-icons";
import { Anchor, Text } from "@mantine/core";
import { FunctionComponent, useMemo } from "react";
import { Column } from "react-table";

Expand All @@ -16,10 +15,6 @@ interface Props {
const Table: FunctionComponent<Props> = ({ backups }) => {
const columns: Column<System.Backups>[] = useMemo<Column<System.Backups>[]>(
() => [
{
accessor: "type",
Cell: <FontAwesomeIcon icon={faClock}></FontAwesomeIcon>,
},
{
Header: "Name",
accessor: "filename",
Expand Down Expand Up @@ -50,52 +45,61 @@ const Table: FunctionComponent<Props> = ({ backups }) => {
},
},
{
id: "actions",
id: "restore",
Header: "Restore",
accessor: "filename",
Cell: ({ value }) => {
const modals = useModals();
const restore = useRestoreBackups();
return (
<Action
label="Restore"
onClick={() =>
modals.openConfirmModal({
title: "Restore Backup",
children: (
<Text size="sm">
Are you sure you want to restore the backup ({value})?
Bazarr will automatically restart and reload the UI during
the restore process.
</Text>
),
labels: { confirm: "Restore", cancel: "Cancel" },
confirmProps: { color: "red" },
onConfirm: () => restore.mutate(value),
})
}
icon={faHistory}
></Action>
);
},
},
{
id: "delet4",
Header: "Delete",
accessor: "filename",
Cell: ({ value }) => {
const modals = useModals();
const remove = useDeleteBackups();
return (
<Group spacing="xs" noWrap>
<Action
label="Restore"
onClick={() =>
modals.openConfirmModal({
title: "Restore Backup",
children: (
<Text size="sm">
Are you sure you want to restore the backup ({value})?
Bazarr will automatically restart and reload the UI
during the restore process.
</Text>
),
labels: { confirm: "Restore", cancel: "Cancel" },
confirmProps: { color: "red" },
onConfirm: () => restore.mutate(value),
})
}
icon={faHistory}
></Action>
<Action
label="Delete"
color="red"
onClick={() =>
modals.openConfirmModal({
title: "Delete Backup",
children: (
<Text size="sm">
Are you sure you want to delete the backup ({value})?
</Text>
),
labels: { confirm: "Delete", cancel: "Cancel" },
confirmProps: { color: "red" },
onConfirm: () => remove.mutate(value),
})
}
icon={faTrash}
></Action>
</Group>
<Action
label="Delete"
color="red"
onClick={() =>
modals.openConfirmModal({
title: "Delete Backup",
children: (
<Text size="sm">
Are you sure you want to delete the backup ({value})?
</Text>
),
labels: { confirm: "Delete", cancel: "Cancel" },
confirmProps: { color: "red" },
onConfirm: () => remove.mutate(value),
})
}
icon={faTrash}
></Action>
);
},
},
Expand Down
Loading

0 comments on commit 1c25d12

Please sign in to comment.