Permalink
Browse files

Fixed MiroBridge abort when Miro metadata has an invalid video filename

Sometimes Miro metadata has no video filename. Skip these invalid
videos.
  • Loading branch information...
1 parent d282ee2 commit 2e3105d27a695c75bd4f0a6cfdd75becd74fbce9 @rdv rdv committed with wagnerrp Aug 18, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 mythtv/contrib/imports/mirobridge/mirobridge.py
@@ -193,6 +193,7 @@
# Fixed aborts caused by bad metadata in Miro (videoFilename)
# Added support for Miro 4.0.2
# Fixed display of command line help (-h or --help)
+# Sometimes Miro metadata has no video filename. Skip these invalid videos.
examples_txt=u'''
For examples, please see the Mirobridge's wiki page at http://www.mythtv.org/wiki/MiroBridge
@@ -1930,8 +1931,12 @@ def updateMythRecorded(items):
# Add new Miro unwatched videos to MythTV'd data base
for item in items_copy:
+ # Do not create records for Miro video files when Miro has a corrupt or missing file name
+ if item[u'videoFilename'] == None:
+ continue
+ # Do not create records for Miro video files that do not exist
if not os.path.isfile(os.path.realpath(item[u'videoFilename'])):
- continue # Do not create records for Miro video files that do not exist
+ continue
records = createRecordedRecords(item)
if records:
if simulation:

0 comments on commit 2e3105d

Please sign in to comment.