Author Topic: (Version 2.0.2) Spotify Integration Plugin  (Read 16321 times)

zkhcohen

  • Sr. Member
  • ****
  • Posts: 293

I'd like this Spotify integration to work one of two ways:

a) ability to drag songs from the Spotify client into MusicBee, creating an entry in the library we can then add to playlists along with local files
b) ability to browse our 'Liked' songs list from Spotify directly in MusicBee client, and then again add those songs along with local files into playlists


Let me preface this by saying that I have no intention of ever implementing these suggestions - it would be an enormous undertaking and I don't think they're particularly useful.

For fun, I thought of a couple of ways you could potentially accomplish this. I settled on one which is the least difficult considering the many obstacles you'd run into when trying to develop this.


For suggestion A:

1. Steven would have to allow web shortcuts to be stored in MusicBee (they are created when you drag songs out of Spotify).
2. The Spotify API would be used to translate the track ID in the shortcuts into metadata.
3. When a shortcut is clicked, it would have to launch a Spotify-approved web browser (probably Chromium-based) that you have authenticated.
4. Pausing, playing, skipping, etc. are an entirely separate issue to tackle...
5. Once a track is completed, it would have to close the browser and send a callback to MusicBee to continue to the next track.


For suggestion B:

1. Steven would have to allow web shortcuts to be stored in MusicBee.
2. The Spotify API would be used to sync your Spotify Liked Songs playlist to a playlist in MusicBee by creating shortcuts and populating the appropriate metadata.


BriAsylum13

  • Newbie
  • *
  • Posts: 6
Quote

The only way for it to stay authenticated would be for me to implement a different authentication type, and unfortunately it would either require the end-user to enter their own API key and recompile the entire plugin, or for me to host an external server to shuttle the requests through.

Another MusicBee user is currently working on the automatic-adding functionality. I'll let you know if he publicly releases it.



Awesome. Thanks so much.
Last Edit: February 02, 2020, 02:01:09 AM by phred

chrisdivine

  • Newbie
  • *
  • Posts: 19
Nice Work, zkhcohen, thank U very much! It works fine.
Do you know, if it would be possible to programm the plugin to send songs directly into a specific spotify playlist or a whole musicbee playlist to spotify?

Aasemoon

  • Newbie
  • *
  • Posts: 1

Hi there,

I have just recently started using MusicBee, and this plugin seems like a great tool to add, so I tried installing it today. However I'm getting the "SpotifyAPI.Web.Auth" error that seems to have come up in this forum before. Here:


Code
MusicBee v3.3.7367.38620D  (Win10.0), 8 Apr 2020 10:26:

System.IO.FileNotFoundException: Could not load file or assembly 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at MusicBeePlugin.Plugin.<SpotifyWebAuth>d__215.MoveNext()
   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at MusicBeePlugin.Plugin.SpotifyWebAuth(Boolean autoRefresh)
   at MusicBeePlugin.Plugin.PanelClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at #=z1b1aIHdE5iOu51l_1OHtZfM=.WndProc(Message& #=z9FSiH_o=)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


I've seen the recommendations to rectify this, and have tried them, but no matter what I do with "SpotifyAPI.Web.Auth.dll" [and I certainly have given it all permissions], I keep getting the same error. Any recommendations?

Thanks, Cheers!


Eudyptula

  • Newbie
  • *
  • Posts: 1
Hello,
I give all permissions to these two dll.

1. SpotifyAPI.Web.Auth.dll
2. SpotifyAPI.Web.dll

It pops up a window and asks me to authorize spotify. I click "Yes", But it shows error.

Code
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Mr. Be

  • Newbie
  • *
  • Posts: 2
it is not working at all. i got to the panel but it only shows this and does completely nothing



Herb_N

  • Newbie
  • *
  • Posts: 13
I have installed the latest Spotify integration app on my MusicBee Portable installation. It shows up under PlugIns but when I click CONFIGURE nothing happens. I have tried this with Chrome and also with Firefox as my default browser. Would love to have this plugin working.

Oopy Doopy

  • Newbie
  • *
  • Posts: 2
I have installed the latest Spotify integration app on my MusicBee Portable installation. It shows up under PlugIns but when I click CONFIGURE nothing happens. I have tried this with Chrome and also with Firefox as my default browser. Would love to have this plugin working.
Just installed today and I'm having the same issue.  Latest Musicbee, latest plugin.  I tested both the windows store version and the normal win32 install, same issue.

funkthefame

  • Newbie
  • *
  • Posts: 1
@zkcohen

This is a great plugin. I was recently exploring the available information in the API.

I wonder if it would be possible to return the values of the

valence, pop, instrumentalness, acoustic, energy, danceability that is stored in Spotify's API?

ie the audio features of a track and have it display in the spotify plugin?

https://developer.spotify.com/console/get-audio-features-track/?id=06AKEBrKUckW0KREUWRnvT

wannaknowmyname

  • Newbie
  • *
  • Posts: 1
I have installed the latest Spotify integration app on my MusicBee Portable installation. It shows up under PlugIns but when I click CONFIGURE nothing happens. I have tried this with Chrome and also with Firefox as my default browser. Would love to have this plugin working.
Just installed today and I'm having the same issue.  Latest Musicbee, latest plugin.  I tested both the windows store version and the normal win32 install, same issue.

I tried with both the Musicbee App and Musicbee for windows, made sure everything was up to date - clicking configure does nothing on both for the spotify integration plugin

djob13

  • Newbie
  • *
  • Posts: 1
Is there any way for this plugin to copy your entire library to Spotify? I have about 17,000 songs in MB that I'm trying to get in my Spotify library, and I just can't go song by song or artist by artist to do that. I've been trying to find a solution that would let me do this, and this seems the closest I've found.

dontfollowme

  • Newbie
  • *
  • Posts: 11
Also struggling to get this working. Hoping to transpose a playlist into spotify

zkhcohen

  • Sr. Member
  • ****
  • Posts: 293
Is there any way for this plugin to copy your entire library to Spotify? I have about 17,000 songs in MB that I'm trying to get in my Spotify library, and I just can't go song by song or artist by artist to do that. I've been trying to find a solution that would let me do this, and this seems the closest I've found.

I have installed the latest Spotify integration app on my MusicBee Portable installation. It shows up under PlugIns but when I click CONFIGURE nothing happens. I have tried this with Chrome and also with Firefox as my default browser. Would love to have this plugin working.
Just installed today and I'm having the same issue.  Latest Musicbee, latest plugin.  I tested both the windows store version and the normal win32 install, same issue.

I tried with both the Musicbee App and Musicbee for windows, made sure everything was up to date - clicking configure does nothing on both for the spotify integration plugin
I have installed the latest Spotify integration app on my MusicBee Portable installation. It shows up under PlugIns but when I click CONFIGURE nothing happens. I have tried this with Chrome and also with Firefox as my default browser. Would love to have this plugin working.
Hello,
I give all permissions to these two dll.

1. SpotifyAPI.Web.Auth.dll
2. SpotifyAPI.Web.dll

It pops up a window and asks me to authorize spotify. I click "Yes", But it shows error.

Code
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Hi there,

I have just recently started using MusicBee, and this plugin seems like a great tool to add, so I tried installing it today. However I'm getting the "SpotifyAPI.Web.Auth" error that seems to have come up in this forum before. Here:


Code
MusicBee v3.3.7367.38620D  (Win10.0), 8 Apr 2020 10:26:

System.IO.FileNotFoundException: Could not load file or assembly 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'SpotifyAPI.Web.Auth, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at MusicBeePlugin.Plugin.<SpotifyWebAuth>d__215.MoveNext()
   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at MusicBeePlugin.Plugin.SpotifyWebAuth(Boolean autoRefresh)
   at MusicBeePlugin.Plugin.PanelClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at #=z1b1aIHdE5iOu51l_1OHtZfM=.WndProc(Message& #=z9FSiH_o=)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


I've seen the recommendations to rectify this, and have tried them, but no matter what I do with "SpotifyAPI.Web.Auth.dll" [and I certainly have given it all permissions], I keep getting the same error. Any recommendations?

Thanks, Cheers!


Also struggling to get this working. Hoping to transpose a playlist into spotify

Hey guys. Life has been really busy and I haven't had the time to maintain this.

Please check out this plugin someone else developed:

https://getmusicbee.com/addons/plugins/306/musicbeesynctoservice/



I just tested my plugin and everything still works for me (this is a fresh installation, too).

Make sure ALL of the plugin files are in the root of the plugins directory.
Last Edit: July 30, 2020, 04:12:30 AM by zkhcohen

taravasya

  • Newbie
  • *
  • Posts: 4
Hello! No way to "emulate" spotify-connect device, for we can to play spotify on wasapi or asio devices with MusicBee?
Thanks!
Last Edit: July 31, 2020, 01:13:19 PM by taravasya

zkhcohen

  • Sr. Member
  • ****
  • Posts: 293
Hello! No way to "emulate" spotify-connect device, for we can to play spotify on wasapi or asio devices with MusicBee?
Thanks!

There's a Spotify Connect Web API beta that could potentially work with some clever tricks, but I have no plans on emulating Spotify within MusicBee.