feat: add old functions to new structure

This commit is contained in:
Jan-Ole Hübner 2025-04-06 19:35:45 +02:00
parent 29e363d419
commit 0bec6db3b9
5 changed files with 13 additions and 17 deletions

View file

@ -1,13 +1,13 @@
patreon() {
ssh janolehuebner@192.168.84.3 "zsh /mnt/hdd/DATA/.scripts/patreon.sh"
ssh $NAS_USER@$NAS_IP "zsh /mnt/hdd/DATA/.scripts/patreon.sh"
}
fansly () {
fansly() {
local users="$*"
ssh janolehuebner@192.168.84.3 "cd /mnt/hdd/DATA/.scripts && echo $(pass sudo-hannah) | sudo -S ./fansly.sh \"$users\""
ssh $NAS_USER@$NAS_IP "cd /mnt/hdd/DATA/.scripts && echo $(pass $NAS_TOKEN_NAME_IN_STORE) | sudo -S ./fansly.sh \"$users\""
}
onlyfans() {
ssh janolehuebner@192.168.84.3 "cd /mnt/hdd/DATA/.scripts && echo $(pass sudo-hannah) | sudo -S ./of.sh"
ssh $NAS_USER@$NAS_IP "cd /mnt/hdd/DATA/.scripts && echo $(pass $NAS_TOKEN_NAME_IN_STORE) | sudo -S ./of.sh"
}

View file

@ -29,7 +29,7 @@ ytr () {
return 1
fi
local token="$(pass tube.lan)"
local token="$(pass $TUBE_TOKEN_NAME_IN_STORE)"
local json_data=$(jq -n --arg youtube_id "$youtube_id" '{
data: [
{
@ -40,7 +40,7 @@ ytr () {
autostart: true
}')
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token $token" -d "$json_data" http://192.168.84.3:4601/api/download/
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token $token" -d "$json_data" http://$NAS_IP:4601/api/download/
}
@ -58,7 +58,7 @@ yts() {
fi
# Set the token and URL
local token="$(pass tube.lan)"
local token="$(pass $TUBE_TOKEN_NAME_IN_STORE)"
# Initialize an empty array to store video data
local video_data="[]"
@ -81,7 +81,7 @@ yts() {
autostart: true
}')
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token $token" -d "$json_data" http://192.168.84.3:4601/api/download/
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token $token" -d "$json_data" http://$NAS_IP:4601/api/download/
}