Esempio n. 1
0
 def get_config_schema(self):
     schema = config.ConfigSchema(self.ext_name)
     schema['enabled'] = config.Boolean()
     schema['country'] = config.String()
     schema['locale'] = config.String()
     schema['spotify_authorization_url'] = config.String()
     schema['lastfm_authorization_url'] = config.String()
     schema['genius_provider_url'] = config.String()
     schema['snapcast_enabled'] = config.Boolean()
     schema['snapcast_host'] = config.String()
     schema['snapcast_port'] = config.Integer()
     return schema
Esempio n. 2
0
    def get_config_schema(self):
        schema = super(Extension, self).get_config_schema()
        schema['volume_device'] = config.String()
        schema['volume_axis'] = config.String()
        schema['volume_max'] = config.Integer(optional=True)
        schema['volume_step'] = config.Integer(optional=True)

        schema['playlist_device'] = config.String()
        schema['playlist_axis'] = config.String()
        schema['mute_device'] = config.String()
        schema['mute_key'] = config.String()
        return schema
Esempio n. 3
0
 def get_config_schema(self):
     schema = super().get_config_schema()
     schema["auth_json"] = config.String(optional=True)
     schema["auto_playlist_refresh"] = config.Integer(minimum=0,
                                                      optional=True)
     schema["youtube_player_refresh"] = config.Integer(minimum=1,
                                                       optional=True)
     schema["playlist_item_limit"] = config.Integer(minimum=1,
                                                    optional=True)
     schema["subscribed_artist_limit"] = config.Integer(minimum=0,
                                                        optional=True)
     schema["enable_history"] = config.Boolean(optional=True)
     schema["enable_liked_songs"] = config.Boolean(optional=True)
     schema["enable_mood_genre"] = config.Boolean(optional=True)
     schema["enable_scrobbling"] = config.Boolean(optional=True)
     schema["stream_preference"] = config.List(optional=True)
     schema["verify_track_url"] = config.Boolean(optional=True)
     return schema
Esempio n. 4
0
    def get_config_schema(self):
        schema = super().get_config_schema()
        schema["theme_type"] = config.String(optional=True,
                                             choices=["light", "dark"])
        schema["background_color"] = ConfigColor(optional=True)
        schema["text_color"] = ConfigColor(optional=True)
        schema["primary_color"] = ConfigColor(optional=True)
        schema["seek_update_interval"] = config.Integer()
        schema["search_history_length"] = config.Integer()
        schema["disable_dnd"] = config.Boolean()
        schema["small_screen"] = config.Boolean()

        schema["key_play_pause"] = config.String(optional=True)
        schema["key_next_track"] = config.String(optional=True)
        schema["key_previous_track"] = config.String(optional=True)
        schema["key_rewind_track"] = config.String(optional=True)
        schema["key_volume_up"] = config.String(optional=True)
        schema["key_volume_down"] = config.String(optional=True)
        return schema
Esempio n. 5
0
    def get_config_schema(self):
        schema = super(GMusicExtension, self).get_config_schema()

        schema['initial_code'] = config.Secret(optional=True)
        schema['refresh_token'] = config.Secret(optional=True)

        schema['bitrate'] = config.Integer(choices=(128, 160, 320))

        schema['deviceid'] = config.String(optional=True)

        schema['all_access'] = config.Boolean(optional=True)

        schema['refresh_library'] = config.Integer(minimum=-1, optional=True)
        schema['refresh_playlists'] = config.Integer(minimum=-1, optional=True)

        schema['radio_stations_in_browse'] = config.Boolean(optional=True)
        schema['radio_stations_as_playlists'] = config.Boolean(optional=True)
        schema['radio_stations_count'] = config.Integer(
            minimum=1, optional=True)
        schema['radio_tracks_count'] = config.Integer(minimum=1, optional=True)

        schema['top_tracks_count'] = config.Integer(minimum=1, optional=True)

        return schema
Esempio n. 6
0
 def test_schema_that_is_missing_enabled(self, ext_data):
     del ext_data.config_schema["enabled"]
     ext_data.config_schema["baz"] = config.String()
     assert not ext.validate_extension_data(ext_data)
Esempio n. 7
0
 def get_config_schema(self):
     schema = super().get_config_schema()
     schema["cmd_power"] = config.String()
     schema["cmd_unpower"] = config.String()
     schema["unpower_in_minutes"] = config.Integer()
     return schema
Esempio n. 8
0
 def get_config_schema(self):
     from pandora import BaseAPIClient
     schema = super(Extension, self).get_config_schema()
     schema['api_host'] = config.String()
     schema['partner_encryption_key'] = config.String()
     schema['partner_decryption_key'] = config.String()
     schema['partner_username'] = config.String()
     schema['partner_password'] = config.String()
     schema['partner_device'] = config.String()
     schema['username'] = config.String()
     schema['password'] = config.Secret()
     schema['preferred_audio_quality'] = config.String(choices=[
         BaseAPIClient.LOW_AUDIO_QUALITY, BaseAPIClient.MED_AUDIO_QUALITY,
         BaseAPIClient.HIGH_AUDIO_QUALITY
     ])
     schema['sort_order'] = config.String(choices=['date', 'A-Z', 'a-z'])
     schema['auto_setup'] = config.Boolean()
     schema['auto_set_repeat'] = config.Deprecated()
     schema['cache_time_to_live'] = config.Integer(minimum=0)
     schema['event_support_enabled'] = config.Boolean()
     schema['double_click_interval'] = config.String()
     schema['on_pause_resume_click'] = config.String(choices=[
         'thumbs_up', 'thumbs_down', 'sleep', 'add_artist_bookmark',
         'add_song_bookmark', 'delete_station'
     ])
     schema['on_pause_next_click'] = config.String(choices=[
         'thumbs_up', 'thumbs_down', 'sleep', 'add_artist_bookmark',
         'add_song_bookmark', 'delete_station'
     ])
     schema['on_pause_previous_click'] = config.String(choices=[
         'thumbs_up', 'thumbs_down', 'sleep', 'add_artist_bookmark',
         'add_song_bookmark', 'delete_station'
     ])
     schema['on_pause_resume_pause_click'] = config.String(choices=[
         'thumbs_up', 'thumbs_down', 'sleep', 'add_artist_bookmark',
         'add_song_bookmark', 'delete_station'
     ])
     return schema
Esempio n. 9
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['backup_file'] = config.String()
     return schema
Esempio n. 10
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema["display"] = config.String(
         choices=self.get_display_types().keys())
     return schema
Esempio n. 11
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['username'] = config.String()
     schema['password'] = config.Secret()
     return schema
Esempio n. 12
0
 def get_config_schema(self):
     schema = super().get_config_schema()
     schema["snapclient_path"] = config.Path(optional=True)
     schema["snapclient_args"] = config.String(optional=True)
     return schema
Esempio n. 13
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['api_key'] = config.String()
     schema['top_list_size'] = config.String()
     schema['secret'] = config.Secret()
     return schema
Esempio n. 14
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['mute'] = config.String()
     schema['next'] = config.String()
     schema['previous'] = config.String()
     schema['playpause'] = config.String()
     schema['stop'] = config.String()
     schema['volumeup'] = config.String()
     schema['volumedown'] = config.String()
     schema['power'] = config.String()
     schema['menu'] = config.String()
     schema['favorites'] = config.String()
     schema['search'] = config.String()
     schema['playlist_uri_template'] = config.String()
     schema['num0'] = config.String()
     schema['num1'] = config.String()
     schema['num2'] = config.String()
     schema['num3'] = config.String()
     schema['num4'] = config.String()
     schema['num5'] = config.String()
     schema['num6'] = config.String()
     schema['num7'] = config.String()
     schema['num8'] = config.String()
     schema['num9'] = config.String()
     return schema
Esempio n. 15
0
 def get_config_schema(self):
     schema = super(RadioDeExtension, self).get_config_schema()
     schema['language'] = config.String()
     schema['favorites'] = config.List(optional=True)
     return schema
Esempio n. 16
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['bot_token'] = config.String()
     return schema
Esempio n. 17
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['topic'] = config.String()
     schema['mqtthost'] = config.String()
     schema['mqttport'] = config.Integer()
     return schema
Esempio n. 18
0
    def get_config_schema(self):
        from pandora.client import BaseAPIClient

        schema = super().get_config_schema()
        schema["api_host"] = config.String()
        schema["partner_encryption_key"] = config.String()
        schema["partner_decryption_key"] = config.String()
        schema["partner_username"] = config.String()
        schema["partner_password"] = config.String()
        schema["partner_device"] = config.String()
        schema["username"] = config.String()
        schema["password"] = config.Secret()
        schema["preferred_audio_quality"] = config.String(
            choices=[
                BaseAPIClient.LOW_AUDIO_QUALITY,
                BaseAPIClient.MED_AUDIO_QUALITY,
                BaseAPIClient.HIGH_AUDIO_QUALITY,
            ]
        )
        schema["sort_order"] = config.String(choices=["date", "A-Z", "a-z"])
        schema["auto_setup"] = config.Boolean()
        schema["auto_set_repeat"] = config.Deprecated()
        schema["cache_time_to_live"] = config.Integer(minimum=0)
        schema["event_support_enabled"] = config.Boolean()
        schema["double_click_interval"] = config.String()
        schema["on_pause_resume_click"] = config.String(
            choices=[
                "thumbs_up",
                "thumbs_down",
                "sleep",
                "add_artist_bookmark",
                "add_song_bookmark",
                "delete_station",
            ]
        )
        schema["on_pause_next_click"] = config.String(
            choices=[
                "thumbs_up",
                "thumbs_down",
                "sleep",
                "add_artist_bookmark",
                "add_song_bookmark",
                "delete_station",
            ]
        )
        schema["on_pause_previous_click"] = config.String(
            choices=[
                "thumbs_up",
                "thumbs_down",
                "sleep",
                "add_artist_bookmark",
                "add_song_bookmark",
                "delete_station",
            ]
        )
        schema["on_pause_resume_pause_click"] = config.String(
            choices=[
                "thumbs_up",
                "thumbs_down",
                "sleep",
                "add_artist_bookmark",
                "add_song_bookmark",
                "delete_station",
            ]
        )
        return schema
Esempio n. 19
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['default_encoding'] = config.String()
     schema['default_extension'] = config.String(choices=['.m3u', '.m3u8'])
     schema['playlists_dir'] = config.Path(optional=True)
     return schema
Esempio n. 20
0
 def get_config_schema(self):
     schema = super().get_config_schema()
     schema["username"] = config.String()
     schema["password"] = config.Secret()
     return schema
 def get_config_schema(self):
     schema = super().get_config_schema()
     schema["login"] = config.String()
     schema["password"] = config.Secret()
     schema["bitrate"] = config.Integer(optional=True)
     return schema
Esempio n. 22
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['card'] = config.Integer(minimum=0)
     schema['control'] = config.String()
     return schema
Esempio n. 23
0
 def get_config_schema(self):
     schema = super(GMusicExtension, self).get_config_schema()
     schema['username'] = config.String()
     schema['password'] = config.Secret()
     schema['deviceid'] = config.String(optional=True)
     return schema
Esempio n. 24
0
 def get_config_schema(self):
     schema = super(BeetsExtension, self).get_config_schema()
     schema['url'] = config.String()
     return schema
Esempio n. 25
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['default_playlist'] = config.String()
     schema['offline'] = config.Boolean(optional=True)
     return schema
Esempio n. 26
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['sink'] = config.String(optional=True)
     return schema
Esempio n. 27
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['http_cache'] = config.String()
     return schema
Esempio n. 28
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['host'] = config.String()
     schema['source'] = config.String(optional=True)
     schema['party_mode'] = config.Boolean(optional=True)
     return schema
Esempio n. 29
0
 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
Esempio n. 30
0
 def get_config_schema(self):
     schema = super(Extension, self).get_config_schema()
     schema['title'] = config.String()
     schema['ws_url'] = config.String(optional=True)
     return schema