fix: image rkey

This commit is contained in:
linyuchen
2024-04-28 09:26:55 +08:00
parent b5ab717634
commit 4ce4f3d3a5
4 changed files with 6 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,5 @@
import {log} from "../../../common/utils";
import * as os from "os";
interface MoeHook {
GetRkey: () => string, // Return '&rkey=xxx'
@@ -11,7 +12,9 @@ class HookApi {
constructor() {
try {
this.moeHook = require('./MoeHook.node');
const systemPlatform = os.platform();
const cpuArch = os.arch();
this.moeHook = require(`./MoeHoo-${systemPlatform}-${cpuArch}.node`);
console.log("hook rkey地址", this.moeHook!.HookRkey());
} catch (e) {
console.log('加载 moehoo 失败', e);