🐛 fixed downloading bug
This commit is contained in:
@ -281,7 +281,16 @@ class Plex():
|
|||||||
message.append(
|
message.append(
|
||||||
dm_section_title_line+dm_section_title+dm_section_title_line
|
dm_section_title_line+dm_section_title+dm_section_title_line
|
||||||
)
|
)
|
||||||
response = requests.get(self.qbittorrent_url+"torrents/info")
|
login_url = self.qbittorrent_url+"auth/login"
|
||||||
|
username = self.credentials["qbittorrent_username"]
|
||||||
|
password = self.credentials["qbittorrent_password"]
|
||||||
|
login_url += f"?username={username}&password={password}"
|
||||||
|
cookie = {"SID": requests.get(login_url).cookies.values()[0]}
|
||||||
|
|
||||||
|
response = requests.get(
|
||||||
|
self.qbittorrent_url+"torrents/info",
|
||||||
|
cookies=cookie
|
||||||
|
)
|
||||||
torrent_list = response.json()
|
torrent_list = response.json()
|
||||||
|
|
||||||
if len(torrent_list) > 0:
|
if len(torrent_list) > 0:
|
||||||
@ -353,10 +362,11 @@ class Plex():
|
|||||||
movies_section_line+movies_section_title+movies_section_line
|
movies_section_line+movies_section_title+movies_section_line
|
||||||
)
|
)
|
||||||
movie_list = requests.get(
|
movie_list = requests.get(
|
||||||
self.radarr_url+"movie?api_key="+self.credentials["radarr_key"]
|
self.radarr_url+"movie?apiKey="+self.credentials["radarr_key"]
|
||||||
).json()
|
).json()
|
||||||
|
print(self.radarr_url+"movie?apiKey="+self.credentials["radarr_key"])
|
||||||
movie_queue = requests.get(
|
movie_queue = requests.get(
|
||||||
self.radarr_url+"queue?api_key="+self.credentials["radarr_key"]
|
self.radarr_url+"queue?apiKey="+self.credentials["radarr_key"]
|
||||||
).json()
|
).json()
|
||||||
movie_queue_ids = []
|
movie_queue_ids = []
|
||||||
|
|
||||||
@ -394,7 +404,7 @@ class Plex():
|
|||||||
)
|
)
|
||||||
|
|
||||||
show_list = requests.get(
|
show_list = requests.get(
|
||||||
self.sonarr_url+"series?api_key="+self.credentials["sonarr_key"]
|
self.sonarr_url+"series?apiKey="+self.credentials["sonarr_key"]
|
||||||
).json()
|
).json()
|
||||||
|
|
||||||
for show in show_list:
|
for show in show_list:
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
"gwendolyn/resources/star_wars/destinyPoints.txt": "",
|
"gwendolyn/resources/star_wars/destinyPoints.txt": "",
|
||||||
"gwendolyn/resources/movies.txt": "The Room",
|
"gwendolyn/resources/movies.txt": "The Room",
|
||||||
"gwendolyn/resources/names.txt": "Gandalf\n",
|
"gwendolyn/resources/names.txt": "Gandalf\n",
|
||||||
"credentials.txt" : "Bot token: TOKEN\nFinnhub API key: KEY\nWordnik API Key: KEY\nMongoDB user: USERNAME\nMongoDB password: PASSWORD\nWolframAlpha AppID: APPID\nRadarr API key: KEY\nSonarr API key: KEY",
|
"credentials.txt" : "Bot token: TOKEN\nFinnhub API key: KEY\nWordnik API Key: KEY\nMongoDB user: USERNAME\nMongoDB password: PASSWORD\nWolframAlpha AppID: APPID\nRadarr API key: KEY\nSonarr API key: KEY\nqBittorrent username: USER\nqBittorrent password: PASSWORD",
|
||||||
"options.txt" : "Testing: True\nTesting guild ids:\nAdmins:"
|
"options.txt" : "Testing: True\nTesting guild ids:\nAdmins:"
|
||||||
},
|
},
|
||||||
"folder" : [
|
"folder" : [
|
||||||
|
@ -130,6 +130,8 @@ def get_credentials():
|
|||||||
credentials["wolfram_alpha_key"] = data["wolframalpha appid"]
|
credentials["wolfram_alpha_key"] = data["wolframalpha appid"]
|
||||||
credentials["radarr_key"] = data["radarr api key"]
|
credentials["radarr_key"] = data["radarr api key"]
|
||||||
credentials["sonarr_key"] = data["sonarr api key"]
|
credentials["sonarr_key"] = data["sonarr api key"]
|
||||||
|
credentials["qbittorrent_username"] = data["qbittorrent username"]
|
||||||
|
credentials["qbittorrent_password"] = data["qbittorrent password"]
|
||||||
|
|
||||||
return credentials
|
return credentials
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user