mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 21:08:27 +00:00
remove field attribute
Addressing #504 remove field attribute as it is no longer available. adding `__repr__` to Marker class resulting in `<Marker:intro:139770:230481>`
This commit is contained in:
parent
f2f6d8b9e7
commit
1f396ca95a
1 changed files with 6 additions and 4 deletions
|
@ -704,13 +704,15 @@ class Marker(PlexObject):
|
|||
"""
|
||||
TAG = 'Marker'
|
||||
|
||||
def __repr__(self):
|
||||
name = self._clean(self.firstAttr('type'))
|
||||
start = self._clean(self.firstAttr('start'))
|
||||
end = self._clean(self.firstAttr('end'))
|
||||
return '<%s>' % ':'.join([p for p in [self.__class__.__name__, name, start, end] if p])
|
||||
|
||||
def _loadData(self, data):
|
||||
self._data = data
|
||||
self.filter = data.attrib.get('filter')
|
||||
self.type = data.attrib.get('type')
|
||||
_tag, _id = self.filter.split('=')
|
||||
self.tag = self.type + _tag.capitalize()
|
||||
self.id = _id
|
||||
self.start = cast(int, data.attrib.get('startTimeOffset'))
|
||||
self.end = cast(int, data.attrib.get('endTimeOffset'))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue