File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
mythtv/contrib/imports/mirobridge/mirobridge Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,14 @@ def do_mythtv_getunwatched(self, line):
278278 if hasattr (it .get_parent (), u'url' ):
279279 if filetypes .is_torrent_filename (it .get_parent ().url ):
280280 continue
281+
282+ # Any item without a proper file name needs to be removed as Miro metadata is corrupt
283+ if it .get_filename () == None :
284+ it .expire ()
285+ self .statistics [u'Miro_videos_deleted' ]+= 1
286+ logging .info (u'Unwatched video (%s) has been removed from Miro as item had no valid file name' % it .get_title ())
287+ continue
288+
281289 self .printItems (it )
282290 self .videofiles .append (self ._get_item_dict (it ))
283291 if self .verbose :
@@ -304,6 +312,14 @@ def do_mythtv_getwatched(self, line):
304312 if hasattr (it .get_parent (), u'url' ):
305313 if filetypes .is_torrent_filename (it .get_parent ().url ):
306314 continue
315+
316+ # Any item without a proper file name needs to be removed as Miro metadata is corrupt
317+ if it .get_filename () == None :
318+ it .expire ()
319+ self .statistics [u'Miro_videos_deleted' ]+= 1
320+ logging .info (u'Watched video (%s) has been removed from Miro as item had no valid file name' % it .get_title ())
321+ continue
322+
307323 self .printItems (it )
308324 self .videofiles .append (self ._get_item_dict (it ))
309325 if self .verbose :
You can’t perform that action at this time.
0 commit comments