Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

soundcloud.ts

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

soundcloud.ts - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

8

dist/entities/Util.js

@@ -383,3 +383,3 @@ "use strict";

result = _b.sent();
dest = path.extname(dest) ? dest : path.join(dest, "".concat(track.title.replace(/\//g, ""), ".").concat(result.headers["x-amz-meta-file-type"]));
dest = path.extname(dest) ? dest : path.join(dest, "".concat(track.title.replace(/[\\/:*?\"<>|]/g, ""), ".").concat(result.headers["x-amz-meta-file-type"]));
return [4 /*yield*/, result.body.arrayBuffer()];

@@ -392,5 +392,5 @@ case 5:

_a = _b.sent();
return [2 /*return*/, this.downloadTrackStream(track, track.title.replace(/\//g, ""), dest)];
return [2 /*return*/, this.downloadTrackStream(track, track.title.replace(/[\\/:*?\"<>|]/g, ""), dest)];
case 7: return [3 /*break*/, 9];
case 8: return [2 /*return*/, this.downloadTrackStream(track, track.title.replace(/\//g, ""), dest)];
case 8: return [2 /*return*/, this.downloadTrackStream(track, track.title.replace(/[\\/:*?\"<>|]/g, ""), dest)];
case 9: return [2 /*return*/];

@@ -511,3 +511,3 @@ }

artwork = (track.artwork_url ? track.artwork_url : track.user.avatar_url).replace(".jpg", ".png").replace("-large", "-t500x500");
title = track.title.replace(/\//g, "");
title = track.title.replace(/[\\/:*?\"<>|]/g, "");
dest = path.extname(dest) ? dest : path.join(folder, "".concat(title, ".png"));

@@ -514,0 +514,0 @@ return [4 /*yield*/, this.api.getClientId()];

@@ -215,3 +215,3 @@ import type {SoundcloudTrack, SoundcloudTranscoding} from "../types"

const result = await request(downloadObj.redirectUri)
dest = path.extname(dest) ? dest : path.join(dest, `${track.title.replace(/\//g, "")}.${result.headers["x-amz-meta-file-type"]}`)
dest = path.extname(dest) ? dest : path.join(dest, `${track.title.replace(/[\\/:*?\"<>|]/g, "")}.${result.headers["x-amz-meta-file-type"]}`)
const arrayBuffer = await result.body.arrayBuffer() as any

@@ -221,6 +221,6 @@ fs.writeFileSync(dest, Buffer.from(arrayBuffer, "binary"))

} catch {
return this.downloadTrackStream(track, track.title.replace(/\//g, ""), dest)
return this.downloadTrackStream(track, track.title.replace(/[\\/:*?\"<>|]/g, ""), dest)
}
} else {
return this.downloadTrackStream(track, track.title.replace(/\//g, ""), dest)
return this.downloadTrackStream(track, track.title.replace(/[\\/:*?\"<>|]/g, ""), dest)
}

@@ -289,3 +289,3 @@ }

const artwork = (track.artwork_url ? track.artwork_url : track.user.avatar_url).replace(".jpg", ".png").replace("-large", "-t500x500")
const title = track.title.replace(/\//g, "")
const title = track.title.replace(/[\\/:*?\"<>|]/g, "")
dest = path.extname(dest) ? dest : path.join(folder, `${title}.png`)

@@ -292,0 +292,0 @@ const client_id = await this.api.getClientId()

{
"name": "soundcloud.ts",
"version": "0.6.0",
"version": "0.6.1",
"description": "Soundcloud API v2 wrapper with typings.",

@@ -5,0 +5,0 @@ "main": "dist/soundcloud.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc