Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New: Indexer condition Custom Format #9417

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

SysError956
Copy link

Database Migration

YES - Migration 234 - Adds a "IndexerId" column to the "Blocklist" and "MovieFiles" tables to support evaluating this new indexer Custom Format based on the saved value

Description

Implement a new Custom Format condition based on the indexer used to grab the specific content. This allows for more granular priority setting based on indexers, and also now facilitates defining custom conditions (using the other Custom Format conditions) that are specific to a or multiple indexers.

Note: It took a bit of time to familiarize myself with the structure of the project, and understand how it all works. Therefore, the way I implemented the dropdown for selecting the Indexer (or any other part of my changes for that matter), may not be optimal/ideal; alternative suggestions are welcome.

Issues Fixed or Closed by this PR

This commit implements a new Custom Format condition to match on the specific Indexer that was used to grab the content. The Indexer ID is the property used for the comparision (and not the Indexer Name), however, the condition editor GUI displays the Indexer Name for a more user friendly experience (instead of the internal Indexer ID).
The ability to store in the database the Indexer ID was also added to Blocklist and MovieFile items. The Indexer ID is also exposed and tracked in all applicable History events.
This commit implements three basic unit tests for the new "Indexer" Custom Format (comparing Indexer IDs).
Fixed MovieHistory data dictionary key lookup to "indexerId" (case mismatch)
Added IndexerID lookup functionality (so that custom formats and their scores can later be calculated) for downloads that are in the Queue
@github-actions github-actions bot added Area: API Issue is related to the API Area: Db-migration Warning: DB Migration | Related to DB Migration labels Nov 19, 2023
@Roxedus
Copy link
Contributor

Roxedus commented Nov 19, 2023

Also consider #7912 as a condition with this pr <3

@SysError956
Copy link
Author

Also consider #7912 as a condition with this pr <3

I can definitely see the similarities between the Indexer condition and the feature you mentioned. I think adding it won't be too tough since it's similar to what I did for the Indexer. But, before I dive into the Downloader/Protocol side of things, I want to wait for a review from the Arr devs on my Indexer condition implementation. Just want to double-check I'm on the right track before working on more code.

@SebbeJohansson
Copy link

I think this could be very helpful. Anything I can do to help speed this PR along?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: API Issue is related to the API Area: Db-migration Warning: DB Migration | Related to DB Migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Custom Format condition for Indexer
3 participants