store fetched artist's info in ~/.ncmpcpp/artists instead of ~/.lyrics

This commit is contained in:
unK
2008-09-28 23:58:27 +02:00
parent 3291d2fe36
commit dbe0480db5
7 changed files with 37 additions and 14 deletions

View File

@@ -162,6 +162,22 @@ void WindowTitle(const string &status)
printf("\033]0;%s\7",status.c_str());
}
void EscapeUnallowedChars(string &s)
{
const string unallowed_chars = "\"*/:<>?\\|";
for (string::const_iterator it = unallowed_chars.begin(); it != unallowed_chars.end(); it++)
{
for (int i = 0; i < s.length(); i++)
{
if (s[i] == *it)
{
s.erase(s.begin()+i);
i--;
}
}
}
}
string FindSharedDir(const string &one, const string &two)
{
if (one == two)