-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add provider saving functionality to api v2 endpoint * First version of config-providers.vue * Added provider_sub_type to specify. * Added config-provider-newznab and config-provider-torrent components. * Fix saving provider config * Add config newznab providers tab * Added post route for getting newznab (and torznab) cats. * Fix adding and saving newznab providers. * Added TorrentRss component * Fixed saving/adding/deleting provider * Added prowlarr component. * Added api operations for: - testing prowlarr connectivity - getting the available prowlarr providers list. * Added prowlarr config properties. * Added prowlarr module. * Finished prowlarr tab * Fix manual-search page. * Improved provider id creation. For when id already exist. Create id_1, id_2. * Added prowlarr images. * Added descriptions for torznab tab. * Renamed jackett tab to torznab * Cleaned up code * Add prowlarr comment block to newznab. * Add default values. * Fix regex * build * Name+size is better for torznab * Fix eslint and css lint * update snapshot * Fix pytest * fix flake * Fix text-color on history-compact.vue -> white * update changelog * Cleanup unused code
- Loading branch information
Showing
36 changed files
with
3,336 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""Utility class for prowlarr.""" | ||
from urllib.parse import urljoin | ||
|
||
from medusa.session.core import ProviderSession | ||
|
||
|
||
class ProwlarrManager(object): | ||
"""Utility class for prowlarr.""" | ||
|
||
def __init__(self, url, apikey): | ||
self.url = url | ||
self.apikey = apikey | ||
self.session = ProviderSession() | ||
self.session.headers.update({'x-api-key': self.apikey}) | ||
|
||
def test_connectivity(self): | ||
"""Verify connectivity to Prowlarrs internal api.""" | ||
response = self.session.get(urljoin(self.url, 'api/v1/health')) | ||
if response and response.ok: | ||
return True | ||
return False | ||
|
||
def get_indexers(self): | ||
"""Get a list of providers (newznab/torznab indexers).""" | ||
response = self.session.get(urljoin(self.url, 'api/v1/indexer')) | ||
if not response: | ||
return False | ||
|
||
return response.json() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.