From c132a6dcb89b7f90a69ef606fa9120f1c2d367ec Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Tue, 31 Dec 2019 14:06:56 +0100 Subject: [PATCH] Fixed flake8 errors in alert.py and base.py Signed-off-by: Andreas Maier --- plexapi/alert.py | 14 +++++++------- plexapi/base.py | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/plexapi/alert.py b/plexapi/alert.py index 20ad9450..38dc930a 100644 --- a/plexapi/alert.py +++ b/plexapi/alert.py @@ -57,10 +57,10 @@ class AlertListener(threading.Thread): def _onMessage(self, *args): """ Called when websocket message is received. - In earlier releases, websocket-client returned a tuple of two parameters: a websocket.app.WebSocketApp object - and the message as a STR. Current releases appear to only return the message. + In earlier releases, websocket-client returned a tuple of two parameters: a websocket.app.WebSocketApp + object and the message as a STR. Current releases appear to only return the message. We are assuming the last argument in the tuple is the message. - This is to support compatibility with current and previous releases of websocket-client. + This is to support compatibility with current and previous releases of websocket-client. """ message = args[-1] try: @@ -73,10 +73,10 @@ class AlertListener(threading.Thread): def _onError(self, *args): # pragma: no cover """ Called when websocket error is received. - In earlier releases, websocket-client returned a tuple of two parameters: a websocket.app.WebSocketApp object - and the error. Current releases appear to only return the error. - We are assuming the last argument in the tuple is the message. - This is to support compatibility with current and previous releases of websocket-client. + In earlier releases, websocket-client returned a tuple of two parameters: a websocket.app.WebSocketApp + object and the error. Current releases appear to only return the error. + We are assuming the last argument in the tuple is the message. + This is to support compatibility with current and previous releases of websocket-client. """ err = args[-1] log.error('AlertListener Error: %s' % err) diff --git a/plexapi/base.py b/plexapi/base.py index e153d5d7..00ea2c30 100644 --- a/plexapi/base.py +++ b/plexapi/base.py @@ -429,7 +429,6 @@ class PlexPartialObject(PlexObject): """ return self._server.history(maxresults=maxresults, mindate=mindate, ratingKey=self.ratingKey) - # The photo tag cant be built atm. TODO # def arts(self): # part = '%s/arts' % self.key @@ -582,7 +581,7 @@ class Playable(object): time, state) self._server.query(key) self.reload() - + def updateTimeline(self, time, state='stopped', duration=None): """ Set the timeline progress for this video.