support for dirs/playlists rename in browser

This commit is contained in:
unK
2008-09-19 23:29:32 +02:00
parent ce9fed322d
commit 6ff6f6e258
4 changed files with 71 additions and 13 deletions

View File

@@ -162,6 +162,19 @@ void WindowTitle(const string &status)
printf("\033]0;%s\7",status.c_str());
}
string FindSharedDir(const string &one, const string &two)
{
if (one == two)
return one;
string result;
int i = 1;
while (one.substr(0, i) == two.substr(0, i))
i++;
result = one.substr(0, i);
i = result.find_last_of("/");
return i != string::npos ? result.substr(0, i) : "/";
}
string TotalPlaylistLength()
{
const int MINUTE = 60;