aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2018-03-28 10:00:00 +0200
committerGarrett Brown <themagnificentmrb@gmail.com>2018-04-02 14:44:10 -0700
commit3fc19e5635c45c8719db11e34620dfe4a41f9b88 (patch)
treedb604c556bfbb771dd7a291ff8f2e4075ca72a83
parentf5facd52ad0c16999160530f0f150322b4d84aef (diff)
Improve logic in CAutorun::ExecuteAutorun()
-rw-r--r--xbmc/Autorun.cpp14
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);