Esempio n. 1
0
        private string CreateLookupKey(TraktCache.Episode episode)
        {
            string show = null;

            if (episode.ShowTvdbId != null)
            {
                show = episode.ShowTvdbId.Value.ToString();
            }
            else if (episode.ShowImdbId != null)
            {
                show = episode.ShowImdbId;
            }
            else
            {
                if (episode.ShowTitle == null)
                    return episode.GetHashCode().ToString();

                show = episode.ShowTitle + "_" + episode.ShowYear ?? string.Empty;
            }

            return string.Format("{0}_{1}_{2}", show, episode.Season, episode.Number);
        }