adding resolution to export list

This commit is contained in:
simon 2021-06-23 20:32:50 +07:00
parent 84a73c52d3
commit fe98942440
1 changed files with 6 additions and 1 deletions

View File

@ -113,12 +113,17 @@ class ListParser():
played = file_item['UserData']['Played']
file_name = path.basename(file_item['Path'])
file_item_name = path.splitext(file_name)[0]
for stream in file_item['MediaStreams']:
if stream['Type'] == 'Video':
width = stream['Width']
height = stream['Height']
break
# seen or unseen
if played:
icon = '[X]'
else:
icon = '[ ]'
seen_line = f'{icon} {file_item_name}'
seen_line = f'{icon} {file_item_name} [{width}x{height}]'
file_item_seen.append(seen_line)
return file_item_seen