Skip to content

Conversation

@tobbee
Copy link
Contributor

@tobbee tobbee commented Nov 10, 2025

Summary

Implements Issue #271 by adding a new --writemissingrepdata CLI option that selectively generates RepData files only for representations that lack them, avoiding unnecessary regeneration of existing files.

Changes

  • Added Version field to RepData structure - Enables future format evolution with a version field (default: 0)
  • New --writemissingrepdata CLI option - Generates RepData only when missing, unlike --writerepdata which regenerates all files
  • Smart RepData generation logic - Updated loadRep() to conditionally write based on file existence
  • Comprehensive test coverage - Added TestWriteMissingRepData to verify existing files are not touched
  • Updated all existing tests - Modified test files to pass the new parameter

Benefits

This improves efficiency when new assets are added to a VoD root with many existing assets that already have RepData files. Instead of regenerating all RepData files (which can be time-consuming for large asset collections), only missing files are generated.

Testing

All existing tests pass, plus a new test specifically verifies:

  • Missing RepData files are generated
  • Existing RepData files are NOT touched (verified by modification time)
  • Generated data includes the correct version field

Usage

# Generate RepData files only for representations that don't have them
livesim2 --writemissingrepdata --vodroot ./vod

…ta files

Implements Issue #271 by adding a new CLI option that selectively
generates RepData files only for representations that lack them,
avoiding unnecessary regeneration of existing files.

This improves efficiency when new assets are added to a VoD root
with many existing assets that already have RepData files.

Changes:
- Added Version field to RepData structure for future format evolution
- New --writemissingrepdata CLI flag and configuration option
- Updated loadRep logic to conditionally write based on file existence
- Added comprehensive test to verify existing files are not touched
- Updated all existing tests to pass new parameter
@tobbee tobbee merged commit 8142f4d into main Nov 11, 2025
4 checks passed
@tobbee tobbee deleted the write-missing-repdata branch November 11, 2025 09:13
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.

2 participants