mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
commit
bd7bffb41a
2 changed files with 3 additions and 3 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.0.1-develop26
|
2.0.1-develop27
|
||||||
|
|
|
@ -96,8 +96,8 @@ class Requests:
|
||||||
def file_yaml(self, path_to_file, check_empty=False, create=False, start_empty=False):
|
def file_yaml(self, path_to_file, check_empty=False, create=False, start_empty=False):
|
||||||
return YAML(path=path_to_file, check_empty=check_empty, create=create, start_empty=start_empty)
|
return YAML(path=path_to_file, check_empty=check_empty, create=create, start_empty=start_empty)
|
||||||
|
|
||||||
def get_yaml(self, url, check_empty=False):
|
def get_yaml(self, url, headers=None, check_empty=False):
|
||||||
response = self.get(url)
|
response = self.get(url, headers=headers)
|
||||||
if response.status_code >= 400:
|
if response.status_code >= 400:
|
||||||
raise Failed(f"URL Error: No file found at {url}")
|
raise Failed(f"URL Error: No file found at {url}")
|
||||||
return YAML(input_data=response.content, check_empty=check_empty)
|
return YAML(input_data=response.content, check_empty=check_empty)
|
||||||
|
|
Loading…
Reference in a new issue