fixes
This commit is contained in:
@@ -130,18 +130,18 @@ class QuixoticApp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.results.innerHTML = videos.map(video => `
|
this.results.innerHTML = videos.map(video => `
|
||||||
<div class="tg-list-item" onclick="app.convertVideo('${video.id}', '${this.escapeHtml(video.title)}', '${this.escapeHtml(video.url)}')">
|
<div class='tg-list-item' onclick='app.convertVideo("${video.id}", "${this.escapeHtml(video.title)}", "${this.escapeHtml(video.url)}")'>
|
||||||
<div class="tg-list-item__content">
|
<div class='tg-list-item__content'>
|
||||||
<div class="tg-list-item__media">
|
<div class='tg-list-item__media'>
|
||||||
<img class="tg-list-item__thumbnail"
|
<img class='tg-list-item__thumbnail'
|
||||||
src="${video.thumbnail}"
|
src='${video.thumbnail}'
|
||||||
alt="${this.escapeHtml(video.title)}"
|
alt='${this.escapeHtml(video.title)}'
|
||||||
loading="lazy">
|
loading='lazy'>
|
||||||
<div class="tg-list-item__duration">${this.formatDuration(video.duration)}</div>
|
<div class='tg-list-item__duration'>${this.formatDuration(video.duration)}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tg-list-item__info">
|
<div class='tg-list-item__info'>
|
||||||
<div class="tg-list-item__title">${this.escapeHtml(video.title)}</div>
|
<div class='tg-list-item__title'>${this.escapeHtml(video.title)}</div>
|
||||||
<div class="tg-list-item__subtitle">${this.escapeHtml(video.channel)}</div>
|
<div class='tg-list-item__subtitle'>${this.escapeHtml(video.channel)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import express, { Request, Response, NextFunction } from 'express';
|
import express, { Request, Response } from 'express';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import ffmpeg from 'fluent-ffmpeg';
|
import ffmpeg from 'fluent-ffmpeg';
|
||||||
@@ -197,7 +197,7 @@ app.get('/health', (req: Request, res: Response) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Error handler
|
// Error handler
|
||||||
app.use((err: Error, req: Request, res: Response, _next: NextFunction) => {
|
app.use((err: Error, req: Request, res: Response) => {
|
||||||
console.error(err.stack);
|
console.error(err.stack);
|
||||||
res.status(500).json({ error: 'Something went wrong!' });
|
res.status(500).json({ error: 'Something went wrong!' });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export class SoundCloudService {
|
|||||||
console.log('Audio stream obtained with track ID method');
|
console.log('Audio stream obtained with track ID method');
|
||||||
return stream;
|
return stream;
|
||||||
|
|
||||||
} catch (_fallbackError: any) {
|
} catch {
|
||||||
console.error('Track ID method failed, trying URL construction...');
|
console.error('Track ID method failed, trying URL construction...');
|
||||||
|
|
||||||
// Final fallback - try constructing different URL formats
|
// Final fallback - try constructing different URL formats
|
||||||
|
|||||||
Reference in New Issue
Block a user