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

Commit 21f9e063 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

Merge "Send the only song in queue as now playing song when get item attributes of now playing" into rvc-dev
parents fec73058 4c37563c
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -995,11 +995,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) {