2014-09-05 21:21:23 -07:00
|
|
|
|
using MediaBrowser.Controller.Configuration;
|
2014-06-29 20:04:50 -07:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Controller.Entities.Movies;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
2014-09-05 21:21:23 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading;
|
2016-10-30 00:02:23 -07:00
|
|
|
|
using System.Xml;
|
2016-10-25 12:02:04 -07:00
|
|
|
|
using MediaBrowser.Common.IO;
|
|
|
|
|
using MediaBrowser.Controller.IO;
|
|
|
|
|
using MediaBrowser.Model.IO;
|
2016-10-30 00:02:23 -07:00
|
|
|
|
using MediaBrowser.Model.Logging;
|
|
|
|
|
using MediaBrowser.Model.Xml;
|
2013-06-27 07:51:40 -07:00
|
|
|
|
|
2014-06-29 20:04:50 -07:00
|
|
|
|
namespace MediaBrowser.LocalMetadata.Savers
|
2013-06-27 07:51:40 -07:00
|
|
|
|
{
|
2016-10-30 00:02:23 -07:00
|
|
|
|
public class BoxSetXmlSaver : BaseXmlSaver
|
2013-06-27 07:51:40 -07:00
|
|
|
|
{
|
2016-10-30 00:02:23 -07:00
|
|
|
|
public override bool IsEnabledFor(IHasMetadata item, ItemUpdateType updateType)
|
2013-06-27 07:51:40 -07:00
|
|
|
|
{
|
2014-02-10 13:11:46 -07:00
|
|
|
|
if (!item.SupportsLocalMetadata)
|
2014-02-08 13:02:35 -07:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-02-11 14:41:01 -07:00
|
|
|
|
return item is BoxSet && updateType >= ItemUpdateType.MetadataDownload;
|
2013-06-27 07:51:40 -07:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-30 00:02:23 -07:00
|
|
|
|
protected override void WriteCustomElements(IHasMetadata item, XmlWriter writer)
|
2013-06-27 07:51:40 -07:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-30 00:02:23 -07:00
|
|
|
|
protected override string GetLocalSavePath(IHasMetadata item)
|
2013-06-27 07:51:40 -07:00
|
|
|
|
{
|
|
|
|
|
return Path.Combine(item.Path, "collection.xml");
|
|
|
|
|
}
|
2016-10-30 00:02:23 -07:00
|
|
|
|
|
|
|
|
|
public BoxSetXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, IUserManager userManager, IUserDataManager userDataManager, ILogger logger, IXmlReaderSettingsFactory xmlReaderSettingsFactory) : base(fileSystem, configurationManager, libraryManager, userManager, userDataManager, logger, xmlReaderSettingsFactory)
|
|
|
|
|
{
|
|
|
|
|
}
|
2013-06-27 07:51:40 -07:00
|
|
|
|
}
|
|
|
|
|
}
|