diff --git a/eh-view-enhance.meta.js b/eh-view-enhance.meta.js
index c9f3bae..e364e99 100644
--- a/eh-view-enhance.meta.js
+++ b/eh-view-enhance.meta.js
@@ -48,6 +48,7 @@
// @match https://*.copymanga.tv/*
// @match https://e621.net/*
// @match https://arca.live/*
+// @match https://*.artstation.com/*
// @require https://cdn.jsdelivr.net/npm/@zip.js/zip.js@2.7.44/dist/zip-full.min.js
// @require https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js
// @require https://cdn.jsdelivr.net/npm/pica@9.0.1/dist/pica.min.js
@@ -82,6 +83,7 @@
// @connect mangafuna.xyz
// @connect e621.net
// @connect namu.la
+// @connect artstation.com
// @connect *
// @grant GM_getValue
// @grant GM_setValue
diff --git a/eh-view-enhance.user.js b/eh-view-enhance.user.js
index b187baf..1d15c1f 100644
--- a/eh-view-enhance.user.js
+++ b/eh-view-enhance.user.js
@@ -48,6 +48,7 @@
// @match https://*.copymanga.tv/*
// @match https://e621.net/*
// @match https://arca.live/*
+// @match https://*.artstation.com/*
// @require https://cdn.jsdelivr.net/npm/@zip.js/zip.js@2.7.44/dist/zip-full.min.js
// @require https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js
// @require https://cdn.jsdelivr.net/npm/pica@9.0.1/dist/pica.min.js
@@ -82,6 +83,7 @@
// @connect mangafuna.xyz
// @connect e621.net
// @connect namu.la
+// @connect artstation.com
// @connect *
// @grant GM_getValue
// @grant GM_setValue
@@ -1257,6 +1259,31 @@ Report issues here: window.fetch(url).then((resp) => {
+ if (resp.ok) {
+ switch (respType) {
+ case "text":
+ return resp.text();
+ case "json":
+ return resp.json();
+ case "arraybuffer":
+ return resp.arrayBuffer();
+ }
+ }
+ throw new Error(`failed to fetch ${url}: ${resp.status} ${resp.statusText}`);
+ }).then((raw) => results[index + i] = raw)
+ );
+ await Promise.all(batchPromises);
+ i += concurrency;
+ }
+ return results;
+ }
var FetchState = /* @__PURE__ */ ((FetchState2) => {
FetchState2[FetchState2["FAILED"] = 0] = "FAILED";
@@ -1352,11 +1379,9 @@ Report issues here: `https://www.artstation.com/projects/${p.hash_id}.json`);
+ const assets = await batchFetch(projectURLs, 10, "json");
+ let ret = [];
+ for (let asset of assets) {
+ this.info.projects++;
+ this.tags[asset.slug] = asset.tags;
+ for (let i = 0; i < asset.assets.length; i++) {
+ const a = asset.assets[i];
+ if (a.asset_type === "cover")
+ continue;
+ const thumb = a.image_url.replace("/large/", "/small/");
+ const ext = a.image_url.match(/\.(\w+)\?\d+$/)?.[1] ?? "jpg";
+ const title = `${asset.slug}-${i + 1}.${ext}`;
+ let originSrc = a.image_url;
+ if (a.has_embedded_player && a.player_embedded) {
+ if (a.player_embedded.includes("youtube"))
+ continue;
+ originSrc = a.player_embedded;
+ }
+ this.info.assets++;
+ ret.push(new ImageNode(thumb, asset.permalink, title, void 0, originSrc));
+ }
+ }
+ return ret;
+ }
+ async fetchOriginMeta(node) {
+ if (node.originSrc?.startsWith("