mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-23 22:45:06 -04:00
Added: A Huge Cleanup of old Series Code. (Let's pray nothing breaks :P) (#2589)
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class AnimeEpisodeSearchCriteria : SearchCriteriaBase
|
||||
{
|
||||
public int AbsoluteEpisodeNumber { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : {1:00}]", Series.Title, AbsoluteEpisodeNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class DailyEpisodeSearchCriteria : SearchCriteriaBase
|
||||
{
|
||||
public DateTime AirDate { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : {1:yyyy-MM-dd}", Series.Title, AirDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using NzbDrone.Common.EnsureThat;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
@@ -13,11 +13,8 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
private static readonly Regex NonWord = new Regex(@"[\W]", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
private static readonly Regex BeginningThe = new Regex(@"^the\s", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
public Series Series { get; set; }
|
||||
|
||||
public Movie Movie { get; set; }
|
||||
public List<string> SceneTitles { get; set; }
|
||||
public List<Episode> Episodes { get; set; }
|
||||
public virtual bool MonitoredEpisodesOnly { get; set; }
|
||||
public virtual bool UserInvokedSearch { get; set; }
|
||||
|
||||
@@ -39,4 +36,4 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
return cleanTitle.Trim('+', ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class SeasonSearchCriteria : SearchCriteriaBase
|
||||
{
|
||||
public int SeasonNumber { get; set; }
|
||||
|
||||
public override bool MonitoredEpisodesOnly => true;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : S{1:00}]", Series.Title, SeasonNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class SingleEpisodeSearchCriteria : SearchCriteriaBase
|
||||
{
|
||||
public int EpisodeNumber { get; set; }
|
||||
public int SeasonNumber { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0} : S{1:00}E{2:00}]", Series.Title, SeasonNumber, EpisodeNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public class SpecialEpisodeSearchCriteria : SearchCriteriaBase
|
||||
{
|
||||
public string[] EpisodeQueryTitles { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var episodeTitles = EpisodeQueryTitles.ToList();
|
||||
|
||||
if (episodeTitles.Count > 0)
|
||||
{
|
||||
return string.Format("[{0}] Specials", Series.Title);
|
||||
}
|
||||
|
||||
return string.Format("[{0} : {1}]", Series.Title, string.Join(",", EpisodeQueryTitles));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user