mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-30 19:02:06 +00:00
Set default Metadata name
This commit is contained in:
parent
0e865fff8c
commit
e296d94417
6 changed files with 34 additions and 8 deletions
|
@ -30,6 +30,14 @@ public MediaBrowserMetadata(IMapCoversToLocal mediaCoverService,
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Emby (Media Browser)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
||||||
{
|
{
|
||||||
var updatedMetadataFiles = new List<MetadataFile>();
|
var updatedMetadataFiles = new List<MetadataFile>();
|
||||||
|
|
|
@ -34,6 +34,14 @@ public RoksboxMetadata(IMapCoversToLocal mediaCoverService,
|
||||||
private static List<string> ValidCertification = new List<string> { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" };
|
private static List<string> ValidCertification = new List<string> { "G", "NC-17", "PG", "PG-13", "R", "UR", "UNRATED", "NR", "TV-Y", "TV-Y7", "TV-Y7-FV", "TV-G", "TV-PG", "TV-14", "TV-MA" };
|
||||||
private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?<season>\d+))|(?<specials>specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?<season>\d+))|(?<specials>specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
public override string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Roksbox";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
||||||
{
|
{
|
||||||
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
||||||
|
|
|
@ -33,6 +33,14 @@ public WdtvMetadata(IMapCoversToLocal mediaCoverService,
|
||||||
|
|
||||||
private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?<season>\d+))|(?<specials>specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex SeasonImagesRegex = new Regex(@"^(season (?<season>\d+))|(?<specials>specials)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
public override string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "WDTV";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
||||||
{
|
{
|
||||||
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
||||||
|
|
|
@ -35,6 +35,14 @@ public XbmcMetadata(IMapCoversToLocal mediaCoverService,
|
||||||
private static readonly Regex SeasonImagesRegex = new Regex(@"^season(?<season>\d{2,}|-all|-specials)-(?<type>poster|banner|fanart)\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex SeasonImagesRegex = new Regex(@"^season(?<season>\d{2,}|-all|-specials)-(?<type>poster|banner|fanart)\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
private static readonly Regex EpisodeImageRegex = new Regex(@"-thumb\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
private static readonly Regex EpisodeImageRegex = new Regex(@"-thumb\.(?:png|jpg)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
public override string Name
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "Kodi (XBMC)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
public override List<MetadataFile> AfterRename(Series series, List<MetadataFile> existingMetadataFiles, List<EpisodeFile> episodeFiles)
|
||||||
{
|
{
|
||||||
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
var episodeFilesMetadata = existingMetadataFiles.Where(c => c.EpisodeFileId > 0).ToList();
|
||||||
|
|
|
@ -32,7 +32,7 @@ protected override void InitializeProviders()
|
||||||
definitions.Add(new MetadataDefinition
|
definitions.Add(new MetadataDefinition
|
||||||
{
|
{
|
||||||
Enable = false,
|
Enable = false,
|
||||||
Name = provider.GetType().Name.Replace("Metadata", ""),
|
Name = provider.Name,
|
||||||
Implementation = provider.GetType().Name,
|
Implementation = provider.GetType().Name,
|
||||||
Settings = (IProviderConfig)Activator.CreateInstance(provider.ConfigContract)
|
Settings = (IProviderConfig)Activator.CreateInstance(provider.ConfigContract)
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,13 +10,7 @@ namespace NzbDrone.Core.Metadata
|
||||||
{
|
{
|
||||||
public abstract class MetadataBase<TSettings> : IMetadata where TSettings : IProviderConfig, new()
|
public abstract class MetadataBase<TSettings> : IMetadata where TSettings : IProviderConfig, new()
|
||||||
{
|
{
|
||||||
public string Name
|
public abstract string Name { get; }
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return GetType().Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Type ConfigContract
|
public Type ConfigContract
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue