Make sure to send playlist length if zero or send detected length.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user