fixed clean_check of server_ids, fixed under-indented radarr get_movie,
and added __repr__ for cleaner logging
This commit is contained in:
parent
87fea6db06
commit
18a5fdacba
8 changed files with 50 additions and 17 deletions
|
@ -14,6 +14,9 @@ class RadarrAPI(object):
|
|||
self.session = Session()
|
||||
self.session.headers = {'X-Api-Key': self.server.api_key}
|
||||
|
||||
def __repr__(self):
|
||||
return "<radarr-{}>".format(self.server.id)
|
||||
|
||||
def get_missing(self):
|
||||
endpoint = '/api/movie'
|
||||
self.now = datetime.now(timezone.utc).astimezone().isoformat()
|
||||
|
@ -29,8 +32,8 @@ class RadarrAPI(object):
|
|||
movies = [Movie(**movie) for movie in get]
|
||||
|
||||
for movie in movies:
|
||||
if self.server.get_missing:
|
||||
if not movie.downloaded and movie.isAvailable:
|
||||
if not movie.downloaded:
|
||||
if movie.isAvailable:
|
||||
ma = True
|
||||
else:
|
||||
ma = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue