Skip to content

Commit

Permalink
Update get-bgm-data.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdjiji committed Apr 11, 2024
1 parent b607c33 commit 18b49c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lib/get-bgm-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 18b49c2

Please sign in to comment.