mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-08 23:00:51 +02:00
added new params for missing/unaired
This commit is contained in:
parent
a4a3800de5
commit
976523afa9
|
@ -335,7 +335,9 @@ namespace MediaBrowser.Api
|
||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object Get(GetItemCounts request)
|
public object Get(GetItemCounts request)
|
||||||
{
|
{
|
||||||
var items = GetAllLibraryItems(request.UserId, _userManager, _libraryManager).ToList();
|
var items = GetAllLibraryItems(request.UserId, _userManager, _libraryManager)
|
||||||
|
.Where(i => i.LocationType != LocationType.Virtual)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var filteredItems = request.UserId.HasValue ? FilterItems(items, request, request.UserId.Value).ToList() : items;
|
var filteredItems = request.UserId.HasValue ? FilterItems(items, request, request.UserId.Value).ToList() : items;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
using System.Collections;
|
using MediaBrowser.Controller.Dto;
|
||||||
using System.Globalization;
|
|
||||||
using MediaBrowser.Controller.Dto;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Persistence;
|
using MediaBrowser.Controller.Persistence;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
using ServiceStack.ServiceHost;
|
using ServiceStack.ServiceHost;
|
||||||
using System;
|
using System;
|
||||||
|
@ -48,17 +47,8 @@ namespace MediaBrowser.Api
|
||||||
[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, OverviewHtml, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[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, OverviewHtml, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines, TrailerUrls", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string Fields { get; set; }
|
public string Fields { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "ExcludeLocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "SeriesId", Description = "Optional. Filter by series id", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
public string ExcludeLocationTypes { get; set; }
|
public string SeriesId { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "MinPremiereDate", Description = "Optional. The minimum premiere date. Format = yyyyMMddHHmmss", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
|
||||||
public string MinPremiereDate { get; set; }
|
|
||||||
|
|
||||||
[ApiMember(Name = "MaxPremiereDate", Description = "Optional. The maximum premiere date. Format = yyyyMMddHHmmss", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
|
||||||
public string MaxPremiereDate { get; set; }
|
|
||||||
|
|
||||||
[ApiMember(Name = "HasPremiereDate", Description = "Optional filter by items with premiere dates.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
|
||||||
public bool? HasPremiereDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the item fields.
|
/// Gets the item fields.
|
||||||
|
@ -170,10 +160,15 @@ namespace MediaBrowser.Api
|
||||||
{
|
{
|
||||||
var user = _userManager.GetUserById(request.UserId);
|
var user = _userManager.GetUserById(request.UserId);
|
||||||
|
|
||||||
var itemsList = user.RootFolder
|
var items = user.RootFolder
|
||||||
.GetRecursiveChildren(user, i => i is Series)
|
.GetRecursiveChildren(user)
|
||||||
|
.OfType<Series>();
|
||||||
|
|
||||||
|
items = FilterSeries(request, items);
|
||||||
|
|
||||||
|
var itemsList = items
|
||||||
.AsParallel()
|
.AsParallel()
|
||||||
.Select(i => GetNextUp((Series)i, user, request))
|
.Select(i => GetNextUp(i, user, request))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
itemsList = itemsList
|
itemsList = itemsList
|
||||||
|
@ -264,35 +259,19 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
private IEnumerable<Episode> FilterItems(GetNextUpEpisodes request, IEnumerable<Episode> items)
|
private IEnumerable<Episode> FilterItems(GetNextUpEpisodes request, IEnumerable<Episode> items)
|
||||||
{
|
{
|
||||||
// ExcludeLocationTypes
|
// Make this configurable when needed
|
||||||
if (!string.IsNullOrEmpty(request.ExcludeLocationTypes))
|
items = items.Where(i => i.LocationType != LocationType.Virtual);
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<Series> FilterSeries(GetNextUpEpisodes request, IEnumerable<Series> items)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(request.SeriesId))
|
||||||
{
|
{
|
||||||
var vals = request.ExcludeLocationTypes.Split(',');
|
var id = new Guid(request.SeriesId);
|
||||||
|
|
||||||
items = items
|
items = items.Where(i => i.Id == id);
|
||||||
.Where(f => !vals.Contains(f.LocationType.ToString(), StringComparer.OrdinalIgnoreCase))
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(request.MinPremiereDate))
|
|
||||||
{
|
|
||||||
var date = DateTime.ParseExact(request.MinPremiereDate, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
|
|
||||||
|
|
||||||
items = items.Where(i => !i.PremiereDate.HasValue || i.PremiereDate.Value >= date);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(request.MaxPremiereDate))
|
|
||||||
{
|
|
||||||
var date = DateTime.ParseExact(request.MaxPremiereDate, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
|
|
||||||
|
|
||||||
items = items.Where(i => !i.PremiereDate.HasValue || i.PremiereDate.Value <= date);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request.HasPremiereDate.HasValue)
|
|
||||||
{
|
|
||||||
var val = request.HasPremiereDate.Value;
|
|
||||||
|
|
||||||
items = items.Where(i => i.PremiereDate.HasValue == val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Globalization;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Controller.Dto;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
|
@ -181,22 +180,19 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
[ApiMember(Name = "IsHD", Description = "Optional filter by items that are HD or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "IsHD", Description = "Optional filter by items that are HD or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||||
public bool? IsHD { get; set; }
|
public bool? IsHD { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "ExcludeLocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
|
||||||
public string ExcludeLocationTypes { get; set; }
|
|
||||||
|
|
||||||
[ApiMember(Name = "LocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
[ApiMember(Name = "LocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string LocationTypes { get; set; }
|
public string LocationTypes { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "MinPremiereDate", Description = "Optional. The minimum premiere date. Format = yyyyMMddHHmmss", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
[ApiMember(Name = "ExcludeLocationTypes", Description = "Optional. If specified, results will be filtered based on LocationType. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]
|
||||||
public string MinPremiereDate { get; set; }
|
public string ExcludeLocationTypes { get; set; }
|
||||||
|
|
||||||
[ApiMember(Name = "MaxPremiereDate", Description = "Optional. The maximum premiere date. Format = yyyyMMddHHmmss", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
|
||||||
public string MaxPremiereDate { get; set; }
|
|
||||||
|
|
||||||
[ApiMember(Name = "HasPremiereDate", Description = "Optional filter by items with premiere dates.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
|
||||||
public bool? HasPremiereDate { get; set; }
|
|
||||||
|
|
||||||
public bool IncludeIndexContainers { get; set; }
|
public bool IncludeIndexContainers { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "IsMissing", Description = "Optional filter by items that are missing episodes or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||||
|
public bool? IsMissing { get; set; }
|
||||||
|
|
||||||
|
[ApiMember(Name = "IsUnaired", Description = "Optional filter by items that are unaired episodes or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||||
|
public bool? IsUnaired { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -270,6 +266,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
items = ApplyFilter(items, filter, user, _userDataRepository);
|
items = ApplyFilter(items, filter, user, _userDataRepository);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
items = FilterVirtualEpisodes(request, items, user);
|
||||||
|
|
||||||
items = items.AsEnumerable();
|
items = items.AsEnumerable();
|
||||||
|
|
||||||
items = ApplySearchTerm(request, items);
|
items = ApplySearchTerm(request, items);
|
||||||
|
@ -440,6 +438,93 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IEnumerable<BaseItem> FilterVirtualEpisodes(GetItems request, IEnumerable<BaseItem> items, User user)
|
||||||
|
{
|
||||||
|
items = FilterVirtualSeasons(request, items, user);
|
||||||
|
|
||||||
|
if (request.IsMissing.HasValue)
|
||||||
|
{
|
||||||
|
var val = request.IsMissing.Value;
|
||||||
|
items = items.Where(i =>
|
||||||
|
{
|
||||||
|
var e = i as Episode;
|
||||||
|
if (e != null)
|
||||||
|
{
|
||||||
|
return e.IsMissingEpisode == val;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.IsUnaired.HasValue)
|
||||||
|
{
|
||||||
|
var val = request.IsUnaired.Value;
|
||||||
|
items = items.Where(i =>
|
||||||
|
{
|
||||||
|
var e = i as Episode;
|
||||||
|
if (e != null)
|
||||||
|
{
|
||||||
|
return e.IsUnaired == val;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<BaseItem> FilterVirtualSeasons(GetItems request, IEnumerable<BaseItem> items, User user)
|
||||||
|
{
|
||||||
|
if (request.IsMissing.HasValue && request.IsUnaired.HasValue)
|
||||||
|
{
|
||||||
|
var isMissing = request.IsMissing.Value;
|
||||||
|
var isUnaired = request.IsUnaired.Value;
|
||||||
|
|
||||||
|
if (!isMissing && !isUnaired)
|
||||||
|
{
|
||||||
|
return items.Where(i =>
|
||||||
|
{
|
||||||
|
var e = i as Season;
|
||||||
|
if (e != null)
|
||||||
|
{
|
||||||
|
return !e.IsMissingOrUnaired;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.IsMissing.HasValue)
|
||||||
|
{
|
||||||
|
var val = request.IsMissing.Value;
|
||||||
|
items = items.Where(i =>
|
||||||
|
{
|
||||||
|
var e = i as Season;
|
||||||
|
if (e != null)
|
||||||
|
{
|
||||||
|
return e.IsMissingSeason == val;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.IsUnaired.HasValue)
|
||||||
|
{
|
||||||
|
var val = request.IsUnaired.Value;
|
||||||
|
items = items.Where(i =>
|
||||||
|
{
|
||||||
|
var e = i as Season;
|
||||||
|
if (e != null)
|
||||||
|
{
|
||||||
|
return e.IsUnaired == val;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies the additional filters.
|
/// Applies the additional filters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -593,13 +678,6 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
items = items.Where(f => vals.Contains(f.GetType().Name, StringComparer.OrdinalIgnoreCase));
|
items = items.Where(f => vals.Contains(f.GetType().Name, StringComparer.OrdinalIgnoreCase));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExcludeLocationTypes
|
|
||||||
if (!string.IsNullOrEmpty(request.ExcludeLocationTypes))
|
|
||||||
{
|
|
||||||
var vals = request.ExcludeLocationTypes.Split(',');
|
|
||||||
items = items.Where(f => !vals.Contains(f.LocationType.ToString(), StringComparer.OrdinalIgnoreCase));
|
|
||||||
}
|
|
||||||
|
|
||||||
// LocationTypes
|
// LocationTypes
|
||||||
if (!string.IsNullOrEmpty(request.LocationTypes))
|
if (!string.IsNullOrEmpty(request.LocationTypes))
|
||||||
{
|
{
|
||||||
|
@ -607,6 +685,13 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
items = items.Where(f => vals.Contains(f.LocationType.ToString(), StringComparer.OrdinalIgnoreCase));
|
items = items.Where(f => vals.Contains(f.LocationType.ToString(), StringComparer.OrdinalIgnoreCase));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExcludeLocationTypes
|
||||||
|
if (!string.IsNullOrEmpty(request.ExcludeLocationTypes))
|
||||||
|
{
|
||||||
|
var vals = request.ExcludeLocationTypes.Split(',');
|
||||||
|
items = items.Where(f => !vals.Contains(f.LocationType.ToString(), StringComparer.OrdinalIgnoreCase));
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(request.NameStartsWithOrGreater))
|
if (!string.IsNullOrEmpty(request.NameStartsWithOrGreater))
|
||||||
{
|
{
|
||||||
items = items.Where(i => string.Compare(request.NameStartsWithOrGreater, i.SortName, StringComparison.CurrentCultureIgnoreCase) < 1);
|
items = items.Where(i => string.Compare(request.NameStartsWithOrGreater, i.SortName, StringComparison.CurrentCultureIgnoreCase) < 1);
|
||||||
|
@ -826,7 +911,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
|
|
||||||
if (request.IsHD.HasValue)
|
if (request.IsHD.HasValue)
|
||||||
{
|
{
|
||||||
items = items.OfType<Video>().Where(i => i.IsHD == request.IsHD.Value);
|
var val = request.IsHD.Value;
|
||||||
|
items = items.OfType<Video>().Where(i => i.IsHD == val);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.ParentIndexNumber.HasValue)
|
if (request.ParentIndexNumber.HasValue)
|
||||||
|
@ -853,27 +939,6 @@ namespace MediaBrowser.Api.UserLibrary
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(request.MinPremiereDate))
|
|
||||||
{
|
|
||||||
var date = DateTime.ParseExact(request.MinPremiereDate, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
|
|
||||||
|
|
||||||
items = items.Where(i => !i.PremiereDate.HasValue || i.PremiereDate.Value >= date);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(request.MaxPremiereDate))
|
|
||||||
{
|
|
||||||
var date = DateTime.ParseExact(request.MaxPremiereDate, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
|
|
||||||
|
|
||||||
items = items.Where(i => !i.PremiereDate.HasValue || i.PremiereDate.Value <= date);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (request.HasPremiereDate.HasValue)
|
|
||||||
{
|
|
||||||
var val = request.HasPremiereDate.Value;
|
|
||||||
|
|
||||||
items = items.Where(i => i.PremiereDate.HasValue == val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
@ -191,5 +192,18 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsMissingEpisode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LocationType == Model.Entities.LocationType.Virtual && PremiereDate.HasValue && PremiereDate.Value < DateTime.UtcNow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsUnaired
|
||||||
|
{
|
||||||
|
get { return LocationType == Model.Entities.LocationType.Virtual && PremiereDate.HasValue && PremiereDate.Value >= DateTime.UtcNow; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using MediaBrowser.Controller.Library;
|
using System.Linq;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Localization;
|
using MediaBrowser.Controller.Localization;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -147,5 +148,20 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||||
{
|
{
|
||||||
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
return IndexNumber != null ? IndexNumber.Value.ToString("0000") : Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsMissingSeason
|
||||||
|
{
|
||||||
|
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsMissingEpisode); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsUnaired
|
||||||
|
{
|
||||||
|
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsUnaired); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsMissingOrUnaired
|
||||||
|
{
|
||||||
|
get { return LocationType == Model.Entities.LocationType.Virtual && Children.OfType<Episode>().All(i => i.IsUnaired || i.IsMissingEpisode); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,8 @@ namespace MediaBrowser.Model.Configuration
|
||||||
|
|
||||||
public bool IsDisabled { get; set; }
|
public bool IsDisabled { get; set; }
|
||||||
|
|
||||||
public bool DisplayVirtualEpisodes { get; set; }
|
public bool DisplayMissingEpisodes { get; set; }
|
||||||
|
public bool DisplayUnairedEpisodes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
|
/// Initializes a new instance of the <see cref="UserConfiguration" /> class.
|
||||||
|
@ -65,7 +66,6 @@ namespace MediaBrowser.Model.Configuration
|
||||||
{
|
{
|
||||||
IsAdministrator = true;
|
IsAdministrator = true;
|
||||||
BlockNotRated = false;
|
BlockNotRated = false;
|
||||||
DisplayVirtualEpisodes = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace MediaBrowser.Model.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
TmdbCollection,
|
TmdbCollection,
|
||||||
MusicBrainzReleaseGroup,
|
MusicBrainzReleaseGroup,
|
||||||
Zap2It
|
Zap2It,
|
||||||
|
NesBox,
|
||||||
|
NesBoxRom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,16 +241,25 @@ namespace MediaBrowser.Model.Querying
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The location types.</value>
|
/// <value>The location types.</value>
|
||||||
public LocationType[] LocationTypes { get; set; }
|
public LocationType[] LocationTypes { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is missing episode.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>null</c> if [is missing episode] contains no value, <c>true</c> if [is missing episode]; otherwise, <c>false</c>.</value>
|
||||||
|
public bool? IsMissing { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is unaired episode.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>null</c> if [is unaired episode] contains no value, <c>true</c> if [is unaired episode]; otherwise, <c>false</c>.</value>
|
||||||
|
public bool? IsUnaired { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the exclude location types.
|
/// Gets or sets the exclude location types.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The exclude location types.</value>
|
/// <value>The exclude location types.</value>
|
||||||
public LocationType[] ExcludeLocationTypes { get; set; }
|
public LocationType[] ExcludeLocationTypes { get; set; }
|
||||||
|
|
||||||
public bool? HasPremiereDate { get; set; }
|
|
||||||
public DateTime? MinPremiereDate { get; set; }
|
|
||||||
public DateTime? MaxPremiereDate { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ItemQuery" /> class.
|
/// Initializes a new instance of the <see cref="ItemQuery" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Querying
|
namespace MediaBrowser.Model.Querying
|
||||||
{
|
{
|
||||||
public class NextUpQuery
|
public class NextUpQuery
|
||||||
|
@ -11,6 +9,12 @@ namespace MediaBrowser.Model.Querying
|
||||||
/// <value>The user id.</value>
|
/// <value>The user id.</value>
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the series id.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The series id.</value>
|
||||||
|
public string SeriesId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Skips over a given number of items within the results. Use for paging.
|
/// Skips over a given number of items within the results. Use for paging.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -28,20 +32,5 @@ namespace MediaBrowser.Model.Querying
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The fields.</value>
|
/// <value>The fields.</value>
|
||||||
public ItemFields[] Fields { get; set; }
|
public ItemFields[] Fields { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the exclude location types.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The exclude location types.</value>
|
|
||||||
public LocationType[] ExcludeLocationTypes { get; set; }
|
|
||||||
|
|
||||||
public bool? HasPremiereDate { get; set; }
|
|
||||||
public DateTime? MinPremiereDate { get; set; }
|
|
||||||
public DateTime? MaxPremiereDate { get; set; }
|
|
||||||
|
|
||||||
public NextUpQuery()
|
|
||||||
{
|
|
||||||
ExcludeLocationTypes = new LocationType[] { };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -240,16 +240,15 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
|
var status = ProviderRefreshStatus.Success;
|
||||||
|
|
||||||
var episode = (Episode)item;
|
var episode = (Episode)item;
|
||||||
|
|
||||||
var seriesId = episode.Series != null ? episode.Series.GetProviderId(MetadataProviders.Tvdb) : null;
|
var seriesId = episode.Series != null ? episode.Series.GetProviderId(MetadataProviders.Tvdb) : null;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(seriesId))
|
if (!string.IsNullOrEmpty(seriesId))
|
||||||
{
|
{
|
||||||
var seriesDataPath = RemoteSeriesProvider.GetSeriesDataPath(ConfigurationManager.ApplicationPaths,
|
var seriesDataPath = RemoteSeriesProvider.GetSeriesDataPath(ConfigurationManager.ApplicationPaths, seriesId);
|
||||||
seriesId);
|
|
||||||
|
|
||||||
var status = ProviderRefreshStatus.Success;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -259,20 +258,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
// Don't fail the provider because this will just keep on going and going.
|
// Don't fail the provider because this will just keep on going and going.
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseProviderInfo data;
|
|
||||||
if (!item.ProviderData.TryGetValue(Id, out data))
|
|
||||||
{
|
|
||||||
data = new BaseProviderInfo();
|
|
||||||
item.ProviderData[Id] = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetLastRefreshed(item, DateTime.UtcNow, status);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.Info("Episode provider not fetching because series does not have a tvdb id: " + item.Path);
|
SetLastRefreshed(item, DateTime.UtcNow, status);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
||||||
|
|
||||||
// If there's a collection type and it's not tv, it can't be a series
|
// If there's a collection type and it's not tv, it can't be a series
|
||||||
if (!string.IsNullOrEmpty(collectionType) &&
|
if (!string.IsNullOrEmpty(collectionType) &&
|
||||||
!string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase))
|
!string.Equals(collectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) &&
|
||||||
|
!string.Equals(collectionType, CollectionType.BoxSets, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.232</version>
|
<version>3.0.233</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.232" />
|
<dependency id="MediaBrowser.Common" version="3.0.233" />
|
||||||
<dependency id="NLog" version="2.1.0" />
|
<dependency id="NLog" version="2.1.0" />
|
||||||
<dependency id="ServiceStack.Text" version="3.9.58" />
|
<dependency id="ServiceStack.Text" version="3.9.58" />
|
||||||
<dependency id="SimpleInjector" version="2.3.2" />
|
<dependency id="SimpleInjector" version="2.3.2" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.232</version>
|
<version>3.0.233</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.232</version>
|
<version>3.0.233</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.232" />
|
<dependency id="MediaBrowser.Common" version="3.0.233" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in a new issue