Beispiel #1
0
def scan():
	global hasScanned

	# if hasScanned:
	#	return
	hasScanned = True
	initTitles()
	initFiles()

	for path in Config.paths.scan:
		Nsps.scan(path)
Beispiel #2
0
def scan():
    global hasScanned

    hasScanned = True
    initFiles()

    r = 0

    for path in Config.paths.scan:
        r += Nsps.scan(path)
    Nsps.save()
    return r
Beispiel #3
0
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
Beispiel #4
0
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
Beispiel #5
0
	def on_scan(self):
		self.tableWidget.setRowCount(0)
		Nsps.scan(Config.paths.scan, True)
		self.refreshTable()
Beispiel #6
0
	def test_scan_empty_dir(self):
		self.fs.makedir(_SCAN_PATH)
		self.fs.makedir('titledb')
		Nsps.scan(_SCAN_PATH)
Beispiel #7
0
	def test_scan_missing_path(self):
		with self.assertRaises(FileNotFoundError):
			Nsps.scan(_SCAN_PATH)
Beispiel #8
0
def scan(path):
    if path:
        Nsps.scan(path, True)