diff --git a/objects/i18n/locales/en.json b/objects/i18n/locales/en.json index a5bbd82..a63c11b 100644 --- a/objects/i18n/locales/en.json +++ b/objects/i18n/locales/en.json @@ -95,7 +95,8 @@ "providers-downloader-saving-status": "Saving everything to hard drive", "providers-downloader-window-closed": "The window has been closed. Data will now be saved.", "providers-error-item-sets-not-found": "Could not find Item Sets", - "providers-error-outdated": "%s: Data is outdated!", + "providers-error-outdated": "%s: Outdated data!", + "providers-error-offline": "%s is offline right now.", "providers-error-perks": "Could not gather perks for %s (%s)", "providers-flux-uploading": "Uploading data to Flu.x", "providers-flux-upload-error": "Couldn't upload data to Flu.x", diff --git a/objects/i18n/locales/fr.json b/objects/i18n/locales/fr.json index c752bc8..d600931 100644 --- a/objects/i18n/locales/fr.json +++ b/objects/i18n/locales/fr.json @@ -96,6 +96,7 @@ "providers-downloader-window-closed": "La fenêtre à été fermée. Les données vont maintenant se sauvegarder.", "providers-error-item-sets-not-found": "Impossible de trouver un set d'objet", "providers-error-outdated": "%s: les données ne sont pas à jour pour le dernier patch", + "providers-error-offline": "%s est hors-ligne.", "providers-error-perks": "Could not gather runes for %s (%s)", "providers-flux-uploading": "Téléversement des données vers Flu.x", "providers-flux-upload-error": "Une erreur est survenue lors du téléversement", diff --git a/objects/providers/OPGG.js b/objects/providers/OPGG.js index a88d6b3..39fb6f8 100644 --- a/objects/providers/OPGG.js +++ b/objects/providers/OPGG.js @@ -47,11 +47,10 @@ class OPGGProvider extends Provider { } _scrape(html, champion, gameMode, position, firstScrape) { - let $ = cheerio.load(html); - - const convertOPGGPosition = this.convertOPGGPosition; + let $ = cheerio.load(html), convertOPGGPosition = this.convertOPGGPosition; if ($('.champion-stats-header-version').text().trim().slice(-4) != Mana.gameClient.branch) UI.error('providers-error-outdated', this.name); + if ($('.WorkingTitle').text().trim().startsWith('Maintenance')) UI.error('providers-error-offline', this.name); position = $('li.champion-stats-header__position.champion-stats-header__position--active').data('position') ? this.convertOPGGPosition($('li.champion-stats-header__position.champion-stats-header__position--active').data('position')).toUpperCase() : position; const availablePositions = [];