From 5387bfb120abfaedae6f7855a41a2b7b3e8ff41e Mon Sep 17 00:00:00 2001 From: filesite Date: Sun, 14 Apr 2024 01:08:42 +0800 Subject: [PATCH] bug fix for image save --- conf/custom_config_tajian.json | 21 +++++++++++++++++++ .../tajian/controller/FrontapiController.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 conf/custom_config_tajian.json diff --git a/conf/custom_config_tajian.json b/conf/custom_config_tajian.json new file mode 100644 index 0000000..30deaf4 --- /dev/null +++ b/conf/custom_config_tajian.json @@ -0,0 +1,21 @@ +{ + "theme":"tajian", + "content_directory":"tajian/", + "heroUnion": { + "server_url": "https://herounion.filesite.io", + "uuid": "machete_tajian", + "token": "machete_tajian", + "contract": "tajiantv", + "country": "cn", + "lang": "zh", + "data_mode": "json", + "notify_url": "https://tajian.tv/frontapi/hunotify", + + "supportedPlatforms": { + "抖音": "douyin", + "快手": "kuaishou", + "西瓜视频": "xigua", + "B站": "bilibili" + } + } +} \ No newline at end of file diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index 401b3e9..c652a34 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -253,7 +253,7 @@ eof; //保存图片文件 if (!empty($task_data['cover_base64'])) { $filepath_cover = "{$data_dir}/{$video_id}.{$task_data['cover_type']}"; - file_put_contents($filepath_cover, $task_data['cover_base64']); + file_put_contents($filepath_cover, base64_decode($task_data['cover_base64'])); $filepath_desc = "{$data_dir}/{$video_id}_cover.txt"; file_put_contents($filepath_desc, "{$video_id}.{$task_data['cover_type']}");