11 Commits

Author SHA1 Message Date
AiiR
2b0ec2b90d 0.9.9.0 2019-11-23 16:19:36 -05:00
AiiR
7eba9848ba Change character replacements to "-" 2019-11-23 14:53:55 -05:00
AiiR
7cb2e827cb Update README.md 2019-11-02 14:15:20 -04:00
AiiR
8005e6297b Update README.md 2019-11-01 22:31:38 -04:00
AiiR
497d7f2963 Merge branch 'master' of https://github.com/ImAiiR/QobuzDownloaderX 2019-11-01 22:30:34 -04:00
AiiR
a8839434e7 Create QBDLX1.png 2019-11-01 22:30:15 -04:00
AiiR
799afa706f Update README.md 2019-11-01 22:23:18 -04:00
AiiR
6e8a4fe1dc Update README.md 2019-11-01 22:23:02 -04:00
AiiR
37eaaecc8a Update README.md 2019-11-01 22:17:45 -04:00
AiiR
15a099d6b2 Update README.md 2019-11-01 22:15:17 -04:00
AiiR
8a4ff7c871 Update README.md 2019-11-01 22:13:10 -04:00
4 changed files with 159 additions and 43 deletions

BIN
-assets/QBDLX1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -546,7 +546,7 @@ namespace QobuzDownloaderX
albumArtist = decodedAlbumArtist;
albumArtist = albumArtist.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album artist in text box under cover art.
albumArtistTextBox.Invoke(new Action(() => albumArtistTextBox.Text = albumArtist));
@@ -567,7 +567,7 @@ namespace QobuzDownloaderX
performerName = decodedPerformerName;
performerName = performerName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (performerNamePath.Length > MaxLength)
@@ -600,7 +600,7 @@ namespace QobuzDownloaderX
albumName = decodedAlbumName;
albumName = albumName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album name in text box under cover art.
albumTextBox.Invoke(new Action(() => albumTextBox.Text = albumName));
@@ -622,7 +622,7 @@ namespace QobuzDownloaderX
trackName = decodedTrackName;
trackName = trackName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (trackNamePath.Length > MaxLength)
@@ -640,7 +640,7 @@ namespace QobuzDownloaderX
versionName = decodedVersionName;
versionName = versionName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Genre tag
var genreLog = Regex.Match(trackRequest, "\"genre\":{\"id\":(?<notUsed>.*?),\"color\":\"(?<notUsed2>.*?)\",\"name\":\"(?<genreName>.*?)\",\\\"").Groups;
@@ -693,7 +693,7 @@ namespace QobuzDownloaderX
#endregion
#region Filename Number Padding
// Set default padding length
// Set default track number padding length
var paddingLength = 2;
// Prepare track number padding in filename.
@@ -706,14 +706,40 @@ namespace QobuzDownloaderX
{
paddingLength = trackTotal.Length;
}
// Set default disc number padding length
var paddingDiscLength = 2;
// Prepare disc number padding in filename.
string paddingDiscLog = discTotal.Length.ToString();
if (paddingDiscLog == "1")
{
paddingDiscLength = 1;
}
else
{
paddingDiscLength = discTotal.Length;
}
#endregion
#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")
{
discFolder = "CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
discFolderCreate = "\\CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
}
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]");
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + discFolderCreate);
string discogPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath;
string discogPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + discFolderCreate;
#endregion
#region Availability Check (Streamable?)
@@ -784,7 +810,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -792,7 +818,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -828,7 +854,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -951,7 +977,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -1081,7 +1107,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);
@@ -1202,7 +1228,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + " [" + albumIdDiscog + "]" + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);
@@ -1554,7 +1580,7 @@ namespace QobuzDownloaderX
albumArtist = decodedAlbumArtist;
albumArtist = albumArtist.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album artist in text box under cover art.
albumArtistTextBox.Invoke(new Action(() => albumArtistTextBox.Text = albumArtist));
@@ -1575,7 +1601,7 @@ namespace QobuzDownloaderX
performerName = decodedPerformerName;
performerName = performerName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (performerNamePath.Length > MaxLength)
@@ -1608,7 +1634,7 @@ namespace QobuzDownloaderX
albumName = decodedAlbumName;
albumName = albumName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album name in text box under cover art.
albumTextBox.Invoke(new Action(() => albumTextBox.Text = albumName));
@@ -1630,7 +1656,7 @@ namespace QobuzDownloaderX
trackName = decodedTrackName;
trackName = trackName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (trackNamePath.Length > MaxLength)
@@ -1648,7 +1674,7 @@ namespace QobuzDownloaderX
versionName = decodedVersionName;
versionName = versionName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Genre tag
var genreLog = Regex.Match(trackRequest, "\"genre\":{\"id\":(?<notUsed>.*?),\"color\":\"(?<notUsed2>.*?)\",\"name\":\"(?<genreName>.*?)\",\\\"").Groups;
@@ -1701,7 +1727,7 @@ namespace QobuzDownloaderX
#endregion
#region Filename Number Padding
// Set default padding length
// Set default track number padding length
var paddingLength = 2;
// Prepare track number padding in filename.
@@ -1714,14 +1740,42 @@ namespace QobuzDownloaderX
{
paddingLength = trackTotal.Length;
}
// Set default disc number padding length
var paddingDiscLength = 2;
// Prepare disc number padding in filename.
string paddingDiscLog = discTotal.Length.ToString();
if (paddingDiscLog == "1")
{
paddingDiscLength = 1;
}
else
{
paddingDiscLength = discTotal.Length;
}
#endregion
#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")
{
discFolder = "CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
discFolderCreate = "\\CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
}
// Create directories
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + discFolderCreate);
string albumPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath;
// Set albumPath to the created directories.
string albumPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + discFolderCreate;
#endregion
#region Availability Check (Streamable?)
@@ -1793,7 +1847,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -1801,7 +1855,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -1834,7 +1888,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -1957,7 +2011,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -2087,7 +2141,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);
@@ -2208,7 +2262,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);
@@ -2509,7 +2563,7 @@ namespace QobuzDownloaderX
albumArtist = decodedAlbumArtist;
albumArtist = albumArtist.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumArtistPath = albumArtist.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album artist in text box under cover art.
albumArtistTextBox.Invoke(new Action(() => albumArtistTextBox.Text = albumArtist));
@@ -2530,7 +2584,7 @@ namespace QobuzDownloaderX
performerName = decodedPerformerName;
performerName = performerName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var performerNamePath = performerName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (performerNamePath.Length > MaxLength)
@@ -2563,7 +2617,7 @@ namespace QobuzDownloaderX
albumName = decodedAlbumName;
albumName = albumName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var albumNamePath = albumName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Display album name in text box under cover art.
albumTextBox.Invoke(new Action(() => albumTextBox.Text = albumName));
@@ -2585,7 +2639,7 @@ namespace QobuzDownloaderX
trackName = decodedTrackName;
trackName = trackName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var trackNamePath = trackName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// If name goes over 200 characters, limit it to 200
if (trackNamePath.Length > MaxLength)
@@ -2603,7 +2657,7 @@ namespace QobuzDownloaderX
versionName = decodedVersionName;
versionName = versionName.Replace(@"\\", @"\").Replace(@"\/", @"/");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", ";").Replace("<", "[").Replace(">", "]").Replace("|", "-").Replace("?", "_").Replace("*", "-");
var versionNamePath = versionName.Replace(@"\", "-").Replace(@"/", "-").Replace("\"", "''").Replace(":", "-").Replace("<", "-").Replace(">", "-").Replace("|", "-").Replace("?", "-").Replace("*", "-");
// Genre tag
var genreLog = Regex.Match(trackRequest, "\"genre\":{\"id\":(?<notUsed>.*?),\"color\":\"(?<notUsed2>.*?)\",\"name\":\"(?<genreName>.*?)\",\\\"").Groups;
@@ -2653,7 +2707,7 @@ namespace QobuzDownloaderX
#endregion
#region Filename Number Padding
// Set default padding length
// Set default track number padding length
var paddingLength = 2;
// Prepare track number padding in filename.
@@ -2666,14 +2720,42 @@ namespace QobuzDownloaderX
{
paddingLength = trackTotal.Length;
}
// Set default disc number padding length
var paddingDiscLength = 2;
// Prepare disc number padding in filename.
string paddingDiscLog = discTotal.Length.ToString();
if (paddingDiscLog == "1")
{
paddingDiscLength = 1;
}
else
{
paddingDiscLength = discTotal.Length;
}
#endregion
#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")
{
discFolder = "CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
discFolderCreate = "\\CD " + discNumber.PadLeft(paddingDiscLength, '0') + "\\";
}
// Create directories
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath);
System.IO.Directory.CreateDirectory(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + discFolderCreate);
string trackPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath;
// Set albumPath to the created directories.
string trackPath = loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + discFolderCreate;
#endregion
#region Availability Check (Streamable?)
@@ -2747,7 +2829,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -2755,7 +2837,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
using (var output = System.IO.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType))
{
await stream.CopyToAsync(output);
}
@@ -2788,7 +2870,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -2911,7 +2993,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
TagLib.Id3v2.Tag t = (TagLib.Id3v2.Tag)tfile.GetTag(TagLib.TagTypes.Id3v2);
@@ -3041,7 +3123,7 @@ namespace QobuzDownloaderX
if (versionName == null | versionName == "")
{
// If there is NOT a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);
@@ -3162,7 +3244,7 @@ namespace QobuzDownloaderX
else
{
// If there is a version name.
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
var tfile = TagLib.File.Create(loc + "\\" + albumArtistPath + "\\" + albumNamePath + "\\" + qualityPath + "\\" + discFolder + trackNumber.PadLeft(paddingLength, '0') + " " + trackNamePath + " (" + versionNamePath + ")" + audioFileType);
// For custom / troublesome tags.
var custom = (TagLib.Ogg.XiphComment)tfile.GetTag(TagLib.TagTypes.Xiph);

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.8.7")]
[assembly: AssemblyFileVersion("0.9.8.7")]
[assembly: AssemblyVersion("0.9.9.0")]
[assembly: AssemblyFileVersion("0.9.9.0")]

View File

@@ -1 +1,35 @@
# QobuzDownloaderX
<p style="align:center;">
<a href="https://github.com/ImAiiR/QobuzDownloaderX">
<img src="https://github.com/ImAiiR/QobuzDownloaderX/raw/master/QobuzDownloaderX/Resources/qbdlx.png?raw=true" />
</a>
</p>
Inspired by Qo-DL by <a href="https://github.com/Sorrow446">Sorrow</a> & <a href="https://github.com/DashLt">Dash</a>
<p style="align:center;">
<a href="https://github.com/ImAiiR/QobuzDownloaderX">
<img src="https://github.com/ImAiiR/QobuzDownloaderX/blob/master/-assets/QBDLX1.png?raw=true" />
</a>
</p>
# About
QobuzDownloaderX is a program for downloading music streams from the streaming platform <a href="https://qobuz.com/">Qobuz</a>.
You can not download anything with a free account.
# Disclaimer & Legal
I will not be responsible for how you use QBDLX (QobuzDownloaderX).
This program DOES NOT include...
- Code to bypass Qobuz's region restrictions.
- Qobuz app IDs or secrets.
QBDLX does not publish any of Qobuz's private secrets or app IDs. It contains regular expressions and other code to dynamically grab them from Qobuz's web player's *publicly available* JavaScript, which is not rehosted, but grabbed client side. Scraping public data is not a violation of the Computer Fraud and Abuse Act (USA) according to the Ninth Court of Appeals, [case # 17-16783](http://cdn.ca9.uscourts.gov/datastore/opinions/2019/09/09/17-16783.pdf) (see page 29).
QBDLX uses the Qobuz API, but is not endorsed, certified or otherwise approved in any way by Qobuz.
Qobuz brand and name is the registered trademark of its respective owner.
QBDLX has no partnership, sponsorship or endorsement with Qobuz.
By using QBDLX, you agree to the following: http://static.qobuz.com/apps/api/QobuzAPI-TermsofUse.pdf