public int CompareTo(WatchListItem other)
        {
            // Handle animes with no episodes in the downloaded list
            if (other.FinishedAiring)
            {
                return(-1);
            }
            else if (FinishedAiring)
            {
                return(1);
            }

            // Handle found animes
            if (ReleaseDay.ToShortDateString() == other.ReleaseDay.ToShortDateString())
            {
                return(ReleaseDay.TimeOfDay.CompareTo(other.ReleaseDay.TimeOfDay));
            }
            return(ReleaseDay.Date.CompareTo(other.ReleaseDay.Date));
        }
Example #2
0
        public int CompareTo(WatchListItem other)
        {
            // Handle animes with no episodes in the downloaded list
            if (string.IsNullOrEmpty(other.LatestEpisodeLink))
            {
                return(-1);
            }
            else if (string.IsNullOrEmpty(LatestEpisodeLink))
            {
                return(1);
            }

            // Handle found animes
            if (ReleaseDay.ToShortDateString() == other.ReleaseDay.ToShortDateString())
            {
                return(ReleaseDay.TimeOfDay.CompareTo(other.ReleaseDay.TimeOfDay));
            }
            return(ReleaseDay.Date.CompareTo(other.ReleaseDay.Date));
        }