Removal of old code and add size check to a condition; minor README edit
This commit is contained in:
parent
1492230456
commit
8545596781
@ -22,7 +22,7 @@ Crossed out items support key dumping but not automatic downloading
|
|||||||
|
|
||||||
## Using
|
## Using
|
||||||
1. Make sure `SpotifyKeyDumperInjector.exe` and `SpotifyKeyDumper.dll` are located in the same folder as Spotify (`Spotify.exe`).
|
1. Make sure `SpotifyKeyDumperInjector.exe` and `SpotifyKeyDumper.dll` are located in the same folder as Spotify (`Spotify.exe`).
|
||||||
2. Start SpotifyKeyDumperInjector either before or after launching Spotify.
|
2. Start SpotifyKeyDumperInjector before launching Spotify.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
This project uses C++14 on Visual Studio 2019
|
This project uses C++14 on Visual Studio 2019
|
||||||
|
@ -87,14 +87,6 @@ std::string Utils::HexString(BYTE* data, int len)
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEqualIgnoreCase(const std::string& stringOne, const std::string& stringTwo)
|
|
||||||
{
|
|
||||||
return std::equal(stringOne.begin(), stringOne.end(), stringTwo.begin(), [](char a, char b)
|
|
||||||
{
|
|
||||||
return tolower(a) == tolower(b);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
std::wstring Utils::FixPathStr(std::wstring str)
|
std::wstring Utils::FixPathStr(std::wstring str)
|
||||||
{
|
{
|
||||||
// No forbidden characters
|
// No forbidden characters
|
||||||
@ -160,7 +152,7 @@ void Utils::DownloadSong(std::string fileId, std::string trackUri, std::string k
|
|||||||
// Download encrypted song data from Spotify
|
// Download encrypted song data from Spotify
|
||||||
std::string songStr = DownloadSpotifyUrl(songHost, songPath, "");
|
std::string songStr = DownloadSpotifyUrl(songHost, songPath, "");
|
||||||
|
|
||||||
if (songStr.substr(0, 6).compare("<HTML>") == 0)
|
if (songStr.length() > 6 && songStr.substr(0, 6).compare("<HTML>") == 0)
|
||||||
{
|
{
|
||||||
std::cout << "Error: " + songStr << std::endl;
|
std::cout << "Error: " + songStr << std::endl;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user