feat: add discover medias

This commit is contained in:
Rogee
2024-12-04 19:50:14 +08:00
parent 675cf72271
commit d4981f99c2
2 changed files with 42 additions and 4 deletions

View File

@@ -11,23 +11,22 @@ import (
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
)
// @provider
type DiscoverMedias struct {
mediasSvc *medias.Service
log *logrus.Entry `inject:"false"`
log *log.Entry
}
// Prepare
func (d *DiscoverMedias) Prepare() error {
d.log = log.WithField("module", "DiscoverMedias")
return nil
}
func (d *DiscoverMedias) Run(from, to string) error {
func (d *DiscoverMedias) RunE(from, to string) error {
d.log.Infof("Discover medias from: %s to: %s", from, to)
mapFile := filepath.Join(to, "map.json")