for j, o in enumerate(output):
_filepart = f"{i:08d}.pth.part{j}"
self.write_to_cache(o, _filepart)
return output[0]
def switch_to_cache(self):
self.original_files = self.files
self.files = [x for x in os.listdir(self.cache) if ".part" in x]
After Change
}
_filename = f"{filename}.cache"
self.write_to_cache(output, _filename)
return self.get_target_length(output, self.current_length)
def switch_to_cache(self):
self.original_files = self.files
self.files = [x for x in os.listdir(self.cache) if ".cache" in x]