mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 11:07:42 +08:00
feat: edit media details
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"polaris/log"
|
||||
"polaris/pkg/notifier"
|
||||
"polaris/pkg/storage"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -55,6 +56,10 @@ func (c *Client) writePlexmatch(seriesId int, episodeId int, targetDir, name str
|
||||
} else {
|
||||
buff.Write(data)
|
||||
}
|
||||
if strings.Contains(buff.String(), name) {
|
||||
log.Debugf("already write plex episode line: %v", name)
|
||||
return nil
|
||||
}
|
||||
buff.WriteString(fmt.Sprintf("\nep: %d: %s\n", ep.EpisodeNumber, name))
|
||||
log.Infof("write season plexmatch file content: %s", buff.String())
|
||||
return st.WriteFile(seasonPlex, buff.Bytes())
|
||||
|
||||
Reference in New Issue
Block a user