This commit is contained in:
Andrey Kondratev
2025-08-28 17:15:41 +05:00
parent 7c5492aefa
commit 9b53366a98
6 changed files with 138 additions and 33 deletions

View File

@@ -112,7 +112,7 @@ app.post('/api/convert', async (req: Request, res: Response) => {
// Test ffmpeg with simple command first
try {
const { execSync } = require('child_process');
const result = execSync(`ffmpeg -i "${tempInputPath}" -t 1 -f null -`, { encoding: 'utf8', stdio: 'pipe' });
execSync(`ffmpeg -i "${tempInputPath}" -t 1 -f null -`, { encoding: 'utf8', stdio: 'pipe' });
console.log('FFmpeg file test passed');
} catch (e: any) {
console.error('FFmpeg file test failed:', e.stderr || e.message);
@@ -197,7 +197,7 @@ app.get('/health', (req: Request, res: Response) => {
});
// Error handler
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
app.use((err: Error, req: Request, res: Response, _next: NextFunction) => {
console.error(err.stack);
res.status(500).json({ error: 'Something went wrong!' });
});

View File

@@ -153,7 +153,7 @@ export class SoundCloudService {
console.log('Audio stream obtained with track ID method');
return stream;
} catch (fallbackError: any) {
} catch (_fallbackError: any) {
console.error('Track ID method failed, trying URL construction...');
// Final fallback - try constructing different URL formats