Skip to content

Commit

Permalink
rebroadcast: remove periodic restart
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 30, 2024
1 parent 4d2a038 commit 7a382a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions plugins/prebuffer-mixin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/prebuffer-mixin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/prebuffer-mixin",
"version": "0.10.17",
"version": "0.10.18",
"description": "Video Stream Rebroadcast, Prebuffer, and Management Plugin for Scrypted.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down
9 changes: 5 additions & 4 deletions plugins/prebuffer-mixin/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1596,10 +1596,11 @@ export class RebroadcastPlugin extends AutoenableMixinProvider implements MixinP
});

// schedule restarts at 2am
const midnight = millisUntilMidnight();
const twoAM = midnight + 2 * 60 * 60 * 1000;
this.log.i(`Rebroadcaster scheduled for restart at 2AM: ${Math.round(twoAM / 1000 / 60)} minutes`)
setTimeout(() => deviceManager.requestRestart(), twoAM);
// removed as the mp4 containerization leak used way back when is defunct.
// const midnight = millisUntilMidnight();
// const twoAM = midnight + 2 * 60 * 60 * 1000;
// this.log.i(`Rebroadcaster scheduled for restart at 2AM: ${Math.round(twoAM / 1000 / 60)} minutes`)
// setTimeout(() => deviceManager.requestRestart(), twoAM);

process.nextTick(() => {
deviceManager.onDeviceDiscovered({
Expand Down

0 comments on commit 7a382a8

Please sign in to comment.