Revert "Add stop after each song repeat mode"
This commit is contained in:
parent
06f053e5a6
commit
e899598967
|
@ -292,6 +292,7 @@ void Player::RestartOrPrevious() {
|
|||
|
||||
void Player::Stop(bool stop_after) {
|
||||
engine_->Stop(stop_after);
|
||||
app_->playlist_manager()->active()->set_current_row(-1);
|
||||
current_item_.reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,8 @@ void OutgoingDataCreator::SetClients(QList<RemoteClient*>* clients) {
|
|||
SLOT(ResultsAvailable(int, SearchProvider::ResultList)),
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(app_->global_search(), SIGNAL(SearchFinished(int)),
|
||||
connect(app_->global_search(),
|
||||
SIGNAL(SearchFinished(int)),
|
||||
SLOT(SearchFinished(int)));
|
||||
}
|
||||
|
||||
|
@ -129,8 +130,8 @@ void OutgoingDataCreator::CheckEnabledProviders() {
|
|||
}
|
||||
}
|
||||
|
||||
SongInfoProvider* OutgoingDataCreator::ProviderByName(
|
||||
const QString& name) const {
|
||||
SongInfoProvider* OutgoingDataCreator::ProviderByName(const QString& name)
|
||||
const {
|
||||
for (SongInfoProvider* provider : fetcher_->providers()) {
|
||||
if (UltimateLyricsProvider* lyrics =
|
||||
qobject_cast<UltimateLyricsProvider*>(provider)) {
|
||||
|
@ -494,9 +495,6 @@ void OutgoingDataCreator::SendRepeatMode(PlaylistSequence::RepeatMode mode) {
|
|||
case PlaylistSequence::Repeat_Playlist:
|
||||
msg.mutable_repeat()->set_repeat_mode(pb::remote::Repeat_Playlist);
|
||||
break;
|
||||
case PlaylistSequence::Repeat_OneByOne:
|
||||
msg.mutable_repeat()->set_repeat_mode(pb::remote::Repeat_OneByOne);
|
||||
break;
|
||||
}
|
||||
|
||||
SendDataToClients(&msg);
|
||||
|
@ -655,16 +653,14 @@ void OutgoingDataCreator::SendKitten(const QImage& kitten) {
|
|||
}
|
||||
}
|
||||
|
||||
void OutgoingDataCreator::DoGlobalSearch(const QString& query,
|
||||
RemoteClient* client) {
|
||||
void OutgoingDataCreator::DoGlobalSearch(const QString &query, RemoteClient *client) {
|
||||
int id = app_->global_search()->SearchAsync(query);
|
||||
|
||||
GlobalSearchRequest request(id, query, client);
|
||||
global_search_result_map_.insert(id, request);
|
||||
}
|
||||
|
||||
void OutgoingDataCreator::ResultsAvailable(
|
||||
int id, const SearchProvider::ResultList& results) {
|
||||
void OutgoingDataCreator::ResultsAvailable(int id, const SearchProvider::ResultList& results) {
|
||||
if (!global_search_result_map_.contains(id)) return;
|
||||
|
||||
GlobalSearchRequest search_request = global_search_result_map_.value(id);
|
||||
|
@ -672,14 +668,12 @@ void OutgoingDataCreator::ResultsAvailable(
|
|||
QImage null_img;
|
||||
|
||||
pb::remote::Message msg;
|
||||
pb::remote::ResponseGlobalSearch* response =
|
||||
msg.mutable_response_global_search();
|
||||
pb::remote::ResponseGlobalSearch* response = msg.mutable_response_global_search();
|
||||
|
||||
msg.set_type(pb::remote::GLOBAL_SEARCH_RESULT);
|
||||
response->set_id(search_request.id_);
|
||||
response->set_query(DataCommaSizeFromQString(search_request.query_));
|
||||
response->set_search_provider(
|
||||
DataCommaSizeFromQString(results.first().provider_->name()));
|
||||
response->set_search_provider(DataCommaSizeFromQString(results.first().provider_->name()));
|
||||
|
||||
// Append the icon
|
||||
QImage icon_image(results.first().provider_->icon().pixmap(48, 48).toImage());
|
||||
|
|
|
@ -1684,11 +1684,6 @@ void Playlist::ClearStreamMetadata() {
|
|||
}
|
||||
|
||||
bool Playlist::stop_after_current() const {
|
||||
PlaylistSequence::RepeatMode repeat_mode = playlist_sequence_->repeat_mode();
|
||||
if (repeat_mode == PlaylistSequence::Repeat_OneByOne) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return stop_after_.isValid() && current_item_index_.isValid() &&
|
||||
stop_after_.row() == current_item_index_.row();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ PlaylistSequence::PlaylistSequence(QWidget* parent, SettingsProvider* settings)
|
|||
repeat_group->addAction(ui_->action_repeat_track);
|
||||
repeat_group->addAction(ui_->action_repeat_album);
|
||||
repeat_group->addAction(ui_->action_repeat_playlist);
|
||||
repeat_group->addAction(ui_->action_repeat_onebyone);
|
||||
repeat_menu_->addActions(repeat_group->actions());
|
||||
ui_->repeat->setMenu(repeat_menu_);
|
||||
|
||||
|
@ -119,7 +118,6 @@ void PlaylistSequence::RepeatActionTriggered(QAction* action) {
|
|||
if (action == ui_->action_repeat_track) mode = Repeat_Track;
|
||||
if (action == ui_->action_repeat_album) mode = Repeat_Album;
|
||||
if (action == ui_->action_repeat_playlist) mode = Repeat_Playlist;
|
||||
if (action == ui_->action_repeat_onebyone) mode = Repeat_OneByOne;
|
||||
|
||||
SetRepeatMode(mode);
|
||||
}
|
||||
|
@ -149,9 +147,6 @@ void PlaylistSequence::SetRepeatMode(RepeatMode mode) {
|
|||
case Repeat_Playlist:
|
||||
ui_->action_repeat_playlist->setChecked(true);
|
||||
break;
|
||||
case Repeat_OneByOne:
|
||||
ui_->action_repeat_onebyone->setChecked(true);
|
||||
break;
|
||||
}
|
||||
|
||||
if (mode != repeat_mode_) {
|
||||
|
@ -242,9 +237,6 @@ void PlaylistSequence::CycleRepeatMode() {
|
|||
mode = Repeat_Playlist;
|
||||
break;
|
||||
case Repeat_Playlist:
|
||||
mode = Repeat_OneByOne;
|
||||
break;
|
||||
case Repeat_OneByOne:
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ class PlaylistSequence : public QWidget {
|
|||
Repeat_Track = 1,
|
||||
Repeat_Album = 2,
|
||||
Repeat_Playlist = 3,
|
||||
Repeat_OneByOne = 4
|
||||
};
|
||||
enum ShuffleMode {
|
||||
Shuffle_Off = 0,
|
||||
|
|
|
@ -314,9 +314,6 @@ void OSD::RepeatModeChanged(PlaylistSequence::RepeatMode mode) {
|
|||
case PlaylistSequence::Repeat_Playlist:
|
||||
current_mode = tr("Repeat playlist");
|
||||
break;
|
||||
case PlaylistSequence::Repeat_OneByOne:
|
||||
current_mode = tr("Stop after every track");
|
||||
break;
|
||||
}
|
||||
ShowMessage(QCoreApplication::applicationName(), current_mode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue