mirror of
https://github.com/vladmandic/automatic
synced 2026-09-17 16:24:33 +02:00
Merge pull request #2426 from D8-Dreambooth/master
Fix potential issues parsing extension repo URLs
This commit is contained in:
@@ -56,6 +56,7 @@ cache
|
||||
/log
|
||||
/cert
|
||||
.vscode/
|
||||
.idea/
|
||||
/localizations
|
||||
|
||||
# unexcluded so folders get created
|
||||
|
||||
@@ -318,9 +318,12 @@ def create_html(search_text, sort_column):
|
||||
stats = { 'processed': 0, 'enabled': 0, 'hidden': 0, 'installed': 0 }
|
||||
for ext in sorted(extensions_list, key=sort_function, reverse=sort_reverse):
|
||||
installed = get_installed(ext)
|
||||
author = f"Author: {ext['url'].split('/')[3]}" if 'github' in ext['url'] else ''
|
||||
author = ''
|
||||
try:
|
||||
updated = datetime.timestamp(datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z').rstrip('Z')))
|
||||
if 'github' in ext_url:
|
||||
author = ext_url.split('/')[-2].split(':')[-1] if '/' in ext_url else ext_url.split(':')[1].split('/')[0]
|
||||
author = f"Author: {author}"
|
||||
updated = datetime.timestamp(datetime.fromisoformat(ext.get('updated', '2000-01-01T00:00:00.000Z').rstrip('Z')))
|
||||
except Exception:
|
||||
updated = datetime.timestamp(datetime.now())
|
||||
update_available = (installed is not None) and (ext['remote'] is not None) and (ext['commit_date'] + 60 * 60 < updated)
|
||||
|
||||
Reference in New Issue
Block a user