It is currently October 19th, 2020, 3:51 pm

Spotify Plugin Released! Now with less bugs!

Plugins and Addons popular with the Community
rahulinho
Posts: 8
Joined: April 25th, 2017, 10:01 pm

Re: Spotify Plugin Released! Now with less bugs!

Post by rahulinho »

redsaph wrote:I have the same issue as well as the same Spotify version and plugin. Add the fact that the progress measure isn't returning the values well for the bar meters... it's been pretty buggy.
I have the same problem, i.e. the controls don't work. However, in my Spotify skin, there are no other notable issues. Progress bar works fine, along with the bang to open player, which I assume doesn't use the class window thing?
User avatar
tjhrulz
Developer
Posts: 252
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Spotify Plugin Released! Now with less bugs!

Post by tjhrulz »

rahulinho wrote:I have the same problem, i.e. the controls don't work. However, in my Spotify skin, there are no other notable issues. Progress bar works fine, along with the bang to open player, which I assume doesn't use the class window thing?
You are correct it knows where the exe is on your machine and looks up the process for spotify for task killing it when you use close.

The progress is part of the spotify plugin, basically all people used now playing for still was the playback controls. (So much so that for an unknown amount of time (Like months) the title and album did not pull correctly and no one noticed)
I had planned on working with .raptor to have some of the controls ported over to the SpotifyPlugin so the command in it would still work for nonpremium users.

If you give me a few minutes to dig through the source I can quickly document how to move existing skins to the new setup but I will warn you that for the time being you should NOT publish a skin using this as it it will only work for spotify premium users
User avatar
tjhrulz
Developer
Posts: 252
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Spotify Plugin Released! Now with less bugs!

Post by tjhrulz »

How to fix the spotify controls are not working issue for the time being, I would not recommend fully releasing a skin with these fixes for the time being to prevent confusion on why it is still not working or to encourage them to get premium because the reason you get that should be to support artists you like not Spotify's poor business decisions, I should have a fix for everyone else soon.

Warning giant wall of text that is a mess incoming (Writing something that is not code was never my strong suite and I have a tendency to use parenthesis a lot (Sometimes even inside another parenthesis pair)(At least I always close both, your welcome)) if you have a more advanced knowledge of rainmeter you can basically skip to the end for the list of bangs that SpotifyPlugin supports and just update your skin to have your bangs point to a SpotifyPlugin measure.

Note: This will only work for Spotify premium users as should not be used in any skin for others to download
I plan on trying to get around to fixing it for everyone else tomorrow if spotify does not beat me to it
Edit: looks like they are aware of it now and it should just be waiting for the next spotify update.


I don't want to encourage folks to switch to premium over this but if you already have it you might as well know how to fix it. For everyone else I can make a hotfix like I did last time that will make it work for everyone but that will take a few hours.

How to fix:
Fix is gonna be kinda an easy one as most of the commands are the same as normal so long as you have premium. Go on ahead and right click the affected skins and go to edit skin. All you should need to do is find the measure the bangs are being sent to, the bangs we are looking for will be in a different place for every skin but they should look something like this:

Code: Select all

LeftMouseUpAction=[!CommandMeasure MeasureState "Previous"]
So to fix it I need to locate the measure it is being sent to (Likely all the commands will be sent to the same measure so once we find one we should be good to go) So in this case (And for a lot of other skins) I need to find a measure named MeasureState in my skin.
If you can not find that measure in the skin file it is being included from some other file, files can be included by using a @include so you will want to try going through those files to find it, however most of the time it will be rather obvious which one contains controls or general measures, in this case I know that MeasureState is in the file included above by the line:

Code: Select all

@include2=#@#include\Measure#MPMode#.inc
So to find that file (And likely all the other included files) if I go to the skins directory (Typically found it documents) I just need to follow that folder path (#@# stands for the @resouces directory of the skin), for most includes it will be under SKINPATH\@resources\include\ it is then pretty obvious which file we are looking for as it is called MeasureSpotify.inc (The #MPMode# is a variable that holds your player name in the example)
If we open that file up now we will find our measure we were looking for right at the top

Code: Select all

[MeasureState]
Measure=Plugin
Plugin=NowPlaying
Playername=Spotify
PlayerType=State
UpdateDivider=10
As you can see if is using the NowPlaying plugin which is broken right now, so we just need to make it use the spotify plugin. If we also would like our play state to continue working we should also probably change the options a little to (See first page to find equivalent options), we only need to change this one measure and I should note that note that this may cause you skin to stop being able to open and close spotify depending on how they did it.
Our new measure should now look like

Code: Select all

[MeasureState]
Measure=Plugin
Plugin=SpotifyPlugin
Type=Playing
UpdateDivider=10
Go on ahead and save the file and refresh the skin and you are done (Repeat the above steps for any other skins that have stopped working that you want to fix.


List of some of the undocumented commands:
playpause
play
pause
next
previous
volume ### where ### is a number between 0-100
setposition ### where ### is a number between 0-100

There is also a shuffle and repeat command that do not work in a easy way and I would not recommend using them because I am going to see if .raptor wants to change it which will break everything that currently does use it.
Last edited by tjhrulz on March 14th, 2018, 2:09 am, edited 1 time in total.
User avatar
tjhrulz
Developer
Posts: 252
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Spotify Plugin Released! Now with less bugs!

Post by tjhrulz »

If your skin already supports my WebNowPlaying plugin another option is to just use khanhas' tool for theming spotify and just turn of the theme stuff and turn on WebNowPlaying injection. Make sure you have closed out of spotify first and I would not use it to hide the spotify ads if you want to support artists and also avoid a ban.

The tool is still a little unstable but it can be found here: https://github.com/khanhas/Spicetify/releases
Gregory2001
Posts: 81
Joined: May 28th, 2010, 2:29 pm

Re: Spotify Plugin Released! Now with less bugs!

Post by Gregory2001 »

And what if you don't want or use Spotify?
rahulinho
Posts: 8
Joined: April 25th, 2017, 10:01 pm

Re: Spotify Plugin Released! Now with less bugs!

Post by rahulinho »

tjhrulz wrote:volume ### where ### is a number between 0-100
My iTunes skin involves using the mouse scroll wheel to change the volume. Does this plugin enable the same kinda thing? Could I use percentage values or something like +10 to achieve the same result?
User avatar
tjhrulz
Developer
Posts: 252
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: Spotify Plugin Released! Now with less bugs!

Post by tjhrulz »

rahulinho wrote:My iTunes skin involves using the mouse scroll wheel to change the volume. Does this plugin enable the same kinda thing? Could I use percentage values or something like +10 to achieve the same result?
I does not support relative changes, likely will not for the future (Or if it does it will not work that well) because in order to read the volume to know what it is require a network call which is slow. It is possible to make something that will work pretty well though by buffering commands but it will take a bit of work.
User avatar
iWilder
Posts: 8
Joined: October 27th, 2017, 11:25 am

Re: Spotify Plugin Released! Now with less bugs!

Post by iWilder »

Is there any examples or documentation on how the player commands work?
fizik
Posts: 21
Joined: July 10th, 2016, 10:09 am

Re: Spotify Plugin Released! Now with less bugs!

Post by fizik »

iWilder wrote:Is there any examples or documentation on how the player commands work?
There is some documentation on GitHub, link see first post. Some things can be found inside the skin .ini itsel, and of course have a look inside the few files on GitHub.



I bumped my skin's plugin version to the latest 2.1.1 in skin version 3.1 and everything is working perfectly again - at least on my end. https://fuckyeahlucas.deviantart.com/art/Spotify-Control-working-Rainmeter-Skin-v3-1-594025385

@Dev: I hope you are still watching this thread? :) The plugin logs "invalid resolution" of the albumcover, although 640 should be still supported..? Moreover, if two skins use the plugin at the same time they confuse album covers.
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released! Now with less bugs!

Post by .raptor »

fizik wrote:There is some documentation on GitHub, link see first post. Some things can be found inside the skin .ini itsel, and of course have a look inside the few files on GitHub.



I bumped my skin's plugin version to the latest 2.1.1 in skin version 3.1 and everything is working perfectly again - at least on my end. https://fuckyeahlucas.deviantart.com/art/Spotify-Control-working-Rainmeter-Skin-v3-1-594025385

@Dev: I hope you are still watching this thread? :) The plugin logs "invalid resolution" of the albumcover, although 640 should be still supported..? Moreover, if two skins use the plugin at the same time they confuse album covers.
Haven't fixed this yet, as a rework of the artwork part of the plugin is planned. The error should be fixed in 2.1.3 (my bad on that one).