public static List <Raw_AniDB_Anime_Title> ProcessTitles(XmlDocument docAnime, int animeID) { List <Raw_AniDB_Anime_Title> titles = new List <Raw_AniDB_Anime_Title>(); XmlNodeList titleItems = docAnime?["anime"]?["titles"]?.GetElementsByTagName("title"); if (titleItems == null) { return(titles); } foreach (XmlNode node in titleItems) { try { Raw_AniDB_Anime_Title animeTitle = new Raw_AniDB_Anime_Title(); animeTitle.ProcessFromHTTPResult(node, animeID); titles.Add(animeTitle); } catch (Exception ex) { logger.Error(ex, $"Error in AniDBHTTPHelper.ProcessTitles: {animeID} - {ex}"); } } return(titles); }
public void Populate(Raw_AniDB_Anime_Title rawTitle) { this.AnimeID = rawTitle.AnimeID; this.Language = rawTitle.Language; this.Title = rawTitle.Title; this.TitleType = rawTitle.TitleType; }
public static List <Raw_AniDB_Anime_Title> ProcessTitles(XmlDocument docAnime, int animeID) { List <Raw_AniDB_Anime_Title> titles = new List <Raw_AniDB_Anime_Title>(); try { if (docAnime["anime"]["titles"] != null) { XmlNodeList titleItems = docAnime["anime"]["titles"].GetElementsByTagName("title"); if (titleItems != null) { foreach (XmlNode node in titleItems) { try { Raw_AniDB_Anime_Title animeTitle = new Raw_AniDB_Anime_Title(); animeTitle.ProcessFromHTTPResult(node, animeID); titles.Add(animeTitle); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { string msg = string.Format("Error in AniDBHTTPHelper.ProcessTitles: {0} - {1}", animeID, ex.ToString()); logger.ErrorException(msg, ex); return(null); } return(titles); }
public static List<Raw_AniDB_Anime_Title> ProcessTitles(XmlDocument docAnime, int animeID) { List<Raw_AniDB_Anime_Title> titles = new List<Raw_AniDB_Anime_Title>(); try { if (docAnime["anime"]["titles"] != null) { XmlNodeList titleItems = docAnime["anime"]["titles"].GetElementsByTagName("title"); if (titleItems != null) { foreach (XmlNode node in titleItems) { try { Raw_AniDB_Anime_Title animeTitle = new Raw_AniDB_Anime_Title(); animeTitle.ProcessFromHTTPResult(node, animeID); titles.Add(animeTitle); } catch (Exception ex) { //BaseConfig.MyAnimeLog.Write("Error in GetEpisodes: {0}", ex); } } } } } catch (Exception ex) { string msg = string.Format("Error in AniDBHTTPHelper.ProcessTitles: {0} - {1}", animeID, ex.ToString()); logger.ErrorException(msg, ex); return null; } return titles; }