Skip to content

Add a new Backfill plugin, accessed from the Task plugin#192

Open
logicalChimp wants to merge 7 commits into
Flexget:developfrom
logicalChimp:backfill-plugin
Open

Add a new Backfill plugin, accessed from the Task plugin#192
logicalChimp wants to merge 7 commits into
Flexget:developfrom
logicalChimp:backfill-plugin

Conversation

@logicalChimp

Copy link
Copy Markdown

NOTE: This is a 'scratch a personal itch' request, and an excuse to get familiar with Typescript, UI development, and using AI coding asissts.... hence the lack of associated feature request, etc. I apologise for the lack of discussion on Chat etc, but I only started working on it a day or two ago.

Motivation for changes:

I often miss the start of a new series, meaning the first few episodes no longer appear in the default RSS tracker view I use. This plugin makes it simple to 'backfill' the series, by selecting the relevant task from the Tasks view (that the series has been added to), and running it once using a custom RSS url to fetch the 'missing' episodes.

This approach was chosen due to the relative complexity of my task definition (including handling series that don't include the series-number for the first series, as well as the deluge configuration (and moving to custom folders per series after download, etc) - cloning the existing task and changing the RSS url means the same logic gets applied to the backfill episodes, and they end up in the same folders, etc.

The plugin works by:

  • Cloning the chosen task
  • Updating the task name
  • Updating the RSS feed URL
  • using the Task API to 'Create' the new backfill' task
  • executing the new task - and streaming the log output to the 'Execution Log' textarea
  • deleting the 'backfill' task once execution is complete.

By default, the task name will be populated into the 'Backfill task name' field with the suffix 'backfill', and the 'Auto Update' checkbox will be checked. If the auto-update checkbox is checked, the 'Backfill Task Name' will incorporate the chosen 'Task Series' value (if a series name is chosen), and/or any values added into the 'Extra Query Params' field, in order to make a more unique and descriptive task-name. This behaviour can be stopped by unchecking the 'auto update' checkbox.

By default, the RSS url from the selected task config will be populated into the 'Backfill RSS URL' field, and the URL parsed to populate the 'Query Params' list. If the user selects a query param from the list, the 'auto update' checkbox will be checked. Any existing (or future) Task Series name and/or Extra Query Params values will be appended to the chosen query parameter in the Backfill RSS URL. This behavious can be stopped by unchecking the 'auto update' checkbox.

Note: the above behaviour for the Backfill RSS URL is intended to make it easier to generate a 'backfill url' for RSS feeds that use a query/search style URL to identify episodes. The encoding of values (task series name and/or extra query params) is done using 'Form Encoding' (URL encoding, followed by a manual conversion of %20 -> '+').

Note: both the original 'Source Task Config' and the updated/modified 'Backfill Task Config' are editable, but they have been collapsed by default to save page-space.

  • Editing the 'Source Task Config' will not change the original task. It will merely repopulate the rest of the form (the starting values for the Backfill Task Name, Backfill RSS URL, and list of Task Series, etc)
  • The 'Backfill Task Config' is the exact config that will be registered as a new task when the 'Backfill' button is clicked. Any change to the other fields in the form will automagically update the Backfill Task Config - but the config can also be directly edited by hand if required

A full suite of unit tests has been included, to cover the functionality and diferent 'sequence-of-actions' for the UI.

Detailed changes:

  • Bugfix: fixed Textfield to handle the edge case where both 'helpertext' and 'error' were displayed at the same time
  • Updated SideNav and Routes to support registering 'hidden' plugins (that need to be routable, but shouldn't appear in the SideNav)
  • Updated global style to make the scrollbar always visible for the 'page', to prevent layout 'bouncing' when field visibility changes caused the page scrollbar to appear (plus update to related test to expect the changed layout)
  • Updated 'Tasks' plugin, 'Latest' view, to include new 'backfill' icon on the far right of each row, with suitable tooltip
  • Added new 'Backfill' plugin
  • Added a project 'CLAUDE.md' - currently covering just the Backfill plugin

Addressed issues:

NA

Implemented feature requests:

NA

To Do:

Currently, all Task executions - including those for 'deleted' tasks such as the one-time Backfill tasks generated by this plugin - appear in the 'Latest' view on the Tasks page.

Time permitting, I will raise a separate PR to update the Tasks plugin 'Latest' view to not show 'deleted' tasks by default. This will be achieved by adding a 'show deleted' checkbox (unchecked by default), and then fetching the list of tasks from the Tasks api, and comparing the list of Task Executions against the list of tasks - any execution that does not have a matching task will be tagged as 'deleted', and not displayed unless the 'Show deleted' checkbox is ticked.

@logicalChimp logicalChimp force-pushed the backfill-plugin branch 2 times, most recently from 053fde6 to 3edb13c Compare June 25, 2026 09:40
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