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 [monitored, setMonitored] = useState(false);
|
||||
|
||||
const [updating, setUpdating] = useState(false);
|
||||
|
||||
const footer = (
|
||||
|
@ -43,11 +45,12 @@ const Editor: FunctionComponent<Props & BaseModalProps> = (props) => {
|
|||
promise={() => {
|
||||
if (payload) {
|
||||
const itemId = GetItemId(payload);
|
||||
const monitored = payload.monitored ? "True" : "False";
|
||||
setId(id);
|
||||
setMonitored(monitored);
|
||||
return submit({
|
||||
id: [itemId],
|
||||
profileid: [id],
|
||||
monitored: [monitored],
|
||||
monitored: [monitored ? "True" : "False"],
|
||||
});
|
||||
} else {
|
||||
return null;
|
||||
|
@ -75,8 +78,10 @@ const Editor: FunctionComponent<Props & BaseModalProps> = (props) => {
|
|||
<Form.Label>Monitored</Form.Label>
|
||||
<Form.Check
|
||||
custom
|
||||
readOnly={true}
|
||||
checked={payload?.monitored}
|
||||
id={payload?.tmdbId.toString()}
|
||||
checked={monitored}
|
||||
onChange={(v) => setMonitored(v.target.checked)}
|
||||
label={"Download subtitles if available"}
|
||||
></Form.Check>
|
||||
</Form.Group>
|
||||
{payload?.audio_language ? (
|
||||
|
|
Loading…
Reference in a new issue