mirror of
https://github.com/koush/scrypted.git
synced 2026-03-04 18:33:18 +00:00
server: fix media manager serialization for non-serializable types
This commit is contained in:
@@ -251,7 +251,7 @@ export abstract class MediaManagerBase implements MediaManager {
|
||||
if (mimeType === ScryptedMimeTypes.MediaObject)
|
||||
return data;
|
||||
|
||||
if (data.constructor.name !== Buffer.name)
|
||||
if (data.constructor.name === Object.name)
|
||||
data = Buffer.from(JSON.stringify(data));
|
||||
|
||||
const sourceId = typeof options?.sourceId === 'string' ? options?.sourceId : this.getPluginDeviceId();
|
||||
|
||||
Reference in New Issue
Block a user