Skip to content

Commit

Permalink
Update community.sh
Browse files Browse the repository at this point in the history
Trakt plaxt  added
  • Loading branch information
MrDoobPG authored Dec 14, 2019
1 parent 23d2267 commit f55738b
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions menu/pgbox/community/community.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,55 @@ final() {
exit
}

api() {

domain=$(cat /var/plexguide/server.domain)
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Trakt API-Key
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: In order for this to work, you must retrieve your API Key! Prior to
continuing, please follow the current steps.
[ 1 ] Visit - https://trakt.tv/oauth/applications
[ 2 ] Click - New Applications
[ 3 ] Name - plaxt
[ 4 ] Redirect UI - http://plaxt.${domain}/authorize
[ 5 ] Permissions - Click /checkin and /scrobble
[ 6 ] Click - Save App
[ 7 ] Copy the Client ID & Secret for the Next Step!
Go Back? Type > exit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
EOF
read -p '↘️ Type API Client | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/trakt.id
read -p '↘️ Type API Secret | Press [ENTER]: ' typed </dev/tty
echo $typed >/var/plexguide/trakt.sec

if [[ "$typed" == "exit" || "$typed" == "Exit" || "$typed" == "EXIT" || "$typed" == "z" || "$typed" == "Z" ]]; then
exit 0
else
tee <<-EOF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ SYSTEM MESSAGE: Traktarr API Notice
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: The API Client and Secret is set!
INFO: Messed up? Rerun this API Interface to update the information!
EOF

read -p '🌎 Acknowledge Info | Press [ENTER] ' typed </dev/tty
fi

}

question2() {

# Image Selector
Expand Down Expand Up @@ -223,9 +272,10 @@ EOF

# Store Used Program
echo "$p" >/tmp/program_var
sleep 1

# Execute Main Program
ansible-playbook /opt/communityapps/apps/$p.yml
if [[ "$p" == "plaxt" ]]; then
api; fi

if [[ "$edition" == "PG Edition - HD Solo" ]]; then
a=b
Expand Down

0 comments on commit f55738b

Please sign in to comment.