Skip to content

Commit

Permalink
Implemented Photo object
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzeman committed Feb 24, 2016
1 parent c73ec3f commit c00fb13
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions plex/interfaces/library/__init__.py
Expand Up @@ -17,6 +17,9 @@ def metadata(self, rating_key):
'season': 'Season',
'show': 'Show'
},
'Photo': {
'photo': 'Photo'
},
'Video': {
'episode': 'Episode',
'clip': 'Clip',
Expand Down
9 changes: 6 additions & 3 deletions plex/interfaces/status.py
Expand Up @@ -10,12 +10,15 @@ def sessions(self):

return self.parse(response, idict({
'MediaContainer': ('SessionContainer', idict({
'Track': 'Track',

'Photo': {
'photo': 'Photo'
},
'Video': {
'episode': 'Episode',
'clip': 'Clip',
'movie': 'Movie'
}
},

'Track': 'Track'
}))
}))
10 changes: 10 additions & 0 deletions plex/objects/library/metadata/photo.py
@@ -0,0 +1,10 @@
from plex.objects.core.base import Property
from plex.objects.directory import Directory
from plex.objects.library.metadata.base import Metadata


class Photo(Directory, Metadata):
index = Property(type=int)

def __repr__(self):
return '<Photo %r>' % self.title
5 changes: 4 additions & 1 deletion plex/objects/library/section.py
Expand Up @@ -26,9 +26,12 @@ def all(self):
return self.parse(response, idict({
'MediaContainer': ('MediaContainer', idict({
'Directory': {
'artist': 'Artist',
'artist': 'Artist',
'show': 'Show'
},
'Photo': {
'photo': 'Photo'
},
'Video': {
'movie': 'Movie'
}
Expand Down

0 comments on commit c00fb13

Please sign in to comment.