@saooti/octopus-sdk 41.5.9 → 41.6.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 41.6.0 (03/03/2026)
4
+
5
+ **Features**
6
+
7
+ - Le smartlink affiche le lien vers saooti play si le podcastmaker n'est pas
8
+ défini
9
+
10
+ **Fix**
11
+
12
+ - Correction écoute épisodes non validés quand connecté
13
+
14
+ **Misc**
15
+
16
+ - Ajout utilitaire pour les plateformes de partage
17
+
18
+ ## 41.5.10 (02/03/2026)
19
+
20
+ **Misc**
21
+
22
+ - Mise à jour des dépendances
23
+
3
24
  ## 41.5.9 (25/02/2026)
4
25
 
5
26
  **Fix**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "41.5.9",
3
+ "version": "41.6.0",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -52,8 +52,7 @@ export const usePlayerLogic = (forceHide: Ref<boolean, boolean>) => {
52
52
  api:0,
53
53
  path:"podcast/download/register/"+playerStore.playerPodcast.podcastId + ".mp3",
54
54
  parameters:getAudioUrlParameters(),
55
- headers: {'X-Extra-UA':'Saooti Player'},
56
- isNotAuth:true
55
+ headers: {'X-Extra-UA':'Saooti Player'}
57
56
  });
58
57
  setDownloadId(response.downloadId.toString());
59
58
  audioUrlToPlay.value = response.location;
@@ -124,6 +124,15 @@ export const useSharePlatforms = () => {
124
124
  }];
125
125
  });
126
126
 
127
+ /**
128
+ * Helper to retrieve configuration of a specific platform
129
+ * @param platform The ID of the platform
130
+ * @return The configuration found
131
+ */
132
+ function getPlatformConfiguration(platform: SharePlatformName): SharePlatform|undefined {
133
+ return platforms.value.find(p => p.name === platform);
134
+ }
135
+
127
136
  /**
128
137
  * Get platforms with their associated links.
129
138
  * A platform with no link will not be included
@@ -162,6 +171,7 @@ export const useSharePlatforms = () => {
162
171
 
163
172
  return {
164
173
  getPlatformsWithLinks,
174
+ getPlatformConfiguration,
165
175
  platforms
166
176
  }
167
177
  };
@@ -45,7 +45,11 @@
45
45
  :key="platform.name"
46
46
  class="platform-btn"
47
47
  >
48
- <button class="btn w-100" :style="gradient(platform)" @click="openLink(platform.url)">
48
+ <button
49
+ class="btn w-100"
50
+ :style="gradient(platform)"
51
+ @click="openLink(platform.url)"
52
+ >
49
53
  <!-- Icon of platform -->
50
54
  <component
51
55
  :is="platform.icon"
@@ -63,7 +67,11 @@
63
67
  <div class="footer">
64
68
  <a target="_blank" href="/">
65
69
  <span>{{ $t('SmartLink - Made by') }}</span>
66
- <img src="/img/logo_saooti_play_black.svg" height="24" class="ms-2" />
70
+ <img
71
+ src="/img/logo_saooti_play_black.svg"
72
+ height="24"
73
+ class="ms-2"
74
+ >
67
75
  </a>
68
76
  <a
69
77
  v-if="podcastmakerElementUrl"
@@ -160,13 +168,13 @@ const organisation = computed((): Organisation|undefined => {
160
168
  return (element.value as Playlist).organisation;
161
169
  } else if (emissionId) {
162
170
  return (element.value as Emission).orga;
163
-
164
171
  }
172
+ return undefined;
165
173
  });
166
174
 
167
175
  /** The URL to the podcastmaker of the organisation, if any */
168
176
  const organisationAttributes = ref<OrganisationAttributes|null>(null);
169
- const { getPodcastMakerUrl, getSharePath } = useSharePath();
177
+ const { getSharePath } = useSharePath();
170
178
 
171
179
  async function getOrganisationAttributes(): Promise<void> {
172
180
  if (organisation.value) {
@@ -174,19 +182,15 @@ async function getOrganisationAttributes(): Promise<void> {
174
182
  }
175
183
  }
176
184
 
177
- /** The URL to the element on the podcastmaker, if any */
185
+ /** The URL to the element on the podcastmaker, or original platform, if any */
178
186
  const podcastmakerElementUrl = computed((): string|undefined => {
179
- const podcastmakerUrl = getPodcastMakerUrl(organisationAttributes.value);
180
- if (!podcastmakerUrl) {
181
- return undefined;
182
- }
183
-
184
187
  // Retrieve full URL of element
185
188
  if (playlistId) {
186
189
  return getSharePath({ name: 'playlist', params: { playlistId }}, organisationAttributes.value);
187
190
  } else if (emissionId) {
188
191
  return getSharePath({ name: 'emission', params: { emissionId }}, organisationAttributes.value);
189
192
  }
193
+ return undefined;
190
194
  });
191
195
 
192
196
  /**
@@ -223,7 +227,7 @@ async function getLatestPodcast(): Promise<void> {
223
227
  const result = await podcastApi.searchFull({
224
228
  emissionId,
225
229
  sort: PodcastSort.DATE,
226
- pageSize: 1
230
+ size: 1
227
231
  });
228
232
 
229
233
  if (result.count > 0) {
@@ -1,5 +1,5 @@
1
1
  import { AdserverConfig } from "../adserver/adserverConfig";
2
- import { Organisation } from "./organisation";
2
+ import { emptyOrganisationData, Organisation } from "./organisation";
3
3
  import { Person } from "../user/person";
4
4
  import { ItuneCategory } from "./ituneCategory";
5
5
  import { Annotations } from ".";
@@ -49,11 +49,7 @@ export function emptyEmissionData(orga?: Organisation): Emission {
49
49
  description: "",
50
50
  imageUrl: "",
51
51
  iabIds: undefined,
52
- orga: orga ?? {
53
- id: "",
54
- name: "",
55
- imageUrl: "",
56
- },
52
+ orga: orga ?? emptyOrganisationData(),
57
53
  beneficiaries: [],
58
54
  rubriqueIds: [],
59
55
  monetisable: "UNDEFINED",
@@ -1,4 +1,4 @@
1
- import { Organisation } from "./organisation";
1
+ import { emptyOrganisationData, Organisation } from "./organisation";
2
2
  import { Person } from "../user/person";
3
3
  import { FetchParam } from "./fetchParam";
4
4
  import { Annotations } from ".";
@@ -42,6 +42,7 @@ export function emptyPlaylistData(): Playlist {
42
42
  title: "",
43
43
  type: "DYNAMIC",
44
44
  samplingViews: [],
45
+ organisation: emptyOrganisationData()
45
46
  };
46
47
  }
47
48
 
@@ -133,7 +133,7 @@ export function emptyPodcastData(): Podcast {
133
133
  imageUrl: "",
134
134
  },
135
135
  pubDate: undefined,
136
- conferenceId: 0,
136
+ conferenceId: undefined,
137
137
  duration: 0,
138
138
  };
139
139
  }
@@ -6,6 +6,6 @@ vi.mock('vue-router', () => ({
6
6
  query: {}
7
7
  }),
8
8
  useRouter: () => ({
9
- router: {}
9
+ resolve: () => ({ path: '' })
10
10
  })
11
11
  }));