Commit Graph

15 Commits

Author SHA1 Message Date
4bb8b85c0e Fix dynamic YouTube cookies detection
Allow cookies uploaded after server start to be detected by checking
process.env.YOUTUBE_COOKIES_PATH dynamically instead of relying only
on the cached COOKIES_PATH constant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 09:24:57 +00:00
14706e2589 Add public endpoint to download cookie extraction script
Features:
- New GET /public/scripts/extract-and-upload-cookies.sh endpoint
- No authentication required (public)
- Downloads the automation script directly
- Proper Content-Disposition headers for file download

Usage:
# Download the script
curl -O http://tomp3.etheryale.com:3001/public/scripts/extract-and-upload-cookies.sh

# Make executable
chmod +x extract-and-upload-cookies.sh

# Configure and run
export API_TOKEN="your_token"
export API_URL="http://tomp3.etheryale.com:3001"
./extract-and-upload-cookies.sh

Security:
- No secrets in the script (uses environment variables)
- Safe to distribute publicly
- Users provide their own API_TOKEN and API_URL

Benefits:
- One-command download
- No need to clone repo
- Easy distribution to end-users
- Cross-platform compatible (Linux/Mac/WSL)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 02:30:55 +00:00
eefe747a9e Remove HSTS header for public endpoints to allow HTTP access
Changes:
- Conditional Strict-Transport-Security header
- Only applied to protected endpoints (require auth)
- Public endpoints (/health, /api, /docs/api, /public/download/*) can use HTTP
- Fixes PowerShell/browser connection issues over HTTP

Security:
- Protected endpoints still enforce HTTPS via HSTS
- Public endpoints remain accessible over HTTP for flexibility
- Other security headers (X-Frame-Options, CSP, etc.) still apply

Resolves:
- TLS connection errors from PowerShell
- Client network socket disconnection issues
- Allows public documentation access without SSL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 01:19:38 +00:00
c1837eca1d Add public API documentation endpoint
Features:
- New GET /docs/api endpoint to retrieve full API documentation
- Returns API.md content as JSON with markdown format
- No authentication required (public endpoint)
- Includes lastUpdated timestamp
- 26,754 characters of complete documentation

Response format:
{
  "success": true,
  "documentation": "<full markdown content>",
  "format": "markdown",
  "lastUpdated": "2025-12-08T12:12:38.942Z"
}

Use case:
- Fetch documentation programmatically
- Display in external applications
- Copy-paste into AI assistants (Claude, ChatGPT)
- Auto-generate API clients

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:38:15 +00:00
ea4c49b781 Update API documentation port from 8888 to 3001
- Changed all localhost:8888 references to localhost:3001
- Reflects actual server configuration (PORT=3001 in .env)
- 32 occurrences updated throughout the documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:13:54 +00:00
eb69e8b063 Add public download endpoint without authentication
Features:
- New GET /public/download/:filename endpoint for public file access
- No authentication required for downloading processed files
- Directory traversal protection with path.basename()
- Proper Content-Disposition headers for browser downloads

Documentation:
- Updated docs/API.md with public endpoint section
- Added to table of contents
- Usage examples and security notes

Use cases:
- Share download links via email/chat/social media
- Embed in web applications without auth
- Direct browser downloads
- Public file sharing

Security:
- Path sanitization prevents directory traversal attacks
- Only files in OUTPUT_DIR are accessible
- Returns proper 404 for non-existent files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 11:32:23 +00:00
751a382ccd Add YouTube cookies management system with enhanced error messages
Features:
- New POST /admin/upload-cookies endpoint for cookie upload
- Enhanced YouTube bot detection error messages with solutions
- extract-and-upload-cookies.sh script for automated cookie extraction
- Improved error display in web interface with actionable solutions
- Cookie storage in both local and persistent locations

Technical changes:
- Add enhanceYouTubeError() in youtube.js service
- Add formatYouTubeError() in web app.js
- Add handleYouTubeError() helper in server.js
- Enhanced SSE error handling for all streaming endpoints
- Updated API documentation with cookies section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 10:42:53 +00:00
Debian User
ea0caa9349 Add YouTube cookies support to bypass bot detection
- Add cookies support in youtube.js service
- Create extract-cookies.sh script for automatic cookie extraction
- Add YOUTUBE_COOKIES_PATH environment variable
- Update .env.example with cookies configuration
- Add comprehensive documentation (YOUTUBE_COOKIES.md, COOKIES_QUICK_START.md)
- Update .gitignore to exclude cookies files for security
- Pass cookiesPath option through all download functions

This fixes Sign in to confirm you're not a bot errors from YouTube.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:32:35 +00:00
1f349834e6 Remove nul file and add Windows device names to .gitignore
- Delete problematic 'nul' file (Windows reserved device name)
- Add Windows reserved names (nul, CON, PRN, AUX) to .gitignore
- Prevents future issues with Windows device name conflicts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:04:47 +08:00
c0cfc4c28e Add API security with token authentication and localStorage management
- Add API token authentication middleware (X-API-Key header)
- Add CORS configuration with ALLOWED_ORIGINS
- Add security HTTP headers (X-Frame-Options, CSP, etc.)
- Add web interface for API token configuration with localStorage
- Add toggle visibility for token input
- Add connection status indicator
- Add auto-save token functionality
- Update API documentation with authentication examples
- Add deployment guides (OVH specific and general)
- Add local testing guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 12:01:19 +08:00
ce32ae3134 Migration Gitea 2025-12-04 20:57:51 +08:00
d4ac6f5859 Add documentation, Claude config, and update services
- Add comprehensive API documentation in docs/API.md
- Add Claude project instructions (CLAUDE.md)
- Add server startup scripts for Windows and Unix
- Update transcription, translation, and summarize services
- Update server.js with latest changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 13:24:31 +08:00
23bb4cd2d9 Add video/audio to MP3 conversion feature
Implement drag-and-drop interface for converting video and audio files to MP3 format using FFmpeg. Users can now upload files (MP4, M4A, AVI, MKV, MOV, WAV, FLAC, OGG) and convert them with customizable bitrate and quality settings.

- Add conversion service with FFmpeg integration
- Add /convert-to-mp3 and /supported-formats API endpoints
- Add new "Video to MP3" tab with drag-and-drop UI
- Support multiple file uploads with batch conversion
- Add bitrate (128k-320k) and VBR quality options

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:56:58 +08:00
a974846efc Add AI summarization feature with GPT-5.1
- Add summarization service (text, files, YouTube videos)
- Add Summarize tab with Text/Files/YouTube Link modes
- Add full pipeline endpoint: download + transcribe + summarize
- Support for concise, detailed, and bullet point styles
- Real-time progress tracking with SSE
- Multi-language output support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:49:39 +08:00
849412c3bd Initial commit: Video to MP3 Transcriptor
- YouTube video/playlist download as MP3 (yt-dlp)
- Audio transcription with OpenAI (gpt-4o-transcribe, whisper-1)
- Translation with GPT-4o-mini (chunking for long texts)
- Web interface with progress bars and drag & drop
- CLI and REST API interfaces
- Linux shell scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:40:23 +08:00