Migrate to QtMultimedia and prepare for Flathub

This commit is contained in:
Sebastian Palencsar
2026-05-25 09:28:20 +02:00
parent f05c234fb1
commit 05e2fbbdbe
11 changed files with 179 additions and 85 deletions

View File

@@ -45,9 +45,11 @@ void NotificationManager::onTrackInfoChanged()
if (artist.isEmpty() && title.isEmpty()) {
m_notifyTimer.stop();
if (m_currentReply) {
m_currentReply->abort();
m_currentReply->deleteLater();
QNetworkReply *reply = m_currentReply;
m_currentReply = nullptr;
reply->disconnect(this);
reply->abort();
reply->deleteLater();
}
closeNotification();
m_lastArtist.clear();
@@ -64,9 +66,11 @@ void NotificationManager::onTrackInfoChanged()
if (trackChanged) {
m_notifyTimer.stop();
if (m_currentReply) {
m_currentReply->abort();
m_currentReply->deleteLater();
QNetworkReply *reply = m_currentReply;
m_currentReply = nullptr;
reply->disconnect(this);
reply->abort();
reply->deleteLater();
}
m_lastArtist = artist;
m_lastTitle = title;
@@ -115,9 +119,11 @@ void NotificationManager::onTrackInfoChanged()
void NotificationManager::downloadCover(const QString &url)
{
if (m_currentReply) {
m_currentReply->abort();
m_currentReply->deleteLater();
QNetworkReply *reply = m_currentReply;
m_currentReply = nullptr;
reply->disconnect(this);
reply->abort();
reply->deleteLater();
}
m_pendingCoverUrl = url;