Author Topic: XMPlay Discord Status Plugin  (Read 1713 times)

Ham62

  • Posts: 4
XMPlay Discord Status Plugin
« on: 4 Aug '20 - 07:11 »
I wrote an XMPlay plugin that sets your "Now Playing" status in Discord to the current track that you're listening to.

I originally based my plugin off the code from xmp-discordrichpres by Cynosphere but realized there was a lot of work to do, so the majority of it was rewritten from scratch.

Features:
    - Three status timer modes (Remaining/Elapsed/Disabled)
    - Automatically detects track seek/pause/stop
    - Show/Hide album date in status
    - Show/Hide XMPlay version in icon alt text

You can download the plugin from here: http://grahamdowney.com/software/XMPlayDiscordStatus/xmp-discordstatus.htm
And I have the code mirrored over on Github here: https://github.com/Ham62/XMPlayDiscordStatus/

Feel free to try it out and tell me any bugs you find!
If you have any suggestions for future updates, feel free to let me know!

Enjoy!

Ian @ un4seen

  • Administrator
  • Posts: 23869
Re: XMPlay Discord Status Plugin
« Reply #1 on: 5 Aug '20 - 17:29 »
Nice work. It has now been added to the XMPlay webpage and support site.

I notice the VC++ 2013 runtime (MSVCR120.DLL) is required. It may be possible to avoid the user needing to have that installed by linking with the MSVCRT files from the Windows Driver Kit. If you would like to try that, the Vista WDK files are available here:

   www.un4seen.com/stuff/msvcrt.zip

Place the i386/msvcrt.lib file in your project's folder and add i386/msvcrt_winxp.obj or i386/msvcrt_win2000.obj to the linker "Additional Dependencies" option.

Ham62

  • Posts: 4
Re: XMPlay Discord Status Plugin
« Reply #2 on: 6 Aug '20 - 04:05 »
Good catch on the runtime thing, and thanks for the files! I think I've got the linking fixed now.

andrumar10

  • Guest
Re: XMPlay Discord Status Plugin
« Reply #3 on: 2 Nov '20 - 19:34 »
Howdy,
Would it be possible for you to throw together a quick walkthrough or installation guide for getting the plugin set up? I managed to find the github repository and went through the process of placing the DLLs in my XMplay folder, adding in the plugin through the Plugins menu, and even adding XMPlay as an application in Discord. I'm still not quite sure what I'm missing to get things running. I feel like I'm missing an obvious step here but I don't quite have the knack to know what.

All the best.


I wrote an XMPlay plugin that sets your "Now Playing" status in Discord to the current track that you're listening to.

I originally based my plugin off the code from xmp-discordrichpres by Cynosphere but realized there was a lot of work to do, so the majority of it was rewritten from scratch.

Features:
    - Three status timer modes (Remaining/Elapsed/Disabled)
    - Automatically detects track seek/pause/stop
    - Show/Hide album date in status
    - Show/Hide XMPlay version in icon alt text

You can download the plugin from here: http://grahamdowney.com/software/XMPlayDiscordStatus/xmp-discordstatus.htm
And I have the code mirrored over on Github here: https://github.com/Ham62/XMPlayDiscordStatus/

Feel free to try it out and tell me any bugs you find!
If you have any suggestions for future updates, feel free to let me know!

Enjoy!

andrumar10

  • Guest
Re: XMPlay Discord Status Plugin
« Reply #4 on: 2 Nov '20 - 19:48 »
Not sure what changed on my end, perhaps closing and opening Discord and XMPlay a few times, but scratch that, performing those three steps got things working for me! Thanks for helping keep XMPlay current and cool to use!
All the Best!



Howdy,
Would it be possible for you to throw together a quick walkthrough or installation guide for getting the plugin set up? I managed to find the github repository and went through the process of placing the DLLs in my XMplay folder, adding in the plugin through the Plugins menu, and even adding XMPlay as an application in Discord. I'm still not quite sure what I'm missing to get things running. I feel like I'm missing an obvious step here but I don't quite have the knack to know what.

All the best.


Androgeos

  • Guest
Re: XMPlay Discord Status Plugin
« Reply #5 on: 11 Jan '21 - 04:22 »
Looks like adding the plugin manually from the drop-down list in Options & stuff -> Plugins is what did the trick. I did the same thing - restart both XMPlay and Discord - before I did that, but once I did, it showed up correctly in Discord.

If you're reading this thread because you can't get the plugin to work, perform the following steps:
  • Download XMPlayDiscordStatus.zip from Ham62's site.
    Drag the files inside it into your XMPlay folder.
  • If you're using the default XMPlay skin, open the "Options and stuff" window by pressing the little wrench icon on the top-right of the main XMPlay window (i.e. the one with the main song timer).
    Alternatively, right-click/press-hold on the same window to open the context menu, then press "Options and stuff".
  • In the "Options and stuff" window, select "Plugins" from the left pane.
  • On the right pane, press the drop-down list directly under "DSP and general plugins" to open it.
    You should see "XMPlay Discord Status" as an available item.
  • Select "XMPlay Discord Status" and press the Add button to the right of the drop-down list.
    This will close the drop-down list and add "XMPlay Discord Status" as a new entry in the listed entries directly under said list.
  • Go to Discord and check your status by viewing your pop-up details on the members pane to the right.
    You should see your current activity in XMPlay shown as "Playing a game"; this includes when you have XMPlay open, but no song is playing.
    If you see this, congratulations; the plugin is working perfectly! Close the "Options and stuff" window in XMPlay and resume doing whatever you were doing.
    If you do not see this, reload Discord by pressing CTRL+R, and/or restart XMPlay, and check Discord again.

For clarification: you do NOT need to add XMPlay as a "game" in Discord's User Settings. The XMPlay plugin will automatically display what XMPlay is doing whenever the player is open.