mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
add timestamps for rich metadata info on discord
This commit is contained in:
parent
4884cee309
commit
ddb7fa04ca
2 changed files with 11 additions and 7 deletions
|
@ -209,6 +209,9 @@ def now():
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
return now.strftime("%Y-%m-%d %H:%M:%S")
|
return now.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
|
def utc_now_iso():
|
||||||
|
utcnow = datetime.datetime.utcnow()
|
||||||
|
return utcnow.isoformat()
|
||||||
|
|
||||||
def human_duration(s, sig='dhms'):
|
def human_duration(s, sig='dhms'):
|
||||||
|
|
||||||
|
|
|
@ -1145,7 +1145,8 @@ class DISCORD(Notifier):
|
||||||
plex_url = pretty_metadata.get_plex_url()
|
plex_url = pretty_metadata.get_plex_url()
|
||||||
|
|
||||||
# Build Discord post attachment
|
# Build Discord post attachment
|
||||||
attachment = {'title': title
|
attachment = {'title': title,
|
||||||
|
'timestamp': helpers.utc_now_iso()
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.config['color']:
|
if self.config['color']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue