Private
Public Access
1
0

Make sure to send playlist length if zero or send detected length.

This commit is contained in:
2020-04-23 13:38:00 -04:00
parent 3aa471345a
commit 4c65173f23

View File

@@ -119,7 +119,11 @@ QMap<QString, qint64> MiniMediaPlayer::currentState()
void MiniMediaPlayer::durationChanged(qint64 length)
{
//emit trackDurationChanged(length); //Don't emit duration changed since we already have duration. TODO: might want to use this still if implement another media source besides youtube-dl.
if(length == 0) {
emit trackDurationChanged(playlist.first().trackLength);
} else {
emit trackDurationChanged(length);
}
}
void MiniMediaPlayer::positionChanged(qint64 position)