Skip to content

Commit

Permalink
fix: added bug-fixes from main (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmen237 authored Nov 7, 2024
1 parent 700aa86 commit ab4b87b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/ateliereLive/pipelines/streams/streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export async function createStream(
};
}
const updatedViewsForSource = viewsForSource.map((v) => {
return { ...v, label: source.name };
return { ...v, label: v.label || source.name };
});

const updatedViews = [
Expand Down
7 changes: 6 additions & 1 deletion src/api/manager/job/syncInventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ export async function runSyncInventory() {
audio_stream:
apiSource.ingest_type === 'SRT' && apiSource.status === 'gone'
? inventorySource.audio_stream
: apiSource.audio_stream,
: {
number_of_channels: apiSource.audio_stream.number_of_channels,
sample_rate: apiSource.audio_stream.sample_rate,
audio_mapping:
inventorySource.audio_stream.audio_mapping || undefined
},
// Add srt metadata if missing from SRT sources
srt: updateSrtMetadata(inventorySource, apiSource)
} satisfies WithId<Source>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/production/sources/ProductionSources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const ProductionSources: React.FC<ProductionSourcesProps> = (props) => {
const input: SourceReference = {
_id: source._id.toString(),
type: 'ingest_source',
label: source.ingest_source_name,
label: source.name || source.ingest_source_name,
input_slot: firstEmptySlot(selectedSources)
};
addSource(input);
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/useMultiviewDefaultPresets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export function useMultiviewDefaultPresets({
return {
...view,
label: sourceSlot >= 0 ? source.label : view.label,
id: sourceSlot >= 0 ? source._id : view.id
id: sourceSlot >= 0 ? source._id : view.id,
input_slot:
sourceSlot >= 0 ? source.input_slot : view.input_slot
};
})
}
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/useUpdateSourceInputSlotOnMultiviewLayouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ export function useUpdateSourceInputSlotOnMultiviewLayouts(): CallbackHook<
)?.label;

if ((view.id && view.id.length < 5) || preview || program) {
return view;
return {
...view,
label: isUpdatedLabel || view.label
};
} else if (isUpdatedInputSlot || isSameInputSlot) {
return {
...view,
Expand Down

0 comments on commit ab4b87b

Please sign in to comment.