mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-18 03:12:18 +12:00
only create playlists dir when needed
This commit is contained in:
parent
3039f744a5
commit
8a05d0e4a0
|
@ -69,8 +69,6 @@ namespace ModAssistant
|
|||
}
|
||||
}
|
||||
|
||||
API.Playlists.CreatePlaylistsFolder();
|
||||
|
||||
options.InstallType =
|
||||
BeatSaberInstallType = ModAssistant.Properties.Settings.Default.StoreType;
|
||||
options.SaveSelection =
|
||||
|
|
|
@ -28,7 +28,6 @@ namespace ModAssistant.API
|
|||
string filename = await Get(url);
|
||||
await DownloadFrom(filename);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +37,9 @@ namespace ModAssistant.API
|
|||
string absolutePath = Path.Combine(BeatSaberPath, PlaylistsFolder, filename);
|
||||
try
|
||||
{
|
||||
CreatePlaylistsFolder();
|
||||
await Utils.DownloadAsset(url.ToString(), PlaylistsFolder, filename);
|
||||
|
||||
return absolutePath;
|
||||
}
|
||||
catch
|
||||
|
@ -49,6 +50,8 @@ namespace ModAssistant.API
|
|||
|
||||
public static async Task DownloadFrom(string file)
|
||||
{
|
||||
CreatePlaylistsFolder();
|
||||
|
||||
if (Path.Combine(BeatSaberPath, PlaylistsFolder) != Path.GetDirectoryName(file))
|
||||
{
|
||||
string destination = Path.Combine(BeatSaberPath, PlaylistsFolder, Path.GetFileName(file));
|
||||
|
|
Loading…
Reference in a new issue