summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR.D. Vaughan <r.d.vaughan@rogers.com>2011-08-18 15:08:33 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2011-08-20 07:38:55 (GMT)
commit2e3105d27a695c75bd4f0a6cfdd75becd74fbce9 (patch)
tree3fd8f28cdd76377a5d3a28010682ab6f4c597e0d
parentd282ee21436ad2be8bc2824a8534ae2df8046a89 (diff)
Fixed MiroBridge abort when Miro metadata has an invalid video filename
Sometimes Miro metadata has no video filename. Skip these invalid videos.
-rwxr-xr-xmythtv/contrib/imports/mirobridge/mirobridge.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mythtv/contrib/imports/mirobridge/mirobridge.py b/mythtv/contrib/imports/mirobridge/mirobridge.py
index 960a526..81df974 100755
--- a/mythtv/contrib/imports/mirobridge/mirobridge.py
+++ b/mythtv/contrib/imports/mirobridge/mirobridge.py
@@ -193,6 +193,7 @@ __version__=u"v0.6.3"
# 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: