@audius/sdk 3.0.8-beta.11 → 3.0.8-beta.12
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/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +6 -6
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +6 -6
- package/dist/native-libs.js.map +1 -1
- package/dist/web-libs.js +6 -6
- package/dist/web-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/api/Track.ts +1 -1
- package/src/services/creatorNode/CreatorNode.ts +3 -3
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@audius/sdk",
|
|
3
|
-
"version": "3.0.8-beta.
|
|
3
|
+
"version": "3.0.8-beta.12",
|
|
4
4
|
"audius": {
|
|
5
|
-
"releaseSHA": "
|
|
5
|
+
"releaseSHA": "1119e8535700beff7e3bef81d78df65bb3e33b0e"
|
|
6
6
|
},
|
|
7
7
|
"description": "Audius SDK",
|
|
8
8
|
"keywords": [
|
package/src/api/Track.ts
CHANGED
|
@@ -505,7 +505,7 @@ export class Track extends Base {
|
|
|
505
505
|
let updatedMetadata = { ...metadata }
|
|
506
506
|
|
|
507
507
|
if (transcodePreview) {
|
|
508
|
-
if (
|
|
508
|
+
if (metadata.preview_start_seconds == null) {
|
|
509
509
|
throw new Error('No track preview start time specified')
|
|
510
510
|
}
|
|
511
511
|
if (!metadata.audio_upload_id) {
|
|
@@ -150,7 +150,7 @@ export class CreatorNode {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
async transcodeTrackPreview(metadata: TrackMetadata): Promise<TrackMetadata> {
|
|
153
|
-
if (
|
|
153
|
+
if (metadata.preview_start_seconds == null) {
|
|
154
154
|
throw new Error('No track preview start time specified')
|
|
155
155
|
}
|
|
156
156
|
if (!metadata.audio_upload_id) {
|
|
@@ -182,7 +182,7 @@ export class CreatorNode {
|
|
|
182
182
|
): Promise<TrackMetadata> {
|
|
183
183
|
const updatedMetadata = { ...metadata }
|
|
184
184
|
const audioUploadOpts: { [key: string]: string } = {}
|
|
185
|
-
if (updatedMetadata.preview_start_seconds) {
|
|
185
|
+
if (updatedMetadata.preview_start_seconds != null) {
|
|
186
186
|
audioUploadOpts['previewStartSeconds'] =
|
|
187
187
|
updatedMetadata.preview_start_seconds.toString()
|
|
188
188
|
}
|
|
@@ -214,7 +214,7 @@ export class CreatorNode {
|
|
|
214
214
|
updatedMetadata.track_segments = []
|
|
215
215
|
updatedMetadata.duration = parseInt(audioResp.probe.format.duration, 10)
|
|
216
216
|
updatedMetadata.track_cid = audioResp.results['320']
|
|
217
|
-
if (updatedMetadata.preview_start_seconds) {
|
|
217
|
+
if (updatedMetadata.preview_start_seconds != null) {
|
|
218
218
|
const previewKey = `320_preview|${updatedMetadata.preview_start_seconds}`
|
|
219
219
|
updatedMetadata.preview_cid = audioResp.results[previewKey]
|
|
220
220
|
}
|