From 18b49c2b14767aa691c84dab0879662b36404aa2 Mon Sep 17 00:00:00 2001 From: JiJi Date: Thu, 11 Apr 2024 11:00:37 +0800 Subject: [PATCH] Update get-bgm-data.js --- src/lib/get-bgm-data.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/get-bgm-data.js b/src/lib/get-bgm-data.js index cb9b121..0713dfd 100644 --- a/src/lib/get-bgm-data.js +++ b/src/lib/get-bgm-data.js @@ -9,6 +9,14 @@ const log = require('hexo-log')({ const LIMIT = 100; const USER_AGENT = 'mmdjiji/hexo-bangumis (https://github.com/mmdjiji/hexo-bangumis)'; +const BGMTV_TYPE = { + 1: '书籍', + 2: '动画', + 3: '音乐', + 4: '游戏', + 6: '三次元' +}; + // get a user's bangumi list const getBangumiList = async (bgmtv_uid) => { const wantWatch = []; // type=1 @@ -98,9 +106,9 @@ const getBangumi = async (bgm, cachePath) => { return obj; } } catch (error) { + console.log(error); log.info(`Failed to get bangumi (${bangumi_id}), please check network!`); return undefined; - // console.log(error); } fs.writeFile(savedPath, '{}', (err) => { // mark as invalid bangumi if (err) {