cody-music
Advanced tools
Comparing version 2.6.70 to 2.6.71
@@ -339,4 +339,5 @@ import { PlayerName, Track, PlayerDevice, SpotifyAudioFeature, PlaylistItem, CodyResponse, CodyConfig, PlayerContext, SpotifyAuthState } from "./models"; | ||
* @param playlistId (optional) If it's not supplied then the trackId must be provided | ||
* @param playerName (optional) SpotifyWeb or SpotifyDesktop | ||
*/ | ||
export declare function launchAndPlaySpotifyTrack(trackId?: string, playlistId?: string): Promise<void>; | ||
export declare function launchAndPlaySpotifyTrack(trackId?: string, playlistId?: string, playerName?: PlayerName): Promise<void>; | ||
/** | ||
@@ -343,0 +344,0 @@ * Plays a Spotify Mac Desktop track within a playlist. |
@@ -838,5 +838,6 @@ "use strict"; | ||
* @param playlistId (optional) If it's not supplied then the trackId must be provided | ||
* @param playerName (optional) SpotifyWeb or SpotifyDesktop | ||
*/ | ||
function launchAndPlaySpotifyTrack(trackId = "", playlistId = "") { | ||
return musicPlayerCtr.launchAndPlaySpotifyTrack(trackId, playlistId); | ||
function launchAndPlaySpotifyTrack(trackId = "", playlistId = "", playerName = models_1.PlayerName.SpotifyWeb) { | ||
return musicPlayerCtr.launchAndPlaySpotifyTrack(trackId, playlistId, playerName); | ||
} | ||
@@ -843,0 +844,0 @@ exports.launchAndPlaySpotifyTrack = launchAndPlaySpotifyTrack; |
@@ -1,2 +0,2 @@ | ||
import { PlayerDevice, Track, PlayerContext, Artist } from "./models"; | ||
import { PlayerDevice, Track, PlayerContext, Artist, PlayerName } from "./models"; | ||
export declare const SPOTIFY_LIKED_SONGS_PLAYLIST_NAME = "Liked Songs"; | ||
@@ -49,3 +49,3 @@ export declare class MusicPlayerState { | ||
getSpotifyPlayerContext(): Promise<PlayerContext>; | ||
launchAndPlaySpotifyTrack(trackId?: string, playlistId?: string): Promise<void>; | ||
launchAndPlaySpotifyTrack(trackId?: string, playlistId?: string, playerName?: PlayerName): Promise<void>; | ||
playSpotifyTrackFromPlaylist(trackId: string, spotifyUserId: string, playlistId?: string, checkTrackStateAndTryAgainCount?: number): Promise<void>; | ||
@@ -52,0 +52,0 @@ launchWebPlayer(options: any): Promise<any>; |
@@ -351,3 +351,3 @@ "use strict"; | ||
} | ||
async launchAndPlaySpotifyTrack(trackId = "", playlistId = "") { | ||
async launchAndPlaySpotifyTrack(trackId = "", playlistId = "", playerName = models_1.PlayerName.SpotifyWeb) { | ||
// check if there's any spotify devices | ||
@@ -358,3 +358,3 @@ const spotifyDevices = await this.getSpotifyDevices(true); | ||
// launch it | ||
await this.launchWebPlayer(models_1.PlayerName.SpotifyWeb); | ||
await this.launchWebPlayer(playerName); | ||
// now select it from within the playlist within 2 seconds | ||
@@ -361,0 +361,0 @@ await setTimeout(() => { |
@@ -934,8 +934,14 @@ "use strict"; | ||
* @param playlistId (optional) If it's not supplied then the trackId must be provided | ||
* @param playerName (optional) SpotifyWeb or SpotifyDesktop | ||
*/ | ||
export function launchAndPlaySpotifyTrack( | ||
trackId: string = "", | ||
playlistId: string = "" | ||
playlistId: string = "", | ||
playerName: PlayerName = PlayerName.SpotifyWeb | ||
) { | ||
return musicPlayerCtr.launchAndPlaySpotifyTrack(trackId, playlistId); | ||
return musicPlayerCtr.launchAndPlaySpotifyTrack( | ||
trackId, | ||
playlistId, | ||
playerName | ||
); | ||
} | ||
@@ -942,0 +948,0 @@ |
@@ -434,3 +434,4 @@ import { MusicUtil } from "./util"; | ||
trackId: string = "", | ||
playlistId: string = "" | ||
playlistId: string = "", | ||
playerName: PlayerName = PlayerName.SpotifyWeb | ||
) { | ||
@@ -446,3 +447,3 @@ // check if there's any spotify devices | ||
// launch it | ||
await this.launchWebPlayer(PlayerName.SpotifyWeb); | ||
await this.launchWebPlayer(playerName); | ||
@@ -449,0 +450,0 @@ // now select it from within the playlist within 2 seconds |
{ | ||
"name": "cody-music", | ||
"version": "2.6.70", | ||
"version": "2.6.71", | ||
"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", |
@@ -565,4 +565,5 @@ # cody-music | ||
* @param playlistId (optional) If it's not supplied then the trackId must be provided | ||
* @param playerName (optional) SpotifyWeb or SpotifyDesktop | ||
*/ | ||
launchAndPlaySpotifyTrack(trackId: string = "", playlistId: string = "") | ||
launchAndPlaySpotifyTrack(trackId: string = "", playlistId: string = "", playerName: string = PlayerName.SpotifyWeb) | ||
@@ -569,0 +570,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
507837
12407
739