fix: log error when song URL retrieval fails

This commit is contained in:
Valeri Gokadze
2025-05-14 13:53:32 +04:00
parent 9450a41238
commit 1b8b4e4e09

View File

@ -299,6 +299,11 @@ class MusifyAudioHandler extends BaseAudioHandler {
? song['audioPath']
: await getSong(song['ytid'], song['isLive']);
if (songUrl == null) {
logger.log('Failed to get song URL for ${song['ytid']}', null, null);
return;
}
final audioSource = await buildAudioSource(song, songUrl, isOffline);
await audioPlayer.setAudioSource(audioSource);