From fe9894244024f119a03df15abc2e0a43ae91ffb6 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 23 Jun 2021 20:32:50 +0700 Subject: [PATCH] adding resolution to export list --- src/db_export.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/db_export.py b/src/db_export.py index 3e2cc36..57a21c7 100644 --- a/src/db_export.py +++ b/src/db_export.py @@ -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