This script aims to use slskd's recent EventBus update to send import requests to betanin whenever a directory has completed downloading.
- Place this script wherever you want in your host
/home/user/slskd_to_betanin.sh
- Give execution permission to the script
chmod +x /home/user/slskd_to_betanin.sh
- Add a volume that gives access to the script to the slskd container
# ... volumes: - /home/user/slskd_to_betanin.sh:/slskd_to_betanin.sh:ro # ...
- Create an slskd integration that runs this script by editing your slskd config
integration: scripts: to_betanin: on: - DownloadDirectoryComplete run: /bin/sh /slskd_to_betanin.sh '$DATA'
- Restart your slskd container, and everything should work
-
The assumed slskd download path is
/downloads/complete
. If yours is different you should update the sed command used in the first line to match it (remember to escape backslashes)e.g., if your slskd path is
/music/downloads
, then the sed command becomessed 's/.*"localDirectoryName":"\/music\/downloads\/\([^"]*\)".*/\1/'
-
The assumed betanin download path is
/downloads
. If yours is different, simply change the value of the post data in the wget command, specifically the path variable.