This PR closes #24 with 221e065 and the following commits.
This PR also closes #68 with 70b4089 to e5789e6.
While adding further metadata (duration/rating) was fairly easy (although i needed to do an additional API request for imdb movies) supporting tags was on a whole different level.
To support Tags a new Tag slice was created of the structure
type Tag struct {
Id int
Name string
}
This new struct was added to the database connector with some simple Add/Get/Find/Delete functions.
To support searching Movies by tag a new function "FilterMoviesByTags" was created which takes a slice of movies and a slice of tags to be found and returns all movies of the original slice that contain the tags to look for.
I also added a new div in the viewMovie.html to render the new metadata and tags for the movie.
This PR closes #24 with 221e065 and the following commits. This PR also closes #68 with 70b4089 to e5789e6.
While adding further metadata (duration/rating) was fairly easy (although i needed to do an additional API request for imdb movies) supporting tags was on a whole different level.
To support Tags a new Tag slice was created of the structure
This new struct was added to the database connector with some simple Add/Get/Find/Delete functions. To support searching Movies by tag a new function "FilterMoviesByTags" was created which takes a slice of movies and a slice of tags to be found and returns all movies of the original slice that contain the tags to look for.
I also added a new div in the viewMovie.html to render the new metadata and tags for the movie.