Merge pull request #3345 from smopucilowski/simple-clean

Refactor magic values in discogs_client
This commit is contained in:
Adrian Sampson 2019-08-11 08:38:57 +02:00 committed by GitHub
commit 27e0e7600d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,6 +38,8 @@ from string import ascii_lowercase
USER_AGENT = u'beets/{0} +https://beets.io/'.format(beets.__version__)
API_KEY = 'rAzVUQYRaoFjeBjyWuWZ'
API_SECRET = 'plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy'
# Exceptions that discogs_client should really handle but does not.
CONNECTION_ERRORS = (ConnectionError, socket.error, http_client.HTTPException,
@ -50,8 +52,8 @@ class DiscogsPlugin(BeetsPlugin):
def __init__(self):
super(DiscogsPlugin, self).__init__()
self.config.add({
'apikey': 'rAzVUQYRaoFjeBjyWuWZ',
'apisecret': 'plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy',
'apikey': API_KEY,
'apisecret': API_SECRET,
'tokenfile': 'discogs_token.json',
'source_weight': 0.5,
'user_token': '',