本文整理汇总了Python中mopidy.config.String方法的典型用法代码示例。如果您正苦于以下问题:Python config.String方法的具体用法?Python config.String怎么用?Python config.String使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mopidy.config
的用法示例。
在下文中一共展示了config.String方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super().get_config_schema()
schema["hostname"] = config.Hostname()
schema["port"] = config.Port(optional=True)
schema["password"] = config.Secret(optional=True)
schema["max_connections"] = config.Integer(minimum=1)
schema["connection_timeout"] = config.Integer(minimum=1)
schema["zeroconf"] = config.String(optional=True)
schema["command_blacklist"] = config.List(optional=True)
schema["default_playlist_scheme"] = config.String()
return schema
示例2: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['server'] = config.String()
schema['username'] = config.String()
schema['password'] = config.Secret()
return schema
示例3: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['username'] = config.String(optional=True)
schema['password'] = config.Secret(optional=True)
schema['quality'] = config.String(optional=True)
schema['difm'] = config.Boolean(optional=True)
schema['radiotunes'] = config.Boolean(optional=True)
schema['rockradio'] = config.Boolean(optional=True)
schema['jazzradio'] = config.Boolean(optional=True)
schema['frescaradio'] = config.Boolean(optional=True)
return schema
示例4: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['username'] = config.String()
schema['password'] = config.Secret()
schema['quality'] = config.String(choices=["LOSSLESS", "HIGH", "LOW"])
return schema
示例5: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['client_id'] = config.String()
schema['client_secret'] = config.String()
schema['mopidy_token_url'] = config.String()
schema['spotify_token_url'] = config.String()
schema['use_mopidy_oauth_bridge'] = config.Boolean()
schema['refresh_token'] = config.String()
return schema
示例6: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['topic'] = config.String()
schema['mqtthost'] = config.String()
schema['mqttport'] = config.Integer()
schema['username'] = config.String()
schema['password'] = config.String()
schema['stoppedimage'] = config.String()
schema['defaultimage'] = config.String()
return schema
示例7: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super().get_config_schema()
schema["timeout"] = config.Integer(minimum=0)
schema["filter"] = config.String(
optional=True, choices=("station", "program")
)
return schema
示例8: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super().get_config_schema()
schema["card"] = config.Integer(minimum=0)
schema["control"] = config.String()
schema["min_volume"] = config.Integer(minimum=0, maximum=100)
schema["max_volume"] = config.Integer(minimum=0, maximum=100)
schema["volume_scale"] = config.String(
choices=("linear", "cubic", "log")
)
return schema
示例9: get_config_schema
# 需要导入模块: from mopidy import config [as 别名]
# 或者: from mopidy.config import String [as 别名]
def get_config_schema(self):
schema = super(Extension, self).get_config_schema()
schema['username'] = config.String()
schema['user_id'] = config.String(optional=True)
schema['password'] = config.Secret(optional=True)
schema['hostname'] = config.String()
schema['libraries'] = config.String(optional=True)
schema['albumartistsort'] = config.String(optional=True)
schema['port'] = config.Port(optional=True)
schema['client_cert'] = config.String(optional=True)
schema['client_key'] = config.String(optional=True)
schema['album_format'] = config.String(optional=True)
schema['max_bitrate'] = config.Integer(optional=True)
return schema