本文整理汇总了Python中resources.lib.settings.Settings.isMenuReturnHome方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.isMenuReturnHome方法的具体用法?Python Settings.isMenuReturnHome怎么用?Python Settings.isMenuReturnHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类resources.lib.settings.Settings
的用法示例。
在下文中一共展示了Settings.isMenuReturnHome方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from resources.lib.settings import Settings [as 别名]
# 或者: from resources.lib.settings.Settings import isMenuReturnHome [as 别名]
def run(self, files):
# All the files have been retrieved, now need to display them
if not files and not Settings.isYouTubeSearchSupportEnabled() and not Settings.isVimeoSearchSupportEnabled():
# "Info", "No extras found"
xbmcgui.Dialog().ok(ADDON.getLocalizedString(32102), ADDON.getLocalizedString(32103))
else:
isTvTunesAlreadySet = True
needsWindowReset = True
# Make sure we don't leave global variables set
try:
# Check which listing format to use
if Settings.isDetailedListScreen():
# Check if TV Tunes override is already set
isTvTunesAlreadySet = (xbmcgui.Window(12000).getProperty("TvTunesContinuePlaying").lower() == "true")
# If TV Tunes is running we want to ensure that we still keep the theme going
# so set this variable on the home screen
if not isTvTunesAlreadySet:
log("VideoExtras: Setting TV Tunes override")
xbmcgui.Window(12000).setProperty("TvTunesContinuePlaying", "True")
else:
log("VideoExtras: TV Tunes override already set")
extrasWindow = VideoExtrasWindow.createVideoExtrasWindow(files=files)
xbmc.executebuiltin("Dialog.Close(movieinformation)", True)
extrasWindow.doModal()
del extrasWindow
else:
extrasWindow = VideoExtrasDialog()
needsWindowReset = extrasWindow.showList(files)
del extrasWindow
# The video selection will be the default return location
if (not Settings.isMenuReturnVideoSelection()) and needsWindowReset:
if Settings.isMenuReturnHome():
xbmc.executebuiltin("ActivateWindow(home)", True)
else:
infoDialogId = 12003
# Put the information dialog back up
xbmc.executebuiltin("ActivateWindow(movieinformation)")
if Settings.isMenuReturnExtras():
# Wait for the Info window to open, it can take a while
# this is to avoid the case where the exList dialog displays
# behind the info dialog
counter = 0
while (xbmcgui.getCurrentWindowDialogId() != infoDialogId) and (counter < 30):
xbmc.sleep(100)
counter = counter + 1
# Allow time for the screen to load - this could result in an
# action such as starting TvTunes
xbmc.sleep(1000)
# Before showing the list, check if someone has quickly
# closed the info screen while it was opening and we were waiting
if xbmcgui.getCurrentWindowDialogId() == infoDialogId:
# Reshow the exList that was previously generated
self.run(files)
except:
log("VideoExtras: %s" % traceback.format_exc(), xbmc.LOGERROR)
# Tidy up the TV Tunes flag if we set it
if not isTvTunesAlreadySet:
log("VideoExtras: Clearing TV Tunes override")
xbmcgui.Window(12000).clearProperty("TvTunesContinuePlaying")