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

3
.environment.d/nas.env Normal file
View file

@ -0,0 +1,3 @@
NAS_IP="192.168.84.3"
NAS_USER="janolehuebner"
NAS_TOKEN_NAME_IN_STORE="sudo-lana"

View file

@ -0,0 +1 @@
TUBE_TOKEN_NAME_IN_STORE="tube.lan"

10
.gitignore vendored
View file

@ -7,14 +7,6 @@ movies/
music/ music/
pictures/ pictures/
public/ public/
bin/
clipboard_debug.log
dev/ dev/
dropshare@jan-ole.download.dsconn
istripper/
keyfile.keyx keyfile.keyx
last_check.log *.log
last_insta.log
nv.log
package-lock.json
test.sh

View file

@ -1,13 +1,13 @@
patreon() { 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="$*" 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() { 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 return 1
fi fi
local token="$(pass tube.lan)" local token="$(pass $TUBE_TOKEN_NAME_IN_STORE)"
local json_data=$(jq -n --arg youtube_id "$youtube_id" '{ local json_data=$(jq -n --arg youtube_id "$youtube_id" '{
data: [ data: [
{ {
@ -40,7 +40,7 @@ ytr () {
autostart: true 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 fi
# Set the token and URL # 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 # Initialize an empty array to store video data
local video_data="[]" local video_data="[]"
@ -81,7 +81,7 @@ yts() {
autostart: true 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/
} }