Exemplo n.º 1
0
        /// <summary>
        /// Gets the season poster.
        /// </summary>
        /// <param name="season">The season.</param>
        /// <returns>
        /// Season Poster path
        /// </returns>
        public string GetSeasonPoster(Season season)
        {
            string seasonPath = season.GetSeasonPath();

            if (string.IsNullOrEmpty(seasonPath))
            {
                return string.Empty;
            }

            string path = Path.GetDirectoryName(seasonPath);
            // <root>/<tv series>/season<00>.tbn
            // <root>/<tv series>/season <00>/<episodes>
            string checkPath = path + "season" + string.Format("{0:d2}", season.SeasonNumber) +".tbn";

            if (File.Exists(checkPath))
            {
                return checkPath;
            }

            return string.Empty;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the season banner.
        /// </summary>
        /// <param name="season">The season.</param>
        /// <returns>
        /// Season banner path
        /// </returns>
        public string GetSeasonBanner(Season season)
        {
            // Having folder.jpg inside the season folder, might overwrite the season poster named seasonxx.tbn in season root
            if (string.IsNullOrEmpty(season.GetSeasonPath()))
            {
                return string.Empty;
            }

            string path = season.GetSeasonPath();

            string checkPath = path + Path.DirectorySeparatorChar + "folder.jpg";

            if (File.Exists(checkPath))
            {
                return checkPath;
            }

            return string.Empty;
        }