quasarr 2.1.0__tar.gz → 2.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of quasarr might be problematic. Click here for more details.

Files changed (88) hide show
  1. {quasarr-2.1.0 → quasarr-2.1.2}/PKG-INFO +38 -22
  2. {quasarr-2.1.0 → quasarr-2.1.2}/README.md +37 -21
  3. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/__init__.py +1 -1
  4. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/arr/__init__.py +1 -15
  5. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/packages/__init__.py +283 -233
  6. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/sponsors_helper/__init__.py +13 -5
  7. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/__init__.py +23 -0
  8. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/auth.py +100 -28
  9. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/html_templates.py +5 -1
  10. quasarr-2.1.2/quasarr/providers/obfuscated.py +121 -0
  11. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/version.py +1 -1
  12. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/PKG-INFO +38 -22
  13. quasarr-2.1.0/quasarr/providers/obfuscated.py +0 -121
  14. {quasarr-2.1.0 → quasarr-2.1.2}/LICENSE +0 -0
  15. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/__init__.py +0 -0
  16. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/captcha/__init__.py +0 -0
  17. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/config/__init__.py +0 -0
  18. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/api/statistics/__init__.py +0 -0
  19. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/linkcrypters/__init__.py +0 -0
  20. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/linkcrypters/al.py +0 -0
  21. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/linkcrypters/filecrypt.py +0 -0
  22. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/linkcrypters/hide.py +0 -0
  23. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/packages/__init__.py +0 -0
  24. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/__init__.py +0 -0
  25. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/al.py +0 -0
  26. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/by.py +0 -0
  27. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/dd.py +0 -0
  28. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/dj.py +0 -0
  29. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/dl.py +0 -0
  30. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/dt.py +0 -0
  31. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/dw.py +0 -0
  32. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/he.py +0 -0
  33. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/mb.py +0 -0
  34. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/nk.py +0 -0
  35. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/nx.py +0 -0
  36. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/sf.py +0 -0
  37. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/sj.py +0 -0
  38. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/sl.py +0 -0
  39. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/wd.py +0 -0
  40. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/downloads/sources/wx.py +0 -0
  41. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/__init__.py +0 -0
  42. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/cloudflare.py +0 -0
  43. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/html_images.py +0 -0
  44. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/imdb_metadata.py +0 -0
  45. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/jd_cache.py +0 -0
  46. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/log.py +0 -0
  47. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/myjd_api.py +0 -0
  48. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/notifications.py +0 -0
  49. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/sessions/__init__.py +0 -0
  50. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/sessions/al.py +0 -0
  51. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/sessions/dd.py +0 -0
  52. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/sessions/dl.py +0 -0
  53. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/sessions/nx.py +0 -0
  54. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/shared_state.py +0 -0
  55. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/statistics.py +0 -0
  56. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/utils.py +0 -0
  57. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/providers/web_server.py +0 -0
  58. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/__init__.py +0 -0
  59. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/__init__.py +0 -0
  60. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/al.py +0 -0
  61. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/by.py +0 -0
  62. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/dd.py +0 -0
  63. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/dj.py +0 -0
  64. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/dl.py +0 -0
  65. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/dt.py +0 -0
  66. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/dw.py +0 -0
  67. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/fx.py +0 -0
  68. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/he.py +0 -0
  69. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/mb.py +0 -0
  70. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/nk.py +0 -0
  71. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/nx.py +0 -0
  72. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/sf.py +0 -0
  73. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/sj.py +0 -0
  74. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/sl.py +0 -0
  75. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/wd.py +0 -0
  76. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/search/sources/wx.py +0 -0
  77. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/storage/__init__.py +0 -0
  78. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/storage/config.py +0 -0
  79. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/storage/setup.py +0 -0
  80. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr/storage/sqlite_database.py +0 -0
  81. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/SOURCES.txt +0 -0
  82. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/dependency_links.txt +0 -0
  83. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/entry_points.txt +0 -0
  84. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/not-zip-safe +0 -0
  85. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/requires.txt +0 -0
  86. {quasarr-2.1.0 → quasarr-2.1.2}/quasarr.egg-info/top_level.txt +0 -0
  87. {quasarr-2.1.0 → quasarr-2.1.2}/setup.cfg +0 -0
  88. {quasarr-2.1.0 → quasarr-2.1.2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quasarr
3
- Version: 2.1.0
3
+ Version: 2.1.2
4
4
  Summary: Quasarr connects JDownloader with Radarr, Sonarr and LazyLibrarian. It also decrypts links protected by CAPTCHAs.
5
5
  Home-page: https://github.com/rix1337/Quasarr
6
6
  Author: rix1337
@@ -25,7 +25,7 @@ Dynamic: license-file
25
25
  Dynamic: requires-dist
26
26
  Dynamic: summary
27
27
 
28
- #
28
+ #
29
29
 
30
30
  <img src="https://raw.githubusercontent.com/rix1337/Quasarr/main/Quasarr.png" data-canonical-src="https://raw.githubusercontent.com/rix1337/Quasarr/main/Quasarr.png" width="64" height="64" />
31
31
 
@@ -197,18 +197,18 @@ docker run -d \
197
197
  ghcr.io/rix1337/quasarr:latest
198
198
  ```
199
199
 
200
- * `INTERNAL_ADDRESS` is required so Radarr/Sonarr/LazyLibrarian can reach Quasarr. **Must** include port!
201
- * `EXTERNAL_ADDRESS` is optional and helpful if using a reverse proxy. Always protect external access with basic auth!
202
- * `DISCORD` is optional and must be a valid Discord webhook URL.
203
- * `HOSTNAMES` is optional and allows skipping the manual hostname step during setup.
204
- * Must be a publicly available `HTTP` or `HTTPs` link
205
- * Must be a raw `.ini` / text file (not HTML or JSON)
206
- * Must contain at least one valid Hostname per line `ab = xyz`
207
- * `USER` / `PASS` are credentials to protect the web UI
208
- * `AUTH` is the authentication mode (`form` or `basic`)
209
- * `SILENT` is optional and silences all discord notifications except for error messages from SponsorsHelper if `True`.
210
- * `DEBUG` is optional and enables debug logging if `True`.
211
- * `TZ` is optional, wrong timezone can cause HTTPS/SSL issues
200
+ | Parameter | Description |
201
+ |--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
202
+ | `INTERNAL_ADDRESS` | **Required.** Internal URL so Radarr/Sonarr/LazyLibrarian can reach Quasarr. **Must include port.** |
203
+ | `EXTERNAL_ADDRESS` | Optional. External URL (e.g. reverse proxy). Always protect external access with authentication. |
204
+ | `DISCORD` | Optional. Discord webhook URL for notifications. |
205
+ | `HOSTNAMES` | Optional. URL to a hostname list to skip manual setup. Must be a publicly accessible `HTTP`/`HTTPS` link, point to a raw `.ini` or plain text file (not HTML or JSON), and contain at least one hostname per line in the format `ab = xyz`. |
206
+ | `USER` | Username to protect the web UI. |
207
+ | `PASS` | Password to protect the web UI. |
208
+ | `AUTH` | Authentication mode. Supported values: `form` or `basic`. |
209
+ | `SILENT` | Optional. If `True`, silences all Discord notifications except SponsorHelper error messages. |
210
+ | `DEBUG` | Optional. If `True`, enables debug logging. |
211
+ | `TZ` | Optional. Timezone. Incorrect values may cause HTTPS/SSL issues. |
212
212
 
213
213
  # Manual setup
214
214
 
@@ -280,9 +280,21 @@ Image access is limited to [active monthly GitHub sponsors](https://github.com/u
280
280
 
281
281
  ---
282
282
 
283
+ ## 🔐 Quasarr API Key Setup
284
+
285
+ 1. Open your Quasarr web UI in a browser
286
+ 2. On the main page, expand **"Show API Settings"**
287
+ 3. Copy the **API Key** value
288
+ 4. Use this value for the `QUASARR_API_KEY` environment variable
289
+
290
+ > **Note:** The API key is required for SponsorsHelper to communicate securely with Quasarr. Without it, all requests
291
+ > will be rejected with a 401/403 error.
292
+
293
+ ---
294
+
283
295
  ## 🐋 Docker Login
284
296
 
285
- ⚠️ **Before logging in, the image will not download.**
297
+ ⚠️ **If not logged in, the image will not download.**
286
298
 
287
299
  ```bash
288
300
  echo "GITHUB_TOKEN" | docker login ghcr.io -u USERNAME --password-stdin
@@ -299,6 +311,7 @@ echo "GITHUB_TOKEN" | docker login ghcr.io -u USERNAME --password-stdin
299
311
  docker run -d \
300
312
  --name='SponsorsHelper' \
301
313
  -e 'QUASARR_URL'='http://192.168.0.1:8080' \
314
+ -e 'QUASARR_API_KEY'='your_quasarr_api_key_here' \
302
315
  -e 'DEATHBYCAPTCHA_TOKEN'='2FMum5zuDBxMmbXDIsADnllEFl73bomydIpzo7...' \
303
316
  -e 'GITHUB_TOKEN'='ghp_123.....456789' \
304
317
  -e 'FLARESOLVERR_URL'='http://10.10.0.1:8191/v1' \
@@ -310,10 +323,13 @@ docker run -d \
310
323
  ghcr.io/rix1337-sponsors/docker/helper:latest
311
324
  ```
312
325
 
313
- * `QUASARR_URL` → Local URL of Quasarr
314
- * `DEATHBYCAPTCHA_TOKEN` → [DeathByCaptcha](https://deathbycaptcha.com/register?refid=6184288242b) account token
315
- * `GITHUB_TOKEN` Classic GitHub PAT with the scopes listed above
316
- * `FLARESOLVERR_URL` Local URL of [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) - required!
317
- * `NX_USER` / `NX_PASS` NX account credentials
318
- * `JUNKIES_USER` / `JUNKIES_PASS` Junkies account credentials
319
- * `JUNKIES_HOSTER` Preferred hoster for Junkies links
326
+ | Parameter | Description |
327
+ |---------------------------------|---------------------------------------------------------------------------------------|
328
+ | `QUASARR_URL` | Local URL of Quasarr (e.g., `http://192.168.0.1:8080`) |
329
+ | `QUASARR_API_KEY` | Your Quasarr API key (found in Quasarr web UI under "API Settings") |
330
+ | `DEATHBYCAPTCHA_TOKEN` | [DeathByCaptcha](https://deathbycaptcha.com/register?refid=6184288242b) account token |
331
+ | `GITHUB_TOKEN` | Classic GitHub PAT with the scopes listed above |
332
+ | `FLARESOLVERR_URL` | Local URL of [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) |
333
+ | `NX_USER` / `NX_PASS` | Optional. NX account credentials |
334
+ | `JUNKIES_USER` / `JUNKIES_PASS` | Optional. Junkies account credentials |
335
+ | `JUNKIES_HOSTER` | Optional. Preferred hoster for Junkies links |
@@ -1,4 +1,4 @@
1
- #
1
+ #
2
2
 
3
3
  <img src="https://raw.githubusercontent.com/rix1337/Quasarr/main/Quasarr.png" data-canonical-src="https://raw.githubusercontent.com/rix1337/Quasarr/main/Quasarr.png" width="64" height="64" />
4
4
 
@@ -170,18 +170,18 @@ docker run -d \
170
170
  ghcr.io/rix1337/quasarr:latest
171
171
  ```
172
172
 
173
- * `INTERNAL_ADDRESS` is required so Radarr/Sonarr/LazyLibrarian can reach Quasarr. **Must** include port!
174
- * `EXTERNAL_ADDRESS` is optional and helpful if using a reverse proxy. Always protect external access with basic auth!
175
- * `DISCORD` is optional and must be a valid Discord webhook URL.
176
- * `HOSTNAMES` is optional and allows skipping the manual hostname step during setup.
177
- * Must be a publicly available `HTTP` or `HTTPs` link
178
- * Must be a raw `.ini` / text file (not HTML or JSON)
179
- * Must contain at least one valid Hostname per line `ab = xyz`
180
- * `USER` / `PASS` are credentials to protect the web UI
181
- * `AUTH` is the authentication mode (`form` or `basic`)
182
- * `SILENT` is optional and silences all discord notifications except for error messages from SponsorsHelper if `True`.
183
- * `DEBUG` is optional and enables debug logging if `True`.
184
- * `TZ` is optional, wrong timezone can cause HTTPS/SSL issues
173
+ | Parameter | Description |
174
+ |--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
175
+ | `INTERNAL_ADDRESS` | **Required.** Internal URL so Radarr/Sonarr/LazyLibrarian can reach Quasarr. **Must include port.** |
176
+ | `EXTERNAL_ADDRESS` | Optional. External URL (e.g. reverse proxy). Always protect external access with authentication. |
177
+ | `DISCORD` | Optional. Discord webhook URL for notifications. |
178
+ | `HOSTNAMES` | Optional. URL to a hostname list to skip manual setup. Must be a publicly accessible `HTTP`/`HTTPS` link, point to a raw `.ini` or plain text file (not HTML or JSON), and contain at least one hostname per line in the format `ab = xyz`. |
179
+ | `USER` | Username to protect the web UI. |
180
+ | `PASS` | Password to protect the web UI. |
181
+ | `AUTH` | Authentication mode. Supported values: `form` or `basic`. |
182
+ | `SILENT` | Optional. If `True`, silences all Discord notifications except SponsorHelper error messages. |
183
+ | `DEBUG` | Optional. If `True`, enables debug logging. |
184
+ | `TZ` | Optional. Timezone. Incorrect values may cause HTTPS/SSL issues. |
185
185
 
186
186
  # Manual setup
187
187
 
@@ -253,9 +253,21 @@ Image access is limited to [active monthly GitHub sponsors](https://github.com/u
253
253
 
254
254
  ---
255
255
 
256
+ ## 🔐 Quasarr API Key Setup
257
+
258
+ 1. Open your Quasarr web UI in a browser
259
+ 2. On the main page, expand **"Show API Settings"**
260
+ 3. Copy the **API Key** value
261
+ 4. Use this value for the `QUASARR_API_KEY` environment variable
262
+
263
+ > **Note:** The API key is required for SponsorsHelper to communicate securely with Quasarr. Without it, all requests
264
+ > will be rejected with a 401/403 error.
265
+
266
+ ---
267
+
256
268
  ## 🐋 Docker Login
257
269
 
258
- ⚠️ **Before logging in, the image will not download.**
270
+ ⚠️ **If not logged in, the image will not download.**
259
271
 
260
272
  ```bash
261
273
  echo "GITHUB_TOKEN" | docker login ghcr.io -u USERNAME --password-stdin
@@ -272,6 +284,7 @@ echo "GITHUB_TOKEN" | docker login ghcr.io -u USERNAME --password-stdin
272
284
  docker run -d \
273
285
  --name='SponsorsHelper' \
274
286
  -e 'QUASARR_URL'='http://192.168.0.1:8080' \
287
+ -e 'QUASARR_API_KEY'='your_quasarr_api_key_here' \
275
288
  -e 'DEATHBYCAPTCHA_TOKEN'='2FMum5zuDBxMmbXDIsADnllEFl73bomydIpzo7...' \
276
289
  -e 'GITHUB_TOKEN'='ghp_123.....456789' \
277
290
  -e 'FLARESOLVERR_URL'='http://10.10.0.1:8191/v1' \
@@ -283,10 +296,13 @@ docker run -d \
283
296
  ghcr.io/rix1337-sponsors/docker/helper:latest
284
297
  ```
285
298
 
286
- * `QUASARR_URL` → Local URL of Quasarr
287
- * `DEATHBYCAPTCHA_TOKEN` → [DeathByCaptcha](https://deathbycaptcha.com/register?refid=6184288242b) account token
288
- * `GITHUB_TOKEN` Classic GitHub PAT with the scopes listed above
289
- * `FLARESOLVERR_URL` Local URL of [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) - required!
290
- * `NX_USER` / `NX_PASS` NX account credentials
291
- * `JUNKIES_USER` / `JUNKIES_PASS` Junkies account credentials
292
- * `JUNKIES_HOSTER` Preferred hoster for Junkies links
299
+ | Parameter | Description |
300
+ |---------------------------------|---------------------------------------------------------------------------------------|
301
+ | `QUASARR_URL` | Local URL of Quasarr (e.g., `http://192.168.0.1:8080`) |
302
+ | `QUASARR_API_KEY` | Your Quasarr API key (found in Quasarr web UI under "API Settings") |
303
+ | `DEATHBYCAPTCHA_TOKEN` | [DeathByCaptcha](https://deathbycaptcha.com/register?refid=6184288242b) account token |
304
+ | `GITHUB_TOKEN` | Classic GitHub PAT with the scopes listed above |
305
+ | `FLARESOLVERR_URL` | Local URL of [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) |
306
+ | `NX_USER` / `NX_PASS` | Optional. NX account credentials |
307
+ | `JUNKIES_USER` / `JUNKIES_PASS` | Optional. Junkies account credentials |
308
+ | `JUNKIES_HOSTER` | Optional. Preferred hoster for Junkies links |
@@ -25,7 +25,7 @@ def get_api(shared_state_dict, shared_state_lock):
25
25
 
26
26
  # Auth: routes must come first, then hook
27
27
  add_auth_routes(app)
28
- add_auth_hook(app, whitelist_prefixes=['/api', '/api/' '/sponsors_helper/', '/download/'])
28
+ add_auth_hook(app, whitelist_prefixes=['/api', '/api/', '/sponsors_helper/', '/download/'])
29
29
 
30
30
  setup_arr_routes(app)
31
31
  setup_captcha_routes(app)
@@ -6,7 +6,6 @@ import traceback
6
6
  import xml.sax.saxutils as sax_utils
7
7
  from base64 import urlsafe_b64decode
8
8
  from datetime import datetime
9
- from functools import wraps
10
9
  from urllib.parse import urlparse, parse_qs
11
10
  from xml.etree import ElementTree
12
11
 
@@ -15,23 +14,10 @@ from bottle import abort, request
15
14
  from quasarr.downloads import download
16
15
  from quasarr.downloads.packages import get_packages, delete_package
17
16
  from quasarr.providers import shared_state
17
+ from quasarr.providers.auth import require_api_key
18
18
  from quasarr.providers.log import info, debug
19
19
  from quasarr.providers.version import get_version
20
20
  from quasarr.search import get_search_results
21
- from quasarr.storage.config import Config
22
-
23
-
24
- def require_api_key(func):
25
- @wraps(func)
26
- def decorated(*args, **kwargs):
27
- api_key = Config('API').get('key')
28
- if not request.query.apikey:
29
- return abort(401, "Missing API key")
30
- if request.query.apikey != api_key:
31
- return abort(403, "Invalid API key")
32
- return func(*args, **kwargs)
33
-
34
- return decorated
35
21
 
36
22
 
37
23
  def parse_payload(payload_str):