feat(tracker): add Jackett/Torznab provider and POST /api/files endpoint#3
Merged
Merged
Conversation
…and CanHandle methods Each provider (RuTracker, NNMClub) now handles its own HTTP fetching and HTML parsing internally. Parser delegates to providers via CanHandle/Parse pattern, removing goquery dependency from parser.go. Tests updated to use httptest and mock providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix nil pointer panic in NnmProvider.getLastComment when RSS parsing fails - Fix graceful shutdown using cancelled context (use context.Background) - Validate non-empty hash from magnet before storing (return 400) - Fix extractMagnet returning non-magnet link silently (return empty) - Add btih hash fallback for Jackett extractID when URL patterns fail - Add dryMode support to HTTP magnet handler - Clean up stored record on download failure in magnet path - Use generic error messages in HTTP responses (no internal details) - Check json.Encode error in handleCreateFile response - Extract toResponse helper to deduplicate FileMetadata mapping - Remove unused JACKETT_API_KEY config field and compose entry - Remove unused default provider fallback in NewParser - Replace debug JSON marshal failure point with Printf format - Update README with Jackett, API endpoint, qBittorrent docs - Update CLAUDE.md HTTP server description Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<link>and<enclosure>elements with TrackerURL swap logicCanHandle(url)/Parse(ctx, url)methods, making each provider own its fetch + parse logicPOST /api/filesHTTP endpoint for creating tracking tasks programmatically (beyond Telegram bot)Test plan
jackett_test.go) — various feed formats, empty feeds, missing tracker URLsclient_test.go) — valid/invalid requests, auth validationintegration_test.go)parser_test.go)magnet_test.go)JACKETT_URLenv var wiring incompose.yaml🤖 Generated with Claude Code