Skip to content

feat(wordpress): fix podcast draft fields and add recording date - #36

Open
k0te1ch wants to merge 1 commit into
mainfrom
fix/wp-draft-fields
Open

feat(wordpress): fix podcast draft fields and add recording date#36
k0te1ch wants to merge 1 commit into
mainfrom
fix/wp-draft-fields

Conversation

@k0te1ch

@k0te1ch k0te1ch commented Jul 26, 2026

Copy link
Copy Markdown
Owner

The WordPress publisher rendered several wrong fields in the podcast draft. This corrects all of them and adds a way to set the recording date at upload time.

Fixes

  • Episode title now uses the real episode name (e.g. 757. Теперь это мои проблемы) instead of the generic Разговорный жанр — N.
  • Description is no longer wrapped in <code>. All <code> spacers are removed so the summary renders as plain text.
  • big_post = 1 custom field is dropped — it was left over from the old theme.

Recording date

Previously the recording date was never sent to Podlove (empty in the episode) and the post body defaulted to today. You can now specify it during setup via an optional line in the upload template:

Number: 600
Recording Date: 26.07.2026
Title: ...

The date accepts DD.MM.YYYY (and / - separators), is normalised to ISO, and flows through the WordPressEvent schema to both the Podlove REST payload and the visible "Дата записи" line. If the line is omitted it falls back to today, so existing templates keep working. The new Avro field is optional and backward compatible.

Notes

  • The real upload path is the app/publishers/WordPress service (app/bot/utils/wordpress.py is legacy and unused).
  • Podlove REST field name/format (recording_date, ISO) is assumed by analogy with the old form field — worth a quick check against the live site.

Tests

ruff check, ruff format --check and the affected unit tests (validators, WordPress publisher, handlers) pass. Added regression tests for the draft fields and recording-date parsing.

The WordPress publisher rendered several wrong fields in the podcast draft:

- episode title showed the generic "Разговорный жанр — N" instead of the
  real episode name; it now comes from the parsed template title
- the description was wrapped in <code>; all <code> spacers are dropped so
  the summary renders as plain text
- the legacy big_post custom field is no longer sent
- the recording date was never pushed to Podlove and the post body defaulted
  to today; it is now supplied via an optional "Recording Date" line in the
  upload template, threaded through the WordPressEvent schema to the Podlove
  REST payload and the post body, falling back to today when omitted
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.

1 participant