diagnostics: fix metadata retrieval failrue

This commit is contained in:
Koushik Dutta
2025-11-25 08:45:56 -08:00
parent 72c7736b2a
commit 6a952bf104
3 changed files with 8 additions and 6 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/diagnostics",
"version": "0.0.22",
"version": "0.0.23",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/diagnostics",
"version": "0.0.22",
"version": "0.0.23",
"dependencies": {
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/diagnostics",
"version": "0.0.22",
"version": "0.0.23",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",

View File

@@ -228,14 +228,16 @@ class DiagnosticsPlugin extends ScryptedDeviceBase implements Settings {
const validated = new Set<string | undefined>();
const validateMediaStream = async (stepName: string, destination: MediaStreamDestination) => {
const vsos = await device.getVideoStreamOptions();
const streamId = vsos.find(vso => vso.destinations?.includes(destination))?.id;
let streamId: string|undefined;
await this.validate(console, stepName + ' (Metadata)', async () => {
const vsos = await device.getVideoStreamOptions();
streamId = vsos.find(vso => vso.destinations?.includes(destination))?.id;
});
if (validated.has(streamId)) {
await this.validate(console, stepName, async () => "Skipped (Duplicate)");
return;
}
validated.add(streamId);
const ffmpegInput = await sdk.mediaManager.convertMediaObjectToJSON<FFmpegInput>(await getVideoStream(destination), ScryptedMimeTypes.FFmpegInput);