aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/ApiEntryPoint.cs8
-rw-r--r--MediaBrowser.Api/LiveTv/LiveTvService.cs20
-rw-r--r--MediaBrowser.Api/Movies/MoviesService.cs1
-rw-r--r--MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs5
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs3
5 files changed, 30 insertions, 7 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs
index 66ca8c25d..a677bc600 100644
--- a/MediaBrowser.Api/ApiEntryPoint.cs
+++ b/MediaBrowser.Api/ApiEntryPoint.cs
@@ -488,13 +488,17 @@ namespace MediaBrowser.Api
{
try
{
- Logger.Info("Killing ffmpeg process for {0}", job.Path);
+ Logger.Info("Stopping ffmpeg process with q command for {0}", job.Path);
//process.Kill();
process.StandardInput.WriteLine("q");
// Need to wait because killing is asynchronous
- process.WaitForExit(5000);
+ if (!process.WaitForExit(5000))
+ {
+ Logger.Info("Killing ffmpeg process for {0}", job.Path);
+ process.Kill();
+ }
}
catch (Exception ex)
{
diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs
index ebcf8fbea..d3a4558c8 100644
--- a/MediaBrowser.Api/LiveTv/LiveTvService.cs
+++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs
@@ -254,6 +254,8 @@ namespace MediaBrowser.Api.LiveTv
[ApiMember(Name = "EnableImages", Description = "Optional, include image information in output", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")]
public bool? EnableImages { get; set; }
+ public bool EnableTotalRecordCount { get; set; }
+
[ApiMember(Name = "ImageTypeLimit", Description = "Optional, the max number of images to return, per image type", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
public int? ImageTypeLimit { get; set; }
@@ -266,12 +268,24 @@ namespace MediaBrowser.Api.LiveTv
/// <value>The fields.</value>
[ApiMember(Name = "Fields", Description = "Optional. Specify additional fields of information to return in the output. This allows multiple, comma delimeted. Options: Budget, Chapters, CriticRatingSummary, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
public string Fields { get; set; }
+
+ public GetPrograms()
+ {
+ EnableTotalRecordCount = true;
+ }
}
[Route("/LiveTv/Programs/Recommended", "GET", Summary = "Gets available live tv epgs..")]
[Authenticated]
public class GetRecommendedPrograms : IReturn<QueryResult<BaseItemDto>>, IHasDtoOptions
{
+ public bool EnableTotalRecordCount { get; set; }
+
+ public GetRecommendedPrograms()
+ {
+ EnableTotalRecordCount = true;
+ }
+
[ApiMember(Name = "UserId", Description = "Optional filter by user id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET,POST")]
public string UserId { get; set; }
@@ -662,7 +676,8 @@ namespace MediaBrowser.Api.LiveTv
{
ChannelIds = (request.ChannelIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(),
UserId = request.UserId,
- HasAired = request.HasAired
+ HasAired = request.HasAired,
+ EnableTotalRecordCount = request.EnableTotalRecordCount
};
if (!string.IsNullOrEmpty(request.MinStartDate))
@@ -709,7 +724,8 @@ namespace MediaBrowser.Api.LiveTv
HasAired = request.HasAired,
IsMovie = request.IsMovie,
IsKids = request.IsKids,
- IsSports = request.IsSports
+ IsSports = request.IsSports,
+ EnableTotalRecordCount = request.EnableTotalRecordCount
};
var result = await _liveTvManager.GetRecommendedPrograms(query, GetDtoOptions(request), CancellationToken.None).ConfigureAwait(false);
diff --git a/MediaBrowser.Api/Movies/MoviesService.cs b/MediaBrowser.Api/Movies/MoviesService.cs
index 9590971d0..786615cc3 100644
--- a/MediaBrowser.Api/Movies/MoviesService.cs
+++ b/MediaBrowser.Api/Movies/MoviesService.cs
@@ -196,7 +196,6 @@ namespace MediaBrowser.Api.Movies
var parentIds = new string[] { };
var list = _libraryManager.GetItemList(query, parentIds)
- .DistinctBy(i => i.PresentationUniqueKey, StringComparer.OrdinalIgnoreCase)
.DistinctBy(i => i.GetProviderId(MetadataProviders.Imdb) ?? Guid.NewGuid().ToString("N"))
.ToList();
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
index 6867f6308..aee1a8d54 100644
--- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
+++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs
@@ -12,6 +12,7 @@ namespace MediaBrowser.Api.UserLibrary
protected BaseItemsRequest()
{
EnableImages = true;
+ EnableTotalRecordCount = true;
}
/// <summary>
@@ -104,7 +105,9 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "IsInBoxSet", Description = "Optional filter by items that are in boxsets, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
public bool? IsInBoxSet { get; set; }
-
+
+ public bool EnableTotalRecordCount { get; set; }
+
/// <summary>
/// Skips over a given number of items within the results. Use for paging.
/// </summary>
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 7d2029cab..ff937078e 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -230,7 +230,8 @@ namespace MediaBrowser.Api.UserLibrary
ParentId = string.IsNullOrWhiteSpace(request.ParentId) ? (Guid?)null : new Guid(request.ParentId),
ParentIndexNumber = request.ParentIndexNumber,
AiredDuringSeason = request.AiredDuringSeason,
- AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater
+ AlbumArtistStartsWithOrGreater = request.AlbumArtistStartsWithOrGreater,
+ EnableTotalRecordCount = request.EnableTotalRecordCount
};
if (!string.IsNullOrWhiteSpace(request.Ids))