Private
Public Access
1
0

Make sure asking for next track when last one plays removes last from playlist.

This commit is contained in:
2019-04-08 17:02:39 -04:00
parent 0174e7784d
commit b86bbd9490
3 changed files with 8 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
Service
Plasma
I18n
DNSSD
)
add_subdirectory(src)

View File

@@ -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)

View File

@@ -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;
}