public Raw_AniDB_Creator(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(12).Split('|'); // 245 CREATOR 200|?????|Suwabe Jun`ichi|1|17015.jpg||http://www.haikyo.or.jp/PROFILE/man/11470.html|Junichi_Suwabe|%E8%AB%8F%E8%A8%AA%E9%83%A8%E9%A0%86%E4%B8%80|1236300570 // 3396|????|Takatsuka Masaya|1|24705.jpg||http://www.aoni.co.jp/actor/ta/takatsuka-masaya.html|Masaya_Takatsuka|????|1271491220 // 235 CHARACTER // 0. 200 ** creator id // 1. ??? ** creator name kanji // 2. Suwabe Jun`ichi ** creator name // 3. 1 ** type values: 1='person', 2='company', 3='collaboration' // 4. 25513.jpg ** pic name // 5. ??? ** desc // 6. ??? ** URLEnglish // 7. ??? ** URLJapanese // 8. ??? ** URLWikiEnglish // 9. ??? ** URLWikiJapanese CreatorID = int.Parse(sDetails[0].Trim()); CreatorKanjiName = AniDBAPILib.ProcessAniDBString(sDetails[1].Trim()); CreatorName = AniDBAPILib.ProcessAniDBString(sDetails[2].Trim()); CreatorType = AniDBAPILib.ProcessAniDBInt(AniDBAPILib.ProcessAniDBString(sDetails[3].Trim())); PicName = AniDBAPILib.ProcessAniDBString(sDetails[4].Trim()); CreatorDescription = string.Empty; URLEnglish = AniDBAPILib.ProcessAniDBString(sDetails[5].Trim()); URLJapanese = AniDBAPILib.ProcessAniDBString(sDetails[6].Trim()); URLWikiEnglish = AniDBAPILib.ProcessAniDBString(sDetails[7].Trim()); URLWikiJapanese = AniDBAPILib.ProcessAniDBString(sDetails[8].Trim()); }
public Raw_AniDB_NotifyAlert(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(14).Split('|'); //{int4 relid}|{int4 type}|{int2 count}|{int4 date}|{str relidname}|{str fids} //293 NOTIFYGET //0. 6080 //1. 0 //2. 2 //3. 1262144732 //4. Queen`s Blade: Rurou no Senshi //5. 685215,685216,685210,685211,685208,685213,685214,685212,685209 iD = long.Parse(sDetails[0]); alertType = long.Parse(sDetails[1]); alertCount = int.Parse(sDetails[2]); alertDate = AniDBAPILib.ProcessAniDBInt(sDetails[3]); relName = AniDBAPILib.ProcessAniDBString(sDetails[4]); string[] fids = sDetails[5].Split(','); foreach (string fid in fids) { long lfid = 0; long.TryParse(fid, out lfid); if (lfid > 0) { fileIDs.Add(lfid); } } }
public Raw_AniDB_NotifyMessage(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(14).Split('|'); //{int4 id}|{int4 from_user_id}|{str from_user_name}|{int4 date}|{int4 type}|{str title}|{str body} //292 NOTIFYGET //0. 1010180 //1. 0 //2. -unknown- //3. 1243764587 //4. 2 //5. Group Drop Notification - [LIME]/Amaenaide yo!! Katsu!! //6. This is an automated message notifying you that a group has dropped an anime<br />you were collecting.<br /><br />Group: LIME Anime [LIME] (<a href="http://anidb.net/g2182">2182</a>)<br />Anime: Amaenaide yo!! Katsu!! (<a href="http://anidb.net/a4145">4145</a>)<br /><br />marked dropped by: keitarou (1294)<br /><br />comment/reason:<br />GRANTED CREQ<br /> iD = long.Parse(sDetails[0]); fromUserID = long.Parse(sDetails[1]); fromUserName = AniDBAPILib.ProcessAniDBString(sDetails[2]); messageDate = AniDBAPILib.ProcessAniDBInt(sDetails[3]); messageType = long.Parse(sDetails[4]); title = AniDBAPILib.ProcessAniDBString(sDetails[5]); body = AniDBAPILib.ProcessAniDBString(sDetails[6]); }
private void ProcessFileSource(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(9).Split('|'); //BaseConfig.MyAnimeLog.Write("PROCESSING EPISODE: {0}", sDetails.Length); // 220 FILE // 0. 572794 ** fileid // 1. 6107 ** anime id // 2. 99294 ** episode id // 3. 12 ** group id // 4. 2723 ** lid // 5. c646d82a184a33f4e4f98af39f29a044 ** ed2k hash // 6. 8452c4bf ** crc32 // 7. high ** quality // 8. HDTV ** source // 9. Vorbis (Ogg Vorbis) ** audio codec // 10. 148 ** audio bit rate // 11. H264/AVC ** video codec // 12. 1773 ** video bit rate // 13. 1280x720 ** video res // 14. mkv ** file extension // 15. 1470 ** length in seconds // 16. ** description // 17. 1239494400 ** release date ** date is the time of the event (in seconds since 1.1.1970) // 18. 2 ** episode # // 19. The Day It Began ** ep name // 20. Hajimari no Hi ** ep name romaji20 . // 21. ** ep Kanji Name // 22. 712 ** episode rating (7.12) // 23. 14 ** episode vote count // 24. Eclipse Productions ** group name // 25. Eclipse ** group name short EpisodeID = int.Parse(sDetails[2].Trim()); AnimeID = int.Parse(sDetails[1].Trim()); int lMinutes = 0; int.TryParse(sDetails[15].Trim(), out lMinutes); int secs = lMinutes * 60; LengthSeconds = secs; string epno = GetValidatedEpisodeNumber(sDetails[18].Trim()); EpisodeType = GetEpisodeType(epno); EpisodeNumber = GetEpisodeNumber(epno); IsDoubleEpisode = GetIsDoubleEpisode(epno); Rating = AniDBAPILib.ProcessAniDBInt(sDetails[22].Trim()); Votes = AniDBAPILib.ProcessAniDBInt(sDetails[23].Trim()); EnglishName = AniDBAPILib.ProcessAniDBString(sDetails[19].Trim()); RomajiName = AniDBAPILib.ProcessAniDBString(sDetails[20].Trim()); KanjiName = AniDBAPILib.ProcessAniDBString(sDetails[21].Trim()); AirDate = AniDBAPILib.ProcessAniDBInt(sDetails[17].Trim()); //BaseConfig.MyAnimeLog.Write("EPISODE: {0}: {1}", sDetails[18].Trim(), this.ToString()); }
private void ProcessEpisodeSource(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(12).Split('|'); //BaseConfig.MyAnimeLog.Write("PROCESSING EPISODE: {0}", sDetails.Length); // 240 EPISODE // 0. 99294 ** episode id // 1. 6107 ** anime id // 2. 25 ** length in minutes // 3. 712 ** episode rating (7.12) // 4. 14 ** episode vote count // 5. 02 ** episode number Returned 'epno' includes special character (only if special) and padding (only if normal). Special characters are S(special), C(credits), T(trailer), P(parody), O(other) // 6. The Day It Began ** english name // 7. Hajimari no Hi ** romaji name // 8. ?????? ** kanji name // 9. 1239494400 ** air date if (!int.TryParse(sDetails[0].Trim(), out int epid)) { return; } EpisodeID = epid; if (!int.TryParse(sDetails[1].Trim(), out int animeid)) { return; } AnimeID = animeid; int.TryParse(sDetails[2].Trim(), out int lMinutes); int secs = lMinutes * 60; LengthSeconds = secs; string epno = GetValidatedEpisodeNumber(sDetails[5].Trim()); EpisodeType = GetEpisodeType(epno); EpisodeNumber = GetEpisodeNumber(epno); IsDoubleEpisode = GetIsDoubleEpisode(epno); Rating = AniDBAPILib.ProcessAniDBInt(sDetails[3].Trim()); Votes = AniDBAPILib.ProcessAniDBInt(sDetails[4].Trim()); EnglishName = AniDBAPILib.ProcessAniDBString(sDetails[6].Trim())?.Replace('`', '\''); RomajiName = AniDBAPILib.ProcessAniDBString(sDetails[7].Trim())?.Replace('`', '\''); KanjiName = AniDBAPILib.ProcessAniDBString(sDetails[8].Trim())?.Replace('`', '\''); AirDate = AniDBAPILib.ProcessAniDBInt(sDetails[9].Trim()); //BaseConfig.MyAnimeLog.Write("EPISODE: {0}: {1}", sDetails[5].Trim(), this.ToString()); IsValid = true; }
// constructor // sRecMessage is the message received from ANIDB file info command public Raw_AniDB_MyListFile(string sRecMessage) { // remove the header info string[] sDetails = sRecMessage.Substring(11).Split('|'); // 221 MYLIST //{int4 lid}|{int4 fid}|{int4 eid}|{int4 aid}|{int4 gid}|{int4 date}|{int2 state}|{int4 viewdate}|{str storage}|{str source}|{str other}|{int2 filestate} // 0. 66031082 ** list id // 1. 572794 ** file id // 2. 99294 ** episode id // 3. 6107 ** anime id // 4. 2723 ** group id // 5. 1239598714 ** fileDate // 6. 1 ** state // 7. 0 ** view date (will contain 0 if not watched, otherwise has the date it was watched) // 8. ** storage // 9. ** source // 10. ** other // 11. 0 ** filestate this.ListID = AniDBAPILib.ProcessAniDBInt(sDetails[0]); this.FileID = AniDBAPILib.ProcessAniDBInt(sDetails[1]); this.EpisodeID = AniDBAPILib.ProcessAniDBInt(sDetails[2]); this.AnimeID = AniDBAPILib.ProcessAniDBInt(sDetails[3]); this.GroupID = AniDBAPILib.ProcessAniDBInt(sDetails[4]); this.FileDate = AniDBAPILib.ProcessAniDBString(sDetails[5]); this.State = AniDBAPILib.ProcessAniDBInt(sDetails[6]); this.ViewDateUDP = AniDBAPILib.ProcessAniDBInt(sDetails[7]); this.Storage = AniDBAPILib.ProcessAniDBString(sDetails[8]); this.Source = AniDBAPILib.ProcessAniDBString(sDetails[9]); this.Other = AniDBAPILib.ProcessAniDBString(sDetails[10]); this.FileState = AniDBAPILib.ProcessAniDBInt(sDetails[11]); // calculate the watched date if (ViewDateUDP > 0) { DateTime utcDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); utcDate = utcDate.AddSeconds(ViewDateUDP); WatchedDate = utcDate.ToLocalTime(); } }
public Raw_AniDB_File(string sRecMessage) { InitDefaultValues(); // remove the header info string[] sDetails = sRecMessage.Substring(9).Split('|'); //BaseConfig.MyAnimeLog.Write("PROCESSING FILE: {0}", sDetails.Length); // 220 FILE // 0. 572794 ** fileid // 1. 6107 ** anime id // 2. 99294 ** episode id // 3. 12 ** group id // 4. 2723 ** lid // 5. ** other episodes // 6. ** isDeprecated // 7. state // 8 ** Size // 9. c646d82a184a33f4e4f98af39f29a044 ** ed2k hash // 10. ** md5 // 11. ** sha1 // 12. 8452c4bf ** crc32 // 13. high ** quality // 14. HDTV ** source // 15. Vorbis (Ogg Vorbis) ** audio codec // 16. 148 ** audio bit rate // 17. H264/AVC ** video codec // 18. 1773 ** video bit rate // 19. 1280x720 ** video res // 20. mkv ** file extension // 21. Audio Langugages. // 22. Subtitle languages. // 23. 1470 ** length in seconds // 24. ** description // 25. 1239494400 ** release date ** date is the time of the event (in seconds since 1.1.1970) // 26. Episode FileName // 27. 2 ** episode # // 28. The Day It Began ** ep name // 29. Hajimari no Hi ** ep name romaji // 30. ** ep name kanji // 31. 712 ** episode rating (7.12) // 32. 14 ** episode vote count // 33. Eclipse Productions ** group name // 34. Eclipse ** group name short this.FileSize = long.Parse(sDetails[8].Trim()); this.ED2KHash = AniDBAPILib.ProcessAniDBString(sDetails[9].Trim()).ToUpper(); this.MD5 = AniDBAPILib.ProcessAniDBString(sDetails[10].Trim()).ToUpper(); this.SHA1 = AniDBAPILib.ProcessAniDBString(sDetails[11].Trim()).ToUpper(); this.CRC = AniDBAPILib.ProcessAniDBString(sDetails[12].Trim()).ToUpper(); FileID = int.Parse(sDetails[0].Trim()); AnimeID = int.Parse(sDetails[1].Trim()); int state = int.Parse(sDetails[7].Trim()); if (state == 0 || state == 1) { FileVersion = 1; } else { AniDBFileState eState = (AniDBFileState)state; if (BitMaskHelper.IsSet(eState, AniDBFileState.FILE_ISV2)) { FileVersion = 2; } if (BitMaskHelper.IsSet(eState, AniDBFileState.FILE_ISV3)) { FileVersion = 3; } if (BitMaskHelper.IsSet(eState, AniDBFileState.FILE_ISV4)) { FileVersion = 4; } if (BitMaskHelper.IsSet(eState, AniDBFileState.FILE_ISV5)) { FileVersion = 5; } if (BitMaskHelper.IsSet(eState, AniDBFileState.FILE_CEN)) { IsCensored = 1; } IsChaptered = BitMaskHelper.IsSet(eState, AniDBFileState.FILE_CHAPTERED) ? 1 : 0; } if (int.TryParse(sDetails[6].Trim(), out int isdep)) { IsDeprecated = isdep == 0 ? 0 : 1; } EpisodesRAW = sDetails[2].Trim(); EpisodesPercentRAW = "100"; OtherEpisodesRAW = string.Empty; if (sDetails[5].Trim().Length > 0) { string[] Eps = sDetails[5].Trim().Split('\''); if (Eps.Length > 0) { foreach (string ep in Eps) { string[] ep2 = ep.Split(','); if (ep2.Length > 0) { EpisodesRAW += "," + ep2[0]; if (!string.IsNullOrEmpty(OtherEpisodesRAW)) { OtherEpisodesRAW += ","; } OtherEpisodesRAW += ep2[0]; } if (ep2.Length > 1) { EpisodesPercentRAW += "," + ep2[1]; } else { EpisodesPercentRAW += ",100"; } } } } // Other Episodes have this format : FileId, % From The End, Per example 1030, 100 Means the complete 1030 Episode // 1030, 49 Means content starts at 51% of the episode 1030. GroupID = int.Parse(sDetails[3].Trim()); File_Source = AniDBAPILib.ProcessAniDBString(sDetails[14].Trim()); File_AudioCodec = AniDBAPILib.ProcessAniDBString(sDetails[15].Trim()); File_VideoCodec = AniDBAPILib.ProcessAniDBString(sDetails[17].Trim()); File_VideoResolution = AniDBAPILib.ProcessAniDBString(sDetails[19].Trim()); File_FileExtension = AniDBAPILib.ProcessAniDBString(sDetails[20].Trim()); File_LengthSeconds = AniDBAPILib.ProcessAniDBInt(sDetails[23].Trim()); File_Description = AniDBAPILib.ProcessAniDBString(sDetails[24].Trim()); File_ReleaseDate = AniDBAPILib.ProcessAniDBInt(sDetails[25].Trim()); LanguagesRAW = AniDBAPILib.ProcessAniDBString(sDetails[21].Trim()); SubtitlesRAW = AniDBAPILib.ProcessAniDBString(sDetails[22].Trim()); FileName = AniDBAPILib.ProcessAniDBString(sDetails[26].Trim()); // mylist values string mlState = sDetails[27].Trim(); string mlFileState = sDetails[28].Trim(); string mlViewed = sDetails[29].Trim(); string mlViewDate = sDetails[30].Trim(); string mlStorage = sDetails[31].Trim(); string mlSource = sDetails[32].Trim(); string mlOther = sDetails[33].Trim(); // amask Anime_GroupName = AniDBAPILib.ProcessAniDBString(sDetails[40].Trim()); Anime_GroupNameShort = AniDBAPILib.ProcessAniDBString(sDetails[41].Trim()); IsWatched = 0; // 0 = false, 1 = true Episode_Rating = AniDBAPILib.ProcessAniDBInt(sDetails[38].Trim()); Episode_Votes = AniDBAPILib.ProcessAniDBInt(sDetails[39].Trim()); Version = LastVersion; }
// constructor // sRecMessage is the message received from ANIDB file info command // example response like '220 FILE .....' public Raw_AniDB_Anime(string sRecMessage) { PopulateDefaults(); // remove the header info string[] sDetails = sRecMessage.Substring(10).Split('|'); //230 ANIME 0|0 // 0. 6107 ** anime id // 1. 2009 ** year // 2. TV Series ** type // 3. 979 ** related anime id's // 4. 32 ** related anime types // 5. Magic,Shounen,Manga,Military,Action ** genres // 6. 6,6,6,6,4 ** genreRAW weight // 7. Hagane no Renkinjutsushi (2009) ** romaji name // 8. Kanji Name // 9. Full Metal Alchemist: Brotherhood ** english name // 10. * other name // 11. FMA2'hagaren2 ** short name list (the apostrophe is the list separator) // 12. Fullmetal Alchemist: Brotherhood'Fullmetal Alchemist 2'Full Metal Alchemist 2'???????? ???????: ????????'St?lalkemisten'????????? ??????? ?????? : ??????'2 ????????? ??????? ??????'??????? ????? 2009'Metalinis Alchemikas 2'?????? 2009 ** synonyms // 13. 0 ** episodes // 14. 5 ** normal episode count // 15. 6 ** special episode count // 16. 1238889600 ** air date // 17. 0 ** end date // 18. http://www.hagaren.jp/ ** url // 19. 15097.jpg ** pic name // 20. 175,5,273,171,4 ** category id list // 21. 0 ** rating // 22. 0 ** vote count // 23. 846 ** temp rating (divide by 100) // 24. 416 ** temp vote count // 25. 0 ** average review rating // 26. 0 ** review count // 27. ** Award List // 28. 0 ** Restricted 18+ // 29. 0 Anime Planet ID // 30. 0 ANN ID // 31. 0 AllCinema ID // 32. 0 AnimeNfo ID // 33. 1238889600 ** last modified // 34. 705,2409,2410,2411,2412,2413,2414,2415 ** character id list // 35. 705,2409,2410,2411,2412,2413,2414,2415 ** review id list AnimeID = int.Parse(sDetails[0]); AnimeTypeRAW = AniDBAPILib.ProcessAniDBString(sDetails[2]); RelatedAnimeIdsRAW = AniDBAPILib.ProcessAniDBString(sDetails[3]); //BaseConfig.MyAnimeLog.Write("relatedAnimeIDs: {0}", sDetails[3]); //BaseConfig.MyAnimeLog.Write("relatedAnimeIDs: {0}", AniDBLib.ProcessAniDBString(sDetails[3])); RelatedAnimeTypesRAW = AniDBAPILib.ProcessAniDBString(sDetails[4]); //genreweight = sDetails[6]; //RomajiName = AniDBAPILib.ProcessAniDBString(sDetails[7]); //BaseConfig.MyAnimeLog.Write("English name old: **{0}**", sDetails[8]); //KanjiName = AniDBAPILib.ProcessAniDBString(sDetails[8]); //EnglishName = AniDBAPILib.ProcessAniDBString(sDetails[9]); //BaseConfig.MyAnimeLog.Write("English name new: **{0}**", englishName); //OtherName = AniDBAPILib.ProcessAniDBString(sDetails[10]); //ShortNames = AniDBAPILib.ProcessAniDBString(sDetails[11].Replace("'", "|")); //Synonyms = AniDBAPILib.ProcessAniDBString(sDetails[12].Replace("'", "|")); EpisodeCount = AniDBAPILib.ProcessAniDBInt(sDetails[13]); EpisodeCountNormal = AniDBAPILib.ProcessAniDBInt(sDetails[14]); EpisodeCountSpecial = AniDBAPILib.ProcessAniDBInt(sDetails[15]); int airDateSeconds = int.Parse(AniDBAPILib.ProcessAniDBString(sDetails[16])); int endDateSeconds = int.Parse(AniDBAPILib.ProcessAniDBString(sDetails[17])); AirDate = AniDB.GetAniDBDateAsDate(airDateSeconds); EndDate = AniDB.GetAniDBDateAsDate(endDateSeconds); URL = AniDBAPILib.ProcessAniDBString(sDetails[18]); Picname = AniDBAPILib.ProcessAniDBString(sDetails[19]); //categoryidlist = sDetails[20]; Rating = AniDBAPILib.ProcessAniDBInt(sDetails[21]); VoteCount = AniDBAPILib.ProcessAniDBInt(sDetails[22]); TempRating = AniDBAPILib.ProcessAniDBInt(sDetails[23]); TempVoteCount = AniDBAPILib.ProcessAniDBInt(sDetails[24]); AvgReviewRating = AniDBAPILib.ProcessAniDBInt(sDetails[25]); ReviewCount = AniDBAPILib.ProcessAniDBInt(sDetails[26]); AwardList = AniDBAPILib.ProcessAniDBString(sDetails[27]); Restricted = AniDBAPILib.ProcessAniDBInt(sDetails[28]); AnimePlanetID = AniDBAPILib.ProcessAniDBInt(sDetails[29]); ANNID = AniDBAPILib.ProcessAniDBInt(sDetails[30]); AllCinemaID = AniDBAPILib.ProcessAniDBInt(sDetails[31]); AnimeNfoID = AniDBAPILib.ProcessAniDBString(sDetails[32]); DateRecordUpdated = AniDBAPILib.ProcessAniDBString(sDetails[33]); CharacterIDListRAW = AniDBAPILib.ProcessAniDBString(sDetails[34]); ReviewIDListRAW = AniDBAPILib.ProcessAniDBString(sDetails[35]); //New version number VersionNumber = LastVersion; //Genres should by right in utf-16 GenreRAW = sDetails[5]; BeginYear = AirDate.HasValue ? AirDate.Value.Year : 0; EndYear = EndDate.HasValue ? EndDate.Value.Year : 0; foreach (int rid in this.ReviewIDList) { //BaseConfig.MyAnimeLog.Write("ReviewID: {0}", rid.ToString()); } /* * char[] chars = sDetails[5].ToCharArray(); * * foreach (char c in chars) * { * if ((int)c > 31 && (int)c < 127) * genreRAW += c.ToString(); * } */ }