|
|
|
@ -921,6 +921,7 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_, |
|
|
|
|
}); |
|
|
|
|
connect(mediaPlayer, |
|
|
|
|
qOverload<const QString &, const QVariant &>(&QMediaPlayer::metaDataChanged), |
|
|
|
|
this, |
|
|
|
|
[this, mediaPlayer](QString t, QVariant) { |
|
|
|
|
nhlog::ui()->debug("Got metadata {}", t.toStdString()); |
|
|
|
|
|
|
|
|
@ -937,7 +938,8 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> source_, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
connect(mediaPlayer, &QMediaPlayer::durationChanged, [this, mediaPlayer](qint64 duration) { |
|
|
|
|
connect( |
|
|
|
|
mediaPlayer, &QMediaPlayer::durationChanged, this, [this, mediaPlayer](qint64 duration) { |
|
|
|
|
if (duration > 0) { |
|
|
|
|
this->duration_ = mediaPlayer->duration(); |
|
|
|
|
if (mimeClass_ == u"audio") |
|
|
|
|