{BUGFIX} For getting files from discogs

This commit is contained in:
Damien Broqua 2023-09-18 14:41:01 +02:00
parent fd0a9df724
commit 4ea7b42d52
2 changed files with 4 additions and 3 deletions

View file

@ -92,6 +92,10 @@ Publié automatiquement via #musictopus`;
const { data: buff } = await axios.get( const { data: buff } = await axios.get(
data.images[i].uri, data.images[i].uri,
{ {
headers: {
"User-Agent":
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0",
},
responseType: "arraybuffer", responseType: "arraybuffer",
} }
); );
@ -114,7 +118,6 @@ Publié automatiquement via #musictopus`;
await M.post("statuses", { status, media_ids }); await M.post("statuses", { status, media_ids });
} }
} catch (err) { } catch (err) {
console.log("Err:", err);
throw new ErrorEvent( throw new ErrorEvent(
500, 500,
"Mastodon", "Mastodon",

View file

@ -99,8 +99,6 @@ class Jobs {
await job.save(); await job.save();
console.log("ERR:", err);
throw err; throw err;
} }
} }