make 'go to containing dir' function work on all screens
This commit is contained in:
10
src/song.cpp
10
src/song.cpp
@@ -57,7 +57,12 @@ Song::Song(mpd_Song *s) : itsHash(0),
|
||||
s->comment ? itsComment = s->comment : itsComment = "";
|
||||
|
||||
int i = itsFile.find_last_of("/");
|
||||
if (i != string::npos)
|
||||
|
||||
if (itsFile.substr(0, 7) == "http://")
|
||||
{
|
||||
itsShortName = itsFile;
|
||||
}
|
||||
else if (i != string::npos)
|
||||
{
|
||||
itsDirectory = itsFile.substr(0, i);
|
||||
itsShortName = itsFile.substr(i+1);
|
||||
@@ -81,6 +86,9 @@ string Song::GetLength() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
if (!GetTotalLength())
|
||||
return "unknown";
|
||||
|
||||
ss << itsMinutesLength << ":";
|
||||
if (!itsSecondsLength)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user