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

Code before:
       (VIDEO::IsBDFile(item) || item.IsDiscImage())) ||
      (forceSelection && URIUtils::IsBlurayPath(item.GetDynPath())))
  {
    // No video selection when using external or remote players (they handle it if supported)
    const bool isSimpleMenuAllowed = [&]()
    {
      const std::string defaulPlayer{
          player.empty() ? m_ServiceManager->GetPlayerCoreFactory().GetDefaultPlayer(item)
                         : player};
      const bool isExternalPlayer{
          m_ServiceManager->GetPlayerCoreFactory().IsExternalPlayer(defaulPlayer)};
      const bool isRemotePlayer{
          m_ServiceManager->GetPlayerCoreFactory().IsRemotePlayer(defaulPlayer)};
      return !isExternalPlayer && !isRemotePlayer;
    }();

    if (isSimpleMenuAllowed)
    {
      // Check if we must show the simplified bd menu.
      if (!CGUIDialogSimpleMenu::ShowPlaySelection(item, forceSelection))
        return true;

      // Reset any resume state as new playlist chosen
      options.startpercent = 0.0;
      options.starttime = 0.0;
      options.state = "";
    }
  }

  // this really aught to be inside !bRestart, but since PlayStack
  // uses that to init playback, we have to keep it outside
  const PLAYLIST::Id playlistId = CServiceBroker::GetPlaylistPlayer().GetCurrentPlaylist();
  if (MUSIC::IsAudio(item) && playlistId == PLAYLIST::Id::TYPE_MUSIC)
  { // playing from a playlist by the looks
    // don't switch to fullscreen if we are not playing the first item...
    options.fullscreen = !CServiceBroker::GetPlaylistPlayer().HasPlayedFirstFile() &&
        CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(
        CSettings::SETTING_MUSICFILES_SELECTACTION) &&
        !CMediaSettings::GetInstance().DoesMediaStartWindowed();
  }
  else if (VIDEO::IsVideo(item) && playlistId == PLAYLIST::Id::TYPE_VIDEO &&
           CServiceBroker::GetPlaylistPlayer().GetPlaylist(playlistId).size() > 1)
  { // playing from a playlist by the looks
    // don't switch to fullscreen if we are not playing the first item...
    options.fullscreen = !CServiceBroker::GetPlaylistPlayer().HasPlayedFirstFile() &&
        CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_fullScreenOnMovieStart &&
        !CMediaSettings::GetInstance().DoesMediaStartWindowed();
  }
  else if (stackHelper->IsPlayingRegularStack())
  {
    //! @todo - this will fail if user seeks back to first file in stack

Review comment (suggestion):
What if, to guard against new fields not being reset, you do:

```c++
options = {};
```

Not sure if this even works but that's the idea.

Code after:
        }

        if (options.starttime == 0.0 && item.HasVideoInfoTag())
        {
          // No resume point is set, but check if this item is part of a multi-episode file
          const CVideoInfoTag *tag = item.GetVideoInfoTag();

          if (tag->m_iBookmarkId > 0)
          {
            CBookmark bookmark;
            dbs.GetBookMarkForEpisode(*tag, bookmark);
            options.starttime = bookmark.timeInSeconds;
            options.state = bookmark.playerState;
          }
        }
      }
      else if (item.HasVideoInfoTag())
      {
        const CVideoInfoTag *tag = item.GetVideoInfoTag();

        if (tag->m_iBookmarkId > 0)
        {
          CBookmark bookmark;
          dbs.GetBookMarkForEpisode(*tag, bookmark);
          options.starttime = bookmark.timeInSeconds;
          options.state = bookmark.playerState;
        }
      }

      dbs.Close();
    }
  }

  // a disc image might be Blu-Ray disc
  if ((!(options.startpercent > 0.0 || options.starttime > 0.0) &&
       (VIDEO::IsBDFile(item) || ::UTILS::DISCS::IsBlurayDiscImage(item))) ||
      (item.GetProperty("force_playlist_selection").asBoolean(false) &&
       URIUtils::IsBlurayPath(item.GetDynPath())))
  {
    // No video selection when using external or remote players (they handle it if supported)
    const bool isSimpleMenuAllowed = [&]()
    {
      const std::string defaulPlayer{
          player.empty() ? m_ServiceManager->GetPlayerCoreFactory().GetDefaultPlayer(item)
                         : player};
      const bool isExternalPlayer{
          m_ServiceManager->GetPlayerCoreFactory().IsExternalPlayer(defaulPlayer)};
      const bool isRemotePlayer{
          m_ServiceManager->GetPlayerCoreFactory().IsRemotePlayer(defaulPlayer)};
      return !isExternalPlayer && !isRemotePlayer;
    }();