Dataview stops loading files in table once properties are edited

What I’m trying to do

I making a list movies that I’ve watched and want to watch using the Media DB Community Plugin. I can successfully add a movie from the plugin. But as soon as I modify anything in the movie file like marking, the status is watched for example, date of you seems to lose the ability to ever show me that file again.

The functionality, I’m looking for, is being able to maintain all movies. And maintain a watchlist. And be able to change the status of the watched property from false to true. Here’s an example of the current code that I have.

View All

table without id 
	("![](" + image + ")") as Poster, as Title,
	string(year) as Year, 
where image != null and type = "movie"

Example Movie File

  - movie
title: Point Break
englishTitle: Point Break
  - "1991"
dataSource: OMDbAPI
id: tt0102685
plot: An F.B.I. Agent goes undercover to catch a gang of surfers who may be bank robbers.
  - Action
  - Crime
  - Thriller
  - Kathryn Bigelow
  - Rick King
  - W. Peter Iliff
  - N/A
duration: 122 min
onlineRating: 7.3
  - Patrick Swayze
  - Keanu Reeves
  - Gary Busey
released: true
premiere: 1991-07-12
watched: true
lastWatched: ""
personalRating: 0
  - mediaDB/tv/movie

Things I have tried

I’ve tried editing other properties for a movie file, and anytime I edit any property date of you stop being able to render the file even if that property is not a constraint of how date of view is looking for the file. So I feel like there’s something I don’t understand about. How did you render content.

I’ve tried being more specific with the date of view code, specifically asking it to look for whether something is true or false, and that seems to have no effect on files that have been edited. For example

table without id 
	("![](" + image + ")") as Poster, as Title,
	string(year) as Year, 
where image != null and type = "movie" and watched = true

One thing you need to make sure when editing properties is that you don’t accidentally enter an invalid property. If that happens the entire property section is “disabled”/“unavailable”. To check this, make sure that you’re seeing the properties in the file you edited. If you don’t see it, or get some error message, then any queries will not be able to see the properties of this file either.

I’m not quite sure if I follow you on this one, but there is one caveat to know about: If you edit a movie, i.e. change from watched: true to watched: false, it’s not a given all the time that a query in another note will pick up on that change. You’ll sometimes need to re-open that note to get it to re-run the query. One way to do this is to go back to another file, and then forward again into the note with the query (or just open another file, and the go back again to the original file).

Two other ways of getting the query to re-run (besides re-opening the file) could be to change the query itself (i.e. adding or removing a space character somewhere… ), or trigger a call to rebuild the view (which do require a little bit of setup).

1 Like

That fixed it, thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.