bazarr/libs/plex/objects/library/extra/genre.py

18 lines
384 B
Python
Raw Normal View History

2018-10-31 16:08:29 +00:00
from plex.objects.core.base import Descriptor, Property
class Genre(Descriptor):
id = Property(type=int)
tag = Property
@classmethod
def from_node(cls, client, node):
items = []
for genre in cls.helpers.findall(node, 'Genre'):
_, obj = Genre.construct(client, genre, child=True)
items.append(obj)
return [], items