| | |
| | | import json |
| | | import re |
| | | import requests |
| | | import unicodedata |
| | | import sys |
| | | from querysubsonic import findalbumbyname |
| | | |
| | |
| | | |
| | | def getmetacopyright(): |
| | | # Return normalized copyright data |
| | | copyright = unicodedata.normalize('NFKD', metadata['format']['tags']['copyright']).encode('ascii', 'ignore') |
| | | return copyright.decode() |
| | | copyright = normalize_data(metadata['format']['tags']['copyright']) |
| | | return copyright |
| | | |
| | | |
| | | def getmetadatatags(key): |
| | |
| | | def getcorrectkey(): |
| | | # request the key for the checksum |
| | | try: |
| | | r = requests.post('http://prod-faas-gw.darkurthe.net:8080/function/checkkey', metadata['checksum'], verify=False, timeout=None) |
| | | r = requests.post('http://faas.darkurthe.net/function/checkkey', metadata['checksum'], verify=False, timeout=None) |
| | | return r.text.strip() |
| | | except requests.exceptions.HTTPError as err: |
| | | raise err |