Merge pull request #1295 from samwiseg00/feature-add-timestamp-discord

Add timestamps for rich metadata info on discord
This commit is contained in:
JonnyWong16 2018-05-27 14:47:53 -07:00 committed by GitHub
commit 10add90451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View file

@ -209,6 +209,9 @@ def now():
now = datetime.datetime.now()
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'):

View file

@ -1145,7 +1145,8 @@ class DISCORD(Notifier):
plex_url = pretty_metadata.get_plex_url()
# Build Discord post attachment
attachment = {'title': title
attachment = {'title': title,
'timestamp': helpers.utc_now_iso()
}
if self.config['color']: