updated nuget
This commit is contained in:
parent
90d4f9a6fd
commit
e0f46bb91e
|
@ -246,13 +246,13 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
var fields = new List<ItemFields>();
|
var fields = new List<ItemFields>();
|
||||||
|
|
||||||
view.BackdropItems = gamesWithBackdrops
|
view.BackdropItems = gamesWithBackdrops
|
||||||
.Randomize("backdrop")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
view.SpotlightItems = gamesWithBackdrops
|
view.SpotlightItems = gamesWithBackdrops
|
||||||
.Randomize("spotlight")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -294,7 +294,7 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
var seriesWithBestBackdrops = FilterItemsForBackdropDisplay(seriesWithBackdrops).ToList();
|
var seriesWithBestBackdrops = FilterItemsForBackdropDisplay(seriesWithBackdrops).ToList();
|
||||||
|
|
||||||
view.BackdropItems = seriesWithBestBackdrops
|
view.BackdropItems = seriesWithBestBackdrops
|
||||||
.Randomize("backdrop")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.AsParallel()
|
.AsParallel()
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
|
@ -336,7 +336,7 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
spotlightSeries = spotlightSeries
|
spotlightSeries = spotlightSeries
|
||||||
.Randomize("spotlight")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -374,8 +374,11 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
|
|
||||||
view.SeriesIdsInProgress = nextUpEpisodes.Select(i => i.Series.Id.ToString("N")).ToList();
|
view.SeriesIdsInProgress = nextUpEpisodes.Select(i => i.Series.Id.ToString("N")).ToList();
|
||||||
|
|
||||||
|
// Avoid implicitly captured closure
|
||||||
|
var currentUser1 = user;
|
||||||
|
|
||||||
var ownedEpisodes = series
|
var ownedEpisodes = series
|
||||||
.SelectMany(i => i.GetRecursiveChildren(user, j => j.LocationType != LocationType.Virtual))
|
.SelectMany(i => i.GetRecursiveChildren(currentUser1, j => j.LocationType != LocationType.Virtual))
|
||||||
.OfType<Episode>()
|
.OfType<Episode>()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -439,7 +442,7 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
var itemsWithTopBackdrops = FilterItemsForBackdropDisplay(itemsWithBackdrops).ToList();
|
var itemsWithTopBackdrops = FilterItemsForBackdropDisplay(itemsWithBackdrops).ToList();
|
||||||
|
|
||||||
view.BackdropItems = itemsWithTopBackdrops
|
view.BackdropItems = itemsWithTopBackdrops
|
||||||
.Randomize("backdrop")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.AsParallel()
|
.AsParallel()
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
|
@ -524,7 +527,7 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
}
|
}
|
||||||
|
|
||||||
spotlightItems = spotlightItems
|
spotlightItems = spotlightItems
|
||||||
.Randomize("spotlight")
|
.OrderBy(i => Guid.NewGuid())
|
||||||
.Take(10)
|
.Take(10)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -559,16 +562,19 @@ namespace MediaBrowser.Api.DefaultTheme
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
// Avoid implicitly captured closure
|
||||||
|
var currentUserId1 = user.Id;
|
||||||
|
|
||||||
view.LatestMovies = movies
|
view.LatestMovies = movies
|
||||||
.OrderByDescending(i => i.DateCreated)
|
.OrderByDescending(i => i.DateCreated)
|
||||||
.Where(i => !_userDataManager.GetUserData(user.Id, i.GetUserDataKey()).Played)
|
.Where(i => !_userDataManager.GetUserData(currentUserId1, i.GetUserDataKey()).Played)
|
||||||
.Take(request.LatestMoviesLimit)
|
.Take(request.LatestMoviesLimit)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
view.LatestTrailers = trailers
|
view.LatestTrailers = trailers
|
||||||
.OrderByDescending(i => i.DateCreated)
|
.OrderByDescending(i => i.DateCreated)
|
||||||
.Where(i => !_userDataManager.GetUserData(user.Id, i.GetUserDataKey()).Played)
|
.Where(i => !_userDataManager.GetUserData(currentUserId1, i.GetUserDataKey()).Played)
|
||||||
.Take(request.LatestTrailersLimit)
|
.Take(request.LatestTrailersLimit)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
.Select(i => _dtoService.GetBaseItemDto(i, fields, user))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
|
@ -294,5 +294,13 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
string FindCollectionType(BaseItem item);
|
string FindCollectionType(BaseItem item);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saves the metadata.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item.</param>
|
||||||
|
/// <param name="updateType">Type of the update.</param>
|
||||||
|
/// <returns>Task.</returns>
|
||||||
|
Task SaveMetadata(BaseItem item, ItemUpdateType updateType);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -12,5 +12,11 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The item.</value>
|
/// <value>The item.</value>
|
||||||
public BaseItem Item { get; set; }
|
public BaseItem Item { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the item.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The item.</value>
|
||||||
|
public ItemUpdateType UpdateReason { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1312,7 +1312,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ItemUpdated(this, new ItemChangeEventArgs { Item = item });
|
ItemUpdated(this, new ItemChangeEventArgs
|
||||||
|
{
|
||||||
|
Item = item,
|
||||||
|
UpdateReason = updateReason
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -1377,8 +1381,14 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <param name="updateType">Type of the update.</param>
|
/// <param name="updateType">Type of the update.</param>
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
private async Task SaveMetadata(BaseItem item, ItemUpdateType updateType)
|
public async Task SaveMetadata(BaseItem item, ItemUpdateType updateType)
|
||||||
{
|
{
|
||||||
|
var locationType = item.LocationType;
|
||||||
|
if (locationType == LocationType.Remote || locationType == LocationType.Virtual)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Only file-system based items can save metadata.");
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var saver in _savers.Where(i => i.IsEnabledFor(item, updateType)))
|
foreach (var saver in _savers.Where(i => i.IsEnabledFor(item, updateType)))
|
||||||
{
|
{
|
||||||
var path = saver.GetSavePath(item);
|
var path = saver.GetSavePath(item);
|
||||||
|
@ -1444,7 +1454,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
return i.ResolveArgs.PhysicalLocations.Contains(item.Path);
|
return i.ResolveArgs.PhysicalLocations.Contains(item.Path);
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
|
|
|
@ -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.240</version>
|
<version>3.0.241</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.240" />
|
<dependency id="MediaBrowser.Common" version="3.0.241" />
|
||||||
<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.6" />
|
<dependency id="SimpleInjector" version="2.3.6" />
|
||||||
|
|
|
@ -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.240</version>
|
<version>3.0.241</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.240</version>
|
<version>3.0.241</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.240" />
|
<dependency id="MediaBrowser.Common" version="3.0.241" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user