Skip to content

Commit

Permalink
#86 Fix for file extension for keo and startrails
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-developer committed Jun 4, 2024
1 parent d2181f1 commit 8882c4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions allsky_discordsend/allsky_discordsend.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,15 @@ def discordsend(params, event):
allskyHome = s.getEnvironmentVariable('ALLSKY_HOME')
date = s.getEnvironmentVariable('DATE_NAME')
dateDir = os.path.join(allskyHome, 'images', date)

fullFileName = s.getSetting('filename')
filename, fileExtension = os.path.splitext(fullFileName)

if startrails:
fileName = os.path.join(dateDir, 'startrails', 'startrails-' + date + '.jpg')
fileName = os.path.join(dateDir, 'startrails', 'startrails-' + date + fileExtension)
result = sendFile(fileName, startrailsimageurl, 'Star Trails')

if keogram:
fileName = os.path.join(dateDir, 'keogram', 'keogram-' + date + '.jpg')
fileName = os.path.join(dateDir, 'keogram', 'keogram-' + date + fileExtension)
result = sendFile(fileName, keogramimageurl, 'Keogram')

if timelapse:
Expand Down

0 comments on commit 8882c4f

Please sign in to comment.