@sigmaott/base-next 1.4.57 → 1.4.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -20,21 +20,26 @@ const { transcodeInput, packageInput } = useGetInputDetail({
|
|
|
20
20
|
isEvent,
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return null
|
|
26
|
-
|
|
23
|
+
const pidToProgramMap = computed(() => {
|
|
24
|
+
const map = new Map<string, any>()
|
|
27
25
|
const programMaps: any[] = (isTranscode.value || isEvent.value)
|
|
28
26
|
? (transcodeInput.value?.programMaps ?? [])
|
|
29
27
|
: (packageInput.value?.programMaps ?? [])
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
for (const pm of programMaps) {
|
|
32
30
|
const rawPids = pm.pids || []
|
|
33
31
|
const pidList = Array.isArray(rawPids)
|
|
34
32
|
? rawPids.map(String)
|
|
35
|
-
: (typeof rawPids === 'string' ? rawPids.split(',').map(s => s.trim()) : [])
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
: (typeof rawPids === 'string' ? rawPids.split(',').map((s: string) => s.trim()) : [])
|
|
34
|
+
for (const pid of pidList) {
|
|
35
|
+
map.set(pid, pm)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return map
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
function getProgramMapByPid(pid: string) {
|
|
42
|
+
return pid ? pidToProgramMap.value.get(String(pid)) ?? null : null
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
function getProgramIdByPid(pid: string) {
|