New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cody-music

Package Overview
Dependencies
Maintainers
1
Versions
234
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cody-music - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

dist/test/controls/test.d.ts

14

dist/lib/controller.js

@@ -130,4 +130,14 @@ "use strict";

if (scriptName === "play" && player.toLowerCase() === "itunes") {
script = this.scripts.playFromLibrary;
params.push("Library");
// if itunes is not currently running, default to play from the
// user's default playlist
let itunesTrack = await this.run(models_1.PlayerName.ItunesDesktop, "state");
if (itunesTrack) {
// make it an object
itunesTrack = JSON.parse(itunesTrack);
if (!itunesTrack || !itunesTrack.id) {
// play from the user's default playlist
script = this.scripts.playFromLibrary;
params.push("Library");
}
}
}

@@ -134,0 +144,0 @@ // apply the params to the one line script

@@ -54,6 +54,20 @@ "use strict";

.then((result) => {
done();
musicCtr
.quitApp(CodyMusic.PlayerName.ItunesDesktop)
.then((result) => {
done();
})
.catch((err) => {
done();
});
})
.catch((err) => {
done();
musicCtr
.quitApp(CodyMusic.PlayerName.ItunesDesktop)
.then((result) => {
done();
})
.catch((err) => {
done();
});
});

@@ -60,0 +74,0 @@ });

@@ -147,5 +147,20 @@ import { MusicUtil } from "./util";

if (scriptName === "play" && player.toLowerCase() === "itunes") {
script = this.scripts.playFromLibrary;
params.push("Library");
// if itunes is not currently running, default to play from the
// user's default playlist
let itunesTrack = await this.run(
PlayerName.ItunesDesktop,
"state"
);
if (itunesTrack) {
// make it an object
itunesTrack = JSON.parse(itunesTrack);
if (!itunesTrack || !itunesTrack.id) {
// play from the user's default playlist
script = this.scripts.playFromLibrary;
params.push("Library");
}
}
}
// apply the params to the one line script

@@ -215,2 +230,3 @@ script = musicUtil.formatString(script, params);

}
return this.execScript(player, scriptName, params, argv).then(

@@ -217,0 +233,0 @@ result => {

5

package.json
{
"name": "cody-music",
"version": "2.0.0",
"version": "2.0.1",
"description": "mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control",

@@ -11,3 +11,4 @@ "main": "dist/index.js",

"playlist-test": "npm run build && mocha -r ts-node/register test/playlists/test.ts --reporter spec --timeout 20000 --exit",
"web-test": "npm run build && mocha -r ts-node/register test/web/test.ts --reporter spec --timeout 20000 --exit"
"web-test": "npm run build && mocha -r ts-node/register test/web/test.ts --reporter spec --timeout 20000 --exit",
"controls-test": "npm run build && mocha -r ts-node/register test/controls/test.ts --reporter spec --timeout 20000 --exit"
},

@@ -14,0 +15,0 @@ "repository": {

@@ -48,6 +48,20 @@ const expect = require("chai").expect;

.then((result: any) => {
done();
musicCtr
.quitApp(CodyMusic.PlayerName.ItunesDesktop)
.then((result: any) => {
done();
})
.catch((err: any) => {
done();
});
})
.catch((err: any) => {
done();
musicCtr
.quitApp(CodyMusic.PlayerName.ItunesDesktop)
.then((result: any) => {
done();
})
.catch((err: any) => {
done();
});
});

@@ -54,0 +68,0 @@ });

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