summaryrefslogtreecommitdiff
path: root/hacks
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-02-29 20:56:49 +0100
committerCarl Hetherington <cth@carlh.net>2020-02-29 20:56:49 +0100
commit924cb5c59bfc7766f7d2db4b02eaa4db4f30def9 (patch)
tree204bc5bb8f714ae27442c4aeccbe75e6b482ad7c /hacks
parent746aa7337ac2d51a4fa09039c1d5d7717cc880fa (diff)
Fix exceptions on some metadata.xml.
Diffstat (limited to 'hacks')
-rwxr-xr-xhacks/filmsum8
1 files changed, 5 insertions, 3 deletions
diff --git a/hacks/filmsum b/hacks/filmsum
index dae0699d1..bda8740c3 100755
--- a/hacks/filmsum
+++ b/hacks/filmsum
@@ -63,9 +63,11 @@ for c in soup.Metadata.Playlist.children:
print()
note(' Type', c.Type.text)
note(' Position', dcp_time(c.Position))
- note(' Video rate', c.VideoFrameRate.text)
- note(' Video length', content_time_from_frames(c.VideoLength, float(c.VideoFrameRate.text)))
- note(' Audio rate', c.AudioFrameRate.text)
+ if c.VideoFrameRate:
+ note(' Video rate', c.VideoFrameRate.text)
+ note(' Video length', content_time_from_frames(c.VideoLength, float(c.VideoFrameRate.text)))
+ if c.AudioFrameRate:
+ note(' Audio rate', c.AudioFrameRate.text)
bool_note(' Reference video', c.ReferenceVideo, lambda x: not x)
bool_note(' Reference audio', c.ReferenceAudio, lambda x: not x)
bool_note(' Reference subtitle', c.ReferenceSubtitle, lambda x: not x)