mProjectsCode / obsidian-media-db-plugin

A plugin that can query multiple APIs for movies, series, anime, games, music and wiki articles, and import them into your vault.
GNU General Public License v3.0
254 stars 31 forks source link

tags in Book template get overwritten by plugin #136

Closed wealthychef1 closed 7 months ago

wealthychef1 commented 8 months ago

Describe the bug I am using a template for MediaDB Books queries.
When I search a book, the tag gets omitted.

---
aliases: 
tags:
  - books/notes/mine
cssclasses:
  - centerImg
desire: 
recommender: 
plot: test plot
something:
  - else
---
# Book Template

## Document Info
- created:: <% "[[" + tp.date.now("YYYY-MM-DD") + "]]" %> 
- modified:: <% "`=this.file.mtime`" %>
- These are my freehand notes.  
- For auto-generated annotations, see <% "[[Knowledge/Books, Programs and People/ibook/" + tp.file.title + "]]" %>

## Overview 

## My Book Notes

To Reproduce

Expected behavior I'm hoping that "mediaDB/book" gets appended to my tags in my template.

Screenshots This movie demonstrates the behavior with my template.

2024-03-17 15 32 40 CleanShot Obsidian

Occurs on

Plugin version 0.6.0

Additional context

ltctceplrm commented 8 months ago

The best solution for this is to disable the default tags for books in MediaDB and only use your own template for the tags image I do this for the properties that I want more control over and it works great. So in your case if you want to keep both tags you disable it in mediadb and change your template to include this

tags:
  - books/notes/mine
  - MediaDB/book
wealthychef1 commented 8 months ago

OK that will work! Thanks