diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2018-03-28 10:00:00 +0200 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2018-04-02 14:44:10 -0700 |
commit | 3fc19e5635c45c8719db11e34620dfe4a41f9b88 (patch) | |
tree | db604c556bfbb771dd7a291ff8f2e4075ca72a83 | |
parent | f5facd52ad0c16999160530f0f150322b4d84aef (diff) |
Improve logic in CAutorun::ExecuteAutorun()
-rw-r--r-- | xbmc/Autorun.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/xbmc/Autorun.cpp b/xbmc/Autorun.cpp index c304810040..b38cb53d08 100644 --- a/xbmc/Autorun.cpp +++ b/xbmc/Autorun.cpp @@ -67,8 +67,18 @@ CAutorun::~CAutorun() = default; void CAutorun::ExecuteAutorun(const std::string& path, bool bypassSettings, bool ignoreplaying, bool startFromBeginning ) { - if ((!ignoreplaying && (g_application.GetAppPlayer().IsPlayingAudio() || g_application.GetAppPlayer().IsPlayingVideo() || CServiceBroker::GetGUI()->GetWindowManager().HasModalDialog())) || CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_LOGIN_SCREEN) - return ; + if (!ignoreplaying) + { + if (g_application.GetAppPlayer().IsPlayingAudio() || + g_application.GetAppPlayer().IsPlayingVideo() || + CServiceBroker::GetGUI()->GetWindowManager().HasModalDialog()) + { + return; + } + } + + if (CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_LOGIN_SCREEN) + return; CCdInfo* pInfo = g_mediaManager.GetCdInfo(path); |