Navigation Menu

Skip to content

Commit

Permalink
Fixed MiroBridge abort when Miro metadata has an invalid video filename
Browse files Browse the repository at this point in the history
Sometimes Miro metadata has no video filename. Skip these invalid
videos.
  • Loading branch information
rdv authored and wagnerrp committed Aug 20, 2011
1 parent d282ee2 commit 2e3105d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mythtv/contrib/imports/mirobridge/mirobridge.py
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 2e3105d

Please sign in to comment.