Skip to content

Commit

Permalink
homekit: undo revert for later publish
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Apr 15, 2024
1 parent a3a878c commit a5a464e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/homekit/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class HomeKitPlugin extends ScryptedDeviceBase implements MixinProvider,
storageSettings.settings.pincode.persistedDefaultValue = randomPinCode();
// TODO: change this value after this current default has been persisted to existing clients.
// changing it now will cause existing accessories be renamed.
storageSettings.settings.addIdentifyingMaterial.persistedDefaultValue = false;
storageSettings.settings.addIdentifyingMaterial.persistedDefaultValue = true;

const mixinConsole = deviceManager.getMixinConsole(device.id, this.nativeId);

Expand Down
6 changes: 4 additions & 2 deletions plugins/homekit/src/types/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ addSupportedType({
const isRecordingEnabled = device.interfaces.includes(ScryptedInterface.MotionSensor);

let configuration: CameraRecordingConfiguration;
const openRecordingStreams = new Set<number>();
const openRecordingStreams = new Map<number, AsyncGenerator<RecordingPacket>>();
if (isRecordingEnabled) {
recordingDelegate = {
updateRecordingConfiguration(newConfiguration: CameraRecordingConfiguration) {
Expand All @@ -112,10 +112,12 @@ addSupportedType({
handleRecordingStreamRequest(streamId: number): AsyncGenerator<RecordingPacket> {
const ret = handleFragmentsRequests(streamId, device, configuration, console, homekitPlugin,
() => openRecordingStreams.has(streamId));
openRecordingStreams.add(streamId);
openRecordingStreams.set(streamId, ret);
return ret;
},
closeRecordingStream(streamId, reason) {
const r = openRecordingStreams.get(streamId);
r?.throw(new Error(reason?.toString()));
openRecordingStreams.delete(streamId);
},
updateRecordingActive(active) {
Expand Down

0 comments on commit a5a464e

Please sign in to comment.