Skip to content

Required Words treated as OR not AND #12172

@fffe

Description

@fffe

Describe the bug
The Required Words list in a show's advanced options is treated as a logical OR, not a logical AND.

This makes it impossible to require multiple words to select specific releases, eg "DV" and "HDR" to match DV with HDR fallback, or "HDR" and "HMAX" if to match an HDR copy from HBO only.

To Reproduce
Steps to reproduce the behavior:

  1. Add a modern streaming TV show to Medusa, that releases in DV and HDR.
  2. Add "DV" and "HDR" as required words, to select DV files with HDR fallback.
  3. Wait.
  4. Medusa downloads a DV-only copy, users complain because their devices don't support it.

Expected behavior

I expect Required Words to be treated as a logical AND, but if the current behavior provides value to someone, I'd be happy if OR vs AND were a setting that could be changed.

Screenshots

Hits containing any individual Required Word will show as green in the search results, even if not all are present.

Medusa (please complete the following information):

  • OS: Ubuntu 24.04
  • Branch: master
  • Commit: 27e1376
  • Python version: 3.9.8 (it's actually PyPy 7.3.15)
  • Database version: 44.19

Debug logs (at least 50 lines):

I will provide if required, but I don't think it adds value.

The Required Words section is documented as "Search results with no words from this list will be ignored" (ie search results require >0 words from this list)... so it's behaving as documented, it's just not useful.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions