Skip to content

As staff, I want to rename episodes so that I can process them downstream #2

@jimdur8n

Description

@jimdur8n

Use regex, metadata.xml to determine facts about the video file.

There are at least 4 files per show: DAT, SRT, XML, TS, they will all have the same name and be created around the same time.

  • The xml file has the key information to read.
  • An Evening News show should be 30 minutes, typically 17:30:00 to 18:00:00.
  • Sometimes a show is broken into two or more pieces. The xml file will say the start/stop times of each piece.
  • Sometimes a second recording will be dumped into the bucket and it doesn't need to be kept.

The Weekend Challenge: There are lots of moving and shifting of show times on the weekends. Do we resort to a manual clipping of a 1-2 hour window?

  • The final naming convention: YYYYMMDD[Network].extension This is required for the mp4-vulstream copy to play.

Key steps

  • Create a dynamoDB to hold data about each show.
  • Create chron job to run late in the night to start the task.
  • Check that all four parts of the recording are there.
  • Read data from xml can determine date, network, file extension
  • Compare read data to a database of existing records.
  • Determine if the recording is:
    A) New and a complete show
    B) New and part of an incomplete show
    C) A duplicate of a complete show

If Then

If A, Then the show is renamed 'YYYYMMDD[Network].extension' and stored appropriately.
If B, Then the show segment is renamed YYYMMDDNET_HHMM-HHMM.ext, where HHMM = start/stop times.
If C, Then the show is moved to recycling.

Error Handling

  • Any file that does not have all four parts should be moved to recycling.
  • For weekdays, we'd prefer to keep the show that has the closet start/stop time to the episode. For example if version A is 1 hour, 17:00 to 18:00 and version B is 17:30 to 18:00, we want version B.
  • We need a mechanism for manually feeding the lambda, to replace an exisitng video with another. A field in the xml might work.

Reporting

  • report activity to logging system, including number of partial recordings, and missing shows.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions