normalize tv recording objects

This commit is contained in:
Luke Pulverenti
2015-05-31 14:22:51 -04:00
parent a93045c01a
commit 25736b259a
24 changed files with 467 additions and 763 deletions

View File

@@ -58,8 +58,6 @@
<Compile Include="Parsers\SeasonXmlParser.cs" />
<Compile Include="Parsers\SeriesXmlParser.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Providers\AlbumXmlProvider.cs" />
<Compile Include="Providers\ArtistXmlProvider.cs" />
<Compile Include="Providers\BoxSetXmlProvider.cs" />
<Compile Include="Providers\EpisodeXmlProvider.cs" />
<Compile Include="Providers\FolderXmlProvider.cs" />

View File

@@ -1,30 +0,0 @@
using System.IO;
using System.Threading;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.LocalMetadata.Providers
{
public class AlbumXmlProvider : BaseXmlProvider<MusicAlbum>
{
private readonly ILogger _logger;
public AlbumXmlProvider(IFileSystem fileSystem, ILogger logger)
: base(fileSystem)
{
_logger = logger;
}
protected override void Fetch(LocalMetadataResult<MusicAlbum> result, string path, CancellationToken cancellationToken)
{
new BaseItemXmlParser<MusicAlbum>(_logger).Fetch(result.Item, path, cancellationToken);
}
protected override FileSystemInfo GetXmlFile(ItemInfo info, IDirectoryService directoryService)
{
return directoryService.GetFile(Path.Combine(info.Path, "album.xml"));
}
}
}

View File

@@ -1,30 +0,0 @@
using System.IO;
using System.Threading;
using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.LocalMetadata.Providers
{
class ArtistXmlProvider : BaseXmlProvider<MusicArtist>
{
private readonly ILogger _logger;
public ArtistXmlProvider(IFileSystem fileSystem, ILogger logger)
: base(fileSystem)
{
_logger = logger;
}
protected override void Fetch(LocalMetadataResult<MusicArtist> result, string path, CancellationToken cancellationToken)
{
new BaseItemXmlParser<MusicArtist>(_logger).Fetch(result.Item, path, cancellationToken);
}
protected override FileSystemInfo GetXmlFile(ItemInfo info, IDirectoryService directoryService)
{
return directoryService.GetFile(Path.Combine(info.Path, "artist.xml"));
}
}
}

View File

@@ -11,7 +11,7 @@ using System.Threading;
namespace MediaBrowser.LocalMetadata.Savers
{
public class SeasonXmlSaver : IMetadataFileSaver
public class SeasonXmlSaver
{
public string Name
{