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

playerxtwo

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playerxtwo - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

40

index.js

@@ -226,2 +226,4 @@

this.emit('error', e);
if([ "Cannot call write after a stream was destroyed", "This socket is closed" ].includes(e.message)) {

@@ -267,3 +269,3 @@ if(this.saveOptions) {

var play_files = this.resolveFilePaths(files, settings.url);
var play_files = this.resolveFilePaths(files/*, settings.url*/);
this.respawnCB = null;

@@ -305,27 +307,25 @@

resolveFilePaths(plist, isUrl) {
// ftw remake (24.11.2019)
resolveFilePaths(plist/*, _isUrl*/) {
this.currentPlaylist = [];
var ret = [];
plist.forEach((audio)=> {
if(!isUrl) {
var realPath = path.resolve(this.fileDir, audio);
if (!fs.existsSync(realPath)) {
this.emit('error', new Error('File does not exist: ' + realPath));
return;
for(const audio of plist) {
let audioPath = audio.path || audio.url || audio;
const isLocal = !(/(http(s)?:\/\/.)/i).test(audioPath);
if(!isLocal) {
audioPath = path.resolve(this.fileDir, audioPath);
if (!fs.existsSync(audioPath)) {
this.emit('error', new Error('File does not exist: ' + audioPath));
continue;
}
}
this.currentPlaylist.push({
url: audioPath,
name: (audio.name || audio.url || 'TrackName')
});
}
let url = isUrl? (audio.url? audio.url: audio): realPath;
let id = ret.push(url);
let ga = { id, url };
if(isUrl && audio.name)
ga = { ...ga, name: audio.name };
this.currentPlaylist.push(ga);
});
return this.currentPlaylist;
// return ret;
}

@@ -332,0 +332,0 @@

{
"name": "playerxtwo",
"version": "1.1.4",
"version": "1.1.5",
"description": "Test node player",

@@ -5,0 +5,0 @@ "main": "index.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