Skip to content

Commit

Permalink
Added Start Time, End Time and Run Time to Summary of run.
Browse files Browse the repository at this point in the history
  • Loading branch information
YozoraXCII committed Dec 12, 2024
1 parent 52a6e54 commit 73b5d92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ Modifies default value presentation for default metadata files.
Fixes an issue causing IMDB collection to fail due to duplicate keys
Removed Blog from the Navigation due to lack of time for updating/maintaining it
Fixes #2354 by updating version of tmdbapi dependency
Added Start Time, End Time and Run Time to Summary of run. Date of Start/End Time now only displays if the Start and End are on different dates.

9 changes: 8 additions & 1 deletion kometa.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,14 @@ def start(attrs):
logger.stacktrace()
logger.error(f"Report Error: {e}")

logger.separator(f"Finished {start_type}Run\n{version_line}\nFinished: {end_time.strftime('%H:%M:%S %Y-%m-%d')} Run Time: {run_time}")
if start_time.date() == end_time.date():
start_str = start_time.strftime('%H:%M:%S')
end_str = end_time.strftime('%H:%M:%S')
else:
start_str = start_time.strftime('%H:%M:%S %Y-%m-%d')
end_str = end_time.strftime('%H:%M:%S %Y-%m-%d')

logger.separator(f"Finished {start_type}Run\n{version_line}\nStart Time: {start_str} End Time: {end_str} Run Time: {run_time}")
logger.remove_main_handler()
except Exception as e:
logger.stacktrace()
Expand Down

0 comments on commit 73b5d92

Please sign in to comment.