diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-05-06 18:55:02 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2011-05-06 18:55:02 -0400 |
commit | 039f009a157c2c10899562ecb4510707ea4ec3ac (patch) | |
tree | 555c34a06ac6bf6c77282cadf13d4c99e02f86f0 /scanner/CachePath.py | |
parent | Resize images to full. (diff) | |
download | PhotoFloat-039f009a157c2c10899562ecb4510707ea4ec3ac.tar.xz PhotoFloat-039f009a157c2c10899562ecb4510707ea4ec3ac.zip |
Change hash tag. Thumbs on albums.
Diffstat (limited to '')
-rw-r--r-- | scanner/CachePath.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scanner/CachePath.py b/scanner/CachePath.py index c9c19fc..0d3032b 100644 --- a/scanner/CachePath.py +++ b/scanner/CachePath.py @@ -14,7 +14,11 @@ def trim_base_custom(path, base): def trim_base(path): return trim_base_custom(path, trim_base.base) def cache_base(path): - path = trim_base(path).replace('/', '-').replace(' ', '_') + path = trim_base(path).replace('/', '-').replace(' ', '_').replace('(', '').replace(')', '').replace('#', '').replace('[', '').replace(']', '').replace('"', '').replace("'", '').replace('_-_', '-').lower() + while path.find("--") != -1: + path = path.replace("--", "-") + while path.find("__") != -1: + path = path.replace("__", "_") if len(path) == 0: path = "root" return path |