Update locations doc strings for consistency

This commit is contained in:
JonnyWong16 2020-12-23 20:40:08 -08:00
parent 7f1e2cafab
commit d433c0b3d4
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 18 additions and 3 deletions

View file

@ -132,7 +132,7 @@ class Artist(Audio):
countries (List<:class:`~plexapi.media.Country`>): List country objects.
genres (List<:class:`~plexapi.media.Genre`>): List of genre objects.
key (str): API URL (/library/metadata/<ratingkey>).
locations (list): List of folder paths where the artist is found on disk.
locations (List<str>): List of folder paths where the artist is found on disk.
similar (List<:class:`~plexapi.media.Similar`>): List of similar objects.
styles (List<:class:`~plexapi.media.Style`>): List of style objects.
"""
@ -377,6 +377,9 @@ class Track(Audio, Playable):
def locations(self):
""" This does not exist in plex xml response but is added to have a common
interface to get the locations of the track.
Retruns:
List<str> of file paths where the track is found on disk.
"""
return [part.file for part in self.iterParts() if part]

View file

@ -135,7 +135,7 @@ class Photo(PlexPartialObject, Playable):
addedAt (datetime): Datetime the photo was added to the library.
createdAtAccuracy (str): Unknown (local).
createdAtTZOffset (int): Unknown (-25200).
fields (list): List of :class:`~plexapi.media.Field`.
fields (List<:class:`~plexapi.media.Field`>): List of field objects.
guid (str): Plex GUID for the photo (com.plexapp.agents.none://231714?lang=xn).
index (sting): Plex index number for the photo.
key (str): API URL (/library/metadata/<ratingkey>).
@ -220,6 +220,9 @@ class Photo(PlexPartialObject, Playable):
def locations(self):
""" This does not exist in plex xml response but is added to have a common
interface to get the locations of the photo.
Retruns:
List<str> of file paths where the photo is found on disk.
"""
return [part.file for item in self.media for part in item.parts if part]

View file

@ -336,6 +336,9 @@ class Movie(Playable, Video):
def locations(self):
""" This does not exist in plex xml response but is added to have a common
interface to get the locations of the movie.
Retruns:
List<str> of file paths where the movie is found on disk.
"""
return [part.file for part in self.iterParts() if part]
@ -387,7 +390,7 @@ class Show(Video):
key (str): API URL (/library/metadata/<ratingkey>).
labels (List<:class:`~plexapi.media.Label`>): List of label objects.
leafCount (int): Number of items in the show view.
locations (list<str>): List of folder paths where the show is found on disk.
locations (List<str>): List of folder paths where the show is found on disk.
originallyAvailableAt (datetime): Datetime the show was released.
rating (float): Show rating (7.9; 9.8; 8.1).
roles (List<:class:`~plexapi.media.Role`>): List of role objects.
@ -754,6 +757,9 @@ class Episode(Playable, Video):
def locations(self):
""" This does not exist in plex xml response but is added to have a common
interface to get the locations of the episode.
Retruns:
List<str> of file paths where the episode is found on disk.
"""
return [part.file for part in self.iterParts() if part]
@ -832,5 +838,8 @@ class Clip(Playable, Video):
def locations(self):
""" This does not exist in plex xml response but is added to have a common
interface to get the locations of the clip.
Retruns:
List<str> of file paths where the clip is found on disk.
"""
return [part.file for part in self.iterParts() if part]