Skip to content

2 Bug Fixes + 1 Request #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
SirHacksABunch opened this issue May 6, 2025 · 5 comments
Open
1 task done

2 Bug Fixes + 1 Request #192

SirHacksABunch opened this issue May 6, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@SirHacksABunch
Copy link

SirHacksABunch commented May 6, 2025

Is there an existing issue for this?

  • I have searched the existing feature requests

Is your feature request related to a problem? Please describe

Bug 1: When enabling episode titles in the installer screen only the season and episode number display.
Bug 2: Discord shows image of media in a square format which cuts off aspect ratio.
Problem 1: Launching ".EXE" creates persistent terminal window on taskbar which doesn't start minimized.

Describe the solution you'd like

Bug Fix 1: When creating "main.js" from installer user prompt include the code to display episode title which is

"episodes": {
      "display": {
        "details_text": "{show-title}",
        "state_text": "S{season-padded}E{episode-padded} {sep} {title}",
        "image_text": "{show-title} ({year})"
      },
      "separator": "-"
    },

Bug Fix 2: Reference comment here on formatting and Plex-RPC solution.

Request: Have the ".EXE" start minimized and in system tray (where the "^" is on the right of the taskbar) instead of on the taskbar. Current fix is to hide the terminal application in system tray when minimized however this is for every terminal instance instead of the ".EXE" only.

Looks like creating a GUI or something which isn't a terminal script would work (though how to code the system tray when minimized can't figure out). Creating a shortcut on the ".EXE" and launching the shortcut stops the ".EXE" from being a terminal window and launches minimized without popping up (with "Run" launch parameter of "Minimized") however don't know how to get the shortcut into system tray.

Please consider this request please and thank you.

Describe alternatives you've considered

No response

Additional context

No response

@SirHacksABunch SirHacksABunch added the enhancement New feature or request label May 6, 2025
@SirHacksABunch SirHacksABunch marked this as a duplicate of #191 May 6, 2025
@SirHacksABunch
Copy link
Author

"--hidden" somewhere for the ".EXE" parameter might start it minimized in system tray

@SirHacksABunch
Copy link
Author

This is the code the other RPC repository has for fixing poster images: phin05/discord-rich-presence-plex@50ac76d#diff-3070b9a832b66d17c3505e99e957d1288fea247a88983415ad66a163b9b1e8e4L9

The code's formatting looks to be different than the solution in this repository's other issue where the linked solution seems like the best process to fix poster images. Please use whichever process seems best to you though

Hopefully these comments help

@SirHacksABunch

This comment has been minimized.

@SirHacksABunch
Copy link
Author

Update:

Some IMDB posters (which IMGUR shows for Discord's media preview) are in an aspect ratio of 2000 X 3000 (2:3). The smallest dimensions Jellyfin uses for media primary image is 680 X 1000 (17:25).

Went through Discord documentation and found the following:
A) The Rich Presence webpage states recommended size 1024 X 1024 for image assets.

Solution: If this repository's code changes to:

  1. Have the Jellyfin retrieved image in a (width=max height dimension) X (height= max height dimension) square without editing the image to change to fit the width. The image's original asspect ratio will be stored
  2. Upscale or downscale the Jellyfin retrieved image's height to 1024
  3. Examine the original aspect ratio and find the"relative width" relative to 1024 (might have to round up to the nearest whole number because this might cause decimal numbers). "Relative width" to 3000 H would be 683 W and "Relative width" to 1000 H would be 696 W. This website is helpful for calculing relative aspect ratios
  4. Calculate (1024 - "relative width"); then divide the dimension difference by 2; then change the divided number space from the left margin and right margin to be transparent (such as having a dimension difference of 1024-683=341 so 171 [round up from 170.5] pixels from the left and 171 pixels from the right will be transparent)
  5. Then it'll match the IMDB retrieved media posters pretty much 1:1 in Discord's media image preview (tricking Discord into thinking it's a square image when in reality it's zoomed out and transparent to show the poster in a rectangular form) however in a smaller size to fit Discord's limitations

B) "Set Activity" shows information on the "Activity Object" which leads you to "Activity Assets" where you can find information on "Activity Asset Image" which ultimately explains "Image Formatting". For documentation purposes Discord states "The returned size can be changed by appending a querystring of ?size=desired_size to the URL. Image size can be any power of two between 16 and 4096." in case you prefer different dimensions to 1024 X 1024.

If this is too much work or doesn't work you can submit a "Developer Support" Request and request if Discord can grant you similar RPC image properties to CrunchyRoll (might be best to save this image and upload it for a file attachment in the ticket since they might be weary on clicking links).

@SirHacksABunch
Copy link
Author

Probably safest to default to resizing the Jellyfin retrieved image to 1024 H (and keeping the width scaled for the same ratio without stretching it) then having 171 pixels from each side transparent since 2:3 and 17:25 are pretty close. Less can go wrong by sticking with these values over dynamically resizing for aspect ratio. Worst case you lose 6.5 pixels on each side if having a 2:3 image for the preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant