mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Post Processing has been implemented, still need to finish app for SAB to NzbDrone.
This commit is contained in:
parent
ce79ab2827
commit
1314d00c97
18 changed files with 345 additions and 50 deletions
75
NzbDrone.Core/Helpers/EpisodeSortingHelper.cs
Normal file
75
NzbDrone.Core/Helpers/EpisodeSortingHelper.cs
Normal file
|
@ -0,0 +1,75 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Model;
|
||||
|
||||
namespace NzbDrone.Core.Helpers
|
||||
{
|
||||
public static class EpisodeSortingHelper
|
||||
{
|
||||
private static readonly List<EpisodeSortingType> SeparatorStyles = new List<EpisodeSortingType>
|
||||
{
|
||||
new EpisodeSortingType {Id = 0, Name = "Dash", Pattern = " - "},
|
||||
new EpisodeSortingType {Id = 1, Name = "Space", Pattern = " "}
|
||||
};
|
||||
|
||||
private static readonly List<EpisodeSortingType> NumberStyles = new List<EpisodeSortingType>
|
||||
{
|
||||
new EpisodeSortingType { Id = 0, Name = "1x05", Pattern = "%sx%0e"},
|
||||
new EpisodeSortingType { Id = 1, Name = "01x05", Pattern = "%0sx%0e"},
|
||||
new EpisodeSortingType { Id = 2, Name = "S01E05", Pattern = "S%0sE%0e"},
|
||||
new EpisodeSortingType { Id = 3, Name = "s01e05", Pattern = "s%0se%0e"}
|
||||
};
|
||||
|
||||
private static readonly List<EpisodeSortingType> MultiEpisodeStyles = new List<EpisodeSortingType>
|
||||
{
|
||||
new EpisodeSortingType { Id = 0, Name = "Extend", Pattern = "" },
|
||||
new EpisodeSortingType { Id = 1, Name = "Duplicate", Pattern = "" },
|
||||
new EpisodeSortingType { Id = 2, Name = "Repeat", Pattern = "" }
|
||||
};
|
||||
|
||||
public static List<EpisodeSortingType> GetSeparatorStyles()
|
||||
{
|
||||
return SeparatorStyles;
|
||||
}
|
||||
|
||||
public static List<EpisodeSortingType> GetNumberStyles()
|
||||
{
|
||||
return NumberStyles;
|
||||
}
|
||||
|
||||
public static List<EpisodeSortingType> GetMultiEpisodeStyles()
|
||||
{
|
||||
return MultiEpisodeStyles;
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetSeparatorStyle(int id)
|
||||
{
|
||||
return SeparatorStyles.Single(s => s.Id == id);
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetNumberStyle(int id)
|
||||
{
|
||||
return NumberStyles.Single(s => s.Id == id);
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetMultiEpisodeStyle(int id)
|
||||
{
|
||||
return MultiEpisodeStyles.Single(s => s.Id == id);
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetSeparatorStyle(string name)
|
||||
{
|
||||
return SeparatorStyles.Single(s => s.Name == name);
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetNumberStyle(string name)
|
||||
{
|
||||
return NumberStyles.Single(s => s.Name == name);
|
||||
}
|
||||
|
||||
public static EpisodeSortingType GetMultiEpisodeStyle(string name)
|
||||
{
|
||||
return MultiEpisodeStyles.Single(s => s.Name == name);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue