Allow disabling last song check, for testing purposes

Also, fix album cover erroring out.
This commit is contained in:
MeowcaTheoRange 2024-02-22 07:11:57 -06:00
parent adafe5e44a
commit 3e2e31e4a4

View file

@ -70,7 +70,7 @@ async function getVideo() {
if (checkLastSong({ if (checkLastSong({
name: trackData.name, name: trackData.name,
channelName: trackData.artist.name channelName: trackData.artist.name
})) { }) && process.argv[2] != "nls") {
console.log("Last song check failed"); console.log("Last song check failed");
return null; return null;
} else { } else {
@ -240,7 +240,7 @@ async function main() {
}) })
let albumCover; let albumCover;
if (!(await checkNextcloudAlbum(video, nextcloudClient)) && video.albumCover != null) { if (video.albumCover?.length > 0 && !(await checkNextcloudAlbum(video, nextcloudClient)) && video.albumCover != null) {
albumCover = await downloadAlbumCover(video); albumCover = await downloadAlbumCover(video);
} }