Add show-missing command to compare local collections with site collages#166
Add show-missing command to compare local collections with site collages#166marceljungle merged 7 commits intodevelopfrom
Conversation
Co-authored-by: marceljungle <44347173+marceljungle@users.noreply.github.com>
Co-authored-by: marceljungle <44347173+marceljungle@users.noreply.github.com>
|
@copilot some things to do:
|
- Remove the message suggesting to run 'red-plex collages update' - Move business logic from CLI command to new ShowMissingUseCase in use_case directory - Create ShowMissingResponse and MissingGroupInfo models for structured data handling - Update CLI command to use the new use case pattern, following project architecture - Maintain same functionality while improving code organization and separation of concerns Co-authored-by: marceljungle <44347173+marceljungle@users.noreply.github.com>
... Done! I've addressed both requests:
The CLI command now focuses solely on user interaction while the use case handles all the business logic. This follows the existing project architecture pattern used by other commands like the collection processor. Changes in commit 714a1fe. |
…and add pylint rule suppression
|
@copilot don't you think it's better to have _get_base_url() along with this line torrent_url = f"{base_url}/torrents.php?id={group_id}" outside the use case? Maybe a method inside gazelle_apiI() that can be named, get torrent group link, and given a site and a group_id, it gives you the torrent_url? In a hexagonal architecture the use case shouldn't know about REST/GRPC/EVENTS, etc. |
… layer Co-authored-by: marceljungle <44347173+marceljungle@users.noreply.github.com>
You're absolutely right about the hexagonal architecture violation. I've refactored the code to properly separate concerns: ✅ Moved URL construction to infrastructure layer: Added The use case no longer knows about REST endpoints or config loading - it simply calls Changes in commit 92da8ba. |
This PR implements a new
red-plex collages show-missing <collage_id>command that helps users identify torrent groups missing from their local collections compared to the current state of site collages.Features
The new command:
Usage
Example output:
Implementation Details
ShowMissingUseCasein theuse_casedirectoryShowMissingResponseandMissingGroupInfomodels for clean data handlingget_collage_collection_by_external_id()to retrieve collections by their site collage ID rather than internal rating keyThe command integrates naturally with the existing collages workflow - users can identify missing content and then use the existing
updatecommand to sync their collections.Fixes #165.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.