Skip to content

Commit

Permalink
Fixed script not setting correct creation date to file
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimaHoarder committed Jun 13, 2021
1 parent d5adabc commit 599138b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apis/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ async def process_download(download_item: media_table):
await main_helper.write_data(
response, download_path, progress_bar
)
timestamp = download_item.created_at.timestamp()
await main_helper.format_image(download_path, timestamp)
download_item.size = response.content_length
download_item.downloaded = True

Expand Down
2 changes: 1 addition & 1 deletion helpers/main_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def format_media_set(media_set):
return merged


def format_image(filepath, timestamp):
async def format_image(filepath: str, timestamp: float):
if json_global_settings["helpers"]["reformat_media"]:
while True:
try:
Expand Down

0 comments on commit 599138b

Please sign in to comment.