mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
started rss cleanup
This commit is contained in:
parent
7a16a907a4
commit
62b2cd510f
43 changed files with 188 additions and 217 deletions
|
@ -1,5 +1,5 @@
|
|||
using NzbDrone.Core.Repository.Quality;
|
||||
using SubSonic.SqlGeneration.Schema;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
|
@ -7,12 +7,12 @@ namespace NzbDrone.Core.Model
|
|||
{
|
||||
internal string SeriesTitle { get; set; }
|
||||
internal int SeasonNumber { get; set; }
|
||||
internal int EpisodeNumber { get; set; }
|
||||
internal List<int> Episodes { get; set; }
|
||||
internal int Year { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Series:{0} Season:{1} Episode:{2}", SeriesTitle, SeasonNumber, EpisodeNumber);
|
||||
return string.Format("Series:{0} Season:{1} Episode:{2}", SeriesTitle, SeasonNumber, String.Join(",", Episodes));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -9,12 +9,9 @@ namespace NzbDrone.Core.Model
|
|||
{
|
||||
public class NzbInfoModel
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string TitleFix { get; set; }
|
||||
public NzbSiteModel Site { get; set; }
|
||||
public Uri Link { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool Proper { get; set; }
|
||||
public QualityTypes Quality { get; set; }
|
||||
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
public class NzbSiteModel
|
||||
{
|
||||
private static readonly IList<NzbSiteModel> Sites = new List<NzbSiteModel>
|
||||
{
|
||||
new NzbSiteModel {Name = "newzbin", Url = "newzbin.com", Pattern = @"\d{7,10}"},
|
||||
new NzbSiteModel {Name = "nzbmatrix", Url = "nzbmatrix.com", Pattern = @"\d{6,10}"},
|
||||
new NzbSiteModel {Name = "nzbsDotOrg", Url = "nzbs.org", Pattern = @"\d{5,10}"},
|
||||
new NzbSiteModel {Name = "nzbsrus", Url = "nzbsrus.com", Pattern = @"\d{6,10}"},
|
||||
new NzbSiteModel {Name = "lilx", Url = "lilx.net", Pattern = @"\d{6,10}"},
|
||||
};
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Pattern { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
// TODO: use HttpUtility.ParseQueryString();
|
||||
// https://nzbmatrix.com/api-nzb-download.php?id=626526
|
||||
public string ParseId(string url)
|
||||
{
|
||||
return Regex.Match(url, Pattern).Value;
|
||||
}
|
||||
|
||||
public static NzbSiteModel Parse(string url)
|
||||
{
|
||||
return Sites.Where(site => url.Contains(site.Url)).SingleOrDefault() ??
|
||||
new NzbSiteModel { Name = "unknown", Pattern = @"\d{6,10}" };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using SubSonic.SqlGeneration.Schema;
|
||||
|
||||
namespace NzbDrone.Core.Repository
|
||||
{
|
||||
public class Season
|
||||
{
|
||||
[SubSonicPrimaryKey(false)]
|
||||
public virtual long SeasonId { get; set; }
|
||||
public long SeriesId { get; set; }
|
||||
public int SeasonNumber { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public string Folder { get; set; }
|
||||
|
||||
[SubSonicToManyRelation]
|
||||
public virtual List<Episode> Episodes { get; private set; }
|
||||
|
||||
[SubSonicToOneRelation(ThisClassContainsJoinKey = true)]
|
||||
public virtual Series Series { get; private set; }
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
using NzbDrone.Core.Repository.Quality;
|
||||
using SubSonic.SqlGeneration.Schema;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
public class SeasonModel
|
||||
{
|
||||
public string SeriesTitle { get; set; }
|
||||
public int SeriesId { get; set; }
|
||||
public int SeasonNumber { get; set; }
|
||||
public QualityTypes Quality { get; set; }
|
||||
public long Size { get; set; }
|
||||
public bool Proper { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NzbDrone.Core.Model
|
||||
{
|
||||
public class SeriesMappingModel
|
||||
{
|
||||
public string Path { get; set; }
|
||||
public int TvDbId { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue