File tree Expand file tree Collapse file tree 2 files changed +21
-21
lines changed
project/settings/components Expand file tree Collapse file tree 2 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -853,25 +853,18 @@ def mb_complete_media_task(
853853 rel .save ()
854854
855855 # acousticbrainz musical analysis
856- if mb_id :
857- url = "http://acousticbrainz.org/{mb_id}/low-level" .format (mb_id = mb_id )
858- log .debug ("API request for: %s" % url )
859- r = requests .get (url , timeout = 5 )
860- if r .status_code == 200 :
861- result = r .json ()
862- try :
863- bpm = result ["rhythm" ]["bpm" ]
864- log .debug ("aquired tempo - {}bpm" .format (bpm ))
865- obj .tempo = float (bpm )
866- except Exception as e :
867- pass
868-
869- # try:
870- # key = result['tonal']['key_key']
871- # scale = result['tonal']['key_scale']
872- # obj.tempo = bpm
873- # except:
874- # pass
856+ # if mb_id:
857+ # url = "http://acousticbrainz.org/{mb_id}/low-level".format(mb_id=mb_id)
858+ # log.debug("API request for: %s" % url)
859+ # r = requests.get(url, timeout=5)
860+ # if r.status_code == 200:
861+ # result = r.json()
862+ # try:
863+ # bpm = result["rhythm"]["bpm"]
864+ # log.debug("aquired tempo - {}bpm".format(bpm))
865+ # obj.tempo = float(bpm)
866+ # except Exception as e:
867+ # pass
875868
876869 return obj
877870
Original file line number Diff line number Diff line change 1717COMPRESS_OFFLINE = False
1818COMPRESS_ENABLED = True
1919
20-
2120################################################################################
22- # language settings
21+ # hacks
2322################################################################################
23+ # os is outdated, manual download of cacert.pem is required
24+ # wget https://curl.se/ca/cacert.pem -O /etc/ca-manually/cacert.pem
25+ CA_CERT_PATH = "/etc/ca-manually/cacert.pem"
26+ if os .path .exists (CA_CERT_PATH ):
27+ os .environ ["REQUESTS_CA_BUNDLE" ] = CA_CERT_PATH
2428
2529
30+ ################################################################################
31+ # language settings
32+ ################################################################################
2633DEFAULT_LANGUAGE = 0
2734LANGUAGE_CODE = "en"
2835
You can’t perform that action at this time.
0 commit comments