Create a personal movie database using Dataview, QuickAdd and Minimal Theme

Here’s a step-by-step guide I put together to help you create a personal movie database like the one featured in the Minimal screenshots

This guide covers how to use QuickAdd, Dataview and Minimal to create sortable Cards gallery of posters. You’ll be able to easily save movies to your watchlist, and add ratings to movies you’ve watched.


9 Likes

Quick question: do you have a recommendation for bulk updating movies added to the database before they got awards, ratings, etc?

1 Like

Hello

On your website…

…you create links with values such as:

director:: {{VALUE:directorLink}}
genre:: {{VALUE:genreLinks}}
cast:: {{VALUE:actorLinks}}

I have tried to do the same for writers, but nothing works.

writers:: {{VALUE:writerLink}}
writers:: {{VALUE:writerLinks}}
writers:: {{VALUE:writersLink}}
writers:: {{VALUE:writersLinks}}

Do you know a way to get it to work?

With thanks

1 Like

What exactly is not working? The seeing of the key value looks good to me. If what you want to do is adding this to the card that are displayed, you need to make this addition to the dataview query. For example, I have an extra field for movies that includes a field “My Rating”. I have it added exactly like you do as part of the quick add script and then on the dataview query that displays the cards I have this extra line:

	"My rating: " + rating as "My Rating"

And that does it.

1 Like

Thanks for the reply.

Some keys will pull data into Obsidian and if there are multiple entries for the key, you get multiple links in the metadata. For example:

**FilmGenre**:: {{VALUE:genreLinks}}   
**FilmActors**:: {{VALUE:actorLinks}}  

Outputs:

**FilmGenre**:: [[Drama]], [[Mystery]]   
**FilmActors**:: [[Anthony Hopkins]], [[Olivia Colman]], [[Mark Gatiss]]  

However, that doesn’t work with the writer key:

**FilmWriter**:: {{VALUE:Writer}}

Outputs two (or more) writers with no link:

**FilmWriter**:: Christopher Hampton, Florian Zeller  

I have tried various permutations:

**FilmWriter**:: {{VALUE:writerLink}}
**FilmWriter**:: {{VALUE:writerLinks}}
**FilmWriter**:: {{VALUE:writersLink}}
**FilmWriter**:: {{VALUE:writersLinks}}
**FilmWriter**:: {{VALUE:WriterLinks}}   
**FilmWriter**:: {{VALUE:WriterLink}} 
**FilmWriter**:: {{VALUE:WritersLinks}}   
**FilmWriter**:: {{VALUE:WritersLink}}     

But none of them yield multiple links for multiple writers:

**FilmWriter**:: [[Christopher Hampton]], [[Florian Zeller]], [[Third Writer]], [[ETC]]  

Simple enough to correct after creating a new note, but it would be nice to be able to automate it.

I think the problem here is that the API does not provide Writers as a field. If you go to the ‘Examples’ section of the OMDB API and make a request, you’ll see it doesn’t return any “Writers” field, so the {{VALUE:writerLink}} call is not returning anything. Which means you will have to add the information manually.

1 Like

Many thanks. I went to OMDP and got sample data for Dune:

{"Title":"Dune",
"Year":"2021",
"Rated":"PG-13",
"Released":"22 Oct 2021",
"Runtime":"155 min",
"Genre":"Action, Adventure, Drama",
"Director":"Denis Villeneuve",
"Writer":"Jon Spaihts, Denis Villeneuve, Eric Roth",
"Actors":"Timothée Chalamet, Rebecca Ferguson, Zendaya",
"Plot":"A noble family becomes embroiled in a war for control over the galaxy's most valuable asset while its heir becomes troubled by visions of a dark future.",
"Language":"English, Mandarin",
"Country":"Canada, United States",
"Awards":"Won 6 Oscars. 168 wins & 281 nominations total",
"Poster":"https://m.media-amazon.com/images/M/MV5BN2FjNmEyNWMtYzM0ZS00NjIyLTg5YzYtYThlMGVjNzE1OGViXkEyXkFqcGdeQXVyMTkxNjUyNQ@@._V1_SX300.jpg",
"Ratings":[{"Source":"Internet Movie Database",
"Value":"8.0/10"},{"Source":"Rotten Tomatoes",
"Value":"83%"},{"Source":"Metacritic",
"Value":"74/100"}],
"Metascore":"74",
"imdbRating":"8.0",
"imdbVotes":"625,484",
"imdbID":"tt1160419",
"Type":"movie",
"DVD":"22 Oct 2021",
"BoxOffice":"$108,327,830",
"Production":"N/A",
"Website":"N/A",
"Response":"True"}

It has a value for Writer.

I don’t understand which values can have Link or Links appended to them as in the example template given on the page written by @kepano.

---
poster: {{VALUE:Poster}}
imdbId: {{VALUE:imdbID}}
scoreImdb: {{VALUE:imdbRating}}
length: {{VALUE:Runtime}}
---

category:: {{VALUE:typeLink}}
director:: {{VALUE:directorLink}}
genre:: {{VALUE:genreLinks}}
year:: {{VALUE:Year}}
cast:: {{VALUE:actorLinks}}
plot:: {{VALUE:Plot}}
watchlist:: [[{{DATE:gggg-MM-DD}}]]
rating::

#movies #to-watch

And why are some called Link (singular) and others Links (plural)? They both return plural links if the key has two values.

For example, FilmDirector:: {{VALUE:directorLink}} (note the Link is singular) will render with two names and two links with a film that has two listed directors, such as Everything Everywhere All at Once:

**FilmDirector**:: [[Dan Kwan]], [[Daniel Scheinert]]  

Why does it work for {{VALUE:directorLink}} but not {{VALUE:writerLink}}?

I am clearly misunderstanding something.

I was misunderstanding something. The values are broken into links through the js file. I was able to add a couple of lines to make both the writer and country values into links.

From:

  QuickAdd.variables = {
    ...selectedShow,
    actorLinks: linkifyList(selectedShow.Actors.split(",")),
    genreLinks: linkifyList(selectedShow.Genre.split(",")),
    directorLink:
      selectedShow.Director === "N/A" ? " " : linkifyList(selectedShow.Director.split(",")),
    fileName: replaceIllegalFileNameCharactersInString(selectedShow.Title),
    typeLink: `[[${selectedShow.Type === "movie" ? "Movies" : "Series"}]]`,
  };

To:

  QuickAdd.variables = {
    ...selectedShow,
    countryLinks: linkifyList(selectedShow.Country.split(",")),
    writerLinks: linkifyList(selectedShow.Writer.split(",")),
    actorLinks: linkifyList(selectedShow.Actors.split(",")),
    genreLinks: linkifyList(selectedShow.Genre.split(",")),
    directorLink:
      selectedShow.Director === "N/A" ? " " : linkifyList(selectedShow.Director.split(",")),
    fileName: replaceIllegalFileNameCharactersInString(selectedShow.Title),
    typeLink: `[[${selectedShow.Type === "movie" ? "Movies" : "Series"}]]`,
  };

Works perfectly.

Thanks for the questions and guidance: you set me on the right path.

2 Likes

This script is great and really useful.

I’ve been creating a ‘system’ to track films I want to see, etc using it, but am struggling little with release date:

The script returns a release date in the format: dd MMM yyyy. e.g. 04 Jan 2023.
I’d like to either retrieve this or be able to convert it to the format, e.g. 2023-01-04, in order that using dataview I can create view showing upcoming releases and separately show what films are out now.

I’ve had a bit of a try in dataview to do the conversion but have failed.

Can anyone help either:

  • obtain the release date from IMDB in the format YYYY-MM-DD
  • explain how I might convert DD MMM YYYY to YYYY-MM-DD within dataview so that I can compare it with ‘today’s’ date

I can’t understand what’s wrong. I’m following the guide step by step, making sure to create a macro, link the API key, then add a command AND make it use said macro.
Still, when I run it, it says “there’s no commands in this macro”.
Can anybody help?

@lucotto I don’t know how to help unfortunately. I ran into another problem, that I have seen other people face with. It seems that the script does not work anymore, as everytime I search for a movie it says that no movie has been found.
Anybody found a solution?