1.16
Small Patch - 1.16
This commit is contained in:
commit
c676d52781
@ -60,7 +60,7 @@ export class SoundCloudTrack {
|
|||||||
this.url = data.uri;
|
this.url = data.uri;
|
||||||
this.fetched = true;
|
this.fetched = true;
|
||||||
this.type = 'track';
|
this.type = 'track';
|
||||||
this.durationInSec = Number(data.duration) / 1000;
|
this.durationInSec = Math.round(Number(data.duration) / 1000);
|
||||||
this.durationInMs = Number(data.duration);
|
this.durationInMs = Number(data.duration);
|
||||||
if (data.publisher_metadata)
|
if (data.publisher_metadata)
|
||||||
this.publisher = {
|
this.publisher = {
|
||||||
@ -125,7 +125,7 @@ export class SoundCloudPlaylist {
|
|||||||
this.client_id = client_id;
|
this.client_id = client_id;
|
||||||
this.type = 'playlist';
|
this.type = 'playlist';
|
||||||
this.sub_type = data.set_type;
|
this.sub_type = data.set_type;
|
||||||
this.durationInSec = Number(data.duration) / 1000;
|
this.durationInSec = Math.round(Number(data.duration) / 1000);
|
||||||
this.durationInMs = Number(data.duration);
|
this.durationInMs = Number(data.duration);
|
||||||
this.user = {
|
this.user = {
|
||||||
name: data.user.username,
|
name: data.user.username,
|
||||||
|
|||||||
@ -148,7 +148,7 @@ export class SpotifyPlaylist {
|
|||||||
if (typeof response !== 'string') return;
|
if (typeof response !== 'string') return;
|
||||||
const json_data = JSON.parse(response);
|
const json_data = JSON.parse(response);
|
||||||
json_data.items.forEach((v: any) => {
|
json_data.items.forEach((v: any) => {
|
||||||
videos.push(new SpotifyTrack(v.track));
|
if(v.track) videos.push(new SpotifyTrack(v.track));
|
||||||
});
|
});
|
||||||
this.fetched_tracks.set(`${i}`, videos);
|
this.fetched_tracks.set(`${i}`, videos);
|
||||||
resolve('Success');
|
resolve('Success');
|
||||||
@ -254,7 +254,7 @@ export class SpotifyAlbum {
|
|||||||
if (typeof response !== 'string') return;
|
if (typeof response !== 'string') return;
|
||||||
const json_data = JSON.parse(response);
|
const json_data = JSON.parse(response);
|
||||||
json_data.items.forEach((v: any) => {
|
json_data.items.forEach((v: any) => {
|
||||||
videos.push(new SpotifyTrack(v));
|
if(v) videos.push(new SpotifyTrack(v));
|
||||||
});
|
});
|
||||||
this.fetched_tracks.set(`${i}`, videos);
|
this.fetched_tracks.set(`${i}`, videos);
|
||||||
resolve('Success');
|
resolve('Success');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user