Download forms: allow a frequency of "Once" (#804)

* app: a download frequency of "Once" no longer blocks submission

useForm treated any falsy value as a missing required field.  "Once" is
frequency 0, so the Channel/Playlist, RSS, and Zim download forms never
became ready and the Download button stayed disabled.  Only null,
undefined, '', false, and NaN count as missing now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* downloads: editing to "Once" stores a once-download, not frequency 0

Once-downloads have a NULL frequency.  A 0 frequency counted as recurring
(frequency != None) but could never be scheduled (not frequency), so an
edited download stayed on the recurring list and could break renewal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lrnselfreliance 2026-10-09 15:00:24 -06:00 • committed by GitHub
parent c8d5765ea3
commit d75be8e1a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 1 deletions

View file

@ -127,6 +127,15 @@ describe('<ChannelDownloadForm/>', () => {
shouldBeInvalid('#url_input');
});
it('can be submitted with a frequency of Once', () => {
cy.get('#url_input').type('https://example.com/playlist').wait(500);
cy.get('#frequency_select').click();
cy.contains('[role="option"]:visible', 'Once').should('be.visible').click({force: true});
cy.get('#frequency_select').should('have.value', 'Once');
cy.get('#download_form_download_button').should('not.be.disabled');
});
it('can choose different options', () => {
/*
* `#download_frequency_selector` and `.item` named the old dropdown and its menu rows.