cellMusic: make selection context valid when setting a playlist

This commit is contained in:
Megamouse 2025-02-03 23:39:46 +01:00
parent 22a1f41ecb
commit b5dbafb3e2
5 changed files with 9 additions and 7 deletions

View file

@ -67,7 +67,7 @@ qt_music_handler::qt_music_handler()
{
music_log.notice("Constructing Qt music handler...");
m_media_player = std::make_shared<QMediaPlayer>();
m_media_player = std::make_unique<QMediaPlayer>();
m_media_player->setAudioOutput(new QAudioOutput());
connect(m_media_player.get(), &QMediaPlayer::mediaStatusChanged, this, &qt_music_handler::handle_media_status);
@ -164,7 +164,7 @@ void qt_music_handler::fast_reverse(const std::string& path)
}
music_log.notice("Fast-reversing music...");
m_media_player->setPlaybackRate(-2.0);
m_media_player->setPlaybackRate(-2.0); // NOTE: This doesn't work on the current Qt version
m_media_player->play();
});