Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e8077ff authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Send the only song in queue as now playing song when get item attributes of now playing"

parents a760c7fa 23692e7e
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -992,11 +992,18 @@ void Device::GetItemAttributesNowPlayingResponse(
  DEVICE_VLOG(2) << __func__ << ": media_id=\"" << media_id << "\"";

  SongInfo info;
  if (song_list.size() == 1) {
    DEVICE_VLOG(2)
        << __func__
        << " Send out the only song in the queue as now playing song.";
    info = song_list.front();
  } else {
    for (const auto& temp : song_list) {
      if (temp.media_id == media_id) {
        info = temp;
      }
    }
  }

  auto attributes_requested = pkt->GetAttributesRequested();
  if (attributes_requested.size() != 0) {