Skip to content

Commit

Permalink
Added video range column #1328
Browse files Browse the repository at this point in the history
  • Loading branch information
mregni committed Aug 19, 2020
1 parent a40d82a commit ecf507d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 9 deletions.
3 changes: 2 additions & 1 deletion EmbyStat.Common/Extensions/BaseItemDtoExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public static class BaseItemDtoExtension
Width = y.Width,
BitDepth = y.BitDepth,
Codec = y.Codec,
IsDefault = y.IsDefault
IsDefault = y.IsDefault,
VideoRange = y.VideoRange
}).ToList();
}
else
Expand Down
1 change: 1 addition & 0 deletions EmbyStat.Common/Models/Entities/Helpers/VideoStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public class VideoStream
public int? BitDepth { get; set; }
public string Codec { get; set; }
public bool IsDefault { get; set; }
public string VideoRange { get; set; }
}
}
2 changes: 2 additions & 0 deletions EmbyStat.Common/Models/Net/BaseMediaStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ namespace EmbyStat.Common.Models.Net
public class BaseMediaStream
{
public int? BitRate { get; set; }
public int? BitDepth { get; set; }
public string ChannelLayout { get; set; }
public int? Channels { get; set; }
public string Codec { get; set; }
public string Language { get; set; }
public int? SampleRate { get; set; }
public string DisplayTitle { get; set; }
public bool IsDefault { get; set; }
public string VideoRange { get; set; }
public string AspectRatio { get; set; }
public float? AverageFrameRate { get; set; }
public int? Height { get; set; }
Expand Down
1 change: 1 addition & 0 deletions EmbyStat.Controllers/Movie/MovieColumnViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ public class MovieColumnViewModel
public int? Width { get; set; }
public string Codec { get; set; }
public int? BitDepth { get; set; }
public string VideoRange { get; set; }
}
}
7 changes: 6 additions & 1 deletion EmbyStat.Services/Models/DataGrid/MovieColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ public class MovieColumn
public string SortName { get; set; }
public string Path { get; set; }
public DateTimeOffset? PremiereDate { get; set; }
public string[] Resolutions { get; set; }
public double SizeInMb { get; set; }
public double BitRate { get; set; }
public int? Height { get; set; }
public int? Width { get; set; }
public string Codec { get; set; }
public int? BitDepth { get; set; }
public string VideoRange { get; set; }
}
}
3 changes: 2 additions & 1 deletion EmbyStat.Services/MovieService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public Page<MovieColumn> GetMoviePage(int skip, int take, string sort, Filter[]
SizeInMb = x.MediaSources.FirstOrDefault()?.SizeInMb ?? 0,
BitRate = Math.Round((x.VideoStreams.FirstOrDefault()?.BitRate ?? 0d) / 1048576, 2),
Codec = x.VideoStreams.FirstOrDefault()?.Codec,
BitDepth = x.VideoStreams.FirstOrDefault()?.BitDepth
BitDepth = x.VideoStreams.FirstOrDefault()?.BitDepth,
VideoRange = x.VideoStreams.FirstOrDefault()?.VideoRange
});

var page = new Page<MovieColumn> { Data = list };
Expand Down
16 changes: 10 additions & 6 deletions EmbyStat.Web/ClientApp/src/pages/movies/MoviesList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,19 +214,18 @@ const MovieList = (props: Props) => {
defaultSortIndex={0}
defaultSortOrder="asc"
/>
<Column
caption={t('COMMON.GENRES')}
calculateCellValue={getGenresValues}
allowSorting={false}
/>
<Column dataField="container" caption="Container" />
<Column
dataField="runTimeTicks"
caption={t('COMMON.RUNTIME')}
width="120"
dataType="number"
calculateCellValue={calculateRunTimeValue}
/>
<Column
caption={t('COMMON.GENRES')}
calculateCellValue={getGenresValues}
allowSorting={false}
/>
<Column
caption={t('COMMON.OFFICIALRATING')}
dataField="officialRating"
Expand Down Expand Up @@ -261,6 +260,11 @@ const MovieList = (props: Props) => {
dataField="codec"
allowSorting={false}
/>
<Column
caption={t('COMMON.VIDEORANGE')}
dataField="videoRange"
allowSorting={false}
/>
<Column caption={t('COMMON.RATING')} dataField="communityRating" />
<Column
caption={t('COMMON.SUBTITLES')}
Expand Down

0 comments on commit ecf507d

Please sign in to comment.