@saooti/octopus-sdk 34.0.6 → 34.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "34.0.6",
3
+ "version": "34.0.8",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -16,7 +16,7 @@
16
16
  "test": "jest --coverage"
17
17
  },
18
18
  "dependencies": {
19
- "@saooti/octopus-api": "^0.34.0",
19
+ "@saooti/octopus-api": "^0.34.2",
20
20
  "@vue/cli": "^5.0.8",
21
21
  "@vue/compat": "^3.2.45",
22
22
  "autoprefixer": "^10.4.13",
@@ -112,6 +112,7 @@ export default defineComponent({
112
112
  emissionId: this.emission.emissionId,
113
113
  first: 0,
114
114
  size: 0,
115
+ includeStatus:["READY","PROCESSING"]
115
116
  }, true);
116
117
  if (0 === data.count) {
117
118
  this.activeEmission = false;
@@ -209,6 +209,7 @@ export default defineComponent({
209
209
  const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',{
210
210
  emissionId: this.emission.emissionId,
211
211
  size: nb,
212
+ includeStatus:["READY","PROCESSING"]
212
213
  }, true);
213
214
  if (0 === data.count) {
214
215
  this.activeEmission = false;
@@ -9,7 +9,7 @@
9
9
  id="rows-per-page-select"
10
10
  :value="rowsPerPage"
11
11
  class="c-hand p-1 mx-2"
12
- @change="$emit('update:rowsPerPage',$event.target.value)"
12
+ @change="$emit('update:rowsPerPage',parseInt($event.target.value,10))"
13
13
  >
14
14
  <option
15
15
  v-for="option in optionsRowsPerPage"
@@ -104,7 +104,7 @@ export default defineComponent({
104
104
 
105
105
  data() {
106
106
  return {
107
- optionsRowsPerPage: [5, 10, 15, 20, 25 , 30, 50] as Array<number>,
107
+ optionsRowsPerPage: [10, 20, 30, 40, 50, 60] as Array<number>,
108
108
  };
109
109
  },
110
110
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="notEmpty"
4
- class="p-3"
4
+ class="py-3"
5
5
  >
6
6
  <h2 class="mb-0 mt-3">
7
7
  {{ $t('All live emission button') }}
@@ -111,6 +111,7 @@ export default defineComponent({
111
111
  participantId: this.participant.participantId,
112
112
  first: 0,
113
113
  size: 0,
114
+ includeStatus:["READY","PROCESSING"]
114
115
  }, true);
115
116
  if (0 === data.count) {
116
117
  this.activeParticipant = false;
@@ -4,7 +4,7 @@
4
4
  v-model:first="dfirst"
5
5
  v-model:rowsPerPage="dsize"
6
6
  v-model:isMobile="isMobile"
7
- :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })} ${$t('sort by score')}`: undefined"
7
+ :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })}`: undefined"
8
8
  :total-count="totalCount"
9
9
  :loading="loading"
10
10
  :loading-text="loading?$t('Loading content ...'):undefined"
@@ -15,7 +15,7 @@
15
15
  v-model:first="first"
16
16
  v-model:rowsPerPage="size"
17
17
  v-model:isMobile="isMobile"
18
- :text-count="podcasts.length > 1 ? `${$t('Number podcasts', { nb: podcasts.length })} ${$t('sort by score')}` : undefined"
18
+ :text-count="podcasts.length > 1 ? `${$t('Number podcasts', { nb: podcasts.length })}` : undefined"
19
19
  :total-count="podcasts.length"
20
20
  :loading="loading"
21
21
  :loading-text="loading?$t('Loading podcasts ...'):undefined"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="p-3">
2
+ <div class="py-3">
3
3
  <h2>{{ titleFilter }}</h2>
4
4
  <div class="d-flex align-items-center flex-wrap mb-2">
5
5
  <div
@@ -27,6 +27,8 @@
27
27
  :organisation-id="productorId"
28
28
  :reload="reloadList"
29
29
  :include-hidden="editRight"
30
+ :showCount="showCount"
31
+ :displaySortText="false"
30
32
  @fetch="fetch"
31
33
  />
32
34
  </div>
@@ -53,6 +55,7 @@ export default defineComponent({
53
55
  reload: { default: false, type: Boolean},
54
56
  editRight: { default: false, type: Boolean},
55
57
  productorId: { default: undefined, type: String},
58
+ showCount: { default: false, type: Boolean },
56
59
  },
57
60
  emits: ['fetch'],
58
61
 
@@ -126,6 +126,9 @@ export default defineComponent({
126
126
  );
127
127
  },
128
128
  }),
129
+ authenticated(): boolean {
130
+ return (state.generalParameters.authenticated as boolean);
131
+ },
129
132
  mainRubrique(): boolean{
130
133
  return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && (this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique) as boolean);
131
134
  },
@@ -154,7 +157,8 @@ export default defineComponent({
154
157
  undefined!==this.podcast &&
155
158
  false !== this.podcast.valid &&
156
159
  ('READY_TO_RECORD' === this.podcast.processingStatus ||
157
- 'READY' === this.podcast.processingStatus) &&
160
+ 'READY' === this.podcast.processingStatus ||
161
+ ('PROCESSING' === this.podcast.processingStatus && !this.authenticated)) &&
158
162
  !this.isLiveToBeRecorded && undefined!==this.podcast.availability.visibility
159
163
  && this.podcast.availability.visibility
160
164
  );
@@ -186,6 +186,7 @@ export default defineComponent({
186
186
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
187
187
  sort: this.popularSort ? 'POPULARITY' : 'DATE',
188
188
  query: this.query,
189
+ includeStatus:["READY","PROCESSING"]
189
190
  }, true);
190
191
  this.loading = false;
191
192
  this.totalCount = data.count;
@@ -64,6 +64,7 @@ export default defineComponent({
64
64
  after: { default: undefined, type: String},
65
65
  includeHidden: { default: false, type: Boolean},
66
66
  showCount: { default: false, type: Boolean },
67
+ displaySortText: { default: true, type: Boolean },
67
68
  sortCriteria: { default: undefined, type: String},
68
69
  notValid: { default: undefined , type: Boolean},
69
70
  rubriqueId: { default: () => [], type: Array as ()=>Array<number> },
@@ -103,6 +104,9 @@ export default defineComponent({
103
104
  return this.popularSort? "POPULARITY" : this.sortCriteria??'DATE';
104
105
  },
105
106
  sortText(): string {
107
+ if(!this.displaySortText){
108
+ return "";
109
+ }
106
110
  switch (this.sortCriteria) {
107
111
  case 'SCORE':return " "+this.$t('sort by score');
108
112
  case 'DATE':return " "+this.$t('sort by date');
@@ -154,7 +158,8 @@ export default defineComponent({
154
158
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
155
159
  includeHidden: this.includeHidden,
156
160
  validity: undefined !== this.notValid?!this.notValid: undefined,
157
- publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined
161
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined,
162
+ includeStatus:["READY","PROCESSING"]
158
163
  };
159
164
  try {
160
165
  const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
@@ -149,6 +149,7 @@ export default defineComponent({
149
149
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
150
150
  sort: this.popularSort ? 'POPULARITY' : 'DATE',
151
151
  query: this.query,
152
+ includeStatus:["READY","PROCESSING"]
152
153
  }, true);
153
154
  this.allPodcasts = this.allPodcasts.concat(
154
155
  data.result.filter((pod: Podcast|null) => null !== pod)
@@ -158,7 +158,7 @@ export const playerLogic = defineComponent({
158
158
  getAudioUrl(): string{
159
159
  if (this.media) return this.media.audioUrl? this.media.audioUrl:"";
160
160
  if (!this.podcast) return '';
161
- if (!this.podcast.availability.visibility)
161
+ if (!this.podcast.availability.visibility || "PROCESSING"===this.podcast.processingStatus)
162
162
  return this.podcast.audioStorageUrl;
163
163
  if (this.listenError) return this.podcast.audioStorageUrl;
164
164
  return this.getAudioUrlParameters();
@@ -66,6 +66,7 @@
66
66
  :emission-id="emissionId"
67
67
  />
68
68
  <PodcastFilterList
69
+ :showCount="true"
69
70
  :emission-id="emissionId"
70
71
  :category-filter="false"
71
72
  :edit-right="editRight"
@@ -46,6 +46,7 @@
46
46
  :name="name"
47
47
  :category-filter="true"
48
48
  :reload="reload"
49
+ :showCount="true"
49
50
  />
50
51
  <PodcastList
51
52
  v-else
@@ -4,15 +4,15 @@ import { Category } from './class/general/category';
4
4
  const state:ParamStore = {
5
5
  generalParameters: {
6
6
  organisationId:'ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c',
7
- authenticated: true,
8
- isAdmin: true,
9
- isRoleLive: true,
10
- isCommments: true,
11
- isOrganisation: true,
12
- isPlaylist: true,
13
- isProduction: true,
14
- isContribution: true,
15
- ApiUri: 'https://api.preprod.saooti.org/',
7
+ authenticated: false,
8
+ isAdmin: false,
9
+ isRoleLive: false,
10
+ isCommments: false,
11
+ isOrganisation: false,
12
+ isPlaylist: false,
13
+ isProduction: false,
14
+ isContribution: false,
15
+ ApiUri: 'https://api.dev2.saooti.org/',
16
16
  podcastmaker: false,
17
17
  buttonPlus: true,
18
18
  allCategories: [],
@@ -26,9 +26,9 @@ const state:ParamStore = {
26
26
  SharePlayer: true,
27
27
  ShareButtons: true,
28
28
  ShareDistribution: true,
29
- MiniplayerUri: 'https://playerbeta.preprod.saooti.org/',
29
+ MiniplayerUri: 'https://playerbeta.dev2.saooti.org/',
30
30
  downloadButton: false,
31
- hlsUri: 'https://hls.preprod.saooti.org/',
31
+ hlsUri: 'https://hls.dev2.saooti.org/',
32
32
  mainRubrique: 0,
33
33
  resourceUrl: undefined,
34
34
  podcastItemShowEmission: false,
@@ -83,13 +83,13 @@ const state:ParamStore = {
83
83
  userName: '',
84
84
  },
85
85
  octopusApi: {
86
- url: 'https://api.preprod.saooti.org/',
87
- commentsUrl: 'https://comments.preprod.saooti.org/',
88
- imageUrl:'https://imageproxy.preprod.saooti.org/',
89
- studioUrl: 'https://studio.preprod.saooti.org/',
90
- playerUrl: 'https://playerbeta.preprod.saooti.org/',
91
- speechToTextUrl:'https://speech2text.preprod.saooti.org/',
92
- recoUrl: 'https://reco.preprod.saooti.org/',
86
+ url: 'https://api.dev2.saooti.org/',
87
+ commentsUrl: 'https://comments.dev2.saooti.org/',
88
+ imageUrl:'https://imageproxy.dev2.saooti.org/',
89
+ studioUrl: 'https://studio.dev2.saooti.org/',
90
+ playerUrl: 'https://playerbeta.dev2.saooti.org/',
91
+ speechToTextUrl:'https://speech2text.dev2.saooti.org/',
92
+ recoUrl: 'https://reco.dev2.saooti.org/',
93
93
  organisationId: undefined,
94
94
  rubriqueIdFilter: undefined,
95
95
  },