1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-02-27 08:13:14 +00:00
bazarr/libs/plex/objects/library/section.py

38 lines
894 B
Python
Raw Normal View History

2018-10-31 16:08:29 +00:00
from plex.core.idict import idict
from plex.objects.core.base import Property
from plex.objects.directory import Directory
class Section(Directory):
uuid = Property
filters = Property(type=bool)
refreshing = Property(type=bool)
agent = Property
scanner = Property
language = Property
composite = Property
type = Property
created_at = Property('createdAt', int)
def __transform__(self):
self.path = '/library/sections/%s' % self.key
def all(self):
response = self.http.get('all')
return self.parse(response, idict({
'MediaContainer': ('MediaContainer', idict({
'Directory': {
'artist': 'Artist',
'show': 'Show'
},
'Video': {
'movie': 'Movie'
}
}))
}))