Skip to content

Commit

Permalink
Merge pull request #40 from tomty89/path_bs
Browse files Browse the repository at this point in the history
ditch remaining backslashes in paths
  • Loading branch information
ImAiiR authored Jul 10, 2020
2 parents 7fee36c + 72db4d0 commit ea09798
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
32 changes: 10 additions & 22 deletions QobuzDownloaderX/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions QobuzDownloaderX/LoginForm-v2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ea09798

Please sign in to comment.