Open jacksonblankenship opened 1 month ago
During implementation, it became clear that handling the creation and management of import lists directly from our side presents significant challenges. The configuration of import lists in Radarr involves a variety of user preferences that are complex to address without a full-blown user interface. Given the complexity and our current constraints, it is not practical to develop a UI for this purpose.
To streamline the process and avoid unnecessary complications, we are adjusting the approach for integrating Roombarr with Radarr. Users will now set up their own import lists in Radarr, allowing them to tailor these lists according to their specific needs. Roombarr will then monitor these lists based on their names, which simplifies the integration and reduces the need for extensive configuration on our end.
Here's how the revised process works:
Onboarding and Configuration Validation
GET /api/v3/tag
POST /api/v3/tag
GET /api/v3/importlist
GET /api/v3/importlist
PUT /api/v3/importlist/{id}
(Modify the list to include the Roombarr tag)GET /api/v3/importlist
PUT /api/v3/importlist/{id}
(Modify the list to remove the Roombarr tag)Data Retrieval from Radarr
GET /api/v3/importlist/movie
GET /api/v3/movie
Filtering and Processing
Handle Orphaned Movies
PUT /api/v3/movie/{id}
(Modify the movie to remove the Roombarr tag)DELETE /api/v3/movie/{id}
GET /api/v3/tag
POST /api/v3/tag
GET /api/v3/importlist
PUT /api/v3/importlist/{id}
GET /api/v3/importlist/movie
GET /api/v3/movie
PUT /api/v3/movie/{id}
DELETE /api/v3/movie/{id}
The current approach mistakenly uses the media's "added" date to calculate deletion timing, which does not align with our goal of deleting media based on how long it has been off the import list. This results in unintended behavior:
Minimum Time on Server: Media may stay on the server for a minimum period based on its "added" date, rather than being deleted after a certain period off the list (e.g., 30 days). This is not the intended behavior.
Lack of Notification for Long-standing Media: Media that has been off the list for a long time may be deleted without prior notification if it has been on the server for longer than the minimum time. This bypasses the intended notification process.
File-Based State Tracking:
Tracking and Management Process:
Date-Based Actions:
This approach will ensure that media management aligns with our intended behavior, providing accurate notifications and deletions based on the import list status.
Here's my take on the pseudo-code for this implementation. Subject to change as I proceed.
Pseudo-Code for Roombarr
<functionName>
- Function that performs a specific taskLoad Configuration
<loadConfig>
<provider.computeListKey>
<fetchAllRadarrTags>
<createRadarrTag>
<fetchAllRadarrLists>
<createRadarrList>
Fetch All Movies from Radarr
<fetchAllRadarrMovies>
Process Each List
<provider.computeListKey>
<provider.fetchListMovies>
Handle Orphaned Movies
<removeRadarrTag>
<sendNotification>
<sendNotification>
<deleteRadarrMovie>
<sendNotification>