working!
This commit is contained in:
@@ -60,7 +60,7 @@ app.post('/api/search', async (req: Request, res: Response) => {
|
||||
// Convert video to MP3
|
||||
app.post('/api/convert', async (req: Request, res: Response) => {
|
||||
try {
|
||||
const { videoId, title, userId }: { videoId?: string; title?: string; userId?: string } = req.body;
|
||||
const { videoId, title, userId, url }: { videoId?: string; title?: string; userId?: string; url?: string } = req.body;
|
||||
console.log('Convert request received:', { videoId, title, userId });
|
||||
|
||||
if (!videoId) {
|
||||
@@ -84,7 +84,7 @@ app.post('/api/convert', async (req: Request, res: Response) => {
|
||||
try {
|
||||
// Get audio stream from YouTube
|
||||
console.log(`Attempting to get audio stream for: ${videoId}`);
|
||||
const audioStream = await soundcloud.getAudioStream(videoId);
|
||||
const audioStream = await soundcloud.getAudioStream(videoId, url);
|
||||
console.log('Audio stream obtained, starting FFmpeg conversion...');
|
||||
|
||||
// Convert to MP3 using ffmpeg
|
||||
|
||||
Reference in New Issue
Block a user