Ejemplo n.º 1
0
 def get_duplicates(self):
     self.cur2.execute(Queries.duplicate_files)
     while True:
         records = self.cur2.fetchmany(LocalData.BLOCK_SIZE)
         if not records:
             break
         for record in records:
             r = LocalFilesRow(record).to_media()
             pth = r.relative_path.parent / r.filename
             yield r.id, pth
Ejemplo n.º 2
0
 def get_missing_paths(self):
     self.cur2.execute(Queries.missing_files)
     while True:
         records = self.cur2.fetchmany(LocalData.BLOCK_SIZE)
         if not records:
             break
         for record in records:
             r = LocalFilesRow(record).to_media()
             pth = Path(r.relative_path.parent / r.filename)
             yield pth