diff options
| -rw-r--r-- | src/photoalbum.default.conf | 2 | ||||
| -rwxr-xr-x | src/photoalbum.sh | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/photoalbum.default.conf b/src/photoalbum.default.conf index 2a85fc7..160a8ed 100644 --- a/src/photoalbum.default.conf +++ b/src/photoalbum.default.conf @@ -8,6 +8,8 @@ MAXPREVIEWS=100 # Diverse directories, need to be full paths, not relative! INCOMING_DIR=$(pwd)/incoming +# Set to yes if per directory sub-albums are wanted +SUB_ALBUMS=no DIST_DIR=$(pwd)/dist TEMPLATE_DIR=/usr/share/photoalbum/templates/default #TEMPLATE_DIR=/usr/share/photoalbum/templates/minimal diff --git a/src/photoalbum.sh b/src/photoalbum.sh index 6099e5e..8334872 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -72,7 +72,7 @@ function generate() { # Figure out wether we want sub-albums or not dirs=$(find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | head | wc -l) - if [ ${dirs} -eq 0 ]; then + if [[ "${SUB_ALBUMS}" != yes || ${dirs} -eq 0 ]]; then makehtml photos html thumbs .. else find "${DIST_DIR}/photos" -mindepth 1 -maxdepth 1 -type d | |
