diff --git a/internal/books/controller.go b/internal/books/controller.go index fed54ed..6bb498b 100644 --- a/internal/books/controller.go +++ b/internal/books/controller.go @@ -26,6 +26,7 @@ func LoadBooks() ([]Book, error) { } func ProcessBooks(books []Book, update bool) error { + utils.Sep() fmt.Printf(" B O O K S\n") utils.Sep() for _, book := range books { diff --git a/internal/movies/controller.go b/internal/movies/controller.go index 3b2d679..f3faa41 100644 --- a/internal/movies/controller.go +++ b/internal/movies/controller.go @@ -26,12 +26,12 @@ func LoadMovies() ([]Movie, error) { } func ProcessMovies(movies []Movie, update bool) error { + utils.Sep() fmt.Printf(" M O V I E S\n") utils.Sep() for _, movie := range movies { // Debug print - fmt.Printf("Título: %s, Puntuación: %.1f, Fecha: %s\n", - movie.Title, movie.Rate, movie.Date) + fmt.Printf("Título: %s\n", movie.Title) // If we're updating, the process is a bit different if update || !movie.New { @@ -126,6 +126,7 @@ func generateMovieMarkdown(movie Movie) error { "Subtitle": movie.Year, "Year": movie.Year, "Rate": movie.Rate, + "Progress": movie.Progress, "Image": movie.Image, "Poster": movie.Poster, "Background": movie.Background, @@ -138,6 +139,7 @@ func generateMovieMarkdown(movie Movie) error { // Helper function to update only YAML fields that exist in both the frontmatter and YAML data func updateFrontmatterWithYAML(frontmatter utils.FrontMatter, movie Movie) utils.FrontMatter { + frontmatter.Progress = movie.Progress frontmatter.Date = movie.Date frontmatter.Rate = movie.Rate return frontmatter diff --git a/internal/movies/model.go b/internal/movies/model.go index fdc8d0b..4888fb5 100644 --- a/internal/movies/model.go +++ b/internal/movies/model.go @@ -12,6 +12,7 @@ type Movie struct { Link string `yaml:"link"` Year int `yaml:"year"` Rate float64 `yaml:"rate"` + Progress string `yaml:"progress"` Image string `yaml:"image"` Poster string `yaml:"poster-image"` Background string `yaml:"background-image"` diff --git a/internal/music/controller.go b/internal/music/controller.go index 557acc5..b2237c5 100644 --- a/internal/music/controller.go +++ b/internal/music/controller.go @@ -26,6 +26,7 @@ func LoadAlbums() ([]Album, error) { } func ProcessAlbum(albumList []Album, update bool) error { + utils.Sep() fmt.Printf(" M U S I C\n") utils.Sep() for _, album := range albumList { diff --git a/internal/series/controller.go b/internal/series/controller.go index cbab53b..536f47a 100644 --- a/internal/series/controller.go +++ b/internal/series/controller.go @@ -26,12 +26,12 @@ func LoadSeries() ([]Serie, error) { } func ProcessSeries(series []Serie, update bool) error { + utils.Sep() fmt.Printf(" S E R I E S\n") utils.Sep() for _, serie := range series { // Debug print - fmt.Printf("Título: %s, Puntuación: %.1f, Fecha: %s\n", - serie.Title, serie.Rate, serie.Date) + fmt.Printf("Título: %s\n", serie.Title) // If we're updating, the process is a bit different if update || !serie.New { diff --git a/main.go b/main.go index be05b94..795a634 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,6 @@ import ( func main() { // Load .env file utils.LoadConfig() - utils.Sep() // --media parameter media := flag.String("media", "", "Specify the media type to process: movies, series, books, games, or music") diff --git a/templates/movie.md.tpl b/templates/movie.md.tpl index 753cc8d..e9718d0 100644 --- a/templates/movie.md.tpl +++ b/templates/movie.md.tpl @@ -4,6 +4,7 @@ link: "{{ .Link }}" subtitle: "{{ .Subtitle }}" year: {{ .Year }} rate: {{ .Rate }} +progress: {{ .Progress }} image: {{ .Image }} poster-image: {{ .Poster }} background-image: {{ .Background }}