Do not use evepraisal info unless there are orders up

This commit is contained in:
DarkPhoenix
2019-11-04 02:50:55 +03:00
parent 6b3e94729c
commit 9eb3b9e017
2 changed files with 5 additions and 1 deletions

View File

@@ -1 +1 @@
__all__ = ['evemarketer', 'evemarketdata', 'evepraisal']
__all__ = ['evemarketer', 'evepraisal', 'evemarketdata']

View File

@@ -66,11 +66,15 @@ class EvePraisal:
try:
typeID = int(itemData['typeID'])
price = itemData['prices']['sell']['min']
orderCount = itemData['prices']['sell']['order_count']
except (KeyError, TypeError):
continue
# evepraisal returns 0 if price data doesn't even exist for the item
if price == 0:
continue
# evepraisal seems to provide price for some items despite having no orders up
if orderCount < 1:
continue
priceMap[typeID].update(PriceStatus.fetchSuccess, price)
del priceMap[typeID]