DiskStation Downloader (formerly photostationtagdownloader / pstd)
Downloads files from Synology DiskStation Manager. Supports downloading
- photos (all photos of a tag / "smart album") via Synology Photos / Photo Station and
- audio (all songs of a playlist) via Audio Station
- Set tags (i.e. IPTC keywords) for photos, grouping them into "smart albums" (DS photo)
- dsdl downloads those for you. For some reasons this cannot be achieved using the Photo Station web app, nor native Android or Windows apps.
- Group your songs into playlists
- dsdl downloads those for you. You can also do this via the web UI (where the playlist is zipped) or with DS audio but it does not seem to work reliably, and it cannot be scripted 😉
You can install it as global package from npm
npm install -g dsdl
dsdl --version
Note that, ff running on android via termux and want to trigger dsdl from a termux widget, you need to perform the following once after installation/upgrade:
termux-fix-shebang $(which dsdl)
Get the binary for your specific OS from the release page.
DSDL_VERSION=2.00
sudo wget -O /usr/local/bin dsdl \
https://github.com/schnatterer/dsdl/releases/download/${DSDL_VERSION}/dsdl-linux-x64
sudo chmod +x /usr/local/bin/dsdl
dsdl --version
docker run --rm -ti -v $(pwd):/dsdl quay.io/schnatterer/dsdl \
audio --user your-photostation-user --output /dsdl http://diskstation/photo
Make sure uid/gid 1000
are allowed to write into current folder.
Of course, you can also run the latest version by cloning this repo.
git clone https://github.com/schnatterer/dsdl && cd dsdl
yarn install
node src/cli/dsdl.js photo --version
- DS Audio
dsdl audio --user your-user --output music/ http://diskstation:5000/
- Synology Photos (DSM 7+) -
dsdl photos --user your-user --output music/ http://diskstation:5000/
- DS Photo (DSM < 7)
dsdl photo --user your-diskstsation-user --output photos/ http://diskstation/photo
You will be prompted for the password.
--folder-structure
- Default:
list
- creates subdirs for each list. flat
- writes all photos to a single folders.server
- creates same folder structure as on server (Works only for audio).
Or is there a way to get the album for a photo via the Synology Photo Station / Foto API?
- Default:
--playlists
- downloads specific playlists. Note that playlists containing spaces must be quoted. Multiple playlists can either be specified- comma separated (e.g.
--playlists "tag one",numberTwo
) or - by using multiple parameters (e.g
--playlists "tag one" --playlists numberTwo
)
- comma separated (e.g.
--m3u
- Create m3u playlist files for each downloaded playlist
Note that for synology photos right now a maximum of 5000 photos can be downloaded for a single tag
--tags
- downloads specific tags. Note that tags containing spaces must be quoted. Multiple tags can either be specified- comma separated (e.g.
--tags "tag one",numberTwo
) or - by using multiple parameters (e.g
--tags "tag one" --tags numberTwo
)
- comma separated (e.g.
--tags
- downloads specific tags. Note that tags containing spaces must be quoted. Multiple tags can either be specified- comma separated (e.g.
--tags "tag one",numberTwo
) or - by using multiple parameters (e.g
--tags "tag one" --tags numberTwo
)
- comma separated (e.g.
If running in batch/non-interactive/headless mode, you you can just pipe it to dsdl
.
Note that passwords showing up in the shell history or log files are a potential security risk.
echo "PW" | dsdl photo -u ...