Skip to content

Instantly share code, notes, and snippets.

@mill1000
mill1000 / audio_custom.js
Last active January 11, 2025 22:50
Custom Gerbera v1.12.1 Import Scripts
// NOTE: Scripts have not been updated for Gerbera 2.0+
// Helper to access first element of an array if it exists
function get(item, fallback) {
return (item && item[0]) || fallback;
}
// Custom audio import script
function addAudioCustom(obj) {
var title = get(obj.metaData[M_TITLE], obj.title);