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 GetKey() { return("AniDBCommand_Vote" + entityID.ToString() + "_" + episodeNumber.ToString() + "_" + voteType.ToString() + "_" + episodeType.ToString()); }