Skip to content

Bug: Watchlisted shows not appearing in Calendar → Upcoming view #1148

@kuzhagan143

Description

@kuzhagan143

Shows that are added to the Watchlist (not tracked under "My Shows") do not appear in the Calendar's Upcoming (Present/Future) view. The calendar only displays upcoming episodes for shows that are in "My Shows".

Although there is existing code in WatchlistAppender.kt that attempts to inject watchlist shows into the calendar, the approach has critical issues that prevent watchlisted shows from being properly displayed.


Root Cause Analysis (Code References)

The calendar loading pipeline works as follows:

  1. CalendarItemsCase.loadItems() (ui-progress/.../cases/items/CalendarItemsCase.kt) fetches both myShows and watchlistShows from the repository (lines 66–72).
  2. It queries all episodes and seasons from the local database for all combined show IDs (lines 77–90).
  3. It then calls WatchlistAppender.appendWatchlistShows() (ui-progress/.../helpers/WatchlistAppender.kt) to inject synthetic episodes for watchlist shows (lines 95–99).
  4. Finally, these episodes are filtered by CalendarFutureFilter (CalendarFutureFilter.kt) which keeps only episodes that are on or after today (isSameDayOrAfter), have seasonNumber != 0, and optionally are premieres (lines 22–24).

The issue is in WatchlistAppender.createWatchlistEpisode() (lines 61–85 of WatchlistAppender.kt):

The synthetic episode is created with:

  • firstAired = nowUtc() → This sets the air date to right now, not the show's actual next episode air date.
  • seasonNumber = 1 and episodeNumber = 1 → Always hardcoded to S01E01, regardless of where the show actually is.
  • title = "" and episodeOverview = "" → No meaningful metadata.

Why this causes problems:

  1. The firstAired is set to nowUtc() (the moment of loading), so the synthetic episode might pass the future filter once but will immediately become stale. It has no real air date data.
  2. If the watchlisted show already has episode data in the local DB (from browsing the show detail page), WatchlistAppender skips it entirely (line 27: filter { it.traktId !in existingShowIds }), but those real episodes may not include future episodes since they are not synced for non-tracked shows.
  3. The CalendarFutureFilter filter checks episode.seasonNumber != 0 (line 22) — this passes since the hardcoded season is 1, but the synthetic data has no real correspondence to an actual upcoming episode.

In short: Watchlist shows lack proper episode sync, and the WatchlistAppender workaround creates fake placeholder episodes with incorrect/insufficient metadata that don't reliably appear in the upcoming view.


Expected behavior

When a show is added to the Watchlist:

  1. Its actual upcoming episodes (with real air dates from Trakt/TMDB) should be fetched/synced.
  2. These upcoming episodes should appear in the Calendar → Upcoming view alongside tracked shows.
  3. Episodes should display proper titles, season/episode numbers, and air dates.

Steps to reproduce

  1. Open the app and navigate to the Discover/Search section.
  2. Find a TV show that has upcoming (future) episodes scheduled.
  3. Add the show to your Watchlist (do NOT add it to "My Shows"/tracked shows).
  4. Navigate to the Progress tab → CalendarUpcoming filter.
  5. Observe: The watchlisted show's upcoming episodes do not appear, or appear briefly with blank titles and immediately vanish.

Suggested Fix

The WatchlistAppender needs to be reworked to either:

  1. Fetch real episode data for watchlisted shows from the API (Trakt) and store it locally, similar to how "My Shows" episodes are synced. Then the calendar pipeline will naturally include them.
  2. At minimum, use the show's firstAired field instead of nowUtc() for the synthetic episode's air date, and populate meaningful metadata (show title, proper season info from the API).

Relevant files:

  • ui-progress/.../calendar/helpers/WatchlistAppender.kt
  • ui-progress/.../calendar/cases/items/CalendarItemsCase.kt
  • ui-progress/.../calendar/helpers/filters/CalendarFutureFilter.kt
  • ui-progress/.../calendar/cases/items/CalendarFutureCase.kt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions