aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2020-08-15 15:40:35 -0700
committerJordan <me@jordan.im>2020-08-15 15:40:35 -0700
commit76cf205696a95e4e812936a6f5aa52f1fd5eb6fd (patch)
treeaeab57ee20413ebbac07db94ea34c9781e5a4c56
parent1a9ea6a3298be7bff6c7bcbd7ccbac8dded9dfc5 (diff)
downloadroka-76cf205696a95e4e812936a6f5aa52f1fd5eb6fd.tar.gz
roka-76cf205696a95e4e812936a6f5aa52f1fd5eb6fd.zip
hash/process tracks in order; sorted os.listdir()
-rwxr-xr-xrebuild.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rebuild.py b/rebuild.py
index 5f2e228..d9144ca 100755
--- a/rebuild.py
+++ b/rebuild.py
@@ -130,7 +130,7 @@ class Books:
# hash of each supported track in directory path
folder_hash = hashlib.md5()
- for f in os.listdir(path):
+ for f in sorted(os.listdir(path)):
# must be a file and have a supported extension
file_path = os.path.join(path, f)
if not os.path.isfile(file_path) or not f.split('.')[-1] in ext: