mirror of
https://github.com/phin05/discord-rich-presence-plex
synced 2024-11-24 18:43:02 +00:00
Update discordRichPresencePlex.py
This commit is contained in:
parent
14ee505fbd
commit
58532445f1
1 changed files with 4 additions and 1 deletions
|
@ -157,19 +157,22 @@ class discordRichPresencePlex(discordRichPresence):
|
|||
else:
|
||||
extra = str(time.strftime("%Hh%Mm", time.gmtime(metadata.duration / 1000)))
|
||||
extra = extra + " · " + ", ".join([genre.tag for genre in metadata.genres[:3]])
|
||||
largeText = "Watching a Movie"
|
||||
elif (mediaType == "episode"):
|
||||
title = metadata.grandparentTitle
|
||||
extra = "S" + str(metadata.parentIndex) + " · E" + str(metadata.index) + " - " + metadata.title
|
||||
largeText = "Watching a TV Show"
|
||||
elif (mediaType == "track"):
|
||||
title = metadata.title
|
||||
extra = metadata.grandparentTitle + " · " + metadata.parentTitle
|
||||
largeText = "Listening to Music"
|
||||
else:
|
||||
return
|
||||
activity = {
|
||||
"details": title,
|
||||
"state": extra,
|
||||
"assets": {
|
||||
"large_text": "Plex",
|
||||
"large_text": largeText,
|
||||
"large_image": "logo",
|
||||
"small_text": state.capitalize(),
|
||||
"small_image": state
|
||||
|
|
Loading…
Reference in a new issue