Skip to content

Commit

Permalink
chore: type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Sep 5, 2024
1 parent 760d677 commit c50a2f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion meteor/client/lib/parsers/mos/mosXml2Js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function parseMosPluginMessageXml(xmlString: string): MosPluginMessage |
}

if (doc.mos.ncsItem && doc.mos.ncsItem.item) {
res.item = MOS.MosModel.XMLMosItem.fromXML(doc.mos.ncsItem.item, MOS_DATA_IS_STRICT)
res.item = MOS.MosModel.XMLMosItem.fromXML('ncsItem.item', doc.mos.ncsItem.item, MOS_DATA_IS_STRICT)
}

return res
Expand Down
13 changes: 10 additions & 3 deletions meteor/server/api/ingest/mosDevice/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { generateRundownSource, getPeripheralDeviceFromRundown, runIngestOperati
import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest'
import { DEFAULT_MOS_TIMEOUT_TIME } from '@sofie-automation/shared-lib/dist/core/constants'
import { executePeripheralDeviceFunctionWithCustomTimeout } from '../../peripheralDevice/executeFunction'
import { getMosTypes } from '@mos-connection/helper'

export namespace MOSDeviceActions {
export async function reloadRundown(
Expand Down Expand Up @@ -72,9 +73,15 @@ export namespace MOSDeviceActions {
if (!mosPayload.Body)
throw new Meteor.Error(500, `Part Cache for "${partCache.externalId}" missing FullStory content!`)

const story = mosPayload.Body.filter(
(item) => item.Type === 'storyItem' && item.Content.ID === piece.externalId
)[0].Content
const mosTypes = getMosTypes(false)

const story = mosPayload.Body.find(
(item) =>
item.itemType === 'storyItem' && mosTypes.mosString128.stringify(item.Content.ID) === piece.externalId
)?.Content as MOS.IMOSItem | undefined

if (!story) throw new Meteor.Error(404, `Story "${piece.externalId}" not found in mosPayload`)

const timeBase = story.TimeBase || 1
const modifiedFields = {
EditorialStart: (inPoint * timeBase) as number | undefined,
Expand Down

0 comments on commit c50a2f3

Please sign in to comment.