add option added + a few fixes regarding tracks with unknown length

This commit is contained in:
unK
2008-08-24 20:06:36 +02:00
parent 6ca6d47104
commit 2d6f0faf7c
8 changed files with 64 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ class Song
string GetComment() const;
string GetLength() const;
long long GetHash() const { return itsHash; }
int GetTotalLength() const { return itsMinutesLength*60+itsSecondsLength; }
int GetTotalLength() const { return itsSecondsLength < 0 ? 0 : itsMinutesLength*60+itsSecondsLength; }
int GetMinutesLength() const { return itsMinutesLength; }
int GetSecondsLength() const { return itsSecondsLength; }
int GetPosition() const { return itsPosition; }