Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/img/europe/italy/mi-amigo-radio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/radio/europe/italy.json
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,6 @@
"language": "Italian",
"cros": false,
"stream": "https://nr12.newradio.it:8662/Live",
"features": "https://www.miamigoradio.it/css-img/logoRadioMiAmigo.svg"
"features": "/img/europe/italy/mi-amigo-radio.jpg"
}
}
9 changes: 8 additions & 1 deletion tests/mi-amigo-radio.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('Mi Amigo Radio offers its direct AAC stream then the configured CORS fallb
assert.equal(entry.url, 'https://www.miamigoradio.it/');
assert.equal(entry.type, 'audio/aac');
assert.equal(entry.stream, 'https://nr12.newradio.it:8662/Live');
assert.equal(entry.features, 'https://www.miamigoradio.it/css-img/logoRadioMiAmigo.svg');
assert.equal(entry.features, '/img/europe/italy/mi-amigo-radio.jpg');
assert.equal(entry.cros, false);

const corsServer = 'https://cors.example/';
Expand All @@ -38,3 +38,10 @@ test('Mi Amigo Radio offers its direct AAC stream then the configured CORS fallb
],
);
});

test('Mi Amigo Radio artwork is an available local JPEG', () => {
const logo = readFileSync(new URL('../public/img/europe/italy/mi-amigo-radio.jpg', import.meta.url));
// A JPEG begins with the Start Of Image marker followed by another marker.
assert.deepEqual([...logo.subarray(0, 3)], [0xff, 0xd8, 0xff]);
assert.ok(logo.length > 1024, 'station artwork should not be an empty placeholder');
});
Loading