diff --git a/QobuzDownloaderX/Form1.cs b/QobuzDownloaderX/Form1.cs index ff6058b..171f482 100644 --- a/QobuzDownloaderX/Form1.cs +++ b/QobuzDownloaderX/Form1.cs @@ -110,8 +110,6 @@ public QobuzDownloaderX() public int trackNumber { get; set; } public int trackTotal { get; set; } - public string discFolder { get; set; } - searchForm searchF = new searchForm(); private void Form1_Load(object sender, EventArgs e) @@ -820,13 +818,11 @@ private async void downloadDiscogBG_DoWork(object sender, DoWorkEventArgs e) #region Create Directories // Create strings for disc folders string discFolder = null; - string discFolderCreate = null; // If more than 1 disc, create folders for discs. Otherwise, strings will remain null. - if (discTotal != 1) + if (discTotal > 1) { - discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; - discFolderCreate = "\\CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; + discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0'); } // Create directories @@ -1620,13 +1616,11 @@ private async void downloadLabelBG_DoWork(object sender, DoWorkEventArgs e) #region Create Directories // Create strings for disc folders string discFolder = null; - string discFolderCreate = null; // If more than 1 disc, create folders for discs. Otherwise, strings will remain null. - if (discTotal != 1) + if (discTotal > 1) { - discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; - discFolderCreate = "\\CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; + discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0'); } // Create directories @@ -2421,13 +2415,11 @@ private async void downloadFaveAlbumsBG_DoWork(object sender, DoWorkEventArgs e) #region Create Directories // Create strings for disc folders string discFolder = null; - string discFolderCreate = null; // If more than 1 disc, create folders for discs. Otherwise, strings will remain null. - if (discTotal != 1) + if (discTotal > 1) { - discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; - discFolderCreate = "\\CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; + discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0'); } // Create directories @@ -3189,13 +3181,11 @@ private async void downloadAlbumBG_DoWork(object sender, DoWorkEventArgs e) #region Create Directories // Create strings for disc folders string discFolder = null; - string discFolderCreate = null; // If more than 1 disc, create folders for discs. Otherwise, strings will remain null. - if (discTotal != 1) + if (discTotal > 1) { - discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; - discFolderCreate = "\\CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; + discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0'); } // Create directories @@ -3904,13 +3894,11 @@ private async void downloadTrackBG_DoWork(object sender, DoWorkEventArgs e) #region Create Directories // Create strings for disc folders string discFolder = null; - string discFolderCreate = null; // If more than 1 disc, create folders for discs. Otherwise, strings will remain null. - if (discTotal != 1) + if (discTotal > 1) { - discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; - discFolderCreate = "\\CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0') + "\\"; + discFolder = "CD " + discNumber.ToString().PadLeft(paddingDiscLength, '0'); } // Create directories diff --git a/QobuzDownloaderX/LoginForm-v2.cs b/QobuzDownloaderX/LoginForm-v2.cs index 37b43db..4c312c5 100644 --- a/QobuzDownloaderX/LoginForm-v2.cs +++ b/QobuzDownloaderX/LoginForm-v2.cs @@ -53,8 +53,8 @@ private void QobuzDownloaderX_FormClosing(Object sender, FormClosingEventArgs e) public string userAuthToken { get; set; } public string altLoginValue { get; set; } - string errorLog = Path.GetDirectoryName(Application.ExecutablePath) + "\\Latest_Error.log"; - string dllCheck = Path.GetDirectoryName(Application.ExecutablePath) + "\\taglib-sharp.dll"; + string errorLog = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "Latest_Error.log"); + string dllCheck = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "taglib-sharp.dll"); static string GetMd5Hash(MD5 md5Hash, string input) {