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
|
|
@ -626,7 +626,11 @@
|
|||
{% if req.stems_error %}
|
||||
<div class="flash error">{{ req.stems_error }}</div>
|
||||
{% endif %}
|
||||
{% if req.stems_url %}
|
||||
{% if req.stems_link %}
|
||||
<div class="actions">
|
||||
<a href="{{ req.stems_link }}" target="_blank" rel="noopener noreferrer" class="button-link" style="display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1rem;background:#4b5563;border-radius:.375rem;color:#fff;text-decoration:none;font-size:.875rem">⬇ Download Stems</a>
|
||||
</div>
|
||||
{% elif req.stems_url %}
|
||||
<div class="actions">
|
||||
<a href="{{ url_for('admin_download_stems', rid=req.id) }}" class="button-link" style="display:inline-flex;align-items:center;gap:.4rem;padding:.5rem 1rem;background:#4b5563;border-radius:.375rem;color:#fff;text-decoration:none;font-size:.875rem">⬇ Download Stems (zip)</a>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue