From 0127a3c6605d292d1e9b9fa53fdf159f98edfde7 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Thu, 29 Aug 2024 16:03:36 +0800 Subject: [PATCH] Show video rotation in mediainfo Signed-off-by: nyanmisaka --- src/components/itemMediaInfo/itemMediaInfo.js | 3 +++ src/strings/en-us.json | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/itemMediaInfo/itemMediaInfo.js b/src/components/itemMediaInfo/itemMediaInfo.js index 620578da8b..f77395abfc 100644 --- a/src/components/itemMediaInfo/itemMediaInfo.js +++ b/src/components/itemMediaInfo/itemMediaInfo.js @@ -194,6 +194,9 @@ function getMediaSourceHtml(user, item, version) { if (stream.RefFrames) { attributes.push(createAttribute(globalize.translate('MediaInfoRefFrames'), stream.RefFrames)); } + if (stream.Rotation && stream.Type === 'Video') { + attributes.push(createAttribute(globalize.translate('MediaInfoRotation'), stream.Rotation)); + } if (stream.NalLengthSize) { attributes.push(createAttribute('NAL', stream.NalLengthSize)); } diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 5d09fc16ce..04516e847c 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1028,6 +1028,7 @@ "MediaInfoProfile": "Profile", "MediaInfoRefFrames": "Ref frames", "MediaInfoResolution": "Resolution", + "MediaInfoRotation": "Rotation", "MediaInfoSampleRate": "Sample rate", "MediaInfoSize": "Size", "MediaInfoTimestamp": "Timestamp",