mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-02 13:04:50 +00:00
37 lines
894 B
Python
37 lines
894 B
Python
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'
|
|
}
|
|
}))
|
|
}))
|