22 lines
885 B
Markdown
22 lines
885 B
Markdown
# Audio File Naming and Caption Improvements
|
|
|
|
## Changes Made
|
|
|
|
### 1. Frontend (public/script.ts)
|
|
- Added `performer` field to `/api/convert` request
|
|
- Now sends artist name along with title and other metadata
|
|
|
|
### 2. Backend (src/server.ts)
|
|
- Updated `/api/convert` endpoint to accept `performer` parameter
|
|
- Modified filename generation to include artist name:
|
|
- Format: `{artist} - {title}.mp3` (when artist available)
|
|
- Fallback: `{title}.mp3` (when no artist)
|
|
- Limited artist name to 20 chars, title to 30 chars for safe filenames
|
|
|
|
### 3. Bot (src/bot.ts)
|
|
- Removed "🎵 ..." text from audio message captions
|
|
- Changed `caption: \`🎵 ${title}\`` to `caption: undefined`
|
|
- Audio files now show clean filename without emoji prefix
|
|
|
|
## Result
|
|
Audio files now have proper names like "Artist Name - Song Title.mp3" and no caption text, making them cleaner in Telegram chats. |