Auto-upload stems to Gokapi on completion, save share link
- New helpers: parse_stems_urls, upload_to_gokapi, process_stems_to_gokapi - Stems webhook handler now downloads stem files from MusicGPT CDN, zips them, uploads to Gokapi with 30-day expiry, saves the Gokapi download URL to stems_link in the DB - Download Stems button uses stems_link (Gokapi URL) when available, falls back to the zip endpoint if not - Config: GOKAPI_URL, GOKAPI_API_KEY, GOKAPI_EXPIRY_DAYS env vars - docker-compose: GOKAPI_* environment variables added
This commit is contained in:
parent
9df4c685a4
commit
ccc93ffb3b
5 changed files with 140 additions and 3 deletions
|
|
@ -110,6 +110,11 @@ class Config:
|
|||
MUSICGPT_MODELS = ['v6', 'v6-pro']
|
||||
MUSICGPT_DEFAULT_MODEL = os.environ.get('MUSICGPT_DEFAULT_MODEL', 'v6-pro')
|
||||
|
||||
# Gokapi file-sharing server for stems uploads.
|
||||
GOKAPI_URL = os.environ.get('GOKAPI_URL', '')
|
||||
GOKAPI_API_KEY = os.environ.get('GOKAPI_API_KEY', '')
|
||||
GOKAPI_EXPIRY_DAYS = int(os.environ.get('GOKAPI_EXPIRY_DAYS', '30'))
|
||||
|
||||
@classmethod
|
||||
def musicgpt_webhook_base_url(cls):
|
||||
"""Return the public base URL used for MusicGPT webhooks."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue