@saooti/octopus-sdk 38.0.6 → 38.0.8
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 +1 -1
- package/src/components/display/live/RadioPlanning.vue +15 -37
- package/src/stores/ParamSdkStore.ts +11 -10
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +9 -18
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +64 -54
package/package.json
CHANGED
|
@@ -29,58 +29,54 @@
|
|
|
29
29
|
v-for="planningItem in planning[daySelected]"
|
|
30
30
|
v-else
|
|
31
31
|
:key="
|
|
32
|
-
planningItem.
|
|
32
|
+
planningItem.occurrenceId +
|
|
33
33
|
'' +
|
|
34
|
-
planningItem.
|
|
34
|
+
planningItem.liveId
|
|
35
35
|
"
|
|
36
36
|
class="d-flex align-items-center mb-3"
|
|
37
37
|
>
|
|
38
38
|
<div class="program-item-date fw-bold flex-shrink-0">
|
|
39
|
-
{{ dateDisplay(planningItem.
|
|
39
|
+
{{ dateDisplay(planningItem.startDate) }}
|
|
40
40
|
</div>
|
|
41
|
-
<component
|
|
42
|
-
:is="
|
|
41
|
+
<!-- <component :is="
|
|
43
42
|
planningItem.podcast.availability.visibility
|
|
44
43
|
? 'router-link'
|
|
45
44
|
: 'div'
|
|
46
|
-
"
|
|
45
|
+
" -->
|
|
46
|
+
<router-link
|
|
47
47
|
class="d-flex align-items-center text-dark"
|
|
48
48
|
:to="{
|
|
49
49
|
name: 'podcast',
|
|
50
|
-
params: { podcastId: planningItem.
|
|
50
|
+
params: { podcastId: planningItem.podcastId },
|
|
51
51
|
query: { productor: filterOrgaId },
|
|
52
52
|
}"
|
|
53
53
|
>
|
|
54
54
|
<img
|
|
55
|
-
v-lazy="proxyImageUrl(planningItem.
|
|
55
|
+
v-lazy="proxyImageUrl(planningItem.podcastData.imageUrl, '150')"
|
|
56
56
|
width="150"
|
|
57
57
|
height="150"
|
|
58
58
|
class="m-2"
|
|
59
59
|
:title="
|
|
60
|
-
$t('Episode name image', { name: planningItem.
|
|
60
|
+
$t('Episode name image', { name: planningItem.podcastData.title })
|
|
61
61
|
"
|
|
62
62
|
:alt="
|
|
63
|
-
$t('Episode name image', { name: planningItem.
|
|
63
|
+
$t('Episode name image', { name: planningItem.podcastData.title })
|
|
64
64
|
"
|
|
65
65
|
/>
|
|
66
66
|
<div class="d-flex flex-column">
|
|
67
67
|
<div class="d-flex align-items-center mb-2">
|
|
68
68
|
<div
|
|
69
|
-
v-if="planningItem.
|
|
69
|
+
v-if="planningItem.liveId"
|
|
70
70
|
class="bg-complementary text-white p-1 me-1"
|
|
71
71
|
>
|
|
72
72
|
{{ $t("Live") }}
|
|
73
73
|
</div>
|
|
74
74
|
<div class="flex-grow-1 text-truncate fw-bold">
|
|
75
|
-
{{ planningItem.
|
|
75
|
+
{{ planningItem.podcastData.title }}
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
|
-
|
|
79
|
-
<ParticipantDescription
|
|
80
|
-
:participants="planningItem.podcast.animators"
|
|
81
|
-
/>
|
|
82
78
|
</div>
|
|
83
|
-
</
|
|
79
|
+
</router-link>
|
|
84
80
|
</div>
|
|
85
81
|
</template>
|
|
86
82
|
</div>
|
|
@@ -96,19 +92,16 @@ import utc from "dayjs/plugin/utc";
|
|
|
96
92
|
dayjs.extend(utc);
|
|
97
93
|
import octopusApi from "@saooti/octopus-api";
|
|
98
94
|
import imageProxy from "../../mixins/imageProxy";
|
|
99
|
-
import ParticipantDescription from "../podcasts/ParticipantDescription.vue";
|
|
100
95
|
import ClassicLoading from "../../form/ClassicLoading.vue";
|
|
101
96
|
import { defineComponent } from "vue";
|
|
102
97
|
import { Canal } from "@/stores/class/radio/canal";
|
|
103
98
|
import { PlanningOccurrence } from "@/stores/class/radio/recurrence";
|
|
104
|
-
import { Podcast } from "@/stores/class/general/podcast";
|
|
105
99
|
import { PlanningLive } from "@/stores/class/radio/live";
|
|
106
100
|
export default defineComponent({
|
|
107
101
|
name: "RadioPlanning",
|
|
108
102
|
|
|
109
103
|
components: {
|
|
110
104
|
ClassicLoading,
|
|
111
|
-
ParticipantDescription,
|
|
112
105
|
},
|
|
113
106
|
|
|
114
107
|
mixins: [imageProxy],
|
|
@@ -120,10 +113,7 @@ export default defineComponent({
|
|
|
120
113
|
data() {
|
|
121
114
|
return {
|
|
122
115
|
planning: {} as {
|
|
123
|
-
[key: number]: Array<
|
|
124
|
-
podcast: Podcast;
|
|
125
|
-
occurrence: PlanningOccurrence | PlanningLive;
|
|
126
|
-
}>;
|
|
116
|
+
[key: number]: Array<PlanningOccurrence | PlanningLive>;
|
|
127
117
|
},
|
|
128
118
|
daySelected: dayjs().valueOf(),
|
|
129
119
|
arrayDays: [] as Array<{
|
|
@@ -195,19 +185,7 @@ export default defineComponent({
|
|
|
195
185
|
return b.startDate > a.startDate ? -1 : 0;
|
|
196
186
|
});
|
|
197
187
|
}
|
|
198
|
-
this.planning[this.daySelected] =
|
|
199
|
-
for (let oc of occurrences) {
|
|
200
|
-
if (oc.podcastId) {
|
|
201
|
-
const data: Podcast = await octopusApi.fetchData<Podcast>(
|
|
202
|
-
0,
|
|
203
|
-
"podcast/" + oc.podcastId,
|
|
204
|
-
);
|
|
205
|
-
this.planning[this.daySelected].push({
|
|
206
|
-
podcast: data,
|
|
207
|
-
occurrence: oc,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
}
|
|
188
|
+
this.planning[this.daySelected] = occurrences.filter((oc) => oc.podcastId);
|
|
211
189
|
} catch {
|
|
212
190
|
this.error = true;
|
|
213
191
|
}
|
|
@@ -12,7 +12,7 @@ const state: ParamStore = {
|
|
|
12
12
|
isPlaylist: true,
|
|
13
13
|
isProduction: true,
|
|
14
14
|
isContribution: true,
|
|
15
|
-
ApiUri: "https://api.
|
|
15
|
+
ApiUri: "https://api.staging.saooti.org/",
|
|
16
16
|
podcastmaker: false,
|
|
17
17
|
buttonPlus: true,
|
|
18
18
|
allCategories: [],
|
|
@@ -26,8 +26,8 @@ const state: ParamStore = {
|
|
|
26
26
|
SharePlayer: true,
|
|
27
27
|
ShareButtons: true,
|
|
28
28
|
ShareDistribution: true,
|
|
29
|
-
MiniplayerUri: "https://playerbeta.
|
|
30
|
-
hlsUri: "https://hls.live.
|
|
29
|
+
MiniplayerUri: "https://playerbeta.staging.saooti.org/",
|
|
30
|
+
hlsUri: "https://hls.live.staging.saooti.org/",
|
|
31
31
|
mainRubrique: 0,
|
|
32
32
|
resourceUrl: undefined,
|
|
33
33
|
podcastItemShowEmission: false,
|
|
@@ -79,13 +79,14 @@ const state: ParamStore = {
|
|
|
79
79
|
userName: "",
|
|
80
80
|
},
|
|
81
81
|
octopusApi: {
|
|
82
|
-
url: "https://api.
|
|
83
|
-
commentsUrl: "https://comments.
|
|
84
|
-
imageUrl: "https://imageproxy.
|
|
85
|
-
studioUrl: "https://studio.
|
|
86
|
-
playerUrl: "https://playerbeta.
|
|
87
|
-
speechToTextUrl: "https://speech2text.
|
|
88
|
-
|
|
82
|
+
url: "https://api.staging.saooti.org/",
|
|
83
|
+
commentsUrl: "https://comments.staging.saooti.org/",
|
|
84
|
+
imageUrl: "https://imageproxy.staging.saooti.org/",
|
|
85
|
+
studioUrl: "https://studio.staging.saooti.org/",
|
|
86
|
+
playerUrl: "https://playerbeta.staging.saooti.org/",
|
|
87
|
+
speechToTextUrl: "https://speech2text.staging.saooti.org/",
|
|
88
|
+
radioUrl:"https://radio.staging.saooti.org/",
|
|
89
|
+
recoUrl: "https://reco.staging.saooti.org/",
|
|
89
90
|
organisationId: undefined,
|
|
90
91
|
rubriqueIdFilter: undefined,
|
|
91
92
|
},
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Occurrence } from "./recurrence";
|
|
2
|
+
|
|
1
3
|
export interface CrudPlanningLive {
|
|
2
4
|
isLive: boolean;
|
|
3
5
|
dateValid: boolean;
|
|
4
6
|
canalId: number;
|
|
5
|
-
|
|
7
|
+
occurrenceId: number;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
export interface TimeRangeAvailable {
|
|
@@ -10,25 +12,14 @@ export interface TimeRangeAvailable {
|
|
|
10
12
|
end: Date;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export interface PlanningLive {
|
|
14
|
-
canalId: number;
|
|
15
|
-
liveId: number;
|
|
16
|
-
startDate: Date;
|
|
17
|
-
endDate: Date;
|
|
18
|
-
podcastId: number;
|
|
19
|
-
podcastData: {
|
|
20
|
-
title: string;
|
|
21
|
-
artist: string;
|
|
22
|
-
duration: number;
|
|
23
|
-
conferenceId: number;
|
|
24
|
-
};
|
|
15
|
+
export interface PlanningLive extends Occurrence {
|
|
25
16
|
}
|
|
26
17
|
|
|
27
18
|
export function emptyCrudPlanningLive(): CrudPlanningLive {
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
return {
|
|
20
|
+
isLive: false,
|
|
30
21
|
dateValid: false,
|
|
31
22
|
canalId: 0,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
23
|
+
occurrenceId:0,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export interface Mix {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
mixId?: number;
|
|
3
|
+
color: string;
|
|
4
|
+
description: string;
|
|
5
|
+
name: string;
|
|
6
|
+
organisationId:string;
|
|
7
|
+
samplings: Array<MediaSampling>
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface MediaSampling {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
mediaSamplingId?: number;
|
|
12
|
+
number: number;
|
|
13
|
+
armb?:string;
|
|
14
|
+
playlistId?:number;
|
|
15
|
+
criterions: Array<Criterion>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface Criterion {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
criterionId?: number;
|
|
20
|
+
criterionValue?: string;
|
|
21
|
+
criterionType?:string;
|
|
22
|
+
mediaField?:string;
|
|
23
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Media } from "../general/media";
|
|
2
2
|
|
|
3
3
|
export interface PlaylistMedia {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
4
|
+
playlistId: number;
|
|
5
|
+
color: string;
|
|
6
|
+
description: string;
|
|
7
|
+
name: string;
|
|
8
|
+
organisationId:string;
|
|
9
|
+
medias: Array<Media>
|
|
10
|
+
}
|
|
@@ -1,76 +1,86 @@
|
|
|
1
|
-
export interface TimeValue
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export interface TimeValue{
|
|
2
|
+
hours: number;
|
|
3
|
+
minutes: number;
|
|
4
|
+
seconds: number;
|
|
5
5
|
}
|
|
6
6
|
export interface Cron {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
cronId?: number;
|
|
8
|
+
cron: string;
|
|
9
|
+
label?:string;
|
|
10
|
+
timezone: string;
|
|
11
11
|
}
|
|
12
12
|
export interface Tranche {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
recId: number;
|
|
14
|
+
start: string;
|
|
15
|
+
duration: number;
|
|
16
|
+
playlistName?: string;
|
|
17
|
+
playlistId?: number;
|
|
18
|
+
mixId?: number;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export interface Occurrence {
|
|
23
|
+
occurrenceId: number;
|
|
24
|
+
canalId: number;
|
|
25
|
+
startDate: string;
|
|
26
|
+
recurrenceStartDate: string;
|
|
27
|
+
endDate:string;
|
|
28
|
+
podcastId: number;
|
|
29
|
+
recurrenceId:number;
|
|
30
|
+
podcastData:{
|
|
31
31
|
title: string;
|
|
32
32
|
artist: string;
|
|
33
33
|
duration: number;
|
|
34
34
|
pathAudio: number;
|
|
35
|
+
conferenceId: number;
|
|
36
|
+
description: string;
|
|
37
|
+
imageUrl: string;
|
|
35
38
|
};
|
|
36
39
|
}
|
|
40
|
+
|
|
41
|
+
export interface PlanningOccurrence extends Occurrence{
|
|
42
|
+
chained: boolean,
|
|
43
|
+
nextOccurrence?: number,
|
|
44
|
+
previousOccurrence?: number,
|
|
45
|
+
}
|
|
46
|
+
|
|
37
47
|
export interface Recurrence {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
recurrenceId: number;
|
|
49
|
+
name: string;
|
|
50
|
+
canalId: number;
|
|
51
|
+
validityStart: string;
|
|
52
|
+
validityEnd: string;
|
|
53
|
+
crons: Array<Cron>;
|
|
54
|
+
duration:number;
|
|
45
55
|
}
|
|
46
56
|
export interface AmbianceRecurrence extends Recurrence {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
armbPlaylistName?: string;
|
|
58
|
+
mediaPlaylistId?: number;
|
|
59
|
+
mixId?: number;
|
|
50
60
|
}
|
|
51
|
-
export interface PlanningRecurrence extends Recurrence
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
export interface PlanningRecurrence extends Recurrence{
|
|
62
|
+
octopusPlaylistName: string;
|
|
63
|
+
octopusPlaylistId: number;
|
|
64
|
+
chained: boolean;
|
|
65
|
+
exclusions: Array<Exclusion>
|
|
56
66
|
}
|
|
57
67
|
export interface Exclusion {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
68
|
+
exclusionId: number;
|
|
69
|
+
validityStart: string;
|
|
70
|
+
validityEnd: string;
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
export function emptyCron(): Cron {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
return {
|
|
75
|
+
cron:"0 0 0 ? * MON,TUE,WED,THU,FRI,SAT,SUN *",
|
|
76
|
+
label:"",
|
|
77
|
+
timezone: "Europe/Paris",
|
|
78
|
+
};
|
|
69
79
|
}
|
|
70
80
|
export function emptyTimeValue(): TimeValue {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
81
|
+
return {
|
|
82
|
+
hours: 0,
|
|
83
|
+
minutes: 0,
|
|
84
|
+
seconds: 0,
|
|
85
|
+
};
|
|
86
|
+
}
|