From 26bf4ca0108c66c6dea69b508b42a785bd185b8f Mon Sep 17 00:00:00 2001 From: Hellowlol Date: Thu, 26 Oct 2017 00:01:42 +0200 Subject: [PATCH] zomg... --- plexapi/photo.py | 1 - plexapi/playlist.py | 10 +++++----- plexapi/utils.py | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plexapi/photo.py b/plexapi/photo.py index c2f04a79..50db79f5 100644 --- a/plexapi/photo.py +++ b/plexapi/photo.py @@ -58,7 +58,6 @@ class Photoalbum(PlexPartialObject): return album raise NotFound('Unable to find album: %s' % title) - def photos(self, **kwargs): """ Returns a list of :class:`~plexapi.photo.Photo` objects in this album. """ key = '/library/metadata/%s/children' % self.ratingKey diff --git a/plexapi/playlist.py b/plexapi/playlist.py index 5877e073..06e18ffa 100644 --- a/plexapi/playlist.py +++ b/plexapi/playlist.py @@ -34,13 +34,13 @@ class Playlist(PlexPartialObject, Playable): self.updatedAt = toDatetime(data.attrib.get('updatedAt')) self._items = None # cache for self.items - def __len__(self): + def __len__(self): # pragma: no cover return len(self.items()) - def __contains__(self, other): + def __contains__(self, other): # pragma: no cover return any(i.key == other.key for i in self.items()) - def __getitem__(self, key): + def __getitem__(self, key): # pragma: no cover return self.items()[key] def items(self): @@ -57,7 +57,7 @@ class Playlist(PlexPartialObject, Playable): items = [items] ratingKeys = [] for item in items: - if item.listType != self.playlistType: + if item.listType != self.playlistType: # pragma: no cover raise BadRequest('Can not mix media types when building a playlist: %s and %s' % (self.playlistType, item.listType)) ratingKeys.append(str(item.ratingKey)) @@ -108,7 +108,7 @@ class Playlist(PlexPartialObject, Playable): items = [items] ratingKeys = [] for item in items: - if item.listType != items[0].listType: + if item.listType != items[0].listType: # pragma: no cover raise BadRequest('Can not mix media types when building a playlist') ratingKeys.append(str(item.ratingKey)) ratingKeys = ','.join(ratingKeys) diff --git a/plexapi/utils.py b/plexapi/utils.py index 0fa96450..5f4ac5e2 100644 --- a/plexapi/utils.py +++ b/plexapi/utils.py @@ -314,7 +314,7 @@ def tag_helper(tag, items, locked=True, remove=False): return data -def getMyPlexAccount(opts=None): # pragma: no cover +def getMyPlexAccount(opts=None): # pragma: no cover """ Helper function tries to get a MyPlex Account instance by checking the the following locations for a username and password. This is useful to create user-friendly command line tools.