cody-music
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -427,3 +427,3 @@ "use strict"; | ||
* @param playerName {spotify|spotify-web|itunes} | ||
* @param options | ||
* @param options (spotify-web only) {playlist_id | album_id | track_id } | ||
*/ | ||
@@ -430,0 +430,0 @@ export function launchPlayer(playerName: PlayerName, options: any = {}) { |
@@ -227,10 +227,14 @@ import { MusicUtil } from "./util"; | ||
launchWebPlayer(options: any) { | ||
if (options.album) { | ||
if (options.album_id) { | ||
return musicUtil.launchWebUrl( | ||
`https://open.spotify.com/album/${options.album}` | ||
`https://open.spotify.com/album/${options.album_id}` | ||
); | ||
} else if (options.track) { | ||
} else if (options.track_id) { | ||
return musicUtil.launchWebUrl( | ||
`https://open.spotify.com/track/${options.track}` | ||
`https://open.spotify.com/track/${options.track_id}` | ||
); | ||
} else if (options.playlist_id) { | ||
return musicUtil.launchWebUrl( | ||
`https://open.spotify.com/playlist/${options.playlist_id}` | ||
); | ||
} | ||
@@ -237,0 +241,0 @@ return musicUtil.launchWebUrl("https://open.spotify.com/browse"); |
{ | ||
"name": "cody-music", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "mac osx spotify and itunes music player controller, spotify audio features, itunes and spotify genre, and playlist control", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -286,3 +286,3 @@ # cody-music | ||
* @param playerName {spotify|spotify-web|itunes} | ||
* @param options | ||
* @param options (spotify-web only) {playlist_id | album_id | track_id } | ||
*/ | ||
@@ -289,0 +289,0 @@ launchPlayer(playerName: PlayerName, options: any = {}) |
@@ -106,7 +106,7 @@ import { MusicUtil } from "../../lib/util"; | ||
// High on Life | ||
const albumId = "1GUfof1gHsqYjoHFym3aim"; | ||
const album_id = "1GUfof1gHsqYjoHFym3aim"; | ||
await CodyMusic.launchPlayer( | ||
CodyMusic.PlayerName.SpotifyWeb, | ||
{ | ||
album: albumId | ||
album_id | ||
} | ||
@@ -113,0 +113,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
289660
7080