mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Got mostly everything working for #254 Ready for testing
This commit is contained in:
parent
131a99b1bb
commit
0699d777d6
7 changed files with 84 additions and 40 deletions
|
@ -108,9 +108,29 @@ namespace PlexRequests.Store
|
|||
Other = 4, // Provide a message
|
||||
}
|
||||
|
||||
public class EpisodesModel
|
||||
public class EpisodesModel : IEquatable<EpisodesModel>
|
||||
{
|
||||
public int SeasonNumber { get; set; }
|
||||
public int EpisodeNumber { get; set; }
|
||||
public bool Equals(EpisodesModel other)
|
||||
{
|
||||
// Check whether the compared object is null.
|
||||
if (ReferenceEquals(other, null)) return false;
|
||||
|
||||
//Check whether the compared object references the same data.
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
|
||||
//Check whether the properties are equal.
|
||||
return SeasonNumber.Equals(other.SeasonNumber) && EpisodeNumber.Equals(other.EpisodeNumber);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashSeason = SeasonNumber.GetHashCode();
|
||||
var hashEp = EpisodeNumber.GetHashCode();
|
||||
|
||||
//Calculate the hash code.
|
||||
return hashSeason + hashEp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue