Repository: xbmc/xbmc
File: xbmc/application/ApplicationPlay.cpp (C++)

Code before:
  // Get current playlist info
  const auto playlistId{CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist()};

  // Determine fullscreen status based on media type and playlist
  using enum PlayMediaType;
  if (MUSIC::IsAudio(m_item) && playlistId == PLAYLIST::Id::TYPE_MUSIC)
    m_options.fullscreen = ShouldGoFullScreen(MUSIC_PLAYLIST);
  else if (VIDEO::IsVideo(m_item) && playlistId == PLAYLIST::Id::TYPE_VIDEO &&
           CServiceBroker::GetPlaylistPlayer().GetPlaylist(playlistId).size() > 1)
  {
    m_options.fullscreen = ShouldGoFullScreen(VIDEO_PLAYLIST);
  }
  else if (m_stackHelper.IsPlayingRegularStack())
  {
    if (m_stackHelper.GetCurrentPartNumber() == 0 ||
        m_stackHelper.GetRegisteredStack(m_item)->GetStartOffset() != 0)
      m_options.fullscreen = ShouldGoFullScreen(VIDEO);
    else
      m_options.fullscreen = false;
  }
  else
    m_options.fullscreen = ShouldGoFullScreen(VIDEO);
}

CApplicationPlay::GatherPlaybackDetailsResult CApplicationPlay::GatherPlaybackDetails(
    const CFileItem& item, std::string_view player, bool restart)
{
  m_item = item;
  m_player = player;

  if (m_item.IsStack())
  {
    if (!ResolveStack())
      return GatherPlaybackDetailsResult::RESULT_ERROR;

    m_player.clear();
    restart = true;
  }

  // Ensure the MIME type has been retrieved for http:// and shout:// streams
  if (m_item.GetMimeType().empty())
    m_item.FillInMimeType();

  if (VIDEO::IsDiscStub(m_item))
    return GatherPlaybackDetailsResult::RESULT_SUCCESS; // all done

  if (PLAYLIST::IsPlayList(m_item))
    return GatherPlaybackDetailsResult::RESULT_ERROR; // playlists not supported

  if (!ResolvePath())
    return GatherPlaybackDetailsResult::RESULT_ERROR;

Review comment (suggestion):
I would slightly prefer `std::string` by value and then move-assigning from it.

Code after:
  // Get current playlist info
  const auto playlistId{CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist()};

  // Determine fullscreen status based on media type and playlist
  using enum PlayMediaType;
  if (MUSIC::IsAudio(m_item) && playlistId == PLAYLIST::Id::TYPE_MUSIC)
    m_options.fullscreen = ShouldGoFullScreen(MUSIC_PLAYLIST);
  else if (VIDEO::IsVideo(m_item) && playlistId == PLAYLIST::Id::TYPE_VIDEO &&
           CServiceBroker::GetPlaylistPlayer().GetPlaylist(playlistId).size() > 1)
  {
    m_options.fullscreen = ShouldGoFullScreen(VIDEO_PLAYLIST);
  }
  else if (m_stackHelper.IsPlayingRegularStack())
  {
    if (m_stackHelper.GetCurrentPartNumber() == 0 ||
        m_stackHelper.GetRegisteredStack(m_item)->GetStartOffset() != 0)
      m_options.fullscreen = ShouldGoFullScreen(VIDEO);
    else
      m_options.fullscreen = false;
  }
  else
    m_options.fullscreen = ShouldGoFullScreen(VIDEO);
}

CApplicationPlay::GatherPlaybackDetailsResult CApplicationPlay::GatherPlaybackDetails(
    const CFileItem& item, std::string player, bool restart)
{
  m_item = item;
  m_player = std::move(player);

  if (m_item.IsStack())
  {
    if (!ResolveStack())
      return GatherPlaybackDetailsResult::RESULT_ERROR;

    m_player.clear();
    restart = true;
  }

  // Ensure the MIME type has been retrieved for http:// and shout:// streams
  if (m_item.GetMimeType().empty())
    m_item.FillInMimeType();

  if (VIDEO::IsDiscStub(m_item))
    return GatherPlaybackDetailsResult::RESULT_SUCCESS; // all done

  if (PLAYLIST::IsPlayList(m_item))
    return GatherPlaybackDetailsResult::RESULT_ERROR; // playlists not supported

  if (!ResolvePath())
    return GatherPlaybackDetailsResult::RESULT_ERROR;