mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 02:36:15 +03:00
Updated External programs: savecategory (markdown)
parent
1e0897fadc
commit
d4e6637a7b
1 changed files with 5 additions and 7 deletions
|
@ -18,20 +18,18 @@ Save the script below as `savecategory` and make it executable via `chmod 755 /p
|
||||||
category=$(basename $1)
|
category=$(basename $1)
|
||||||
torrent_hash=$2
|
torrent_hash=$2
|
||||||
torrent_name=$3
|
torrent_name=$3
|
||||||
apiv2=http://localhost:8112/api/v2
|
apiv2=http://localhost:25832/api/v2
|
||||||
username=admin
|
username=admin
|
||||||
password=adminadmin
|
password=adminadmin
|
||||||
cookie_file=/config/external/cookie
|
cookie_file=/config/external/cookie
|
||||||
|
|
||||||
echo "running savecategory script"
|
echo "running savecategory script"
|
||||||
|
|
||||||
if [ ! -f "$cookie_file" ]; then
|
echo "getting cookie"
|
||||||
echo "getting cookie"
|
|
||||||
|
|
||||||
curl --silent --fail --show-error --request GET \
|
curl --silent --fail --show-error --request GET \
|
||||||
--url "$apiv2/auth/login?username=$username&password=$password" \
|
--url "$apiv2/auth/login?username=$username&password=$password" \
|
||||||
--cookie-jar "$cookie_file" > /dev/null
|
--cookie-jar "$cookie_file" > /dev/null
|
||||||
fi
|
|
||||||
|
|
||||||
echo "setting $torrent_name to category $category"
|
echo "setting $torrent_name to category $category"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue