示例#1
0
文件: spotify.py 项目: wickism/beets
    def __init__(self):
        super(SpotifyPlugin, self).__init__()
        self.config.add({
            'mode': 'list',
            'tiebreak': 'popularity',
            'show_failures': False,
            'artist_field': 'albumartist',
            'album_field': 'album',
            'track_field': 'title',
            'region_filter': None,
            'regex': [],
            'client_id': '4e414367a1d14c75a5c5129a627fcab8',
            'client_secret': 'f82bdc09b2254f1a8286815d02fd46dc',
            'tokenfile': 'spotify_token.json',
            'source_weight': 0.5,
        })
        self.config['client_secret'].redact = True

        self.tokenfile = self.config['tokenfile'].get(
            confit.Filename(in_app_dir=True)
        )  # Path to the JSON file for storing the OAuth access token.
        self.setup()
示例#2
0
 def _tokenfile(self):
     """Get the path to the JSON file for storing the OAuth token.
     """
     return self.config['tokenfile'].get(confit.Filename(in_app_dir=True))