fixes #887 - Support ttml subtitle output

This commit is contained in:
Luke Pulverenti
2014-08-05 19:59:24 -04:00
parent 7e25c857a5
commit 3ba6364f25
35 changed files with 333 additions and 96 deletions

View File

@@ -34,6 +34,11 @@ namespace MediaBrowser.Controller.Entities.Audio
Tags = new List<string>();
}
public override bool SupportsAddingToPlaylist
{
get { return LocationType == LocationType.FileSystem && RunTimeTicks.HasValue; }
}
/// <summary>
/// Gets or sets a value indicating whether this instance has embedded image.
/// </summary>

View File

@@ -21,6 +21,11 @@ namespace MediaBrowser.Controller.Entities.Audio
SoundtrackIds = new List<Guid>();
}
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
[IgnoreDataMember]
public MusicArtist MusicArtist
{

View File

@@ -26,6 +26,11 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
protected override IEnumerable<BaseItem> ActualChildren
{
get

View File

@@ -18,6 +18,11 @@ namespace MediaBrowser.Controller.Entities.Audio
return "MusicGenre-" + Name;
}
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
/// <summary>
/// Returns the folder containing the item.
/// If the item is a folder, it returns the folder itself

View File

@@ -52,6 +52,14 @@ namespace MediaBrowser.Controller.Entities
public List<ItemImageInfo> ImageInfos { get; set; }
public virtual bool SupportsAddingToPlaylist
{
get
{
return false;
}
}
/// <summary>
/// Gets a value indicating whether this instance is in mixed folder.
/// </summary>

View File

@@ -29,6 +29,11 @@ namespace MediaBrowser.Controller.Entities.TV
}
}
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
[IgnoreDataMember]
public override bool IsPreSorted
{

View File

@@ -39,6 +39,11 @@ namespace MediaBrowser.Controller.Entities.TV
DisplaySpecialsWithSeasons = true;
}
public override bool SupportsAddingToPlaylist
{
get { return true; }
}
[IgnoreDataMember]
public override bool IsPreSorted
{

View File

@@ -55,6 +55,11 @@ namespace MediaBrowser.Controller.Entities
LinkedAlternateVersions = new List<LinkedChild>();
}
public override bool SupportsAddingToPlaylist
{
get { return LocationType == LocationType.FileSystem && RunTimeTicks.HasValue; }
}
[IgnoreDataMember]
public int MediaSourceCount
{

View File

@@ -46,5 +46,11 @@ namespace MediaBrowser.Controller
/// </summary>
/// <value>The server identifier.</value>
string ServerId { get; }
/// <summary>
/// Gets the name of the friendly.
/// </summary>
/// <value>The name of the friendly.</value>
string FriendlyName { get; }
}
}

View File

@@ -126,7 +126,7 @@ namespace MediaBrowser.Controller.Library
{
var filename = Path.GetFileName(path);
if (string.Equals(path, "specials", StringComparison.OrdinalIgnoreCase))
if (string.Equals(filename, "specials", StringComparison.OrdinalIgnoreCase))
{
return 0;
}

View File

@@ -13,6 +13,7 @@ namespace MediaBrowser.Controller.MediaEncoding
/// <param name="inputFormat">The input format.</param>
/// <param name="outputFormat">The output format.</param>
/// <param name="startTimeTicks">The start time ticks.</param>
/// <param name="endTimeTicks">The end time ticks.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<Stream> ConvertSubtitles(
@@ -20,6 +21,7 @@ namespace MediaBrowser.Controller.MediaEncoding
string inputFormat,
string outputFormat,
long startTimeTicks,
long? endTimeTicks,
CancellationToken cancellationToken);
/// <summary>
@@ -30,6 +32,7 @@ namespace MediaBrowser.Controller.MediaEncoding
/// <param name="subtitleStreamIndex">Index of the subtitle stream.</param>
/// <param name="outputFormat">The output format.</param>
/// <param name="startTimeTicks">The start time ticks.</param>
/// <param name="endTimeTicks">The end time ticks.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{Stream}.</returns>
Task<Stream> GetSubtitles(string itemId,
@@ -37,6 +40,7 @@ namespace MediaBrowser.Controller.MediaEncoding
int subtitleStreamIndex,
string outputFormat,
long startTimeTicks,
long? endTimeTicks,
CancellationToken cancellationToken);
/// <summary>