Skip to content

feat: download selected missing episodes from the library gap list - #35

Open
Marshmello0w wants to merge 1 commit into
PD-Codes:mainfrom
Marshmello0w:feat/library-gap-downloads
Open

Marshmello0w wants to merge 1 commit into
PD-Codes:mainfrom
Marshmello0w:feat/library-gap-downloads

Conversation

@Marshmello0w

@Marshmello0w Marshmello0w commented Oct 30, 2026 •

Copy link
Copy Markdown

Title Format

  • My PR title starts with one of the required prefixes.
  • Everything I wrote here is in English.

Description

Add download controls to the library gap list and the series gap dialog:

  • Queue selected gaps across multiple series and pages using a shared language and provider.
  • Select individual missing episodes or queue all missing episodes.
  • Automatically match series by IMDb identifier when available, with exact title matching and manual selection as fallbacks.
  • Strip year ranges and metadata identifiers from search terms.
  • Preserve ignored episodes and retain failed selections for retry.
  • Open the complete gap list directly from “Show all gaps”.

Related Issue(s)

None linked.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Chore / Refactoring

How Has This Been Tested?

  • I have run the application locally via Python.
  • I have verified that actual media downloading still works as intended.
  • I have verified that the WebUI renders correctly without errors.

Validation:

  • 38 browser tests passed.
  • 290 targeted Python tests passed; one test was skipped.
  • JavaScript syntax, Python error checks, static assets and translation consistency checks passed.
  • Verified the updated application in an isolated local installation.
  • Download requests were intercepted during browser tests. No actual media downloads were performed.

Checklist

  • I have performed a self-review of my own code.
  • No new syntax errors or warnings were detected by the checks performed.
  • Code comments are written in English.

Screenshots

Before/after screenshots have not been attached.

@Marshmello0w
Marshmello0w force-pushed the feat/library-gap-downloads branch from 8827a62 to 81b815b Compare October 30, 2026 20:36
@Domekologe Domekologe self-assigned this Oct 31, 2026
@Domekologe

Copy link
Copy Markdown
Member

@Marshmello0w

Overall this is well built, but I still see a few issues:

  • Ignoring now silently applies to the whole series: Renaming “Ignore whole series” to “Select series” misleads users. If someone then clicks “Ignore selected”, all future seasons and episodes get ignored as well.
  • Heavy scraper load: Every series triggers a search across all enabled sources. If the folder also contains an IMDb ID, the ID lookup runs on top of that. Selecting just 50 series, for example, would fire off several hundred requests, which would very likely hit a rate limit. On top of that, every refresh re-fetches all entries, so a caching layer would be a better fit here.
  • AbortSignal.any only works on newer devices: It’s a fairly recent API (Chrome 116+, Safari 17.4+), so on older devices every request fails.
  • IMDb tag skips the title search: If a folder name contains an IMDb ID, matching relies only on that tag and never tries the title. If the IMDb lookup finds nothing, the series stays unmatched even when the title matches exactly.
  • response.json() is read before the status check: When the app runs behind a reverse proxy, an error page (e.g. 502 or 413) returns HTML, and the user only sees a message like “Unexpected token”.

FYI: This would also add new module APIs: openGapFill, openGapFillBatch and MFGapDownloads.

@Marshmello0w
Marshmello0w force-pushed the feat/library-gap-downloads branch from 81b815b to 727b83a Compare October 31, 2026 17:16
@Marshmello0w

Copy link
Copy Markdown
Author

@Domekologe
Thanks for the detailed review. I’ve pushed changes to address the points you raised:

  • Selecting a series now captures its currently displayed gaps. Ignoring the selection no longer permanently ignores the entire series.
  • Batch downloads search sources in priority order and stop at the first match. Successful lookups are cached for five minutes, and concurrent requests are limited to three.
  • Replaced AbortSignal.any() with a compatible abort and timeout implementation.
  • Added an exact-title fallback when IMDb information is unavailable. An explicitly conflicting IMDb ID still prevents an automatic match.
  • HTTP status is now checked before parsing JSON, so proxy error pages produce a useful status message.
  • The existing openGapFill, openGapFillBatch, and MFGapDownloads interfaces remain in place.

I ran the existing browser and Python tests, as well as six focused JavaScript tests. The automated browser tests intercept download requests, so they do not start actual downloads.

@Marshmello0w
Marshmello0w force-pushed the feat/library-gap-downloads branch from 727b83a to 3d4af05 Compare November 1, 2026 12:43
@Domekologe

Copy link
Copy Markdown
Member
  • Title fallback rarely applies in the single-series dialog. The dialog searches all sources at once. If the same series appears with the same title on two sources, there are two title matches, and the “exactly one” rule fails. Example: a folder with an IMDb tag and two sources that return no IMDb ID gives match = -1, so the user has to pick manually. Batch mode isn’t affected because it searches one source at a time. Suggestion: when there are several title matches, take the one from the highest-priority source.

  • Language and provider are still hardcoded to “German Dub” and “VOE” instead of using the user’s defaults.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants