public void GenerateGenreFolderNames(string input, string shouldBe)
        {
            var artistFolder = FolderPathHelper.GenrePath(Configuration, input);
            var t            = new DirectoryInfo(Path.Combine(Configuration.GenreImageFolder, shouldBe));

            Assert.Equal(t.FullName, artistFolder);
        }
Beispiel #2
0
        ///// <summary>
        /////     Returns a full file path to the Genre Image
        ///// </summary>
        //public string PathToImage(IRoadieSettings configuration)
        //{
        //    return Path.Combine(configuration.GenreImageFolder, $"{ Name.ToFileNameFriendly() } [{ Id }].jpg");
        //}

        /// <summary>
        ///     Returns a full file path to the Genre Image
        /// </summary>
        public string PathToImage(IRoadieSettings configuration, bool makeFolderIfNotExist = false)
        {
            var folder = FolderPathHelper.GenrePath(configuration, SortNameValue);

            if (!Directory.Exists(folder) && makeFolderIfNotExist)
            {
                Directory.CreateDirectory(folder);
            }
            return(Path.Combine(folder, $"{ SortNameValue.ToFileNameFriendly() } [{ Id }].jpg"));
        }