cody-music
Advanced tools
Comparing version 2.6.97 to 2.6.98
@@ -14,3 +14,3 @@ import { PlayerName } from "./models"; | ||
startMacPlayer(player: string, options?: any): Promise<any>; | ||
startWindowsPlayer(player: string, options?: any): Promise<any>; | ||
startWindowsPlayer(command: string): Promise<any>; | ||
execScript(player: string, scriptName: string, params?: any, argv?: any): Promise<any>; | ||
@@ -17,0 +17,0 @@ run(player: PlayerName, scriptName: string, params?: any, argv?: any): Promise<any>; |
@@ -123,3 +123,7 @@ "use strict"; | ||
if (musicUtil.isWindows()) { | ||
return await this.startWindowsPlayer(player, options); | ||
let winResult = await this.startWindowsPlayer("cmd /c spotify.exe"); | ||
if (winResult && winResult.error) { | ||
// try using the %APPDATA%/Spotify/Spotify.exe command | ||
return await this.startWindowsPlayer("%APPDATA%/Spotify/Spotify.exe"); | ||
} | ||
} | ||
@@ -143,4 +147,3 @@ return await this.startMacPlayer(player, options); | ||
} | ||
async startWindowsPlayer(player, options = {}) { | ||
const command = "cmd /c spotify.exe"; | ||
async startWindowsPlayer(command) { | ||
let result = await musicUtil.execCmd(command); | ||
@@ -147,0 +150,0 @@ if (result === null || result === undefined || result === "") { |
@@ -140,3 +140,9 @@ import { MusicUtil } from "./util"; | ||
if (musicUtil.isWindows()) { | ||
return await this.startWindowsPlayer(player, options); | ||
let winResult = await this.startWindowsPlayer("cmd /c spotify.exe"); | ||
if (winResult && winResult.error) { | ||
// try using the %APPDATA%/Spotify/Spotify.exe command | ||
return await this.startWindowsPlayer( | ||
"%APPDATA%/Spotify/Spotify.exe" | ||
); | ||
} | ||
} | ||
@@ -165,4 +171,3 @@ return await this.startMacPlayer(player, options); | ||
async startWindowsPlayer(player: string, options: any = {}) { | ||
const command = "cmd /c spotify.exe"; | ||
async startWindowsPlayer(command: string) { | ||
let result = await musicUtil.execCmd(command); | ||
@@ -169,0 +174,0 @@ if (result === null || result === undefined || result === "") { |
{ | ||
"name": "cody-music", | ||
"version": "2.6.97", | ||
"version": "2.6.98", | ||
"description": "mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control", | ||
@@ -24,3 +24,4 @@ "main": "dist/index.js", | ||
"recommendation-test": "yarn build && mocha -r ts-node/register test/recommendation/test.ts --reporter spec --timeout 20000 --exit", | ||
"genre-test": "yarn build && mocha -r ts-node/register test/genre/test.ts --reporter spec --timeout 20000 --exit" | ||
"genre-test": "yarn build && mocha -r ts-node/register test/genre/test.ts --reporter spec --timeout 20000 --exit", | ||
"launch-test": "yarn build && mocha -r ts-node/register test/launch/test.ts --reporter spec --timeout 20000 --exit" | ||
}, | ||
@@ -27,0 +28,0 @@ "repository": { |
import { MusicUtil } from "../../lib/util"; | ||
const expect = require("chai").expect; | ||
import * as CodyMusic from "../../index"; | ||
import { | ||
Track, | ||
PlayerName, | ||
PlaylistItem, | ||
CodyResponse, | ||
PaginationItem | ||
} from "../../lib/models"; | ||
import { Track, PlayerName } from "../../lib/models"; | ||
import { MusicController } from "../../lib/controller"; | ||
@@ -12,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
526930
117
12852