Skip to content

Commit b0a8170

Browse files
Chris McKeevercgmckeever
Chris McKeever
authored and
cgmckeever
committed
omit downloads fix success code
config handling config config
1 parent d7af8db commit b0a8170

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/
2+
config.sh

config.example.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
export PLEXPASS='PLEXPASSWORD' \
4+
export PLEXUSER="PLEXUSER"
5+
6+
7+
LIST=""

fetch.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
source config.sh
4+
5+
IFSO=$IFS
6+
IFS=$'\n'
7+
8+
open .
9+
10+
source env/bin/activate
11+
for url in $LIST
12+
do
13+
echo "Fetching ${url: -20}"
14+
python3 main.py -u ${PLEXUSER} -p ${PLEXPASS} $url
15+
done
16+
deactivate
17+
18+
IFS=$IFSO

main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def login(self):
4141
r = requests.post("https://plex.tv/users/sign_in.json",
4242
headers=self.headers, data=payload)
4343

44-
if r.status_code != 200:
44+
if r.status_code != 201:
4545
print(r.json()["error"])
4646
quit(1)
4747

0 commit comments

Comments
 (0)