public void Populate(AniDB_FileRequest data) { this.Anime_GroupName = data.Anime_GroupName; this.Anime_GroupNameShort = data.Anime_GroupNameShort; this.AnimeID = data.AnimeID; this.CRC = data.CRC; this.Episode_Rating = data.Episode_Rating; this.Episode_Votes = data.Episode_Votes; this.File_AudioCodec = data.File_AudioCodec; this.File_Description = data.File_Description; this.File_FileExtension = data.File_FileExtension; this.File_LengthSeconds = data.File_LengthSeconds; this.File_ReleaseDate = data.File_ReleaseDate; this.File_Source = data.File_Source; this.File_VideoCodec = data.File_VideoCodec; this.File_VideoResolution = data.File_VideoResolution; this.FileID = data.FileID; this.FileName = data.FileName; this.FileSize = data.FileSize; this.GroupID = data.GroupID; this.Hash = data.Hash; this.MD5 = data.MD5; this.SHA1 = data.SHA1; this.SubtitlesRAW = data.SubtitlesRAW; this.LanguagesRAW = data.LanguagesRAW; this.EpisodesRAW = data.EpisodesRAW; this.EpisodesPercentRAW = data.EpisodesPercentRAW; this.DateTimeUpdated = DateTime.Now; }
protected void Page_Load(object sender, EventArgs e) { Response.ContentType = "text/xml"; try { Response.Write(Constants.ERROR_XML); return; string sfsize = Utils.GetParam("fsize"); long fsize = 0; long.TryParse(sfsize, out fsize); if (fsize <= 0) { Response.Write(Constants.ERROR_XML); return; } string hash = Utils.GetParam("hash"); if (hash.Trim().Length == 0) { Response.Write(Constants.ERROR_XML); return; } AniDB_FileRepository rep = new AniDB_FileRepository(); AniDB_File anifile = rep.GetByHashAndFileSize(hash, fsize); if (anifile == null) { Response.Write(Constants.ERROR_XML); return; } AniDB_FileRequest data = new AniDB_FileRequest(anifile); string ret = Utils.ConvertToXML(data, typeof(AniDB_FileRequest)); Response.Write(ret); } catch (Exception ex) { Response.Write(ex.ToString()); return; } }