restore changes
This commit is contained in:
parent
3cdfd57ee0
commit
b2548a83b6
|
@ -32,6 +32,12 @@ namespace MediaBrowser.Api.System
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Route("/System/Ping", "POST")]
|
||||||
|
public class PingSystem : IReturnVoid
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class RestartApplication
|
/// Class RestartApplication
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -104,6 +110,11 @@ namespace MediaBrowser.Api.System
|
||||||
_security = security;
|
_security = security;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object Post(PingSystem request)
|
||||||
|
{
|
||||||
|
return _appHost.Name;
|
||||||
|
}
|
||||||
|
|
||||||
public object Get(GetServerLogs request)
|
public object Get(GetServerLogs request)
|
||||||
{
|
{
|
||||||
List<FileSystemMetadata> files;
|
List<FileSystemMetadata> files;
|
||||||
|
|
|
@ -359,12 +359,13 @@ namespace MediaBrowser.Providers.Manager
|
||||||
private void ClearImages(IHasImages item, ImageType type)
|
private void ClearImages(IHasImages item, ImageType type)
|
||||||
{
|
{
|
||||||
var deleted = false;
|
var deleted = false;
|
||||||
|
var deletedImages = new List<ItemImageInfo>();
|
||||||
|
|
||||||
foreach (var image in item.GetImages(type).ToList())
|
foreach (var image in item.GetImages(type).ToList())
|
||||||
{
|
{
|
||||||
if (!image.IsLocalFile)
|
if (!image.IsLocalFile)
|
||||||
{
|
{
|
||||||
// TODO: Need to get this image removed
|
deletedImages.Add(image);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,6 +385,11 @@ namespace MediaBrowser.Providers.Manager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (var image in deletedImages)
|
||||||
|
{
|
||||||
|
item.RemoveImage(image);
|
||||||
|
}
|
||||||
|
|
||||||
if (deleted)
|
if (deleted)
|
||||||
{
|
{
|
||||||
item.ValidateImages(new DirectoryService(_logger, _fileSystem));
|
item.ValidateImages(new DirectoryService(_logger, _fileSystem));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user