parameters: (self, line)
docstring: Process MythTV get all watched/saved video details
docstring_summary: Process MythTV get all watched/saved video details
docstring_tokens: Process MythTV get all watched / saved video details
function: def do_mythtv_getwatched(self, line):
          """Process MythTV get all watched/saved video details"""
          if self.verbose:
             print
             print u"Getting details on watched/saved Miro videos"
          self.videofiles = []
          if item.Item.downloaded_view().count():
              if self.verbose:
                  print u"%-20s %-10s %s" % (u"State", u"Size", u"Name")
                  print u"-" * 70
              for it in item.Item.downloaded_view():
                  state = it.get_state()
                  if state == u'newly-downloaded':
                      continue
                  # Skip any bittorrent video downloads for legal concerns
                  if hasattr(it.get_parent(), u'url'):
                      if filetypes.is_torrent_filename(it.get_parent().url):
                          continue
  
                  # Any item without a proper file name needs to be removed as Miro metadata is corrupt
                  if it.get_filename() is None:
                      it.expire()
                      self.statistics[u'Miro_videos_deleted']+=1
                      logging.info(u'Watched video (%s) has been removed from Miro as item had no valid file name' % it.get_title())
                      continue
  
                  self.printItems(it)
                  self.videofiles.append(self._get_item_dict(it))
              if self.verbose:
                  print
          if not len(self.videofiles):
               logging.info(u"No watched/saved Miro videos")
function_tokens: def do_mythtv_getwatched ( self , line ) : if self . verbose : print print u"Getting details on watched/saved Miro videos" self . videofiles = [ ] if item . Item . downloaded_view ( ) . count ( ) : if self . verbose : print u"%-20s %-10s %s" % ( u"State" , u"Size" , u"Name" ) print u"-" * 70 for it in item . Item . downloaded_view ( ) : state = it . get_state ( ) if state == u'newly-downloaded' : continue # Skip any bittorrent video downloads for legal concerns if hasattr ( it . get_parent ( ) , u'url' ) : if filetypes . is_torrent_filename ( it . get_parent ( ) . url ) : continue # Any item without a proper file name needs to be removed as Miro metadata is corrupt if it . get_filename ( ) is None : it . expire ( ) self . statistics [ u'Miro_videos_deleted' ] += 1 logging . info ( u'Watched video (%s) has been removed from Miro as item had no valid file name' % it . get_title ( ) ) continue self . printItems ( it ) self . videofiles . append ( self . _get_item_dict ( it ) ) if self . verbose : print if not len ( self . videofiles ) : logging . info ( u"No watched/saved Miro videos" )