Пример #1
0
        public static void AddGenreToDirectory(DirectoryInfo dir)
        {
            if (GenreRegex.IsMatch(dir.Name))
            {
                return;
            }
            List <string> genres = new List <string>();

            if (!dir.GetGenres(out genres))
            {
                Error($"No genres found for {dir.Name}");
                return;
            }
            Log($"Got {genres.Count} genres for {dir.Name}.");
            string genreTags = "[" + string.Join("] [", genres) + "]";

            Log($"Appending {genreTags} to {dir.Name}");
            dir.AppendToName(genreTags);
        }
Пример #2
0
        public static void AddOscarNotation(DirectoryInfo dir)
        {
            Log($"Adding oscar tag for {dir.Name} if applicable.");
            if (OscarRegex.IsMatch(dir.Name))
            {
                return;
            }
            string awards;

            if (!dir.GetOscarsLine(out awards))
            {
                Log($"{dir.Name} did not win oscars.");
                return;
            }
            string tag = GetOscarTag(awards);

            Log($"Appending {tag} to {dir.Name}");
            dir.AppendToName(tag);
        }