diff --git a/plexpy/pmsconnect.py b/plexpy/pmsconnect.py index cc433027..347de513 100644 --- a/plexpy/pmsconnect.py +++ b/plexpy/pmsconnect.py @@ -780,17 +780,15 @@ class PmsConnect(object): for marker in metadata_main.getElementsByTagName('Marker'): marker_type = helpers.get_xml_attr(marker, 'type') if marker_type == 'credits': - if first is None: - first = True - elif first is True: - first = False + first = bool(first is None) + final = helpers.bool_true(helpers.get_xml_attr(marker, 'final')) markers.append({ 'id': helpers.cast_to_int(helpers.get_xml_attr(marker, 'id')), - 'type': helpers.get_xml_attr(marker, 'type'), + 'type': marker_type, 'start_time_offset': helpers.cast_to_int(helpers.get_xml_attr(marker, 'startTimeOffset')), 'end_time_offset': helpers.cast_to_int(helpers.get_xml_attr(marker, 'endTimeOffset')), - 'first': first if marker_type == 'credits' else False, - 'final': helpers.bool_true(helpers.get_xml_attr(marker, 'final')) + 'first': first if marker_type == 'credits' else None, + 'final': final if marker_type == 'credits' else None }) if metadata_type == 'movie':