def scan(): global hasScanned # if hasScanned: # return hasScanned = True initTitles() initFiles() for path in Config.paths.scan: Nsps.scan(path)
def scan(): global hasScanned hasScanned = True initFiles() r = 0 for path in Config.paths.scan: r += Nsps.scan(path) Nsps.save() return r
def scan(): global hasScanned #if hasScanned: # return hasScanned = True initTitles() initFiles() refreshRegions() importRegion(Config.region, Config.language) r = Nsps.scan(Config.paths.scan) Titles.save() return r
def scan(scanTitles=False): global hasScanned hasScanned = True if scanTitles == True: initTitles() refreshRegions() importRegion(Config.region, Config.language) initFiles() r = 0 for path in Config.paths.scan: r += Nsps.scan(path) Nsps.save() return r
def on_scan(self): self.tableWidget.setRowCount(0) Nsps.scan(Config.paths.scan, True) self.refreshTable()
def test_scan_empty_dir(self): self.fs.makedir(_SCAN_PATH) self.fs.makedir('titledb') Nsps.scan(_SCAN_PATH)
def test_scan_missing_path(self): with self.assertRaises(FileNotFoundError): Nsps.scan(_SCAN_PATH)
def scan(path): if path: Nsps.scan(path, True)