You've already forked tf2wikipricing
refactor: make noisy logs debug only
This commit is contained in:
@@ -215,7 +215,7 @@ async function inject() {
|
||||
const promises = qualities.filter(x => !excludedQualities.has(x)).map(async (quality) => {
|
||||
|
||||
const qualifiedName = ((quality != 6 ? itemQualities[quality as unknown as keyof typeof itemQualities].toString() : '') + ' ' + itemName).trim()
|
||||
// logDebug(`Fetching price for ${qualifiedName}`)
|
||||
logDebug(`Saving price for ${qualifiedName}`)
|
||||
|
||||
let data: ItemPriceData | null
|
||||
try {
|
||||
@@ -235,7 +235,7 @@ async function inject() {
|
||||
if(itemSchema[itemIndex].hasAustraliumVariant) {
|
||||
promises.push(fetchPrice(token, `${itemIndex};11;australium`, currentTime).then(data => {
|
||||
updateTime = new Date(data.update)
|
||||
log(`Saving price for Australium ${itemName}`)
|
||||
logDebug(`Saving price for Australium ${itemName}`)
|
||||
|
||||
const priceRow = createPriceRow($T("Australium"), data, keyPrice, exchangeRates, locale, "https://wiki.teamfortress.com/wiki/Australium_weapons")
|
||||
|
||||
@@ -263,7 +263,7 @@ async function inject() {
|
||||
|
||||
promises.push(fetchPrice(token, `${itemSchema[itemIndex].festiveVariant};6`, currentTime).then(data => {
|
||||
updateTime = new Date(data.update)
|
||||
log(`updateTime price for Festive ${itemName}`)
|
||||
logDebug(`Saving price for Festive ${itemName}`)
|
||||
|
||||
const priceRow = createPriceRow($T("Unique"), data, keyPrice, exchangeRates, locale)
|
||||
|
||||
@@ -275,7 +275,7 @@ async function inject() {
|
||||
}))
|
||||
promises.push(fetchPrice(token, `${itemSchema[itemIndex].festiveVariant};11`, currentTime).then(data => {
|
||||
updateTime = new Date(data.update)
|
||||
log(`Saving price for Strange Festive ${itemName}`)
|
||||
logDebug(`Saving price for Strange Festive ${itemName}`)
|
||||
|
||||
const priceRow = createPriceRow($T("Strange"), data, keyPrice, exchangeRates, locale)
|
||||
|
||||
@@ -351,7 +351,6 @@ async function inject() {
|
||||
|
||||
itemSchema[itemIndex].botkillerVariants.map((variantIndex) => {
|
||||
const itemName = itemSchema[variantIndex].name
|
||||
// FIXME: variantName should match wiki display name
|
||||
const variantName = itemName.includes('Mk.II') ? itemName.split(' ')[0] + ' Mk.II' : itemName.split(' ')[0]
|
||||
promises.push(fetchPrice(token, `${variantIndex};11`, currentTime).then(data => {
|
||||
logDebug(`Saving price for ${itemName}`)
|
||||
|
||||
Reference in New Issue
Block a user