blob: 3912093c76ac90043f5409354d50aa4266823f1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Windows;
namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
{
/// <summary>
/// Interaction logic for ItemMediaInfo.xaml
/// </summary>
public partial class ItemMediaInfo : BaseDetailsControl
{
/// <summary>
/// Initializes a new instance of the <see cref="ItemMediaInfo" /> class.
/// </summary>
public ItemMediaInfo()
{
InitializeComponent();
}
/// <summary>
/// Called when [item changed].
/// </summary>
protected override void OnItemChanged()
{
MediaStreams.Children.Clear();
TxtPath.Text = Item.Path;
if (Item.VideoFormat.HasValue && Item.VideoFormat.Value != VideoFormat.Standard)
{
TxtVideoFormat.Visibility = Visibility.Visible;
TxtVideoFormat.Text = Item.VideoFormat.Value == VideoFormat.Digital3D ? "Digital 3D" : "SBS 3D";
}
else
{
TxtVideoFormat.Visibility = Visibility.Collapsed;
}
foreach (var stream in Item.MediaStreams ?? new List<MediaStream> {})
{
MediaStreams.Children.Add(new MediaStreamControl
{
MediaStream = stream
});
}
}
}
}
|