feat(wordpress): fix podcast draft fields and add recording date - #36
Open
k0te1ch wants to merge 1 commit into
Open
feat(wordpress): fix podcast draft fields and add recording date#36k0te1ch wants to merge 1 commit into
k0te1ch wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
757. Теперь это мои проблемы) instead of the genericРазговорный жанр — N.<code>. All<code>spacers are removed so the summary renders as plain text.big_post = 1custom 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:
The date accepts
DD.MM.YYYY(and/-separators), is normalised to ISO, and flows through theWordPressEventschema 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
app/publishers/WordPressservice (app/bot/utils/wordpress.pyis legacy and unused).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 --checkand the affected unit tests (validators, WordPress publisher, handlers) pass. Added regression tests for the draft fields and recording-date parsing.