mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
globalization fix
This commit is contained in:
parent
f83c7be727
commit
2647cc6859
@ -8,15 +8,13 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.Movies
|
namespace MediaBrowser.Controller.Entities.Movies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class BoxSet
|
/// Class BoxSet
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IMetadataContainer, IHasShares
|
public class BoxSet : Folder, IHasTrailers, IHasKeywords, IHasDisplayOrder, IHasLookupInfo<BoxSetInfo>, IHasShares
|
||||||
{
|
{
|
||||||
public List<Share> Shares { get; set; }
|
public List<Share> Shares { get; set; }
|
||||||
|
|
||||||
@ -159,34 +157,6 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||||||
return GetItemLookupInfo<BoxSetInfo>();
|
return GetItemLookupInfo<BoxSetInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress<double> progress, CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
// Refresh bottom up, children first, then the boxset
|
|
||||||
// By then hopefully the movies within will have Tmdb collection values
|
|
||||||
var items = GetRecursiveChildren().ToList();
|
|
||||||
|
|
||||||
var totalItems = items.Count;
|
|
||||||
var numComplete = 0;
|
|
||||||
|
|
||||||
// Refresh songs
|
|
||||||
foreach (var item in items)
|
|
||||||
{
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
await item.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
numComplete++;
|
|
||||||
double percent = numComplete;
|
|
||||||
percent /= totalItems;
|
|
||||||
progress.Report(percent * 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Refresh current item
|
|
||||||
await RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
progress.Report(100);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsVisible(User user)
|
public override bool IsVisible(User user)
|
||||||
{
|
{
|
||||||
var userId = user.Id.ToString("N");
|
var userId = user.Id.ToString("N");
|
||||||
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
public class PhotoAlbum : Folder, IMetadataContainer
|
public class PhotoAlbum : Folder
|
||||||
{
|
{
|
||||||
[IgnoreDataMember]
|
[IgnoreDataMember]
|
||||||
public override bool SupportsLocalMetadata
|
public override bool SupportsLocalMetadata
|
||||||
@ -33,31 +33,5 @@ namespace MediaBrowser.Controller.Entities
|
|||||||
{
|
{
|
||||||
return config.BlockUnratedItems.Contains(UnratedItem.Other);
|
return config.BlockUnratedItems.Contains(UnratedItem.Other);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress<double> progress, CancellationToken cancellationToken)
|
|
||||||
{
|
|
||||||
var items = GetRecursiveChildren().ToList();
|
|
||||||
|
|
||||||
var totalItems = items.Count;
|
|
||||||
var numComplete = 0;
|
|
||||||
|
|
||||||
// Refresh songs
|
|
||||||
foreach (var item in items)
|
|
||||||
{
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
|
||||||
|
|
||||||
await item.RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
numComplete++;
|
|
||||||
double percent = numComplete;
|
|
||||||
percent /= totalItems;
|
|
||||||
progress.Report(percent * 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Refresh current item
|
|
||||||
await RefreshMetadata(refreshOptions, cancellationToken).ConfigureAwait(false);
|
|
||||||
|
|
||||||
progress.Report(100);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user