feat: add imdbid to .plexmatch file

This commit is contained in:
Simon Ding
2024-07-31 17:01:50 +08:00
parent 1340305f2d
commit 001b850d8f

View File

@@ -33,7 +33,8 @@ func (s *Server) writePlexmatch(seriesId int, episodeId int, targetDir, name str
if err != nil {
//create new
log.Warnf(".plexmatch file not found, create new one: %s", series.NameEn)
if err := st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"), []byte(fmt.Sprintf("tmdbid: %d\n",series.TmdbID))); err != nil {
if err := st.WriteFile(filepath.Join(series.TargetDir, ".plexmatch"),
[]byte(fmt.Sprintf("tmdbid: %d\nimdbid:%s\n",series.TmdbID, series.ImdbID))); err != nil {
return errors.Wrap(err, "series plexmatch")
}
}