示例#1
0
        public override void ProcessCommand()
        {
            logger.Info("Processing CommandRequest_GetCreator: {0}", CreatorID);

            try
            {
                AniDB_CreatorRepository repCreator = new AniDB_CreatorRepository();
                AniDB_Seiyuu            creator    = repCreator.GetByCreatorID(CreatorID);

                if (ForceRefresh || creator == null)
                {
                    // redownload anime details from http ap so we can get an update character list
                    creator = JMMService.AnidbProcessor.GetCreatorInfoUDP(CreatorID);
                }

                if (creator != null || !string.IsNullOrEmpty(creator.PosterPath) && !File.Exists(creator.PosterPath))
                {
                    CommandRequest_DownloadImage cmd = new CommandRequest_DownloadImage(creator.AniDB_SeiyuuID, ImageEntityType.AniDB_Creator, false);
                    cmd.Save();
                }
            }
            catch (Exception ex)
            {
                logger.Error("Error processing CommandRequest_GetCreator: {0} - {1}", CreatorID, ex.ToString());
                return;
            }
        }
		public override void ProcessCommand()
		{
			logger.Info("Processing CommandRequest_GetCreator: {0}", CreatorID);

			try
			{
				AniDB_CreatorRepository repCreator = new AniDB_CreatorRepository();
				AniDB_Seiyuu creator = repCreator.GetByCreatorID(CreatorID);

				if (ForceRefresh || creator == null)
				{
					// redownload anime details from http ap so we can get an update character list
					creator = JMMService.AnidbProcessor.GetCreatorInfoUDP(CreatorID);
				}

				if (creator != null || !string.IsNullOrEmpty(creator.PosterPath) && !File.Exists(creator.PosterPath))
				{
					CommandRequest_DownloadImage cmd = new CommandRequest_DownloadImage(creator.AniDB_SeiyuuID, JMMImageType.AniDB_Creator, false);
					cmd.Save();
				}

			}
			catch (Exception ex)
			{
				logger.Error("Error processing CommandRequest_GetCreator: {0} - {1}", CreatorID, ex.ToString());
				return;
			}
		}