Author Topic: (Version 3.1) Spotify Integration Plugin  (Read 61253 times)

KaleidoscopicThoughts

  • Newbie
  • *
  • Posts: 9
Do I have to click authenticate each time I open musicbee? isn't there a way to make it automatic?

zkhcohen

  • Sr. Member
  • ****
  • Posts: 336
Do I have to click authenticate each time I open musicbee? isn't there a way to make it automatic?

Funny you should ask, Spotify finally added a PKCE auth. method which solves the problems with implementing the other auth. method which allows for token renewal:

https://developer.spotify.com/community/news/2020/06/18/pkce-oauth/

If I have time, I'll implement this.

Terry Walker

  • Jr. Member
  • **
  • Posts: 92
I'm currently working on creating a new Spotify integration plugin using the updated API.
If there's any interest in this project, please let me know what sorts of features you would be interested in having.

Yay! looking forward to the result of this as long as it's good then I'm good also.


Vince0511

  • Newbie
  • *
  • Posts: 1
Hi All,

I'm new here, I've been using MusicBee for a couple of weeks now and loving it! :)
I was trying to add some extra's via Plugins from the website.
The First, (discogs) is working very nice.

But when trying to install the Spotify-Plugin it gave me an error then trying to authenticate.
The error: (in dutch)

Code
MusicBee v3.3.7491.38139D  (Win10.0), 3 dec 2020 13:30:

System.IO.FileNotFoundException: Kan bestand of assembly SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null of een van de afhankelijkheden hiervan niet laden. Het systeem kan het opgegeven bestand niet vinden.
Bestandsnaam: SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
   bij MusicBeePlugin.Plugin.<SpotifyWebAuth>d__215.MoveNext()
   bij System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   bij MusicBeePlugin.Plugin.SpotifyWebAuth(Boolean autoRefresh)
   bij MusicBeePlugin.Plugin.PanelClick(Object sender, EventArgs e)
   bij System.Windows.Forms.Control.OnClick(EventArgs e)
   bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bij System.Windows.Forms.Control.WndProc(Message& m)
   bij #=zHtEf7r5NvoOIlAZv2tlwPAI=.WndProc(Message& #=zcoS3AB0=)
   bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRSCH: registratie van assembly-bindingen is uitgeschakeld.
Als u assembly-bindingsfouten wilt registreren, stelt u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) in op 1.
Opmerking: er is een prestatiestraf gekoppeld aan de registratie van assembly-bindingsfouten.
Als u deze functie wilt uitschakelen, verwijdert u de registerwaarde [HKLM\Software\Microsoft\Fusion!EnableLog].

Quote
System.IO.FileNotFoundException: Kan bestand of assembly SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null of een van de afhankelijkheden hiervan niet laden. Het systeem kan het opgegeven bestand niet vinden.
It said it cant find the file.

I've tried the REGEDIT option. Without any luck.
Code
HKLM\Software\Microsoft\Fusion!EnableLog

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7276
Do you have the Spotify plugin installed correctly? That would be one reason why the file can't be found.

This should be posted on the plugin's thread so the developer of the plugin can see it.  I've moved it for you.
Download the latest MusicBee v3.4 patch from here.
Download the latest MusicBee v3.5 beta patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
Check out the MusicBee Wiki.
How to post screenshots is here


VijuaruKei

  • Newbie
  • *
  • Posts: 1
Hello, I just installed the plugin, but sadly it's not working, when I click on the spotify pannel to log I get an error.


Code
MusicBee v3.3.7491.38089Store (Win10.0), 27 janv. 2021 1:32:

System.IO.FileNotFoundException: Impossible de charger le fichier ou l'assembly 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' ou une de ses dépendances. Le fichier spécifié est introuvable.
Nom de fichier : 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   à MusicBeePlugin.Plugin.<SpotifyWebAuth>d__215.MoveNext()
   à System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   à MusicBeePlugin.Plugin.SpotifyWebAuth(Boolean autoRefresh)
   à MusicBeePlugin.Plugin.PanelClick(Object sender, EventArgs e)
   à System.Windows.Forms.Control.OnClick(EventArgs e)
   à System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   à System.Windows.Forms.Control.WndProc(Message& m)
   à #=zTWpQxM2qpiCzHyaRcEbNZQs=.WndProc(Message& #=zLjLuuqY=)
   à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

AVT : la journalisation de liaison d'assembly est désactivée.
Pour activer la journalisation des échecs de liaison d'assembly, attribuez la valeur 1 à la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD).
Remarque : une certaine perte de performance est associée à l'enregistrement dans le journal des échecs de liaison d'assembly.
Pour désactiver cette fonctionnalité, supprimez la valeur de Registre [HKLM\Software\Microsoft\Fusion!EnableLog].

thanks in advance for any help

S3rM5Y5

  • Newbie
  • *
  • Posts: 3
Can you be more clear about what is not clear?

Do you have the plugin installed?
Do you find access to Configure Layout/Arrange Panels?  (either via button or edit/preferences)
Do you see the Spotify plugin among 'available elements'?
Do you know how to set up the maind and side panels? (if not, experiment a bit ;-) ... or check the WIKI ('panel configuration'):  
https://musicbee.fandom.com/wiki/The_Anatomy_of_MusicBee)
If you have done all this:  do you see 'Authenticate' in the plugin panel?

This should be part of the README. I couldn't figure out how to get it to work without these instructions.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 336
I finally decided to revisit this and so far I've updated the auth. method to PKCE and transitioned all of the other functions from the 5.x.x to the 6.x.x API spec.

I still need to get token renewal implemented, but this should be a better solution all-around.

KlausZeFlammenwerfer

  • Newbie
  • *
  • Posts: 4
I really love the idea of this plug and it would make things a lot better, but it doesn't work for me, I don't know if the current state of the plugin just doesn't work or its on my end, whenever I click "configure" nothing happens, and when I authenticate from the "Spotify Plugin" window on the right side it says "No Track Found!" which does not change after trying 20 different songs, both on desktop and the web client, whenever I click the right side of the "No Track Found!" a window pops up and says "Bad ID". Not sure whether this helps in any ways but thank you for your attention.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 336
Version 3.0.5 released:

PKCE auth. method now automatically renews tokens when necessary, even between restarts.
General performance improvements.

https://www.mediafire.com/file/rex368art4yr1wh/mb_Spotify-Plugin.zip/file

NOTE: I did notice some artifacting issues and I also noticed that the "Please Click to Authenticate" erroneously appears after a restart. I'm working on resolving these issues.
Last Edit: April 10, 2021, 03:38:19 AM by zkhcohen

zkhcohen

  • Sr. Member
  • ****
  • Posts: 336
I really love the idea of this plug and it would make things a lot better, but it doesn't work for me, I don't know if the current state of the plugin just doesn't work or its on my end, whenever I click "configure" nothing happens, and when I authenticate from the "Spotify Plugin" window on the right side it says "No Track Found!" which does not change after trying 20 different songs, both on desktop and the web client, whenever I click the right side of the "No Track Found!" a window pops up and says "Bad ID". Not sure whether this helps in any ways but thank you for your attention.

There are no configuration options.

Spotify is picky about how tracks and artists are named, so that could be part of it. Unique cataloging/naming schemas may cause it to fail.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 336
Beta 3.1: Bug fixes for network disconnections, refreshing, various other things.

KlausZeFlammenwerfer

  • Newbie
  • *
  • Posts: 4
There is an issue with the last update for me, it functions significantly better than before but now there is a problem that occurs when switching playlists, whenever I click on a playlist and then switch to another, the album cover gets stuck on the screen until I refresh or click on a track's name, it also increases the playlist load times by 2-3 seconds for me (could be related to using an external hard disk).

How the described issue looks:

Additionally, a similar issue happens to the wavebar but I am not sure whether this is 100% caused by this plugin since it only occurs occasionally:

Edit: The wavebar issue fixes itself whenever I hover over it