2019-01-13 20:02:23 +00:00
|
|
|
using System.IO;
|
2019-01-13 19:25:45 +00:00
|
|
|
using System.Xml;
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2014-06-30 03:04:50 +00:00
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Controller.Entities.Movies;
|
|
|
|
using MediaBrowser.Controller.Library;
|
2016-10-25 19:02:04 +00:00
|
|
|
using MediaBrowser.Model.IO;
|
2019-01-13 19:25:45 +00:00
|
|
|
using Microsoft.Extensions.Logging;
|
2013-06-27 14:51:40 +00:00
|
|
|
|
2014-06-30 03:04:50 +00:00
|
|
|
namespace MediaBrowser.LocalMetadata.Savers
|
2013-06-27 14:51:40 +00:00
|
|
|
{
|
2016-10-30 07:02:23 +00:00
|
|
|
public class BoxSetXmlSaver : BaseXmlSaver
|
2013-06-27 14:51:40 +00:00
|
|
|
{
|
2018-09-12 17:26:21 +00:00
|
|
|
public override bool IsEnabledFor(BaseItem item, ItemUpdateType updateType)
|
2013-06-27 14:51:40 +00:00
|
|
|
{
|
2014-02-10 20:11:46 +00:00
|
|
|
if (!item.SupportsLocalMetadata)
|
2014-02-08 20:02:35 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-02-11 21:41:01 +00:00
|
|
|
return item is BoxSet && updateType >= ItemUpdateType.MetadataDownload;
|
2013-06-27 14:51:40 +00:00
|
|
|
}
|
|
|
|
|
2018-09-12 17:26:21 +00:00
|
|
|
protected override void WriteCustomElements(BaseItem item, XmlWriter writer)
|
2013-06-27 14:51:40 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-09-12 17:26:21 +00:00
|
|
|
protected override string GetLocalSavePath(BaseItem item)
|
2013-06-27 14:51:40 +00:00
|
|
|
{
|
|
|
|
return Path.Combine(item.Path, "collection.xml");
|
|
|
|
}
|
2016-10-30 07:02:23 +00:00
|
|
|
|
2020-03-03 22:07:10 +00:00
|
|
|
public BoxSetXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger<BoxSetXmlSaver> logger)
|
2019-02-01 16:43:31 +00:00
|
|
|
: base(fileSystem, configurationManager, libraryManager, userManager, userDataManager, logger)
|
2016-10-30 07:02:23 +00:00
|
|
|
{
|
|
|
|
}
|
2013-06-27 14:51:40 +00:00
|
|
|
}
|
|
|
|
}
|