diff --git a/dist/templates/bgm-template.ejs b/dist/templates/bgm-template.ejs index 3aad476..04cf79f 100644 --- a/dist/templates/bgm-template.ejs +++ b/dist/templates/bgm-template.ejs @@ -1,9 +1,9 @@
<% if(download_image) { %> - " data-src="<%= `/images/${item.image}` %>" referrerPolicy="no-referrer" width="110" style="width:110px;margin:<%= margin %> auto;" /> + " data-src="<%= `/images/bangumis/${item.image}` %>" referrerPolicy="no-referrer" width="110" style="width:110px;margin:<%= margin %> auto;" /> <% } else { %> - " data-src="<%= `/images/${item.image}` %>" referrerPolicy="no-referrer" width="110" style="width:110px;margin:<%= margin %> auto;" /> + " data-src="<%= `https://lain.bgm.tv/pic/cover/${image_level}/${item.image}` %>" referrerPolicy="no-referrer" width="110" style="width:110px;margin:<%= margin %> auto;" /> <% } %>
diff --git a/src/index.js b/src/index.js index 223092a..668c151 100644 --- a/src/index.js +++ b/src/index.js @@ -22,8 +22,8 @@ hexo.extend.generator.register('bangumis', function (locals) { if (!this?.config?.bangumis?.enable) { return; } - if (!fs.existsSync(path.join(this.source_dir, '/images/loading.gif'))) { - fs.copyFile(path.join(__dirname, 'img/loading.gif'), path.join(this.source_dir, '/images/loading.gif')); + if (!fs.existsSync(path.join(this.source_dir, '/images/bangumis/loading.gif'))) { + fs.copyFile(path.join(__dirname, 'img/loading.gif'), path.join(this.source_dir, '/images/bangumis/loading.gif')); } return require('./dist/bangumi-generator').call(this, locals); }); diff --git a/src/lib/get-bgm-data.js b/src/lib/get-bgm-data.js index 68a83c3..5bd5a07 100644 --- a/src/lib/get-bgm-data.js +++ b/src/lib/get-bgm-data.js @@ -181,7 +181,7 @@ module.exports.getBgmData = async (bgmtv_uid, download_image, image_level, sourc // create folders if not exist const bangumisPath = path.join(source_dir, '/_data/bangumis'); const cachePath = path.join(bangumisPath, '/cache'); - const imagesPath = path.join(source_dir, '/images'); + const imagesPath = path.join(source_dir, '/images/bangumis'); const pathList = [bangumisPath, cachePath, imagesPath]; for (const i of pathList) { if (!fs.existsSync(i)) {