Author Topic: Skype Now Playing Plugin  (Read 36667 times)

kelsos

  • Sr. Member
  • ****
  • Posts: 302
Here is a simple now Skype Now playing plugin I created for MusicBee using C#.

The plugin uses the Skype4COM ActiveX to communicate with skype. Before 5.5 Skype4COM was part of the Extras Manager distributed along with Skype. In 5.5 The extras manager was removed so now if Skype4COM is not installed in your system you have to install it through the provided Skype4COM.msi.
If you have previously installed Skype4COM then this step is not required.

The tags supported at the moment are <Artist>, <AlbumArtist>, <Title>, <Year> and <Album> and they have to be like above in the textbox in order for the tag to get displayed. Also there is the option (activated by default) for a "Now Playing" string and a Unicode note char to appear in front of the selected pattern. (Depending on the computer the note may appear as a square).

There are installation info inside the archive.

Here is the original version: http://www.mediafire.com/?cwc5jmx6s1cx49t

Here is the latest v1.1.0.213: http://www.mediafire.com/?v9lj0clf4acf25a
(the skype4com.msi is provided along with the application archive)
Also thanks to Mikey helping me to sort out the issues with v1.1.0.202

The sources can be found on Github https://github.com/kelsos/mb-skype-plugin

It is possible that Skype4COM.msi will resolve the connectivity problems reported also with the previous version.

Last Edit: September 22, 2013, 06:05:09 PM by kelsos

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
Hello! Thank you so much for this plugin!

Unfortunately, I got this error when trying to enable skype in MB:

Code
MusicBee v1.2.4136.34658 (Win6.1), 30 Apr 2011 14:04:

System.InvalidCastException: Unable to cast object of type '#=q4SPYDhidHOPs2MuKRg7oiivglNE00$wHLqWlHwfmgqW3Br__AzPS9jS7$2TGaQYH' to type '#=qFgvimSFsaJtgguyXzN0K2qqHEhOV3YBRimEPCdMZ6lX7e$pGG6wL5dFl4Glzon70'.
   at #=q4v4ehwoA1wZSV77L3pFqVWE_Ak0JIQJp7gFrA47mECHSczF7gHcuZqEusfKHgXJb.#=q8c8RS0YZxgpHKgRjEfpn_Yp8N8qmnV7oLpovgQBZpuE=(Object #=qwB_tJ64K4fF5gVlW0DJyCg==, EventArgs #=qJYPWUDFFpNXOU_GleeT47w==)
   at #=q4SPYDhidHOPs2MuKRg7oiivglNE00$wHLqWlHwfmgqW3Br__AzPS9jS7$2TGaQYH.OnClick(EventArgs #=qSfPn7Eb6oMVZmJgFR8jwDg==)
   at #=q4SPYDhidHOPs2MuKRg7oiivglNE00$wHLqWlHwfmgqW3Br__AzPS9jS7$2TGaQYH.#=q1nUO4vzqqWh5GVMf4ewLkbem3yQ1DI$EQF4N1MYEllg=(Object #=qA88cayXkTo9MUjkCXIZGQQ==, EventArgs #=qDbilhWlLPArGitOENOFq7g==)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   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)

Thus, everytime I try to enable the plugin, it will pop up that error above.
Not sure if you know how to fix this, so I'll PM Steven to this topic too.

http://imgur.com/4V1Wc

kelsos

  • Sr. Member
  • ****
  • Posts: 302
That's a shame, to be honest I have no idea what is causing this problem, and if am unable to actually replicate it I can't think of a way to fix it... are you using a newer build than 1.2.4120?

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658

kelsos

  • Sr. Member
  • ****
  • Posts: 302
It actually seems pretty weird... I have been getting the same error while trying to enable it with the 1.2.4136, so I decided check it with some debug builds... In the debug build somehow I actually managed to activate the plugin and it works (it updates the skype mood properly), but now I am getting the same error when I try to disable the plugin, so my guess is that probably Steven can help us resolve whatever issue exists.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
i made a change to swap a couple of fields around to fix a GUI glitch but it needed one other change. Glad you guys caught the mistake!
this should fix it:
get the latest weekly update
Last Edit: May 08, 2011, 10:46:24 PM by Steven

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
Yep, with that release, it now works properly! Thanks again Steven :)

Pipovski

  • Guest
Thank you Kelsos! Works fine...  ::)

Cheers.

stas

  • Jr. Member
  • **
  • Posts: 54
Great, kelsos, thank you very much.
The only problem is if I press Pause and then Play again, status updates again. So the same song is shown 2 times in a row.
Last Edit: May 26, 2011, 03:00:56 PM by stas

jpirez

  • Jr. Member
  • **
  • Posts: 24

kelsos

  • Sr. Member
  • ****
  • Posts: 302
It's not working on Skype beta 5.5
I just got back home, I am gonna check it soon.

Great, kelsos, thank you very much.
The only problem is if I press Pause and then Play again, status updates again. So the same song is shown 2 times in a row.
The actual design was to restore the previous status when the track is paused and restore the playing track when un-paused. Is the original message not restored during pause? I could try to add it as an option, not to restore the original message when the track is paused and restored.

UPDATE:  I just installed Skype 5.5 beta on my computer and the plugin seems to work just fine. It updates properly. Did you allow MusicBee.exe to access skype and everything?
Last Edit: October 21, 2011, 07:05:24 PM by kelsos

jpirez

  • Jr. Member
  • **
  • Posts: 24
Hi mate

Thanks for your answer.

I am still having problems. Everything was working fine before updating to Skype's last beta.
Now, no matter what I do,  the plugin doesn't interact with skype.

I have tried to sort things out downgrading Skype but even so it didn't fix the problem.

I've got musicbee , skype (not beta), and the plugin working fine on my laptop.

I'll continue to investigate this issue.
Cheers

kelsos

  • Sr. Member
  • ****
  • Posts: 302
It is weird... It could be that the plugin fails to find if Skype is running or something.  I will add an information dialog at some point to show you If it managed to find Skype successfully. However it may take a while because it is my exams period right now..

Mikey

  • Guest
This plugin and thread dead?  Not working for me in Skype 5.5.0.119  :(

Skype doesn't see the plugin...it does see my last fm scobbler but not your plugin...

kelsos

  • Sr. Member
  • ****
  • Posts: 302
I am currently working on a new version with updated skype4com, also I added the ability to check if the plugin sees skype. I will add a link soon.