Fix organize metadata matching and Telegram group privacy

This commit is contained in:
ShukeBta
2026-06-14 01:12:55 +08:00
parent c76c72966a
commit 4a3ed77395
7 changed files with 353 additions and 13 deletions
+9 -4
View File
@@ -31,10 +31,11 @@ import (
// OrganizerService moves/renames files into library structures.
type OrganizerService struct {
cfg *config.Config
log *zap.Logger
repo *repository.Container
probe *FFprobeService // optional; used for 洗版 resolution comparison
cfg *config.Config
log *zap.Logger
repo *repository.Container
probe *FFprobeService // optional; used for 洗版 resolution comparison
scraper *ScraperService // optional; used to identify metadata before rename
}
// NewOrganizerService is the constructor.
@@ -47,6 +48,10 @@ func NewOrganizerService(cfg *config.Config, log *zap.Logger, repo *repository.C
// Optional: when nil the organizer falls back to filename resolution tokens.
func (o *OrganizerService) SetProbe(p *FFprobeService) { o.probe = p }
// SetScraper wires the scraper so directory organize can resolve TMDb/Bangumi
// metadata before it decides the final folder and filename.
func (o *OrganizerService) SetScraper(s *ScraperService) { o.scraper = s }
// OrganizeResult reports what happened.
type OrganizeResult struct {
Organized int `json:"organized"`