Files
pgsql-jellyfin/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs
wjones af1152b001 Refactor: standardize namespace and using directive style
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
2026-02-20 16:26:53 -05:00

56 lines
2.1 KiB
C#

// <copyright file="BoxSetXmlSaver.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace MediaBrowser.LocalMetadata.Savers
{
using System.IO;
using System.Threading.Tasks;
using System.Xml;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.IO;
using Microsoft.Extensions.Logging;
/// <summary>
/// Box set xml saver.
/// </summary>
public class BoxSetXmlSaver : BaseXmlSaver
{
/// <summary>
/// Initializes a new instance of the <see cref="BoxSetXmlSaver"/> class.
/// </summary>
/// <param name="fileSystem">Instance of the <see cref="IFileSystem"/> interface.</param>
/// <param name="configurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
/// <param name="libraryManager">Instance of the <see cref="ILibraryManager"/> interface.</param>
/// <param name="logger">Instance of the <see cref="ILogger{BoxSetXmlSaver}"/> interface.</param>
public BoxSetXmlSaver(IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ILogger<BoxSetXmlSaver> logger)
: base(fileSystem, configurationManager, libraryManager, logger)
{
}
/// <inheritdoc />
public override bool IsEnabledFor(BaseItem item, ItemUpdateType updateType)
{
if (!item.SupportsLocalMetadata)
{
return false;
}
return item is BoxSet && updateType >= ItemUpdateType.MetadataDownload;
}
/// <inheritdoc />
protected override Task WriteCustomElementsAsync(BaseItem item, XmlWriter writer)
=> Task.CompletedTask;
/// <inheritdoc />
protected override string GetLocalSavePath(BaseItem item)
{
return Path.Combine(item.Path, "collection.xml");
}
}
}