@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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@audius/sdk",
3
- "version": "3.0.8-beta.11",
3
+ "version": "3.0.8-beta.12",
4
4
  "audius": {
5
- "releaseSHA": "94503e85377fab74d3b3f490b927c5a3bc12fd1f"
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 (!metadata.preview_start_seconds) {
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 (!metadata.preview_start_seconds) {
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
  }