Merge pull request #113 from ruinshe/add-templated-attachment-support

support variables in attachment
This commit is contained in:
wanxp 2024-05-16 12:29:34 +08:00 committed by GitHub
commit e1ae4cd88c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

@ -508,6 +508,8 @@ export default abstract class DoubanAbstractLoadHandler<T extends DoubanSubject>
if (!folder) {
folder = DEFAULT_SETTINGS.attachmentPath;
}
folder = this.parsePartText(folder, extract, context)
const referHeaders = {'referer': image};
if ((syncConfig ? syncConfig.cacheHighQuantityImage : context.settings.cacheHighQuantityImage) && context.userComponent.isLogin()) {
try {

@ -214,7 +214,7 @@ PS: This file could be delete if you want to.
'121430': `Save Attachment File`,
'121431': `Save attachment file to local disk, such as image ? If you do not enable this feature, it will not show cover image in note`,
'121432': `Attachment folder`,
'121433': `Attachment file created from Obsidian-Douban will be placed in this folder, If blank, they will be placed in the default location for this vault.`,
'121433': `Attachment file created from Obsidian-Douban will be placed in this folder, If blank, they will be placed in the default location for this vault. example: {{myType}}/attachments`,
'121434': `assets`,
'121435': `Save High Definition Cover`,
'121436': `High Definition Cover looks better but it will take more space, and you must login douban in this plugin`,

@ -235,7 +235,7 @@ export default {
'121430': `保存图片附件`,
'121431': `导入数据会同步保存图片附件到本地文件夹, 如电影封面,书籍封面。如果需要显示封面,请保持开启该功能。`,
'121432': `附件存放位置`,
'121433': `保存的附件将会存放至该文件夹中. 如果为空, 笔记将会存放到默认位置(assets) `,
'121433': `保存的附件将会存放至该文件夹中. 如果为空, 笔记将会存放到默认位置(assets)。如:{{myType}}/attachments`,
'121434': `assets`,
'121435': `保存高清封面`,
'121436': `高清封面图片质量更高清晰度更好, 需要您在此插件 登录豆瓣 才能生效, 若未登录则默认使用低精度版本封面`,