add more report data

This commit is contained in:
Luke Pulverenti 2014-03-03 23:53:48 -05:00
parent 6efb78b8b2
commit a72a297c88
8 changed files with 47 additions and 12 deletions

View File

@ -224,8 +224,14 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "IsLocked", Description = "Optional filter by items that are locked.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public bool? IsLocked { get; set; }
[ApiMember(Name = "HasSubtitles", Description = "Optional filter by items that are unidentified by internet metadata providers.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
[ApiMember(Name = "IsUnidentified", Description = "Optional filter by items that are unidentified by internet metadata providers.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public bool? IsUnidentified { get; set; }
[ApiMember(Name = "IsPlaceHolder", Description = "Optional filter by items that are placeholders", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public bool? IsPlaceHolder { get; set; }
[ApiMember(Name = "HasOfficialRating", Description = "Optional filter by items that have official ratings", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public bool? HasOfficialRating { get; set; }
}
/// <summary>
@ -1135,6 +1141,37 @@ namespace MediaBrowser.Api.UserLibrary
items = items.Where(i => IsYearMismatched(i) == filterValue);
}
if (request.HasOfficialRating.HasValue)
{
var filterValue = request.HasOfficialRating.Value;
items = items.Where(i =>
{
var hasValue = !string.IsNullOrEmpty(i.OfficialRating);
return hasValue == filterValue;
});
}
if (request.IsPlaceHolder.HasValue)
{
var filterValue = request.IsPlaceHolder.Value;
items = items.Where(i =>
{
var isPlaceHolder = false;
var hasPlaceHolder = i as ISupportsPlaceHolders;
if (hasPlaceHolder != null)
{
isPlaceHolder = hasPlaceHolder.IsPlaceHolder;
}
return isPlaceHolder == filterValue;
});
}
return items;
}

View File

@ -185,7 +185,7 @@ namespace MediaBrowser.Controller.Entities.TV
{
get
{
return LocationType == LocationType.Virtual && PremiereDate.HasValue && PremiereDate.Value < DateTime.UtcNow;
return LocationType == LocationType.Virtual && !IsUnaired;
}
}

View File

@ -779,7 +779,6 @@ namespace MediaBrowser.Controller.Providers
break;
case "TMDbCollectionId":
case "CollectionNumber":
var tmdbCollection = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(tmdbCollection))
{

View File

@ -34,9 +34,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
{
return new ITaskTrigger[]
{
new DailyTrigger { TimeOfDay = TimeSpan.FromHours(2) },
new IntervalTrigger{ Interval = TimeSpan.FromHours(24)}
new DailyTrigger { TimeOfDay = TimeSpan.FromHours(3) },
};
}

View File

@ -40,7 +40,7 @@ namespace MediaBrowser.Server.Implementations.ScheduledTasks
new SystemEventTrigger{ SystemEvent = SystemEvent.WakeFromSleep},
new IntervalTrigger{ Interval = TimeSpan.FromHours(4)}
new IntervalTrigger{ Interval = TimeSpan.FromHours(6)}
};
}

View File

@ -121,7 +121,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
{
return new[]
{
"https://copy.com/IB0W4efS6t9A/ffall-2.1.1.tar.gz?download=1"
"https://www.dropbox.com/s/n188rxbulqem8ry/ffmpeg-osx-20131121.gz?dl=1"
};
}
@ -148,7 +148,7 @@ namespace MediaBrowser.ServerApplication.FFMpeg
//No Unix version available
return new string[] {};
#endif
#endif
}
return new string[] {};
}

View File

@ -456,8 +456,6 @@ namespace MediaBrowser.WebDashboard.Api
/// <returns>Task{Stream}.</returns>
private async Task<Stream> GetAllJavascript()
{
var assembly = GetType().Assembly;
var scriptFiles = new[]
{
"extensions.js",
@ -581,6 +579,7 @@ namespace MediaBrowser.WebDashboard.Api
await AppendResource(memoryStream, "thirdparty/autonumeric/autoNumeric.min.js", newLineBytes).ConfigureAwait(false);
var assembly = GetType().Assembly;
await AppendResource(assembly, memoryStream, "MediaBrowser.WebDashboard.ApiClient.js", newLineBytes).ConfigureAwait(false);
foreach (var file in scriptFiles)

View File

@ -84,7 +84,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ApiClient.js" />
<EmbeddedResource Include="ApiClient.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<Content Include="dashboard-ui\advancedserversettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>