generated from crowbartools/firebot-custom-script-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Oceanity/feature/more-vars-on-track
New vars: spotifyIsPlaylistActive: bool spotifyPlaylistCoverImageUrl: string spotifyPlaylistDescription: string spotifyPlaylistLength: integer spotifyPlaylistUrl: string spotifyTrackUri: string spotifyTrackId: string New events: Playlist Changed Various structural changes and fixes
- Loading branch information
Showing
38 changed files
with
452 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,9 @@ | ||
import { SpotifyIsPlayingVariable } from "./spotifyIsPlaying"; | ||
import { SpotifyPlayerVolumeVariable } from "./spotifyPlayerVolume"; | ||
import { SpotifyPlayerRelativeVolumeVariable } from "./spotifyPlayerRelativeVolume"; | ||
import { SpotifyTrackArtistVariable } from "./spotifyTrackArtist"; | ||
import { SpotifyTrackArtistsVariable } from "./spotifyTrackArtists"; | ||
import { SpotifyTrackAlbumVariable } from "./spotifyTrackAlbum"; | ||
import { SpotifyTrackAlbumArtUrlVariable } from "./spotifyTrackAlbumArtUrl"; | ||
import { SpotifyTrackTitleVariable } from "./spotifyTrackTitle"; | ||
import { SpotifyTrackUriVariable } from "./spotifyTrackUri"; | ||
import { SpotifyTrackDurationVariable } from "./spotifyTrackDuration"; | ||
import { SpotifyTrackDurationMsVariable } from "./spotifyTrackDurationMs"; | ||
import { SpotifyTrackPositionVariable } from "./spotifyTrackPosition"; | ||
import { SpotifyTrackPositionMsVariable } from "./spotifyTrackPositionMs"; | ||
import { SpotifyTrackRelativePositionVariable } from "./spotifyTrackRelativePosition"; | ||
import { AllSpotifyPlayerVariables } from "./player"; | ||
import { AllSpotifyPlaylistVariables } from "./playlist"; | ||
import { AllSpotifyTrackVariables } from "./track"; | ||
|
||
export const AllSpotifyReplaceVariables = [ | ||
SpotifyIsPlayingVariable, | ||
SpotifyPlayerVolumeVariable, | ||
SpotifyPlayerRelativeVolumeVariable, | ||
SpotifyTrackArtistVariable, | ||
SpotifyTrackArtistsVariable, | ||
SpotifyTrackAlbumVariable, | ||
SpotifyTrackAlbumArtUrlVariable, | ||
SpotifyTrackTitleVariable, | ||
SpotifyTrackUriVariable, | ||
SpotifyTrackDurationVariable, | ||
SpotifyTrackDurationMsVariable, | ||
SpotifyTrackPositionVariable, | ||
SpotifyTrackPositionMsVariable, | ||
SpotifyTrackRelativePositionVariable, | ||
...AllSpotifyPlayerVariables, | ||
...AllSpotifyPlaylistVariables, | ||
...AllSpotifyTrackVariables, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { SpotifyIsPlayingVariable } from "./spotifyIsPlaying"; | ||
import { SpotifyPlayerVolumeVariable } from "./spotifyPlayerVolume"; | ||
import { SpotifyPlayerRelativeVolumeVariable } from "./spotifyPlayerRelativeVolume"; | ||
|
||
export const AllSpotifyPlayerVariables = [ | ||
SpotifyIsPlayingVariable, | ||
SpotifyPlayerVolumeVariable, | ||
SpotifyPlayerRelativeVolumeVariable, | ||
]; |
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
src/firebot/variables/player/spotifyPlayerRelativeVolume.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlayerRelativeVolumeVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlayerRelativeVolume", | ||
description: | ||
"Gets the relative volume of the active Spotify Device as a value from 0.0 to 1.0", | ||
usage: "spotifyPlayerRelativeVolume", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.volume / 100, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlayerVolumeVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlayerVolume", | ||
description: "Gets the volume of the active Spotify device", | ||
usage: "spotifyPlayerVolume", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.volume, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { SpotifyIsPlaylistActiveVariable } from "./spotifyIsPlaylistActive"; | ||
import { SpotifyPlaylistDescriptionVariable } from "./spotifyPlaylistDescription"; | ||
import { SpotifyPlaylistUrlVariable } from "./spotifyPlaylistUrl"; | ||
import { SpotifyPlaylistNameVariable } from "./spotifyPlaylistName"; | ||
import { SpotifyPlaylistCoverImageUrlVariable } from "./spotifyPlaylistCoverImageUrl"; | ||
import { SpotifyPlaylistLengthVariable } from "./spotifyPlaylistLength"; | ||
|
||
export const AllSpotifyPlaylistVariables = [ | ||
SpotifyIsPlaylistActiveVariable, | ||
SpotifyPlaylistDescriptionVariable, | ||
SpotifyPlaylistUrlVariable, | ||
SpotifyPlaylistNameVariable, | ||
SpotifyPlaylistCoverImageUrlVariable, | ||
SpotifyPlaylistLengthVariable, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyIsPlaylistActiveVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyIsPlaylistActive", | ||
description: "Will be `true` if Spotify has playlist open, `false` if not", | ||
usage: "spotifyIsPlaylistActive", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.isPlaylistActive, | ||
}; |
13 changes: 13 additions & 0 deletions
13
src/firebot/variables/playlist/spotifyPlaylistCoverImageUrl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlaylistCoverImageUrlVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlaylistCoverImageUrl", | ||
description: | ||
"Gets the Cover Image Url of the currently playing Spotify Playlist", | ||
usage: "spotifyPlaylistCoverImageUrl", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.coverImageUrl, | ||
}; |
13 changes: 13 additions & 0 deletions
13
src/firebot/variables/playlist/spotifyPlaylistDescription.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlaylistDescriptionVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlaylistDescription", | ||
description: | ||
"Gets the Description of the currently playing Spotify Playlist", | ||
usage: "spotifyPlaylistDescription", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.description, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlaylistLengthVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlaylistLength", | ||
description: "Gets the Length of the currently playing Spotify Playlist", | ||
usage: "spotifyPlaylistLength", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.length, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlaylistNameVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlaylistName", | ||
description: "Gets the Name of the currently playing Spotify Playlist", | ||
usage: "spotifyPlaylistName", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.name, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { spotify } from "@/main"; | ||
import { ReplaceVariable } from "@crowbartools/firebot-custom-scripts-types/types/modules/replace-variable-manager"; | ||
|
||
export const SpotifyPlaylistUrlVariable: ReplaceVariable = { | ||
definition: { | ||
handle: "spotifyPlaylistUrl", | ||
description: "Gets the Url of the currently playing Spotify Playlist", | ||
usage: "spotifyPlaylistUrl", | ||
possibleDataOutput: ["number"], | ||
}, | ||
evaluator: async () => spotify.player.playlist.url, | ||
}; |
Oops, something went wrong.