mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Add locations for plexapi.photo.Photo and plexapi.video.Clip
This commit is contained in:
parent
8a953e789c
commit
a649d2ec12
3 changed files with 17 additions and 3 deletions
|
@ -383,7 +383,7 @@ class Track(Audio, Playable):
|
||||||
@property
|
@property
|
||||||
def locations(self):
|
def locations(self):
|
||||||
""" This does not exist in plex xml response but is added to have a common
|
""" This does not exist in plex xml response but is added to have a common
|
||||||
interface to get the location of the Artist
|
interface to get the location of the Track
|
||||||
"""
|
"""
|
||||||
return [part.file for part in self.iterParts() if part]
|
return [part.file for part in self.iterParts() if part]
|
||||||
|
|
||||||
|
|
|
@ -159,6 +159,13 @@ class Photo(PlexPartialObject):
|
||||||
else:
|
else:
|
||||||
raise BadRequest('Unable to get section for photo, can`t find librarySectionID')
|
raise BadRequest('Unable to get section for photo, can`t find librarySectionID')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def locations(self):
|
||||||
|
""" This does not exist in plex xml response but is added to have a common
|
||||||
|
interface to get the location of the Photo
|
||||||
|
"""
|
||||||
|
return [part.file for item in self.media for part in item.parts if part]
|
||||||
|
|
||||||
def sync(self, resolution, client=None, clientId=None, limit=None, title=None):
|
def sync(self, resolution, client=None, clientId=None, limit=None, title=None):
|
||||||
""" Add current photo as sync item for specified device.
|
""" Add current photo as sync item for specified device.
|
||||||
See :func:`plexapi.myplex.MyPlexAccount.sync()` for possible exceptions.
|
See :func:`plexapi.myplex.MyPlexAccount.sync()` for possible exceptions.
|
||||||
|
|
|
@ -328,7 +328,7 @@ class Movie(Playable, Video):
|
||||||
@property
|
@property
|
||||||
def locations(self):
|
def locations(self):
|
||||||
""" This does not exist in plex xml response but is added to have a common
|
""" This does not exist in plex xml response but is added to have a common
|
||||||
interface to get the location of the Movie/Show/Episode
|
interface to get the location of the Movie
|
||||||
"""
|
"""
|
||||||
return [part.file for part in self.iterParts() if part]
|
return [part.file for part in self.iterParts() if part]
|
||||||
|
|
||||||
|
@ -714,7 +714,7 @@ class Episode(Playable, Video):
|
||||||
@property
|
@property
|
||||||
def locations(self):
|
def locations(self):
|
||||||
""" This does not exist in plex xml response but is added to have a common
|
""" This does not exist in plex xml response but is added to have a common
|
||||||
interface to get the location of the Movie/Show
|
interface to get the location of the Episode
|
||||||
"""
|
"""
|
||||||
return [part.file for part in self.iterParts() if part]
|
return [part.file for part in self.iterParts() if part]
|
||||||
|
|
||||||
|
@ -770,3 +770,10 @@ class Clip(Playable, Video):
|
||||||
self.type = data.attrib.get('type')
|
self.type = data.attrib.get('type')
|
||||||
self.year = utils.cast(int, data.attrib.get('year'))
|
self.year = utils.cast(int, data.attrib.get('year'))
|
||||||
self.media = self.findItems(data, media.Media)
|
self.media = self.findItems(data, media.Media)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def locations(self):
|
||||||
|
""" This does not exist in plex xml response but is added to have a common
|
||||||
|
interface to get the location of the Clip
|
||||||
|
"""
|
||||||
|
return [part.file for part in self.iterParts() if part]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue