Skip to content

Commit

Permalink
SOF-1824 Don't include the audioTrack in the name of EVS when ingesti…
Browse files Browse the repository at this point in the history
…ng from iNews
  • Loading branch information
LindvedKrvang committed Mar 19, 2024
1 parent 21e57b8 commit ededde5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions src/tv2-common/inewsConversion/converters/ParseBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,14 +675,15 @@ export function getSourceDefinition(typeStr: string): SourceDefinition | undefin
}
} else if (EVS_RED_TEXT.test(typeStr)) {
const strippedToken = typeStr.match(EVS_RED_TEXT)
const id = `EVS ${strippedToken![1].toUpperCase()} 1/2`
const vo = strippedToken![2]
const name: string = `EVS ${strippedToken![1].toUpperCase()}`
const audioTrack: string = '1/2'
const vo: string = strippedToken![2]
return {
sourceType: SourceType.REPLAY,
id,
id: `${name} ${audioTrack}`,
vo: !!vo,
raw: strippedToken![0].trim(),
name: `${id}${vo ? ' ' + vo : ''}`
name: `${name}${vo ? ' ' + vo : ''}`
}
} else if (/EPSIO/i.test(typeStr)) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 1 1/2',
name: 'EVS 1 1/2',
name: 'EVS 1',
raw: 'EVS 1',
vo: false
},
Expand All @@ -1542,7 +1542,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 1 1/2',
name: 'EVS 1 1/2 VOV',
name: 'EVS 1 VOV',
raw: 'EVS1VOV',
vo: true
},
Expand All @@ -1568,7 +1568,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 1 1/2',
name: 'EVS 1 1/2 VO',
name: 'EVS 1 VO',
raw: 'EVS 1 VO',
vo: true
},
Expand All @@ -1586,7 +1586,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 2 1/2',
name: 'EVS 2 1/2 VO',
name: 'EVS 2 VO',
raw: 'EVS 2VO',
vo: true
},
Expand All @@ -1604,7 +1604,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 3 1/2',
name: 'EVS 3 1/2 VO',
name: 'EVS 3 VO',
raw: 'EVS3VO',
vo: true
},
Expand All @@ -1622,7 +1622,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 4 1/2',
name: 'EVS 4 1/2 VO',
name: 'EVS 4 VO',
raw: 'EVS4 VO',
vo: true
},
Expand Down Expand Up @@ -2564,7 +2564,7 @@ describe('Body parser', () => {
routing: {
type: CueType.Routing,
target: 'WALL',
INP1: { sourceType: SourceType.REPLAY, name: 'EVS 1 1/2', id: 'EVS 1 1/2', raw: 'EVS 1', vo: false },
INP1: { sourceType: SourceType.REPLAY, name: 'EVS 1', id: 'EVS 1 1/2', raw: 'EVS 1', vo: false },
iNewsCommand: ''
},
graphic: {
Expand Down Expand Up @@ -2604,7 +2604,7 @@ describe('Body parser', () => {
sourceDefinition: {
sourceType: SourceType.REPLAY,
id: 'EVS 1 1/2',
name: 'EVS 1 1/2',
name: 'EVS 1',
raw: 'EVS 1',
vo: false
},
Expand Down

0 comments on commit ededde5

Please sign in to comment.