Skip to content

feat: add episode numbering option to general settings#2142

Merged
SamTV12345 merged 2 commits into
mainfrom
feat/episode-numbering-general-settings
Jun 25, 2026
Merged

feat: add episode numbering option to general settings#2142
SamTV12345 merged 2 commits into
mainfrom
feat/episode-numbering-general-settings

Conversation

@SamTV12345

Copy link
Copy Markdown
Owner

What

Adds an Episode numbering toggle to the general (instance-wide) settings. Until now this option only existed in per-podcast settings.

Closes #2139

How

The global flag is a default that is OR-ed with the per-podcast flag, mirroring how auto_download already layers the per-podcast value over the global default (podcast_settings.auto_download || settings.auto_download).

  • Numbering applies if either the per-podcast flag or the new global default enables it.
  • The decision lives in download/service.rs::episode_numbering_enabled, delegating to a pure, unit-tested numbering_from(per_podcast, global) helper that replaces the two previously-duplicated inline blocks (ID3 + MP4 metadata paths).

Changes

  • Migrations: add episode_numbering BOOLEAN NOT NULL DEFAULT FALSE to the settings table (sqlite + postgres, with down).
  • Backend: field threaded through the domain Setting, persistence (table! + SettingEntity + conversions + insert_default_settings), and the web DTO (#[serde(default)] for backward compatibility).
  • Frontend: toggle on the general settings page with an explanatory tooltip; TS model + both schema.d.ts updated (field rendered optional to match the #[serde(default)] generator output); en + de translations added (other locales fall back to English).
  • Tests: persistence round-trip extended; new truth-table unit test for the OR logic.

Behavior note

Like other global settings, the flag applies going forward (new downloads / metadata insertion / rescan), not retroactively on save.

Verification

  • cargo clippy --no-default-features --features sqlite --all-targets -- -D warnings
  • Targeted tests (persistence + download + settings/podcast controllers, sqlite) ✅
  • tsc --noEmit for the UI ✅

Episode numbering previously existed only in per-podcast settings.
Add an instance-wide default in general settings that is OR-ed with the
per-podcast flag, mirroring how auto_download layers the per-podcast value
over the global default. Enabling it in general settings turns episode-number
title prefixing on for every podcast unless already enabled per podcast.

Like other global settings, it applies going forward (new downloads /
metadata insertion / rescan), not retroactively on save.

Closes #2139
The reconcile_standard_user test helper assumed the reconcile migration was
the newest one (split_last), so adding 2026-06-25 settings_episode_numbering
after it broke `apply_through_pre_reconcile`. Locate the reconcile migration
by name and apply only the migrations ordered before it, which preserves the
test's intent and survives future migrations.
@SamTV12345 SamTV12345 merged commit cbeff48 into main Jun 25, 2026
8 checks passed
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.

[Feature request] Episode numbering option in general settings

1 participant