Update playersite on saving a channel (datarhei/restreamer#362)
In case the playersite is enabled and the metadata of a channel e.g. its name changes, the playersite needs also to be updated in order to reflect this change. As a consequence the playersite has to be enabled explicitely otherwise it will get enabled without the user wanting it.
This commit is contained in:
parent
b952e4680f
commit
d7dd3b0969
@ -2068,7 +2068,7 @@ class Restreamer {
|
||||
|
||||
const settings = {
|
||||
player: 'videojs',
|
||||
playersite: true,
|
||||
playersite: false,
|
||||
channelid: 'current',
|
||||
title: 'restreamer',
|
||||
share: true,
|
||||
|
||||
@ -188,6 +188,9 @@ export default function Wizard(props) {
|
||||
// Create/update the player
|
||||
await props.restreamer.UpdatePlayer(_channelid);
|
||||
|
||||
// Create/update the playersite
|
||||
await props.restreamer.UpdatePlayersite();
|
||||
|
||||
notify.Dispatch('success', 'save:ingest', i18n._(t`Main channel saved`));
|
||||
|
||||
navigate(`/${_channelid}`);
|
||||
|
||||
@ -316,6 +316,12 @@ export default function Edit(props) {
|
||||
notify.Dispatch('warning', 'save:ingest', i18n._(t`Failed to update the player`));
|
||||
}
|
||||
|
||||
// Create/update the playersite
|
||||
res = await props.restreamer.UpdatePlayersite();
|
||||
if (res === false) {
|
||||
notify.Dispatch('warning', 'save:ingest', i18n._(t`Failed to update the playersite`));
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
@ -501,7 +507,7 @@ export default function Edit(props) {
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={12} display={{xs: 'block', md: 'none'}}>
|
||||
<Grid item xs={12} display={{ xs: 'block', md: 'none' }}>
|
||||
<Divider />
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user