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
255 stars 31 forks source link

Template error when using watched and personalRating in movie notes #109

Open btbristow opened 1 year ago

btbristow commented 1 year ago

Describe the bug When I try to insert {{watched}} or {{personalRating}} in a movie note, I get: {{ INVALID TEMPLATE TAG - object undefined }}

I can see these are being added to my metadata with values of "false" and "0" respectively, but I don't know how to add them to the body of a movie note.

Can you give me an example of how to use these variables in the note body and the YAML? If this is a bug, it is only a documentation bug, as I don't think docs are written yet. Thanks!

Occurs on

Windows iOS

ltctceplrm commented 3 months ago

Hi there, I don't know if you still have this issue almost a year later but I wanted to let you know that if you use templater this bug doesn't happen, instead of {{watched}} or {{personalRating}} you'd use <% tp.frontmatter.watched %> or <% tp.frontmatter.personalRating %>

I tried find why this bug happens but I believe it's a problem with obsidian templates and not this plugin.

mProjectsCode commented 3 months ago

I guess this is due to those properties being handled differently from the rest. (They are not plain props on the models)