public List <string> ToSearchParameters() { List <string> parms = new List <string>(); if (AniDB_Anime == null) { RefreshAnime(); } VM_AniDB_Anime anime = AniDB_Anime; if (anime == null) { return(parms); } // only use the first 2 words of the anime's title string[] titles = anime.MainTitle.Split(' '); int i = 0; foreach (string s in titles) { i++; parms.Add(s.Trim()); if (i == 2) { break; } } parms.Add(EpisodeNumber.ToString().PadLeft(2, '0')); return(parms); }
public override string ToString() { return(new StringBuilder("Episode: ") .Append(EpisodeNumber.ToString()) .Append(" ") .Append(OldFilename) .ToString()); }
private string GetEpisodenNumberWithZeros() { int maxNumberLength = ViewModel.Current.MaxEpisodeNumber.ToString().Length; string numberText = EpisodeNumber.ToString(); for (int i = numberText.Length; i < maxNumberLength; i++) { numberText = "0" + numberText; } return(numberText); }
/* * public Raw_AniDB_Episode(XmlNode node, int anid) * { * ProcessEpisodeSource(node, anid); * }*/ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("episodeID: " + EpisodeID.ToString()); sb.Append(" | animeID: " + AnimeID.ToString()); sb.Append(" | episodeNumber: " + EpisodeNumber.ToString()); sb.Append(" | episodeType: " + EpisodeType.ToString()); sb.Append(" | englishName: " + EnglishName); sb.Append(" | airDate: " + AirDate); //sb.Append(" | AirDateFormatted: " + AirDateFormatted); return(sb.ToString()); }
private void SetEpisodeNameVariants() { EpisodeNumberAndName = string.Format("{0} - {1}", EpisodeNumber, EpisodeName); string shortType = ""; switch (EpisodeTypeEnum) { case JMMClient.EpisodeType.Credits: shortType = "C"; break; case JMMClient.EpisodeType.Episode: shortType = ""; break; case JMMClient.EpisodeType.Other: shortType = "O"; break; case JMMClient.EpisodeType.Parody: shortType = "P"; break; case JMMClient.EpisodeType.Special: shortType = "S"; break; case JMMClient.EpisodeType.Trailer: shortType = "T"; break; } EpisodeNumberAndNameWithType = string.Format("{0}{1} - {2}", shortType, EpisodeNumber, EpisodeName); EpisodeNumberWithType = string.Format("{0} {1}", EpisodeTypeEnum.ToString(), EpisodeNumber); EpisodeTypeAndNumber = string.Format("{0}{1}", shortType, EpisodeNumber); EpisodeTypeAndNumberAbsolute = string.Format("{0}{1}", shortType, EpisodeNumber.ToString().PadLeft(5, '0')); EpisodeNumberAndNameTruncated = EpisodeNumberAndName; if (EpisodeNumberAndName.Length > 60) { EpisodeNumberAndNameTruncated = EpisodeNumberAndName.Substring(0, 60) + "..."; } EpisodeNumberAndNameWithTypeTruncated = EpisodeNumberAndNameWithType; if (EpisodeNumberAndNameWithTypeTruncated.Length > 60) { EpisodeNumberAndNameWithTypeTruncated = EpisodeNumberAndNameWithType.Substring(0, 60) + "..."; } }
private void SetEpisodeNameVariants() { EpisodeNumberAndName = $"{EpisodeNumber} - {EpisodeName}"; string shortType = ""; switch (EpisodeTypeEnum) { case enEpisodeType.Credits: shortType = "C"; break; case enEpisodeType.Episode: shortType = ""; break; case enEpisodeType.Other: shortType = "O"; break; case enEpisodeType.Parody: shortType = "P"; break; case enEpisodeType.Special: shortType = "S"; break; case enEpisodeType.Trailer: shortType = "T"; break; } EpisodeNumberAndNameWithType = $"{shortType}{EpisodeNumber} - {EpisodeName}"; EpisodeNumberWithType = $"{EpisodeTypeEnum.ToString()} {EpisodeNumber}"; EpisodeTypeAndNumber = $"{shortType}{EpisodeNumber}"; EpisodeTypeAndNumberAbsolute = $"{shortType}{EpisodeNumber.ToString().PadLeft(5, '0')}"; EpisodeNumberAndNameTruncated = EpisodeNumberAndName; if (EpisodeNumberAndName.Length > 60) { EpisodeNumberAndNameTruncated = EpisodeNumberAndName.Substring(0, 60) + "..."; } EpisodeNumberAndNameWithTypeTruncated = EpisodeNumberAndNameWithType; if (EpisodeNumberAndNameWithTypeTruncated.Length > 60) { EpisodeNumberAndNameWithTypeTruncated = EpisodeNumberAndNameWithType.Substring(0, 60) + "..."; } }
public string GetNumber() { return($"S{SeasonNumber.ToString().PadLeft(2, '0')}E{EpisodeNumber.ToString().PadLeft(2, '0')}"); }
public override string ToString() { return("s" + Season.ToString("D2") + " e" + EpisodeNumber.ToString("D2") + " - " + EpisodeName); }