def handle(self, *args, **options): checked = [] try: with open('checked.json', 'r') as f: checked = json.loads(f.read()) except IOError: pass for dl in DownloadLocation.objects.filter(zone=ReplicaSet.ZONE_WHAT): for torrent in os.listdir(dl.path): if torrent in checked: print 'Already checked', torrent, 'skipping...' continue torrent_path = os.path.join(dl.path, torrent) print 'Generating spectrals for', torrent_path if not generate_spectrals_for_dir(torrent_path): print 'There are no FLACs, moving on...' else: raw_input('Please check the spectrals...') checked.append(torrent) with open('checked.json', 'w') as f: f.write(json.dumps(checked))
def generate_spectrals(self): print 'Generating spectrals...' generate_spectrals_for_dir(self.full_location)
def generate_spectrals(self): print 'Generating spectrals...' generate_spectrals_for_dir(self.full_location)