mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Do not show fetching metadata message unless there's data to fetch
This commit is contained in:
parent
20f934dc12
commit
1c8349a28e
|
@ -420,10 +420,11 @@ class LegendaryCore:
|
||||||
|
|
||||||
# setup and teardown of thread pool takes some time, so only do it when it makes sense.
|
# setup and teardown of thread pool takes some time, so only do it when it makes sense.
|
||||||
use_threads = len(fetch_list) > 5
|
use_threads = len(fetch_list) > 5
|
||||||
self.log.info(f'Fetching metadata for {len(fetch_list)} apps.')
|
if fetch_list:
|
||||||
if use_threads:
|
self.log.info(f'Fetching metadata for {len(fetch_list)} apps.')
|
||||||
with ThreadPoolExecutor(max_workers=16) as executor:
|
if use_threads:
|
||||||
executor.map(fetch_game_meta, fetch_list, timeout=60.0)
|
with ThreadPoolExecutor(max_workers=16) as executor:
|
||||||
|
executor.map(fetch_game_meta, fetch_list, timeout=60.0)
|
||||||
|
|
||||||
for app_name, app_assets in sorted(assets.items()):
|
for app_name, app_assets in sorted(assets.items()):
|
||||||
if skip_ue and any(v.namespace == 'ue' for v in app_assets.values()):
|
if skip_ue and any(v.namespace == 'ue' for v in app_assets.values()):
|
||||||
|
|
Loading…
Reference in a new issue