mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-28 08:35:53 +00:00
Added mass changing of monitored status.
This commit is contained in:
parent
591c4243e2
commit
4a178f0e62
1 changed files with 9 additions and 4 deletions
|
@ -33,6 +33,8 @@ const Editor: FunctionComponent<Props & BaseModalProps> = (props) => {
|
||||||
);
|
);
|
||||||
const [id, setId] = useState<Nullable<number>>(null);
|
const [id, setId] = useState<Nullable<number>>(null);
|
||||||
|
|
||||||
|
const [monitored, setMonitored] = useState(false);
|
||||||
|
|
||||||
const [updating, setUpdating] = useState(false);
|
const [updating, setUpdating] = useState(false);
|
||||||
|
|
||||||
const footer = (
|
const footer = (
|
||||||
|
@ -43,11 +45,12 @@ const Editor: FunctionComponent<Props & BaseModalProps> = (props) => {
|
||||||
promise={() => {
|
promise={() => {
|
||||||
if (payload) {
|
if (payload) {
|
||||||
const itemId = GetItemId(payload);
|
const itemId = GetItemId(payload);
|
||||||
const monitored = payload.monitored ? "True" : "False";
|
setId(id);
|
||||||
|
setMonitored(monitored);
|
||||||
return submit({
|
return submit({
|
||||||
id: [itemId],
|
id: [itemId],
|
||||||
profileid: [id],
|
profileid: [id],
|
||||||
monitored: [monitored],
|
monitored: [monitored ? "True" : "False"],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -75,8 +78,10 @@ const Editor: FunctionComponent<Props & BaseModalProps> = (props) => {
|
||||||
<Form.Label>Monitored</Form.Label>
|
<Form.Label>Monitored</Form.Label>
|
||||||
<Form.Check
|
<Form.Check
|
||||||
custom
|
custom
|
||||||
readOnly={true}
|
id={payload?.tmdbId.toString()}
|
||||||
checked={payload?.monitored}
|
checked={monitored}
|
||||||
|
onChange={(v) => setMonitored(v.target.checked)}
|
||||||
|
label={"Download subtitles if available"}
|
||||||
></Form.Check>
|
></Form.Check>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
{payload?.audio_language ? (
|
{payload?.audio_language ? (
|
||||||
|
|
Loading…
Reference in a new issue