mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 06:17:14 -04:00
fixes #238 - MBServer Client Theme Background
This commit is contained in:
parent
0adf788c40
commit
e6b57e264c
@ -44,8 +44,10 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
|
|||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
// Get the first audio stream
|
// Get the first audio stream
|
||||||
var stream = data.streams.First(s => s.codec_type.Equals("audio", StringComparison.OrdinalIgnoreCase));
|
var stream = data.streams.FirstOrDefault(s => s.codec_type.Equals("audio", StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
|
if (stream != null)
|
||||||
|
{
|
||||||
// Get duration from stream properties
|
// Get duration from stream properties
|
||||||
var duration = stream.duration;
|
var duration = stream.duration;
|
||||||
|
|
||||||
@ -60,6 +62,7 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
|
|||||||
{
|
{
|
||||||
audio.RunTimeTicks = TimeSpan.FromSeconds(double.Parse(duration, UsCulture)).Ticks;
|
audio.RunTimeTicks = TimeSpan.FromSeconds(double.Parse(duration, UsCulture)).Ticks;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (data.format.tags != null)
|
if (data.format.tags != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user