diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 86f06213c..5d88a41aa 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -839,7 +839,7 @@ namespace MediaBrowser.Api.Playback
}
// leave blank so ffmpeg will decide
- return string.Empty;
+ return null;
}
///
@@ -849,7 +849,7 @@ namespace MediaBrowser.Api.Playback
/// System.String.
protected string GetInputArgument(StreamState state)
{
- var arg = string.Format("{1}-i {0}", GetInputPathArgument(state), GetVideoDecoder(state));
+ var arg = string.Format("-i {0}", GetInputPathArgument(state));
if (state.SubtitleStream != null)
{
@@ -1060,6 +1060,7 @@ namespace MediaBrowser.Api.Playback
var bytes = Encoding.UTF8.GetBytes(Environment.NewLine + line);
await target.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
+ await target.FlushAsync().ConfigureAwait(false);
}
}
}
@@ -2191,6 +2192,12 @@ namespace MediaBrowser.Api.Playback
inputModifier += " -re";
}
+ var videoDecoder = GetVideoDecoder(state);
+ if (!string.IsNullOrWhiteSpace(videoDecoder))
+ {
+ inputModifier += " " + videoDecoder;
+ }
+
return inputModifier;
}
diff --git a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
index ca5e343f8..3a9c1f9d0 100644
--- a/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
+++ b/MediaBrowser.Controller/Channels/ChannelVideoItem.cs
@@ -115,7 +115,11 @@ namespace MediaBrowser.Controller.Channels
var info = GetItemLookupInfo();
info.ContentType = ContentType;
- info.ExtraType = ExtraType;
+
+ if (ExtraType.HasValue)
+ {
+ info.ExtraType = ExtraType.Value;
+ }
return info;
}
diff --git a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
index 50df07e72..60a29da90 100644
--- a/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
+++ b/MediaBrowser.Controller/Channels/IChannelMediaItem.cs
@@ -11,7 +11,7 @@ namespace MediaBrowser.Controller.Channels
ChannelMediaContentType ContentType { get; set; }
- ExtraType ExtraType { get; set; }
+ ExtraType? ExtraType { get; set; }
List ChannelMediaSources { get; set; }
}
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 623329ca6..43b980c20 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -24,14 +24,20 @@ namespace MediaBrowser.Controller.Entities.Audio
IThemeMedia,
IArchivable
{
- public string FormatName { get; set; }
public long? Size { get; set; }
public string Container { get; set; }
public int? TotalBitrate { get; set; }
public List Tags { get; set; }
- public ExtraType ExtraType { get; set; }
+ public ExtraType? ExtraType { get; set; }
- public bool IsThemeMedia { get; set; }
+ [IgnoreDataMember]
+ public bool IsThemeMedia
+ {
+ get
+ {
+ return ExtraType.HasValue && ExtraType.Value == Model.Entities.ExtraType.ThemeSong;
+ }
+ }
public Audio()
{
@@ -46,12 +52,6 @@ namespace MediaBrowser.Controller.Entities.Audio
get { return LocationType == LocationType.FileSystem && RunTimeTicks.HasValue; }
}
- ///
- /// Gets or sets a value indicating whether this instance has embedded image.
- ///
- /// true if this instance has embedded image; otherwise, false.
- public bool HasEmbeddedImage { get; set; }
-
[IgnoreDataMember]
protected override bool SupportsOwnedItems
{
@@ -212,8 +212,7 @@ namespace MediaBrowser.Controller.Entities.Audio
Path = enablePathSubstituion ? GetMappedPath(i.Path, locationType) : i.Path,
RunTimeTicks = i.RunTimeTicks,
Container = i.Container,
- Size = i.Size,
- Formats = (i.FormatName ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList()
+ Size = i.Size
};
if (string.IsNullOrEmpty(info.Container))
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
index 807beee52..98d1eb4ce 100644
--- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
+++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
@@ -66,6 +66,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// Gets the tracks.
///
/// The tracks.
+ [IgnoreDataMember]
public IEnumerable