···11-<script lang="ts">
22- import type { Song } from '$lib/types';
33-44- export let song: Song;
55-</script>
66-77-{#if song.isPlaying}
88- <a href={song.songUrl} target="_blank">
99- <span class="text-xl opacity-50 hover:opacity-75 transition">
1010- Now Playing:
1111- <strong>{song.artist} - {song.title}</strong>
1212- </span>
1313- </a>
1414-{/if}
+7-7
src/routes/api/spotify/np/+server.ts
···2727 let artist = song.item.artists.map((_artist: Artist) => _artist.name).join(', ');
2828 const songUrl = song.item.external_urls.spotify;
29293030- // trim artist and song names
3131- if (artist.length > 15) {
3232- artist = artist.substring(0, 15) + '...';
3333- }
3434- if (title.length > 25) {
3535- title = title.substring(0, 25) + '...';
3636- }
3030+ // trim artist and song names
3131+ if (artist.length > 15) {
3232+ artist = artist.substring(0, 15) + '...';
3333+ }
3434+ if (title.length > 25) {
3535+ title = title.substring(0, 25) + '...';
3636+ }
37373838 return new Response(
3939 JSON.stringify({