diff --git a/README.md b/README.md index fab7a5c..05ebc06 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Python script that displays your [Plex](https://www.plex.tv/) status on [Discord](https://discord.com/) using [Rich Presence](https://discord.com/developers/docs/rich-presence/how-to). -Current Version: 2.3.0 +Current Version: 2.3.1 ## Getting Started @@ -26,10 +26,11 @@ The script must be running on the same machine as your Discord client. * `logging` * `debug` (boolean, default: `true`) - Outputs additional debug-helpful information to the console if enabled. * `writeToFile` (boolean, default: `false`) - Writes everything outputted to the console to a `console.log` file if enabled. -* `display` - * `useRemainingTime` (boolean, default: `false`) - Displays your media's remaining time instead of elapsed time in your Rich Presence if enabled. +* `display` - Display settings for Rich Presence + * `hideTotalTime` (boolean, default: `false`) - Hides the total duration of the media if enabled. + * `useRemainingTime` (boolean, default: `false`) - Displays the media's remaining time instead of elapsed time if enabled. * `posters` - * `enabled` (boolean, default: `false`) - Displays media posters in Rich Presence if enabled. Requires `imgurClientID`. + * `enabled` (boolean, default: `false`) - Displays media posters if enabled. Requires `imgurClientID`. * `imgurClientID` (string, default: `""`) - [Obtention Instructions](#obtaining-an-imgur-client-id) * `buttons` (list) - [Information](#buttons) * `label` (string) - The label to be displayed on the button. @@ -69,6 +70,7 @@ During runtime, the following dynamic URL placeholders will get replaced with re "writeToFile": false }, "display": { + "hideTotalTime": false, "useRemainingTime": false, "posters": { "enabled": true, diff --git a/models/config.py b/models/config.py index cfa9464..b848ae6 100644 --- a/models/config.py +++ b/models/config.py @@ -13,6 +13,7 @@ class Button(TypedDict): url: str class Display(TypedDict): + hideTotalTime: bool useRemainingTime: bool posters: Posters buttons: list[Button] diff --git a/services/PlexAlertListener.py b/services/PlexAlertListener.py index 3be542f..ddd7fff 100644 --- a/services/PlexAlertListener.py +++ b/services/PlexAlertListener.py @@ -181,7 +181,7 @@ class PlexAlertListener(threading.Thread): title: str thumb: str if mediaType in ["movie", "episode"]: - stateStrings: list[str] = [formatSeconds(item.duration / 1000)] + stateStrings: list[str] = [] if config["display"]["hideTotalTime"] else [formatSeconds(item.duration / 1000)] if mediaType == "movie": title = f"{item.title} ({item.year})" genres: list[Genre] = item.genres[:3] diff --git a/services/config.py b/services/config.py index 7eeddc7..af65b63 100644 --- a/services/config.py +++ b/services/config.py @@ -12,6 +12,7 @@ config: models.config.Config = { "writeToFile": False, }, "display": { + "hideTotalTime": False, "useRemainingTime": False, "posters": { "enabled": False, diff --git a/store/constants.py b/store/constants.py index 6ebd121..0643e91 100644 --- a/store/constants.py +++ b/store/constants.py @@ -2,7 +2,7 @@ import os import sys name = "Discord Rich Presence for Plex" -version = "2.3.0" +version = "2.3.1" plexClientID = "discord-rich-presence-plex" discordClientID = "413407336082833418"