Skip to content

Commit

Permalink
修复一直BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Apr 19, 2020
1 parent 112b3f5 commit 4edc736
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hexo.extend.console.register('bangumi', 'Update bilibili bangumis data', options
fs.rmdirSync(path.join(__dirname, "/data/"));
log.info('Bangumis data has been deleted');
}
} else {
} else if (args.u) {
if (!this.config.bangumi || !this.config.bangumi.enable) {
log.info("Please add config to _config.yml");
return;
Expand All @@ -36,6 +36,8 @@ hexo.extend.console.register('bangumi', 'Update bilibili bangumis data', options
return;
}
saveBangumiData(this.config.bangumi.vmid);
} else {
log.info("Unknown command.")
}
});

Expand Down
14 changes: 7 additions & 7 deletions lib/templates/template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
class="bangumi-info-label-em">0</em>
</span>
<span class="bangumi-info-item bangumi-area">
<span class="bangumi-info-label"><%= item.type %></span> <em><%= item.area %></em>
<span class="bangumi-info-label"><%= item.type %></span> <em><%= item.area || "null" %></em>
</span>
<span class="bangumi-info-item bangumi-play">
<span class="bangumi-info-label">总播放</span> <em><%= item.view %></em>
<span class="bangumi-info-label">总播放</span> <em><%= item.view || "null" %></em>
</span>
<span class="bangumi-info-item bangumi-follow">
<span class="bangumi-info-label">追番人数</span> <em><%= item.follow %></em>
<span class="bangumi-info-label">追番人数</span> <em><%= item.follow || "null" %></em>
</span>
<span class="bangumi-info-item bangumi-coin">
<span class="bangumi-info-label">硬币数</span> <em><%= item.coin %></em>
<span class="bangumi-info-label">硬币数</span> <em><%= item.coin || "null" %></em>
</span>
<span class="bangumi-info-item bangumi-danmaku">
<span class="bangumi-info-label">弹幕总数</span> <em><%= item.danmaku %></em>
<span class="bangumi-info-label">弹幕总数</span> <em><%= item.danmaku || "null" %></em>
</span>
<span class="bangumi-info-item bangumi-info-item-score">
<span class="bangumi-info-label">评分</span> <em><%= item.score %></em>
<span class="bangumi-info-label">评分</span> <em><%= item.score || "null" %></em>
</span>
</span>
</div>
<div class="bangumi-comments">简介:<%= item.des %> </div>
<div class="bangumi-comments">简介:<%= item.des || "null" %> </div>
</div>
</div>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-bilibili-bangumi",
"version": "1.1.9",
"version": "1.1.10",
"description": "hexo bilibili番剧页",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 4edc736

Please sign in to comment.