🐛 fixed downloading bug

This commit is contained in:
NikolajDanger
2021-08-18 17:49:51 +02:00
parent f07a7e169f
commit 3d592e05b1
3 changed files with 17 additions and 5 deletions

View File

@ -281,7 +281,16 @@ class Plex():
message.append(
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()
if len(torrent_list) > 0:
@ -353,10 +362,11 @@ class Plex():
movies_section_line+movies_section_title+movies_section_line
)
movie_list = requests.get(
self.radarr_url+"movie?api_key="+self.credentials["radarr_key"]
self.radarr_url+"movie?apiKey="+self.credentials["radarr_key"]
).json()
print(self.radarr_url+"movie?apiKey="+self.credentials["radarr_key"])
movie_queue = requests.get(
self.radarr_url+"queue?api_key="+self.credentials["radarr_key"]
self.radarr_url+"queue?apiKey="+self.credentials["radarr_key"]
).json()
movie_queue_ids = []
@ -394,7 +404,7 @@ class Plex():
)
show_list = requests.get(
self.sonarr_url+"series?api_key="+self.credentials["sonarr_key"]
self.sonarr_url+"series?apiKey="+self.credentials["sonarr_key"]
).json()
for show in show_list: