Howdy,
I created a plugin to read information from the Spotify client and display it on the LCD Screen.
I know that there is already a similiar plugin called "Spotify Status", but it seems to be broken atm and has less functionality than this.
I coded it in C# in 2 hours so its possible that I left a few bugs in it (please report them in this post or send me a PM).
All 3 .dll files have to be copied to the plugins folder.
- grimsi
REQUIREMENTS
------------
1. LCD Smartie 5.3 beta3 or newer
2. .NET Framework 4.5
3. Spotify Client running in the background
INFORMATION
-----------
This plugin allows you to display various information from your Spotify client on your LCD.
for more information refer to the Features part of this README.
Version
-------
0.1
Features
----------------
function1
Returns the name of the currently playing song
Usage:
$dll(spotify,1,,) -> Lose Yourself
function2
Returns the artists name of the currently playing song
Usage:
$dll(spotify,2,,) -> Eminem
function3
Returns the album name of the currently playing song
Usage:
$dll(spotify,3,,) -> Curtain Call (Deluxe)
function4
Returns current position in the song in the format mm:ss
Params:
param1 - set to "1" to disable leading zero
Usage:
$dll(spotify,4,1,) -> 1:54
$dll(spotify,4,,) -> 01:54
function5
Returns length of the current song in the format mm:ss
Params:
param1 - set to "1" to disable leading zero
Usage
$dll(spotify,5,1,) -> 5:26
$dll(spotify,5,,) -> 05:26
function6
Returns the volume level of the Spotify Client in percent
Usage:
$dll(spotify,6,,) -> 47
function20
Returns credits about the dll and its version.
KNOWN BUGS AND LIMITATIONS
--------------------------
1. When Spotify is not running in the background the dll will return an exception.
2. It is currently not possible to display the information of a podcast except length and current position (an exception will be returned).
3. If a song is longer than 60 minutes the plugin will only show the minutes and seconds of the total length and the current position (will be fixed soon).
Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases
[Release] Spotify Plugin
Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo
-
- Posts: 5
- Joined: March 17th, 2018, 2:11 pm
[Release] Spotify Plugin
You do not have the required permissions to view the files attached to this post.
Last edited by grimsi on March 18th, 2018, 2:21 pm, edited 1 time in total.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: [Release] Spotify Plugin
Hi, yes old plugin got broken with latest spotify update.grimsi wrote:Howdy,
KNOWN BUGS AND LIMITATIONS
--------------------------
1. When Spotify is not running in the background the dll will return an exception.
2. It is currently not possible to display the information of a podcast except length and current position (an exception will be returned).
3. If a song is longer than 60 minutes the plugin will only show the minutes and seconds of the total length and the current position (will be fixed soon).
This one works great. Thanks.
Maybe we can change the dll exception with a custom text? Maybe `waiting for spotify` or other text. Or a cfg to put custom message.
BTW, I opened a thread about a netflix plugin request, do you think it can be done?
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: [Release] Spotify Plugin
Im having a problem using character replacement.
I have my list of foreign characters to be replaced by subst plugin (cause my display wont show foreign characters right by default)
But on this plugin, foreign characters are replaced by two weird symbols, different than one weird symbol it shows on other plugins. Could this plugin using a different charset? ascii table?
Any ideas if this can be changed?
Same problem occured with old spotify plugin.
Thanks
I have my list of foreign characters to be replaced by subst plugin (cause my display wont show foreign characters right by default)
But on this plugin, foreign characters are replaced by two weird symbols, different than one weird symbol it shows on other plugins. Could this plugin using a different charset? ascii table?
Any ideas if this can be changed?
Same problem occured with old spotify plugin.
Thanks
-
- Posts: 5
- Joined: March 17th, 2018, 2:11 pm
Re: [Release] Spotify Plugin
It kinda already does that. In case of an error it returns an exception with a description of the error (e.g. "Spotify client not running"), but the text gets displayed at the very end of the exception on your LCD so you have to wait until it scrolls to that part. There is nothing I can really do about that because thats how C# (and most other object-oriented programming languages) works except calling the "connect to Spotify" part every time a function gets called.trihy wrote: Maybe we can change the dll exception with a custom text? Maybe `waiting for spotify` or other text. Or a cfg to put custom message.
I tried that and it works but it has a huge impact on performance, because when the plugin gets loaded it tries to connect to your Spotify client once (which takes comparatively long) and when a function gets called it just uses the already connected client. When it tries to connect on every function call (once per second) LCD Smartie will freeze for a short time every second.
Afaik the Netflix Client does not offer an API unlike the Spotify Client which makes it almost impossible to read information such as "currently playing" or similiar.trihy wrote: BTW, I opened a thread about a netflix plugin request, do you think it can be done?
I think it has something to do with C# returning UTF-16 encoded strings instead of ASCII encoded ones afaik. I will try to find a solution for that.trihy wrote: Im having a problem using character replacement.
I have my list of foreign characters to be replaced by subst plugin (cause my display wont show foreign characters right by default)
But on this plugin, foreign characters are replaced by two weird symbols, different than one weird symbol it shows on other plugins. Could this plugin using a different charset? ascii table?
Any ideas if this can be changed?
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: [Release] Spotify Plugin
No way to add other function when spoty is not running? like read a text from cfg file? like a conditional.
Oh, I see. Guess netflix has a closed api.
Oh, I see. Guess netflix has a closed api.
Hi, yes, that could be the problem. Hope its an easy fix! It will be perfect then.grimsi wrote: I think it has something to do with C# returning UTF-16 encoded strings instead of ASCII encoded ones afaik. I will try to find a solution for that.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: [Release] Spotify Plugin
Seems latest spotify update breaks compatibility again.grimsi wrote:It kinda already does that. In case of an error it returns an exception with a description of the error (e.g. "Spotify client not running"), but the text gets displayed at the very end of the exception on your LCD so you have to wait until it scrolls to that part. There is nothing I can really do about that because thats how C# (and most other object-oriented programming languages) works except calling the "connect to Spotify" part every time a function gets called.trihy wrote: Maybe we can change the dll exception with a custom text? Maybe `waiting for spotify` or other text. Or a cfg to put custom message.
I tried that and it works but it has a huge impact on performance, because when the plugin gets loaded it tries to connect to your Spotify client once (which takes comparatively long) and when a function gets called it just uses the already connected client. When it tries to connect on every function call (once per second) LCD Smartie will freeze for a short time every second.
Afaik the Netflix Client does not offer an API unlike the Spotify Client which makes it almost impossible to read information such as "currently playing" or similiar.trihy wrote: BTW, I opened a thread about a netflix plugin request, do you think it can be done?
I think it has something to do with C# returning UTF-16 encoded strings instead of ASCII encoded ones afaik. I will try to find a solution for that.trihy wrote: Im having a problem using character replacement.
I have my list of foreign characters to be replaced by subst plugin (cause my display wont show foreign characters right by default)
But on this plugin, foreign characters are replaced by two weird symbols, different than one weird symbol it shows on other plugins. Could this plugin using a different charset? ascii table?
Any ideas if this can be changed?
-
- Posts: 5
- Joined: March 17th, 2018, 2:11 pm
Re: [Release] Spotify Plugin
It turned out that spotify disabled their local API with the newest udpate.
See: https://developer.spotify.com/community ... ay-button/
If Spotify changes their mind in the future I will most likely update it again.
See: https://developer.spotify.com/community ... ay-button/
For now this plugin is deprecated and it wont work any more.Remote control of Spotify’s desktop app has been deprecated in favour of full track playback in the browser.
If Spotify changes their mind in the future I will most likely update it again.
Re: [Release] Spotify Plugin
Seems like some workaounds are being planned by dev https://github.com/JohnnyCrazy/SpotifyA ... issues/254
Hope it will be able to make it work.
Hope it will be able to make it work.
-
- Posts: 100
- Joined: January 17th, 2018, 1:43 pm
Re: [Release] Spotify Plugin
You have one working perfect here viewtopic.php?f=8&t=3705
Not sure how dev made it without using web api, but works great.
Not sure if a web api based one will be more future proof.
Not sure how dev made it without using web api, but works great.
Not sure if a web api based one will be more future proof.