libsaria: Return empty string when no song loaded
I was returning "0:00", but I think an empty string looks better.
This commit is contained in:
parent
1018b0bc5b
commit
9f6320ce18
|
@ -79,9 +79,13 @@ namespace libsaria
|
|||
string audio::posstr()
|
||||
{
|
||||
stringstream stream;
|
||||
int minutes, seconds, pos;
|
||||
gint64 pos;
|
||||
int minutes, seconds;
|
||||
|
||||
pos = position() / GST_SECOND;
|
||||
if (!get_position(pos))
|
||||
return "";
|
||||
|
||||
pos = pos / GST_SECOND;
|
||||
minutes = pos / 60;
|
||||
seconds = pos - (minutes * 60);
|
||||
stream << minutes << ":";
|
||||
|
|
Loading…
Reference in New Issue