diff --git a/README.md b/README.md index 4bdfa74..3bd9a4f 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ This is a Firebot Script that will allow you to integrate Spotify functionality - Refresh the list of scripts and pick `oceanitySpotifyIntegration.js` from the dropdown - In Client Id and Client Secret fields, copy in the two codes from earlier - Go to Settings > Integrations and click Link next to Spotify (by Oceanity) +- Log in and authorize on the page that pops up - You should now have the ability to use this script's Effects, Events and Replace Variables in Firebot
@@ -45,9 +46,11 @@ This script adds the following features to Firebot - Replace Variables - spotifyIsPlaying: `bool` - - spotifyNowPlayingTitle: `string` - - spotifyNowPlayingArtist: `string` + - spotifyNowPlayingAlbum: `string` - spotifyNowPlayingAlbumArtUrl: `string` + - spotifyNowPlayingArtist: `string` + - spotifyNowPlayingArtists: `string[]` + - spotifyNowPlayingTitle: `string` - spotifyNowPlayingUrl: `string` - Events - Track Changed diff --git a/src/firebot/effects/spotifyGetCurrentlyPlayingTrackEffect.ts b/src/firebot/effects/spotifyGetCurrentlyPlayingTrackEffect.ts deleted file mode 100644 index 275aa31..0000000 --- a/src/firebot/effects/spotifyGetCurrentlyPlayingTrackEffect.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { spotify } from "@/main"; -import { Firebot } from "@crowbartools/firebot-custom-scripts-types"; -import { getErrorMessage } from "@/utils/errors"; - -export const spotifyGetCurrentlyPlayingEffect: Firebot.EffectType<{}> = { - definition: { - id: "oceanity-spotify:get-currently-playing-track", - name: "Spotify: Get Now Playing", - description: - "Gets all details of the currently playing track on active Spotify device", - icon: "fab fa-spotify", - categories: ["integrations"], - //@ts-expect-error ts2353 - outputs: [ - { - label: "Now Playing", - description: - "Will be currently playing track details if Spotify is playing, null if not.", - defaultName: "nowPlaying", - }, - { - label: "Error Message", - description: - "If getting currently playing track failed, will contain an error message.", - defaultName: "error", - }, - ], - }, - - optionsTemplate: ``, - - // @ts-expect-error ts6133: Variables must be named consistently - optionsController: ($scope: any, backendCommunicator: any, $q: any) => {}, - - optionsValidator: () => [], - - onTriggerEvent: async () => { - try { - const track = await spotify.player.getCurrentlyPlaying(); - - return { - success: true, - outputs: { - nowPlaying: track.item, - }, - }; - } catch (error) { - return { - success: false, - outputs: { - nowPlaying: null, - error: getErrorMessage(error), - }, - }; - } - }, -};