Skip to content

Commit 4474da4

Browse files
committed
change the default mb retry/timeout count
1 parent 4654432 commit 4474da4

File tree

6 files changed

+10
-21
lines changed

6 files changed

+10
-21
lines changed

nowplaying/musicbrainz.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
REMIX_RE = re.compile(r'^(.*) [\(\[].*[\)\]]$')
2121

22+
musicbrainzngs._max_retries = 3
23+
musicbrainzngs._timeout = 30
2224

2325
@functools.lru_cache(maxsize=128, typed=False)
2426
def _verify_artist_name(artistname, artistcredit):

nowplaying/vendor/bin/wptool

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/Users/aw/venv/wnp/bin/python3.10
1+
#!/tmp/wnp/bin/python
22
# -*- coding: utf-8 -*-
33
import re
44
import sys

nowplaying/vendor/discogs_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '2.6'
1+
__version__ = '2.7'
22
__version_info__ = tuple(int(i) for i in __version__.split('.') if i.isdigit())
33

44
from nowplaying.vendor.discogs_client.client import Client

nowplaying/vendor/discogs_client/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,10 @@ class Artist(PrimaryAPIObject):
479479
#: single string, for example: "DJ ABC Feat MC Z". Also check out the
480480
#: ``artists_sort`` attribute of a ``Release`` object.
481481
join = SimpleField()
482-
482+
#: This attribute is only present when an ``Artist`` object is part of a
483+
#: ``credits`` list of a ``Release`` object.
484+
role = SimpleField()
485+
483486
def __init__(self, client, dict_):
484487
super(Artist, self).__init__(client, dict_)
485488
self.data['resource_url'] = '{0}/artists/{1}'.format(client._base_url, dict_['id'])
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2011 Alastair Porter, Adrian Sampson, and others.
1+
Copyright 2011-2023 Alastair Porter, Adrian Sampson, and others.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
@@ -22,19 +22,3 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2222
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2323
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2424

25-
26-
The license for the file `musicbrainzngs/compat.py` is
27-
28-
Copyright (c) 2012 Kenneth Reitz.
29-
30-
Permission to use, copy, modify, and/or distribute this software for any
31-
purpose with or without fee is hereby granted, provided that the above
32-
copyright notice and this permission notice appear in all copies.
33-
34-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
35-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
36-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
37-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
38-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
39-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
40-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

nowplaying/vendor/musicbrainzngs/musicbrainz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_max_retries = 8
2626

2727
_timeout = 60
28-
_retry = Retry(total=8, backoff_factor=2, status_forcelist=[500, 502, 503])
28+
_retry = Retry(total=_max_retries, backoff_factor=2, status_forcelist=[500, 502, 503])
2929

3030
LUCENE_SPECIAL = r'([+\-&|!(){}\[\]\^"~*?:\\\/])'
3131

0 commit comments

Comments
 (0)