Make sure asking for next track when last one plays removes last from playlist.
This commit is contained in:
@@ -20,6 +20,7 @@ find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
|
||||
Service
|
||||
Plasma
|
||||
I18n
|
||||
DNSSD
|
||||
)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
@@ -15,6 +15,7 @@ target_link_libraries( plasma_engine_simplecast
|
||||
KF5::Plasma
|
||||
KF5::Service
|
||||
KF5::I18n
|
||||
KF5::DNSSD
|
||||
)
|
||||
|
||||
install(TARGETS plasma_engine_simplecast DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/dataengine)
|
||||
|
||||
@@ -44,6 +44,12 @@ bool MiniMediaPlayer::nextTrack()
|
||||
emit playlistChanged(getTrackNames());
|
||||
return true;
|
||||
}
|
||||
else if(playlist.size() == 1)
|
||||
{
|
||||
playlist.pop_front();
|
||||
m_player->stop();
|
||||
emit playlistChanged(getTrackNames());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user