aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MediaBrowser.Api/Dlna/DlnaService.cs6
-rw-r--r--MediaBrowser.Api/EnvironmentService.cs35
-rw-r--r--MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs21
-rw-r--r--MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj3
4 files changed, 58 insertions, 7 deletions
diff --git a/MediaBrowser.Api/Dlna/DlnaService.cs b/MediaBrowser.Api/Dlna/DlnaService.cs
index b6c4f5dfb..dd4b59b92 100644
--- a/MediaBrowser.Api/Dlna/DlnaService.cs
+++ b/MediaBrowser.Api/Dlna/DlnaService.cs
@@ -31,11 +31,9 @@ namespace MediaBrowser.Api.Dlna
public string Id { get; set; }
}
- [Route("/Dlna/Profiles/{ProfileId}", "POST", Summary = "Updates a profile")]
+ [Route("/Dlna/Profiles/{Id}", "POST", Summary = "Updates a profile")]
public class UpdateProfile : DeviceProfile, IReturnVoid
{
- [ApiMember(Name = "ProfileId", Description = "Profile Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
- public string ProfileId { get; set; }
}
[Route("/Dlna/Profiles", "POST", Summary = "Creates a profile")]
@@ -89,4 +87,4 @@ namespace MediaBrowser.Api.Dlna
_dlnaManager.CreateProfile(request);
}
}
-}
+} \ No newline at end of file
diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs
index 4e88e946f..b354cb26c 100644
--- a/MediaBrowser.Api/EnvironmentService.cs
+++ b/MediaBrowser.Api/EnvironmentService.cs
@@ -90,6 +90,17 @@ namespace MediaBrowser.Api
public string Path { get; set; }
}
+ public class DefaultDirectoryBrowserInfo
+ {
+ public string Path { get; set; }
+ }
+
+ [Route("/Environment/DefaultDirectoryBrowser", "GET", Summary = "Gets the parent path of a given path")]
+ public class GetDefaultDirectoryBrowser : IReturn<DefaultDirectoryBrowserInfo>
+ {
+
+ }
+
/// <summary>
/// Class EnvironmentService
/// </summary>
@@ -108,7 +119,6 @@ namespace MediaBrowser.Api
/// Initializes a new instance of the <see cref="EnvironmentService" /> class.
/// </summary>
/// <param name="networkManager">The network manager.</param>
- /// <exception cref="System.ArgumentNullException">networkManager</exception>
public EnvironmentService(INetworkManager networkManager, IFileSystem fileSystem)
{
if (networkManager == null)
@@ -120,6 +130,29 @@ namespace MediaBrowser.Api
_fileSystem = fileSystem;
}
+ public object Get(GetDefaultDirectoryBrowser request)
+ {
+ var result = new DefaultDirectoryBrowserInfo();
+
+ if (Environment.OSVersion.Platform == PlatformID.Unix)
+ {
+ try
+ {
+ var qnap = "/share/CACHEDEV1_DATA";
+ if (Directory.Exists(qnap))
+ {
+ result.Path = qnap;
+ }
+ }
+ catch
+ {
+
+ }
+ }
+
+ return ToOptimizedResult(result);
+ }
+
/// <summary>
/// Gets the specified request.
/// </summary>
diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
index c2a4339f0..ddc1de9cd 100644
--- a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
+++ b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
@@ -119,12 +119,29 @@ namespace MediaBrowser.Server.Implementations.TV
// Avoid implicitly captured closure
var currentUser = user;
- return series
+ var allNextUp = series
.Select(i => GetNextUp(i, currentUser))
+ .Where(i => i.Item1 != null)
// Include if an episode was found, and either the series is not unwatched or the specific series was requested
- .Where(i => i.Item1 != null && (!i.Item3 || !string.IsNullOrWhiteSpace(request.SeriesId)))
.OrderByDescending(i => i.Item2)
.ThenByDescending(i => i.Item1.PremiereDate ?? DateTime.MinValue)
+ .ToList();
+
+ // If viewing all next up for all series, remove first episodes
+ if (string.IsNullOrWhiteSpace(request.SeriesId))
+ {
+ var withoutFirstEpisode = allNextUp
+ .Where(i => !i.Item3)
+ .ToList();
+
+ // But if that returns empty, keep those first episodes (avoid completely empty view)
+ if (withoutFirstEpisode.Count > 0)
+ {
+ allNextUp = withoutFirstEpisode;
+ }
+ }
+
+ return allNextUp
.Select(i => i.Item1)
.Take(request.Limit ?? int.MaxValue);
}
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
index c44b6bf65..44be96aa8 100644
--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj
@@ -125,6 +125,9 @@
<Content Include="dashboard-ui\components\filterdialog\style.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\components\groupedcards.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\components\guestinviter\connectlink.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>