aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-08-04 07:58:17 -0400
committerXe Iaso <me@xeiaso.net>2023-08-04 07:58:27 -0400
commitb3f486fc9efa6866e29aa7b0e8dd66c9cc40d8dc (patch)
tree8f0bf707a3ee1382c41b9d515e37a5c76af60c6a /cmd
parenta354caf8664dafcdc9f009cc54fc03509ba6ec3b (diff)
downloadx-b3f486fc9efa6866e29aa7b0e8dd66c9cc40d8dc.tar.xz
x-b3f486fc9efa6866e29aa7b0e8dd66c9cc40d8dc.zip
cmd/sanguisuga: don't double ID
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sanguisuga/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/sanguisuga/main.go b/cmd/sanguisuga/main.go
index ceeaefd..8a97dd9 100644
--- a/cmd/sanguisuga/main.go
+++ b/cmd/sanguisuga/main.go
@@ -175,7 +175,7 @@ func (s *Sanguisuga) HandleIRCMessage(ev *irc.Event) {
torrentURL := ConvertURL(ta.TorrentID, s.Config.RSSKey, ta.Name)
slog.Debug("found url", "url", torrentURL)
- downloadDir := filepath.Join(show.DiskPath, fmt.Sprintf("Season %2d", ti.Season))
+ downloadDir := filepath.Join(show.DiskPath, fmt.Sprintf("Season %02d", ti.Season))
var buf bytes.Buffer
resp, err := http.Get(torrentURL)
@@ -209,7 +209,7 @@ func (s *Sanguisuga) HandleIRCMessage(ev *irc.Event) {
return
}
- slog.Info("added torrent", "title", ti.Title, "id", id, "path", downloadDir, "infohash", t.Hash, "dupe", dupe)
+ slog.Info("added torrent", "title", ti.Title, "id", id, "path", downloadDir, "infohash", t.Hash, "tid", t.ID, "dupe", dupe)
s.db.Data.Seen[stateKey] = *ta
if err := s.db.Save(); err != nil {