mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Fix lint errors in skin-database
This commit is contained in:
parent
aedd8e4745
commit
dfdffb390b
8 changed files with 5 additions and 16 deletions
|
|
@ -2,7 +2,5 @@
|
|||
built/
|
||||
coverage/
|
||||
**/node_modules/
|
||||
experiments/winamp-skin-museum/
|
||||
experiments/skin-database/
|
||||
modern/
|
||||
examples/webpack/bundle.js
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class DiscordWinstonTransport extends Transport {
|
|||
}
|
||||
|
||||
async log(info, callback) {
|
||||
const { message, ...rest } = info;
|
||||
const { message } = info;
|
||||
await this._channel.send(`${message}`);
|
||||
// Perform the writing to the remote service
|
||||
callback();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ const ensureInternetArchiveItemsIndexByMd5 = require("./tasks/ensureInternetArch
|
|||
const path = require("path");
|
||||
const logger = require("./logger");
|
||||
const Skins = require("./data/skins");
|
||||
const db = require("./db");
|
||||
|
||||
const { spawn } = require("child_process");
|
||||
|
||||
|
|
@ -57,6 +58,7 @@ async function main() {
|
|||
|
||||
case "ensure-md5s":
|
||||
await ensureInternetArchiveItemsIndexByMd5();
|
||||
break;
|
||||
case "metadata": {
|
||||
const hash = argv._[1];
|
||||
console.log(await Skins.getInternetArchiveUrl(hash));
|
||||
|
|
|
|||
|
|
@ -88,13 +88,6 @@ async function getSkinUrl(md5) {
|
|||
return getProp(md5, "skinUrl");
|
||||
}
|
||||
|
||||
async function getInternetArchiveItemName(md5) {
|
||||
const item = await getInternetArchiveItem(md5);
|
||||
if (item == null) {
|
||||
return null;
|
||||
}
|
||||
return item.identifier;
|
||||
}
|
||||
async function getInternetArchiveItem(md5) {
|
||||
return iaItems.findOne({ md5: md5 });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ const config = require("../../config");
|
|||
const Skins = require("../../data/skins");
|
||||
const Utils = require("../utils");
|
||||
|
||||
const { getInfo } = require("../info");
|
||||
|
||||
async function handler(message) {
|
||||
const { attachments } = message;
|
||||
if (attachments.length < 1) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ const rgbHex = require("rgb-hex");
|
|||
const Skins = require("../data/skins");
|
||||
const { approve, reject } = require("./s3");
|
||||
const logger = require("../logger");
|
||||
const { approve, reject } = require("./s3");
|
||||
|
||||
const filter = reaction => {
|
||||
return ["👍", "👎"].some(name => reaction.emoji.name === name);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
const fetch = require("node-fetch");
|
||||
const db = require("../db");
|
||||
const iaItems = db.get("internetArchiveItems");
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ module.exports = async function main() {
|
|||
const skinFiles = item.metadata.files.filter(file => {
|
||||
return file.name.endsWith(".wsz");
|
||||
});
|
||||
if (skinFiles.length != 1) {
|
||||
if (skinFiles.length !== 1) {
|
||||
console.warn(
|
||||
`Found a skin item with ${skinFiles.length} skin files. Identifier: ${
|
||||
item.identifier
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ async function fetchAllMetadata(limit) {
|
|||
// TODO: Refetch collections from:
|
||||
// https://archive.org/advancedsearch.php?q=collection%3Awinampskins&fl%5B%5D=identifier&rows=100000&page=1&output=json
|
||||
module.exports = async function main() {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise(resolve => {
|
||||
let delay = 60000;
|
||||
let timeout = null;
|
||||
async function go() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue