예제 #1
0
파일: __init__.py 프로젝트: blawar/nut
def scan():
	global hasScanned

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

	for path in Config.paths.scan:
		Nsps.scan(path)
예제 #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
예제 #3
0
파일: __init__.py 프로젝트: anonu1/nut
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
예제 #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
예제 #5
0
파일: server.py 프로젝트: xyqkent/nut
	def on_scan(self):
		self.tableWidget.setRowCount(0)
		Nsps.scan(Config.paths.scan, True)
		self.refreshTable()
예제 #6
0
	def test_scan_empty_dir(self):
		self.fs.makedir(_SCAN_PATH)
		self.fs.makedir('titledb')
		Nsps.scan(_SCAN_PATH)
예제 #7
0
	def test_scan_missing_path(self):
		with self.assertRaises(FileNotFoundError):
			Nsps.scan(_SCAN_PATH)
예제 #8
0
def scan(path):
    if path:
        Nsps.scan(path, True)