Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/
config.sh
7 changes: 7 additions & 0 deletions config.example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

export PLEXPASS='PLEXPASSWORD' \
export PLEXUSER="PLEXUSER"


LIST=""
18 changes: 18 additions & 0 deletions fetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

source config.sh

IFSO=$IFS
IFS=$'\n'

open .

source env/bin/activate
for url in $LIST
do
echo "Fetching ${url: -20}"
python3 main.py -u ${PLEXUSER} -p ${PLEXPASS} $url
done
deactivate

IFS=$IFSO
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def login(self):
r = requests.post("https://plex.tv/users/sign_in.json",
headers=self.headers, data=payload)

if r.status_code != 200:
if r.status_code != 201:
print(r.json()["error"])
quit(1)

Expand Down