summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR.D. Vaughan <r.d.vaughan@rogers.com>2011-08-18 17:04:05 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2011-08-20 08:32:33 (GMT)
commit57e08de22357041e2a57faf37595f41211bf1bb1 (patch)
tree7e9afc6755bb2fa0546c8a965b0277882e895045
parent59e728eddb2e77e9931890d215b1e3592bbd38d8 (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.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mythtv/contrib/imports/mirobridge/mirobridge.py b/mythtv/contrib/imports/mirobridge/mirobridge.py
index 327d1d8..781aae3 100755
--- a/mythtv/contrib/imports/mirobridge/mirobridge.py
+++ b/mythtv/contrib/imports/mirobridge/mirobridge.py
@@ -30,7 +30,7 @@ The source of all cover art and screen shots are from those downloaded and maint
Miro v2.0.3 or later must already be installed and configured and capable of downloading videos.
'''
-__version__=u"v0.6.7"
+__version__=u"v0.6.8"
# 0.1.0 Initial development
# 0.2.0 Initial Alpha release for internal testing only
# 0.2.1 Fixes from initial alpha test
@@ -208,6 +208,7 @@ __version__=u"v0.6.7"
# Removed creation of "folder.png" graphics when creating directories as that is no longer used
# by MythVideo
# Fixed the options "-h, --help" command line display
+# 0.6.8 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
@@ -1765,6 +1766,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
if not os.path.isfile(os.path.realpath(item[u'videoFilename'])):
continue # Do not create records for Miro video files that do not exist
records = createRecordedRecords(item)