Description
Schedules Direct air dates are stored as 2025-11-15, and the XMLTV output wrote them out as they were, both in <date> and in the start of <previously-shown>. XMLTV wants 20251115, and Jellyfin drops the dashed form, so those programmes show up with no year. The output code now turns a plain YYYY-MM-DD value into YYYYMMDD when it writes the XML. Anything else, like a year on its own, goes through untouched. The same change is made at the second place in apps/output/epg.py that writes <date>, which is the custom dummy guide. CHANGELOG bullet added under Fixed.
Related Issue
Closes #2027
Related Proposal
Proposal:
How was it tested?
New test test_schedules_direct_dates_are_written_in_xmltv_form in apps/output/tests/test_views.py. It saves one programme with a dashed date and previously_shown_details.start, and one with a year only, then reads /output/epg. Without the change it fails (the output still has 2025-11-15), with the change it passes. A second test, test_custom_dummy_date_is_written_in_xmltv_form in apps/output/tests/test_dummy_epg.py, covers the dummy guide the same way: it fails without the change and passes with it.
manage.py test apps.output apps.epg: 672 tests pass. Full manage.py test with both new tests: 4494 run, 3 fail. The 3 are DVR remux tests (test_a_real_capture_that_swaps_codecs_mid_stream_is_recovered, test_a_splice_inside_a_segment_shows_at_its_two_ends, test_audio_encoder_map_matches_this_build). They depend on which encoders the installed ffmpeg was built with, and my container has the Debian ffmpeg, not the project's ffmpeg image. They do not touch the XMLTV output code, and the same kind of failure showed up on unchanged dev code before my change. The Redis connection tests pass once Redis runs on localhost. I left "Existing tests still pass" unticked for that reason, so CI in your base image should give the real result. I did not run it against a live Schedules Direct account or Jellyfin.
No models, endpoints or frontend files are touched, so the migration, OpenAPI and ESLint boxes below do not apply.
Checklist
Please check every item before marking this PR as ready for review. Unchecked items will be flagged during review.
- I have read the CONTRIBUTING.md in full
- I agree to the Contributor License Agreement
- I understand — line by line — every change in this PR and can explain it if asked
- This PR targets the
dev branch
- Backend: migrations are included if any models were changed
- Backend: new API endpoints appear correctly in the OpenAPI schema
- Frontend: ESLint and Prettier pass cleanly (
npm run lint, npm run format)
- Tests are included for new functionality
- Existing tests still pass
- No
console.log, print(), debug statements, or commented-out code is left in the diff
- I have not reformatted or refactored code outside the scope of this change