本文整理汇总了Python中resources.lib.settings.Settings.isCustomPathEnabled方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.isCustomPathEnabled方法的具体用法?Python Settings.isCustomPathEnabled怎么用?Python Settings.isCustomPathEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类resources.lib.settings.Settings
的用法示例。
在下文中一共展示了Settings.isCustomPathEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getPathForVideoItem
# 需要导入模块: from resources.lib.settings import Settings [as 别名]
# 或者: from resources.lib.settings.Settings import isCustomPathEnabled [as 别名]
def getPathForVideoItem(self, videoItem):
path = ""
# Get the path where the theme should be stored
if Settings.isCustomPathEnabled():
path = os_path_join(Settings.getCustomPath(), normalize_string(videoItem['title']))
else:
path = videoItem['file']
# Handle stacked files that have a custom file name format
if path.startswith("stack://"):
path = path.replace("stack://", "").split(" , ", 1)[0]
# Need to remove the filename from the end as we just want the directory
fileExt = os.path.splitext(path)[1]
# If this is a file, then get it's parent directory
if fileExt is not None and fileExt != "":
path = os_path_split(path)[0]
return path
示例2: len
# 需要导入模块: from resources.lib.settings import Settings [as 别名]
# 或者: from resources.lib.settings.Settings import isCustomPathEnabled [as 别名]
try:
if len(sys.argv) > 2:
# get the type of operation
log("Operation = %s" % sys.argv[1])
# Check to make sure that there was actually some data in the second argument
# it's possible that a skin has sent us an empty string
if (sys.argv[2] is None) or (len(sys.argv[2]) < 1):
log("VideoExtras: Called with empty final argument", xbmc.LOGERROR)
else:
# Load the details of the current source of the extras
SourceDetails.forceLoadDetails()
# handle the plugins that VideoExtras supports
forceExtrasSupport = False
if ("plugin.video.emby" in sys.argv[2]) and Settings.isCustomPathEnabled():
forceExtrasSupport = True
# Make sure we are not passed a plugin path
if ("plugin://" in sys.argv[2]) and not forceExtrasSupport:
if sys.argv[1] == "check":
xbmcgui.Window(12003).setProperty("HideVideoExtrasButton", "true")
else:
# Create the extras class that deals with any extras request
videoExtras = VideoExtras(sys.argv[2])
# We are either running the command or just checking for existence
if sys.argv[1] == "check":
videoExtras.checkButtonEnabled()
else:
# Check if the use database setting is enabled