From 9ef2eb198de686b69e8316fdc9a44ce6de80289d Mon Sep 17 00:00:00 2001 From: milarin Date: Sun, 15 Jan 2023 22:32:01 +0100 Subject: [PATCH] AnimeEpFilepathPattern improved --- anime_episode_filepath.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/anime_episode_filepath.go b/anime_episode_filepath.go index fe3d5e3..0037705 100644 --- a/anime_episode_filepath.go +++ b/anime_episode_filepath.go @@ -4,14 +4,21 @@ import ( "path/filepath" "strings" + "git.milar.in/milarin/anilist" "git.milar.in/nyaanime/model" ) +type AnimePathPatternData struct { + Anime *anilist.Media + Episode int + Ext string +} + func GetAnimeEpFilepath(animeEp model.AnimeEpisode, ext string) string { ext = strings.TrimPrefix(ext, ".") tmplData := AnimePathPatternData{ - Title: animeEp.Anime.Title, + Anime: animeEp.Anime, Episode: animeEp.Episode, Ext: ext, }