Update app.py
Browse files
app.py
CHANGED
|
@@ -12,16 +12,6 @@ import os
|
|
| 12 |
import uuid
|
| 13 |
import gc # Import the garbage collector module
|
| 14 |
|
| 15 |
-
# Constants
|
| 16 |
-
BASE_URL = 'https://tecuts-request.hf.space'
|
| 17 |
-
BASE = 'https://www.qobuz.com/api.json/0.2/'
|
| 18 |
-
try:
|
| 19 |
-
load_dotenv()
|
| 20 |
-
TOEKN = os.getenv('TOKEN')
|
| 21 |
-
if not TOKEN:
|
| 22 |
-
logging.error(f"no token found")
|
| 23 |
-
TOKEN = None
|
| 24 |
-
|
| 25 |
APP_ID = '579939560'
|
| 26 |
|
| 27 |
# Custom Headers
|
|
@@ -39,6 +29,17 @@ logging.basicConfig(level=logging.DEBUG)
|
|
| 39 |
def md5(string):
|
| 40 |
"""Generate MD5 hash of a string."""
|
| 41 |
return hashlib.md5(string.encode('utf-8')).hexdigest()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
@app.get('/')
|
| 44 |
def main():
|
|
|
|
| 12 |
import uuid
|
| 13 |
import gc # Import the garbage collector module
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
APP_ID = '579939560'
|
| 16 |
|
| 17 |
# Custom Headers
|
|
|
|
| 29 |
def md5(string):
|
| 30 |
"""Generate MD5 hash of a string."""
|
| 31 |
return hashlib.md5(string.encode('utf-8')).hexdigest()
|
| 32 |
+
# Constants
|
| 33 |
+
BASE_URL = 'https://tecuts-request.hf.space'
|
| 34 |
+
BASE = 'https://www.qobuz.com/api.json/0.2/'
|
| 35 |
+
try:
|
| 36 |
+
load_dotenv()
|
| 37 |
+
TOEKN = os.getenv('TOKEN')
|
| 38 |
+
except Exception as e:
|
| 39 |
+
logging.error(f"no token found")
|
| 40 |
+
TOKEN = None
|
| 41 |
+
|
| 42 |
+
|
| 43 |
|
| 44 |
@app.get('/')
|
| 45 |
def main():
|