Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Develeon64 committed Oct 6, 2022
2 parents 0498d58 + bf10e8c commit 2940324
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 176 deletions.
2 changes: 1 addition & 1 deletion ExtensionManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Develeon64",
"repository": "https://github.com/Develeon64/Macro-Deck-Spotify-Plugin",
"packageId": "Develeon64.SpotifyPlugin",
"version": "1.1.0",
"version": "1.2.0",
"target-plugin-api-version": 36,
"dll": "SpotifyPlugin.dll"
}
5 changes: 5 additions & 0 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class Main : MacroDeckPlugin {
new LibraryActionAction(),
};

MacroDeck.OnMacroDeckLoaded += this.MacroDeck_OnMacroDeckLoaded;
MacroDeck.OnMainWindowLoad += this.MacroDeck_OnMainWindowLoad;
SpotifyHelper.ConnectionStateChanged += this.SpotifyHelper_ConnectionStateChanged;

Expand All @@ -49,6 +50,10 @@ public class Main : MacroDeckPlugin {
SpotifyHelper.Connect(CredentialHelper.GetCredentials()?.AccessToken ?? null);
}

private void MacroDeck_OnMacroDeckLoaded (object sender, EventArgs e) {
this.SetUpdateTimer();
}

private void SetUpdateTimer () {
if (this.timer != null) {
this.timer.Enabled = false;
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Control your Spotify-Player using Macro Deck 2

### Important Notes
- You need Spotify Premium in order to be able to control your Player!
- You need Spotify Premium in order to be able to control your Player!\
If you just want to make use of the Variables, it should work without the need of Premium.
- This is a plugin for [Macro Deck 2](https://github.com/SuchByte/Macro-Deck), it does NOT function as a standalone app!

Expand All @@ -29,8 +29,18 @@ Control your Spotify-Player using Macro Deck 2
| spotify_track_in_library | Indicates if the current track is added to your library | Boolean |
| spotify_playing | Indicates if the player is playing a track at the moment (can be bound to the button state) | Boolean |

## Installation
1. Go to the [Spotify Developer Portal](https://developers.spotify.com/)
2. Create a new App, give it a name and description of your choice
3. Add ``http://localhost:5000/callback`` in the Redirect URIs field
4. Copy the client ID of your new App into the Configuration field in Macro Deck
5. Press the "Authorize Spotify"-Button
6. It should open your browser, where you must authorize the App to access your Spotify account.\
The Tokens (Access and Refresh) will be filled into their fields automatically. After authorizing the app you can close your browser again and save the Configuration with "Ok".

## Helping with the translation
All translation files are located under https://github.com/Develeon64/Macro-Deck-Spotify-Plugin/tree/main/Resources/Languages
All translation files are located under:\
https://github.com/Develeon64/Macro-Deck-Spotify-Plugin/tree/main/Resources/Languages

### Adding/editing a translation file
1. Fork this GitHub repository
Expand Down
Loading

0 comments on commit 2940324

Please sign in to comment.