コード例 #1
0
ファイル: VideoInfoManager.cs プロジェクト: ichobits/JRYVideo
        private CombineResult CanCombine(JryVideoInfo to, JryVideoInfo from)
        {
            if (to.Type != from.Type)
            {
                return(CombineResult.False("have diff type."));
            }

            if (to.Year != from.Year)
            {
                return(CombineResult.False("have diff year."));
            }

            if (to.Index != from.Index)
            {
                return(CombineResult.False("have diff index."));
            }

            if (to.LastVideoId != null && from.LastVideoId != null && to.LastVideoId != from.LastVideoId)
            {
                return(CombineResult.False("have diff last video."));
            }

            if (to.NextVideoId != null && from.NextVideoId != null && to.NextVideoId != from.NextVideoId)
            {
                return(CombineResult.False("have diff next video."));
            }

            if (to.DoubanId != null && from.DoubanId != null && to.DoubanId != from.DoubanId)
            {
                return(CombineResult.False("have diff douban id."));
            }

            if (to.ImdbId != null && from.ImdbId != null && to.ImdbId != from.ImdbId)
            {
                return(CombineResult.False("have diff douban id."));
            }

            if (to.EpisodesCount != from.EpisodesCount)
            {
                return(CombineResult.False("have diff episodes count."));
            }

            return(CombineResult.True);
        }
コード例 #2
0
        private CombineResult CanCombine(Series to, Series @from)
        {
            if (!JryObject.CanCombineField(to.TheTVDBId, from.TheTVDBId))
            {
                return(CombineResult.False("have diff TheTVDB id."));
            }

            if (!JryObject.CanCombineField(to.ImdbId, from.ImdbId))
            {
                return(CombineResult.False("have diff douban id."));
            }

            if (!JryObject.CanCombineField(to.WorldLineId, from.WorldLineId))
            {
                return(CombineResult.False("have diff world line id."));
            }

            return(CombineResult.True);
        }