Author Topic: Enhanced Discord Presence  (Read 1610 times)

cleaninfla

  • Newbie
  • *
  • Posts: 5
This is the first plugin i wrote for MusicBee, It enables Discord Rich Presence and allows you to automatically upload and use your album artwork, Show time remaining, play / pause status, artist and track name.

https://github.com/maybeclean/musicbee-rich-presence
https://github.com/maybeclean/musicbee-rich-presence/releases/tag/v1.1

*Discord has a max size of 300 for assets meaning you can have 298 artworks including play / pause icons or 300 without. This is an internal limitation and cannot be bypassed.
**Characters from other languages (Japanese for example) might not pass Discord's asset regex and fail to upload artwork, currently looking for a work around.
***This plugin uses a publicly exposed portion of the Discord API (/assets) to upload images and does not violate any ToS or agreement because of that.

Last Edit: May 08, 2021, 08:11:56 PM by cleaninfla

mantecademani

  • Newbie
  • *
  • Posts: 2
Hey, just managed to get this plugin working for the most part, but I ran into one issue. I'm getting a ["String value did not match validation regex."] error in the log file whenever I play a song from the Owl City album "Maybe I'm Dreaming". Any idea what it could be. Not a huge deal, but would be nice to figure out. Awesome job with the plugin though, really nice to have the album art in discord!
🎶 "Reality is a lovely place, but I wouldn't want to live there."
Last.fm: https://www.last.fm/user/mantecademani

cleaninfla

  • Newbie
  • *
  • Posts: 5
Hey, just managed to get this plugin working for the most part, but I ran into one issue. I'm getting a ["String value did not match validation regex."] error in the log file whenever I play a song from the Owl City album "Maybe I'm Dreaming". Any idea what it could be. Not a huge deal, but would be nice to figure out. Awesome job with the plugin though, really nice to have the album art in discord!

That issue is because of Discord's internal regex not allowing some symbols, i've updated the repo so single and double quotes are changed to '_' which Discord supports and that should fix your issue.

mantecademani

  • Newbie
  • *
  • Posts: 2
Hey, just managed to get this plugin working for the most part, but I ran into one issue. I'm getting a ["String value did not match validation regex."] error in the log file whenever I play a song from the Owl City album "Maybe I'm Dreaming". Any idea what it could be. Not a huge deal, but would be nice to figure out. Awesome job with the plugin though, really nice to have the album art in discord!

That issue is because of Discord's internal regex not allowing some symbols, i've updated the repo so single and double quotes are changed to '_' which Discord supports and that should fix your issue.

That seems to have done it, thanks!
🎶 "Reality is a lovely place, but I wouldn't want to live there."
Last.fm: https://www.last.fm/user/mantecademani

cleaninfla

  • Newbie
  • *
  • Posts: 5
Precompiled Binaries are now available at GitHub with full functionality https://github.com/maybeclean/musicbee-rich-presence/releases/tag/v1.0
Last Edit: April 30, 2021, 11:50:42 PM by cleaninfla

kick12134

  • Newbie
  • *
  • Posts: 1
Hey there, I tried this plugin but when I tried to activate it in musicbee it gives me an "Unable to initialise plugin: mb_discordrichpresence.dll" error

cleaninfla

  • Newbie
  • *
  • Posts: 5
This has been fixed with the latest commit, binaries have been updated aswell. Feel free to redownload them and try it out.

HOX

  • Newbie
  • *
  • Posts: 7

cleaninfla

  • Newbie
  • *
  • Posts: 5
Plugin should work fine with portable, only difference is that you would drag the plugin files to the plugin folder in your portable folder. Everything else is the exact same following the readme.

Shingo

  • Newbie
  • *
  • Posts: 1
Hey, I downloaded the latest binaries (v1.1) and followed the instructions in the readme, but I still get the same error as kick12134.

My MusicBee version is 3.4.7792.

diozzz

  • Newbie
  • *
  • Posts: 1
Hello, I tried to enable the plugin but it gives me an "Exception has been thrown by the target of an invocation" error message.
Also, Here is the error logs.

Code
2021/05/11 0:10:30 - 10.0.19042.0 - 3.4.7764.37422D - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: The format of value '' is invalid.
   at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
   at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(String name, HeaderStoreItemInfo info, String value)
   at System.Net.Http.Headers.HttpHeaders.Add(String name, String value)
   at MusicBeePlugin.Plugin.Initialise(IntPtr apiInterfacePtr)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at #=z_aDAVc7sMkwkYxQETg==..ctor(#=zoKrwgApZgrrQua03HQ== #=zmYRlZmg=)

sadpengu

  • Newbie
  • *
  • Posts: 9
Have the same issue as above!
 Looking forward to a fix :)