public async Task <SongsList> FetchAll(GlobalVar.SongMode mode) { SongsList list = new SongsList(); if (mode == GlobalVar.SongMode.Audica) { return(list = await DownloadSongList(GlobalVar.AudicaSongAPI)); } if (mode == GlobalVar.SongMode.SynthRiders) { return(list = await DownloadSongList(GlobalVar.SRSongAPI)); } return(list); }
private string GenSongName(string fileName, GlobalVar.SongMode mode) { return(""); }
public void GetSongFolder(bool overwrite = false, GlobalVar.SongMode mode = GlobalVar.SongMode.Audica) { //If we already have the folder, and the user doesn't want to overwrite that value, just return. if (overwrite == false && Properties.Settings.Default.CustomSongFolder != null) { return; } if (mode == GlobalVar.SongMode.Audica) { //Attempt to automatically find song folder. string installFolderSteam = GetSteamLocation(GlobalVar.AudicaSteamAppId); if (installFolderSteam != null) { SetSongFolder(installFolderSteam); return; } string installFolderOculus = GetValidOculusLocation(GlobalVar.AudicaOculusSubFolderPath, GlobalVar.AudicaExe); if (installFolderOculus != null) { SetSongFolder(installFolderOculus); return; } //Let the user manually select it. string installFolderUser = FolderSelectionDialog(); if (installFolderUser != null) { SetSongFolder(installFolderUser); return; } void SetSongFolder(string installFolder) { Properties.Settings.Default.CustomSongFolder = installFolder + GlobalVar.AudicaAddonPath; Properties.Settings.Default.Save(); } } if (mode == GlobalVar.SongMode.SynthRiders) { //Attempt to automatically find song folder. string installFolderSteam = GetSteamLocation(GlobalVar.SRSteamAppId); if (installFolderSteam != null) { SetSongFolder(installFolderSteam); return; } string installFolderOculus = GetValidOculusLocation(GlobalVar.SROculusSubFolderPath, GlobalVar.SRExe); if (installFolderOculus != null) { SetSongFolder(installFolderOculus); return; } //Let the user manually select it. string installFolderUser = FolderSelectionDialog(); if (installFolderUser != null) { SetSongFolder(installFolderUser); return; } void SetSongFolder(string installFolder) { Properties.Settings.Default.CustomSongFolder = installFolder + GlobalVar.SRAddonPath; Properties.Settings.Default.Save(); } } return; }