aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-01-10 20:00:24 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-01-10 20:40:48 +0100
commit7dc00b40b5349cae623568341df76c81f0ccb222 (patch)
treebe6a2103140ce53d5da5bc2966aadc0043ab36ac /backend
parentDefer rendering of each table row for performance. (diff)
downloadzmusic-ng-7dc00b40b5349cae623568341df76c81f0ccb222.tar.xz
zmusic-ng-7dc00b40b5349cae623568341df76c81f0ccb222.zip
Use unix file permissions instead of predefined exclude list.
Diffstat (limited to 'backend')
-rw-r--r--backend/app.cfg1
-rw-r--r--backend/zmusic/endpoints/scan.py12
2 files changed, 0 insertions, 13 deletions
diff --git a/backend/app.cfg b/backend/app.cfg
index 0bf7691..280b4cd 100644
--- a/backend/app.cfg
+++ b/backend/app.cfg
@@ -7,7 +7,6 @@ ACCEL_MUSIC_PREFIX = False # With NGINX: '/music/'
STATIC_PATH = '../frontend'
MUSIC_PATH = '/home/zx2c4/Music'
-EXCLUDE_PATHS = [ 'something/personal/' ]
MUSIC_USER = 'mrmusic'
MUSIC_PASSWORD = 'ilovemusics'
diff --git a/backend/zmusic/endpoints/scan.py b/backend/zmusic/endpoints/scan.py
index 5a85714..1eab692 100644
--- a/backend/zmusic/endpoints/scan.py
+++ b/backend/zmusic/endpoints/scan.py
@@ -13,24 +13,12 @@ def scan_music():
def do_scan():
yield "%i | Begin.\n" % int(time.time())
all_files = {}
- excludes = [os.path.join(app.config["MUSIC_PATH"], item) for item in app.config["EXCLUDE_PATHS"]]
for root, dirs, files in os.walk(app.config["MUSIC_PATH"]):
if len(files) != 0:
yield "%i | Scanning [%s].\n" % (int(time.time()), root)
for name in files:
name = os.path.join(root, name)
-
- skip = False
- for exclude in excludes:
- if name.find(exclude) == 0:
- skip = True
- break
- if skip:
- yield "%i | Excluded [%s].\n" % (int(time.time()), name)
- continue
-
all_files[name] = True
-
song = Song.query.get(name)
if song != None:
stat = os.stat(name)