// Build external "listen" / reference links from a song record. We don't store
// video IDs, so these are always-valid search deep-links (labeled "Search …").
function q(parts) {
  return encodeURIComponent(parts.filter(Boolean).join(" "));
}

export function youtube(s) {
  return "https://www.youtube.com/results?search_query=" + q([s.o, s.t, s.s, s.y]);
}

export function spotify(s) {
  return "https://open.spotify.com/search/" + q([s.o, s.t, s.s]);
}

// Generic web search — lands on el-recodo / tango.info / lyric pages for the song.
export function web(s) {
  return "https://www.google.com/search?q=" + q([s.t, s.o, s.s, "tango"]);
}
