当前位置: 首页>>代码示例>>C#>>正文


C# AniDB_AnimeRepository.GetByID方法代码示例

本文整理汇总了C#中JMMServer.Repositories.AniDB_AnimeRepository.GetByID方法的典型用法代码示例。如果您正苦于以下问题:C# AniDB_AnimeRepository.GetByID方法的具体用法?C# AniDB_AnimeRepository.GetByID怎么用?C# AniDB_AnimeRepository.GetByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JMMServer.Repositories.AniDB_AnimeRepository的用法示例。


在下文中一共展示了AniDB_AnimeRepository.GetByID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProcessCommand

        public override void ProcessCommand()
        {
            logger.Info("Processing CommandRequest_DownloadImage: {0}", EntityID);
            string downloadURL = "";
            try
            {
                ImageDownloadRequest req = null;
                switch (EntityTypeEnum)
                {
                    case JMMImageType.AniDB_Cover:
                        AniDB_AnimeRepository repAnime = new AniDB_AnimeRepository();
                        AniDB_Anime anime = repAnime.GetByID(EntityID);
                        if (anime == null) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, anime, ForceDownload);
                        break;

                    case JMMImageType.TvDB_Episode:

                        TvDB_EpisodeRepository repTvEp = new TvDB_EpisodeRepository();
                        TvDB_Episode ep = repTvEp.GetByID(EntityID);
                        if (ep == null) return;
                        if (string.IsNullOrEmpty(ep.Filename)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, ep, ForceDownload);
                        break;

                    case JMMImageType.TvDB_FanArt:

                        TvDB_ImageFanartRepository repFanart = new TvDB_ImageFanartRepository();
                        TvDB_ImageFanart fanart = repFanart.GetByID(EntityID);
                        if (fanart == null) return;
                        if (string.IsNullOrEmpty(fanart.BannerPath)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, fanart, ForceDownload);
                        break;

                    case JMMImageType.TvDB_Cover:

                        TvDB_ImagePosterRepository repPoster = new TvDB_ImagePosterRepository();
                        TvDB_ImagePoster poster = repPoster.GetByID(EntityID);
                        if (poster == null) return;
                        if (string.IsNullOrEmpty(poster.BannerPath)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, poster, ForceDownload);
                        break;

                    case JMMImageType.TvDB_Banner:

                        TvDB_ImageWideBannerRepository repBanners = new TvDB_ImageWideBannerRepository();
                        TvDB_ImageWideBanner wideBanner = repBanners.GetByID(EntityID);
                        if (wideBanner == null) return;
                        if (string.IsNullOrEmpty(wideBanner.BannerPath)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, wideBanner, ForceDownload);
                        break;

                    case JMMImageType.MovieDB_Poster:

                        MovieDB_PosterRepository repMoviePosters = new MovieDB_PosterRepository();
                        MovieDB_Poster moviePoster = repMoviePosters.GetByID(EntityID);
                        if (moviePoster == null) return;
                        if (string.IsNullOrEmpty(moviePoster.URL)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, moviePoster, ForceDownload);
                        break;

                    case JMMImageType.MovieDB_FanArt:

                        MovieDB_FanartRepository repMovieFanart = new MovieDB_FanartRepository();
                        MovieDB_Fanart movieFanart = repMovieFanart.GetByID(EntityID);
                        if (movieFanart == null) return;
                        if (string.IsNullOrEmpty(movieFanart.URL)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, movieFanart, ForceDownload);
                        break;

                    case JMMImageType.Trakt_Poster:

                        Trakt_ImagePosterRepository repTraktPosters = new Trakt_ImagePosterRepository();
                        Trakt_ImagePoster traktPoster = repTraktPosters.GetByID(EntityID);
                        if (traktPoster == null) return;
                        if (string.IsNullOrEmpty(traktPoster.ImageURL)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, traktPoster, ForceDownload);
                        break;

                    case JMMImageType.Trakt_Fanart:

                        Trakt_ImageFanartRepository repTraktFanarts = new Trakt_ImageFanartRepository();
                        Trakt_ImageFanart traktFanart = repTraktFanarts.GetByID(EntityID);
                        if (traktFanart == null) return;
                        if (string.IsNullOrEmpty(traktFanart.ImageURL)) return;

                        req = new ImageDownloadRequest(EntityTypeEnum, traktFanart, ForceDownload);
                        break;

                    case JMMImageType.Trakt_Friend:

                        Trakt_FriendRepository repFriends = new Trakt_FriendRepository();
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:


注:本文中的JMMServer.Repositories.AniDB_AnimeRepository.GetByID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。