diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-02 17:55:19 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-04-02 17:55:19 -0400 |
| commit | 0200911afc125051b4f5e652ef1bebeca984b571 (patch) | |
| tree | d6f00cd6b521dd2232bf0ac1f9d110773e3abe7e /MediaBrowser.Server.Implementations/Dto | |
| parent | dcf2e70f039a79dd93ac4f6f3cd5b2c8c9a4dcc8 (diff) | |
add latest translations
Diffstat (limited to 'MediaBrowser.Server.Implementations/Dto')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Dto/DtoService.cs | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 02da776bd5..ce616ef03a 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -268,9 +268,7 @@ namespace MediaBrowser.Server.Implementations.Dto PlayableMediaTypes = session.PlayableMediaTypes, RemoteEndPoint = session.RemoteEndPoint, AdditionalUsers = session.AdditionalUsers, - SupportsFullscreenToggle = session.SupportsFullscreenToggle, - SupportsNavigationControl = session.SupportsNavigationControl, - SupportsOsdToggle = session.SupportsOsdToggle + SupportedCommands = session.SupportedCommands }; if (session.NowPlayingItem != null) @@ -1347,7 +1345,7 @@ namespace MediaBrowser.Server.Implementations.Dto { var mediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery { ItemId = i.Id }).ToList(); - return new MediaSourceInfo + var info = new MediaSourceInfo { Id = i.Id.ToString("N"), IsoType = i.IsoType, @@ -1359,11 +1357,22 @@ namespace MediaBrowser.Server.Implementations.Dto Video3DFormat = i.Video3DFormat, VideoType = i.VideoType }; + + if (i.VideoType == VideoType.VideoFile || i.VideoType == VideoType.Iso) + { + var locationType = i.LocationType; + if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + { + info.Container = Path.GetExtension(i.Path).TrimStart('.'); + } + } + + return info; } private MediaSourceInfo GetVersionInfo(Audio i) { - return new MediaSourceInfo + var info = new MediaSourceInfo { Id = i.Id.ToString("N"), LocationType = i.LocationType, @@ -1372,6 +1381,14 @@ namespace MediaBrowser.Server.Implementations.Dto Path = GetMappedPath(i), RunTimeTicks = i.RunTimeTicks }; + + var locationType = i.LocationType; + if (!string.IsNullOrWhiteSpace(i.Path) && locationType != LocationType.Remote && locationType != LocationType.Virtual) + { + info.Container = Path.GetExtension(i.Path).TrimStart('.'); + } + + return info; } private string GetMappedPath(IHasMetadata item) |
