It is currently May 17th, 2024, 8:18 am

Spotify Plugin Released! Now with less bugs!

Plugins and Addons popular with the Community
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Spotify Plugin Released!

Post by rm_lion »

Something you have done right!!
There isn't much to see in the log txt. But in the Form1 that appears when I start the Debugger everything works perfect now. The cover is allways visible and also the Data in the Form is allways correct. Even the Track Position changes it's value appropriate.
You do not have the required permissions to view the files attached to this post.
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released!

Post by .raptor »

rm_lion wrote:Something you have done right!!
There isn't much to see in the log txt. But in the Form1 that appears when I start the Debugger everything works perfect now. The cover is allways visible and also the Data in the Form is allways correct. Even the Track Position changes it's value appropriate.
Unfortunately all i did was add some fail safes, so the underlying problem is still there.
For some reason it cant decode progress unless its 0 (And when its not it just defaults to 0).

The reason is that your system language does not use the same number format as spotify does. The file attached below should work, but if it doesn't I'll attach a new debugger aswell.
Last edited by .raptor on January 23rd, 2015, 8:14 pm, edited 1 time in total.
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Spotify Plugin Released!

Post by rm_lion »

Yesss it works.
But as soon as I refresh it Rainmeters crashes.
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released!

Post by .raptor »

rm_lion wrote:Yesss it works.
But as soon as I refresh it Rainmeters crashes.
Ahaha, yeah thats a know bug. I will get to that as soon as i can :oops:
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Spotify Plugin Released!

Post by rm_lion »

I'm really happy again.
Thanks again to:
.raptor
VasTex
exper1mental

There are some minor Problems left.
1. I just noticed, that the cover for the Album "B'sides Themselves" from Marillion doesn't work. Maybe it has something to do with the ' in the Album Name.
2. Everytime after a Commercial the ProgressBar doesn't work correct anymore. I tried it also with other Skins and it was the same.

3. I noticed that Shuffle also works now and integrated that in my Skin. But I wasn't able to Toggle Shuffle via the Skin. Isn't this possible or am I doing something wrong?
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released!

Post by .raptor »

rm_lion wrote:I'm really happy again.
Thanks again to:
.raptor
VasTex
exper1mental

There are some minor Problems left.
1. I just noticed, that the cover for the Album "B'sides Themselves" from Marillion doesn't work. Maybe it has something to do with the ' in the Album Name.
2. Everytime after a Commercial the ProgressBar doesn't work correct anymore. I tried it also with other Skins and it was the same.

3. I noticed that Shuffle also works now and integrated that in my Skin. But I wasn't able to Toggle Shuffle via the Skin. Isn't this possible or am I doing something wrong?
1. Nice catch there. The error was not at my side this time, but i found a workaround anyhow. (Compare https://embed.spotify.com/?uri=spotify:album:1aoP9bccXX1u0tmjznQH2e with https://embed.spotify.com/?uri=spotify:album:3FFzNn8Ys6A3q3hF6TlG4M). Updated version below.

2. I will look into this, but I'm fixing crashes first (Since I'm pretty sure most of us are premium users, and i have to fix the issues bothering the most first).

3. There is currently no way to toggle shuffle from the plugin.
Last edited by .raptor on January 23rd, 2015, 8:15 pm, edited 1 time in total.
User avatar
rm_lion
Posts: 93
Joined: December 27th, 2013, 4:04 pm
Location: Switzerland

Re: Spotify Plugin Released!

Post by rm_lion »

1. Perfect! With the new Plugin the cover gets displayed.
The first Link you posted doesn't work. The second does. Is this what you wanted to show me?

2. I absolutely understand your priority for stability.

I guess the thing with the ProgressBar has something to do with the NaN Value that is delivered when a Commercial is running. Maybe you could work with "0" and it would be easy to Substitute "0" with "NaN".

Btw I didn't like to have so much Decimals so I made a MeasureCalc to be able to use NumOfDecimals in the ProgressMeter.

Code: Select all

;Progress Measures

[MeasureProgress]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=Progress
Substitute="NaN":"0"

[MeasureCalcProgress]
Measure=Calc
Formula=[MeasureProgress]
Substitute=".":","
DynamicVariables=1
IfCondition=MeasureCalcProgress = 0
IfTrueAction=[!SetOption MeterProgress Text "NaN"]
IfFalseAction=[!SetOption MeterProgress Text "%1%"]
IfConditionMode=1

;Progress Meters

[MeterProgress]
Meter=STRING
MeasureName=MeasureCalcProgress
X=370
Y=0r
StringAlign=RIGHT
FontFace=DejaVu Sans Mono
FontColor=FFFFFFFF
AntiAlias=1
NumOfDecimals=2
Text="%1%"

[MeterProgressBar]
Meter=BAR
MeasureName=MeasureProgress
X=120
Y=20r
W=250
H=3
BarColor=E8D71CEE
SolidColor=FFFFFF80
BarOrientation=HORIZONTAL
3. Ok. I can live without it. Nevertheless it would be awesome if it was possible. Same for Repeat.

Hey and thank you very much again for this cool Plugin and your work.
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released!

Post by .raptor »

rm_lion wrote:1. Perfect! With the new Plugin the cover gets displayed.
The first Link you posted doesn't work. The second does. Is this what you wanted to show me?

2. I absolutely understand your priority for stability.

I guess the thing with the ProgressBar has something to do with the NaN Value that is delivered when a Commercial is running. Maybe you could work with "0" and it would be easy to Substitute "0" with "NaN".

Btw I didn't like to have so much Decimals so I made a MeasureCalc to be able to use NumOfDecimals in the ProgressMeter.

Code: Select all

;Progress Measures

[MeasureProgress]
Measure=Plugin
Plugin=SpotifyPlugin.dll
Type=Progress
Substitute="NaN":"0"

[MeasureCalcProgress]
Measure=Calc
Formula=[MeasureProgress]
Substitute=".":","
DynamicVariables=1
IfCondition=MeasureCalcProgress = 0
IfTrueAction=[!SetOption MeterProgress Text "NaN"]
IfFalseAction=[!SetOption MeterProgress Text "%1%"]
IfConditionMode=1

;Progress Meters

[MeterProgress]
Meter=STRING
MeasureName=MeasureCalcProgress
X=370
Y=0r
StringAlign=RIGHT
FontFace=DejaVu Sans Mono
FontColor=FFFFFFFF
AntiAlias=1
NumOfDecimals=2
Text="%1%"

[MeterProgressBar]
Meter=BAR
MeasureName=MeasureProgress
X=120
Y=20r
W=250
H=3
BarColor=E8D71CEE
SolidColor=FFFFFF80
BarOrientation=HORIZONTAL
3. Ok. I can live without it. Nevertheless it would be awesome if it was possible. Same for Repeat.

Hey and thank you very much again for this cool Plugin and your work.
Yes, for some reason the album you discovered cant be embedded (The frame is just blank). Spotify making things easy :x

After the next patch i will make myself a free Spotify account and look into the issue. I'm pretty sure it's quite easy to fix. (Or you could just run the debugger when a commercial is playing and see what happens. If anything changes from normal, just upload a screenshot and i might be able to do this in between the other development.)

I fully agree how awesome it would be to set shuffle, repeat and maybe even volume from the plugin, but so far i have found this impossible. I even tried some hacky stuff, but that only worked when the window was open (and that kind of defeats the purpose of Rainmeter, if Spotify has to be open anyway). I have not lost hope tho, either for Spotify to release a usable API, or me discovering what they use themselves. What i wouldn't give for an hour with a Spotify developer... :p
User avatar
exper1mental
Posts: 269
Joined: January 9th, 2013, 7:52 pm
Location: Clemson University

Re: Spotify Plugin Released!

Post by exper1mental »

.raptor wrote:What i wouldn't give for an hour with a Spotify developer... :p
Have you tried contacting Spotify or gone on Spotify Developer and contacted them there? Their stackoverflow developer support Q&A page looks like as good of a place to ask as any.
Image
User avatar
.raptor
Posts: 220
Joined: April 3rd, 2013, 11:03 pm
Location: Norway

Re: Spotify Plugin Released!

Post by .raptor »

exper1mental wrote: Have you tried contacting Spotify or gone on Spotify Developer and contacted them there? Their stackoverflow developer support Q&A page looks like as good of a place to ask as any.
Well, the last guy that asked about the API I'm using got told that they couldn't help him, since it was never intended for public use anyway. I guess the only reason i haven't asked yet is that I'm afraid they will close it entirely :confused:

Guess it's worth to take a shot at it tho...

EDIT:
After reading some post, it actually seems like I'm not the only one using the JSON API. Guess asking for help every now and then would be helpful :)