mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Simplify metadata credits marker first flag
This commit is contained in:
parent
7cc78d448d
commit
9c6b8f1af5
1 changed files with 5 additions and 7 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue