foo_discord_rich icon indicating copy to clipboard operation
foo_discord_rich copied to clipboard

Allow artwork url as the large image

Open s0hv opened this issue 1 year ago • 32 comments

I've written some documentation about this feature (such as how to configure it) to https://s0hv.github.io/foo_discord_rich/docs/album-artwork. I also wrote a rust program for the upload process. The repository can be found here and installation instructions here.

For things not related to implementation details or problems in code such as installation problems, use the discussion forum on my repo as that's a better place to organize those discussions https://github.com/s0hv/foo_discord_rich/discussions. Also @JizzMasterBladee created a video tutorial on the installation process which you can find here https://www.youtube.com/watch?v=E-uq0WT2pwk

This PR tries to implement a simple way of using artwork in the discord status. I've implemented in a way that leaves the uploading of the file to the user in order to allow for flexibility as to where and how the uploading is done.

~Important features currently not implemented~ Should be fine now

  • ~image hashes (to prevent uploading the same file multiple times)~ md5 hashes with urls stored in a json
    • Calculating md5 hash should be quite simple
    • Maybe behind an option in the config to toggle it on or off?
    • Performance on large images?
    • How to store the hash url combinations? (json?)
  • ~Race condition prevention~ Implemented with a mutex
    • ~Prevent trying to upload the same image multiple times~
    • ~Would a global lock be sufficient for this, allowing only one upload at a time?~
  • ~Error handling might not be perfect~might be ok
    • Check that processes are not left open in case of an error
  • ~UTF-8 support~ done
  • ~User configurable metadb key~ done
  • ~A sample script for uploading images~ https://github.com/s0hv/rust-imgur-upload
  • Documentation to gh-pages
    • https://github.com/s0hv/foo_discord_rich/tree/gh-pages

The path to the image upload command is set in Preferences -> Tools -> Discord Rich Presence Integration -> Advanced -> Artwork upload command. A checkbox used to enable and disable this feature is also found in the advanced tab (disabled by default).

s0hv avatar Aug 20 '22 13:08 s0hv

Would love to see this come to fruition.

Seagulls avatar Sep 03 '22 17:09 Seagulls