Set default music directory MBID Locator Mod

This commit is contained in:
Yoshi Askharoun
2021-10-23 22:30:30 -05:00
parent aaf8a8ddf4
commit c77affd954
+1 -5
View File
@@ -31,7 +31,7 @@ namespace ZuneModCore.Mods
Title = "Select music folder:", Title = "Select music folder:",
Items = Items =
{ {
new AbstractTextBox("folderBox"), new AbstractTextBox("folderBox", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)),
new AbstractBooleanUIElement("recursiveBox", "Search recursively") new AbstractBooleanUIElement("recursiveBox", "Search recursively")
} }
}; };
@@ -46,10 +46,6 @@ namespace ZuneModCore.Mods
bool recursive = ((AbstractBooleanUIElement)OptionsUI.Items[1]).State; bool recursive = ((AbstractBooleanUIElement)OptionsUI.Items[1]).State;
string errorString = string.Empty; string errorString = string.Empty;
// If the user didn't enter a folder, default to the "My Music" user folder
if (string.IsNullOrEmpty(folderPath))
folderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
// Verify that the folder exists // Verify that the folder exists
DirectoryInfo folder = new(folderPath); DirectoryInfo folder = new(folderPath);
if (!folder.Exists) if (!folder.Exists)