mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 08:44:33 +02:00
fix division by zero
This commit is contained in:
@@ -57,3 +57,5 @@ Tech that can be integrated as part of the core workflow...
|
||||
- image `imagehash` phash and hdash
|
||||
- custom exif tags
|
||||
- replace lightbox with iv-viewer
|
||||
- git-rebasin
|
||||
- additional upscalers
|
||||
|
||||
@@ -332,7 +332,7 @@ def refresh_extensions_list_from_data(search_text, sort_column):
|
||||
ext['sort_enabled'] = f"{'0' if ext['enabled'] else '1'}{'1' if ext['is_builtin'] else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}"
|
||||
ext['sort_update'] = f"{'1' if update_available else '0'}{'1' if ext['installed'] else '0'}{ext.get('updated', '2000-01-01T00:00')}"
|
||||
timedelta = datetime.now() - datetime.fromisoformat(ext.get('created', '2000-01-01T00:00Z')[:-1])
|
||||
ext['sort_trending'] = round(stars / min(timedelta.days, 5), 1)
|
||||
ext['sort_trending'] = round(stars / max(timedelta.days, 5), 1)
|
||||
tags = ext.get("tags", [])
|
||||
if not isinstance(tags, list):
|
||||
tags = tags.split(' ')
|
||||
|
||||
Reference in New Issue
Block a user