Skip to content

Incorrect viewed episode detection on Jellyfin #2547

@adripo

Description

@adripo

Describe the bug
Jellyfin episodes manually marked as played (using the checkmark in the UI) are not detected as "viewed" by Maintainerr rules (e.g., sw_viewedEpisodes). This causes rules to return 0 viewed episodes even when items are explicitly marked as watched.

To Reproduce
Steps to reproduce the behavior:

  1. Go to your Jellyfin server UI.
  2. Manually click the "Played" checkmark on one or more episodes of a series (without actually playing/streaming them).
  3. In Maintainerr, run a rule using the Jellyfin.sw_viewedEpisodes property for that series.
  4. See that the viewed episode count returns 0 instead of the expected amount.

Expected behavior
Episodes manually marked as played in Jellyfin should be recognized as viewed by Maintainerr rules, regardless of whether they were actually streamed.

Device (please complete the following information):

  • OS: win64
  • Version: 3.2.0

Additional context
The issue was caused by the internal isCompletedWatch logic incorrectly prioritizing watch percentage over the explicit "Played" flag. Additionally, some API calls were not explicitly requesting user-specific metadata, leading to missing watch states.

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