get it running again

This commit is contained in:
2023-11-06 15:19:25 +01:00
parent 4b0b31471b
commit bdc117be3d
6 changed files with 87 additions and 44 deletions

View File

@@ -138,8 +138,8 @@ app.get( '/indexDirs', ( req, res ) => {
app.get( '/getSongCover', ( req, res ) => {
if ( req.query.filename ) {
if ( coverArtIndex[ req.query.filename ] ) {
res.send( coverArtIndex[ req.query.filename ] );
if ( indexer.getImages( req.query.filename ) ) {
res.send( indexer.getImages( req.query.filename ) );
} else {
res.status( 404 ).send( 'No cover image for this file' );
}