+ {#if activeTab === 'nowplaying'}
+
+
Connection
+
+ Status: {#if connected} Connected{:else} Disconnected{/if}
+
+
+ Last Update: {lastUpdate ? lastUpdate.toLocaleTimeString() : 'Never'}
+
+
Next Update: {formatTime(nextUpdateIn)}
+
Interval: {updateInterval}s {trackRemainingTime > 0 ? `(smart mode)` : nowPlaying ? '(fast mode)' : '(normal)'}
+ {#if trackRemainingTime > 0}
+
Track Remaining: {formatTime(trackRemainingTime)}
+ {/if}
+
+
+
+
Now Playing
+ {#if nowPlaying}
+
+
{nowPlaying.album.artist.name}
+
{nowPlaying.album.name}
+ {#if nowPlaying.track}
+
{nowPlaying.track}
+ {/if}
+ {#if nowPlaying.album.appleMusicData}
+
+ Preview: {#if nowPlaying.album.appleMusicData.previewUrl} Available{:else} Not found{/if}
+
+ {/if}
+
+ {:else}
+
No music playing
+ {/if}
+
+ {/if}
+
+ {#if activeTab === 'albums'}
+
+
Recent Albums ({albums.length})
+
+ {#each albums as album}
+ {@const albumId = `${album.artist.name}:${album.name}`}
+
+
+
+ {#if expandedAlbumId === albumId}
+
+ {#if album.appleMusicData}
+ {#if album.appleMusicData.searchMetadata}
+
Search Information
+
+ {/if}
+
+ {#if album.appleMusicData.appleMusicId}
+
Apple Music Details
+
Apple Music ID: {album.appleMusicData.appleMusicId}
+ {/if}
+
+ {#if album.appleMusicData.releaseDate}
+
Release Date: {album.appleMusicData.releaseDate}
+ {/if}
+
+ {#if album.appleMusicData.recordLabel}
+
Label: {album.appleMusicData.recordLabel}
+ {/if}
+
+ {#if album.appleMusicData.genres?.length}
+
Genres: {album.appleMusicData.genres.join(', ')}
+ {/if}
+
+ {#if album.appleMusicData.previewUrl}
+
Preview URL: {album.appleMusicData.previewUrl}
+ {/if}
+
+ {#if album.appleMusicData.tracks?.length}
+
+
Tracks ({album.appleMusicData.tracks.length})
+
+ {#each album.appleMusicData.tracks as track, i}
+
+ {i + 1}.
+ {track.name}
+ {#if track.durationMs}
+ {Math.floor(track.durationMs / 60000)}:{String(Math.floor((track.durationMs % 60000) / 1000)).padStart(2, '0')}
+ {/if}
+ {#if track.previewUrl}
+
+ {/if}
+
+ {/each}
+
+
+ {/if}
+
+
+
Raw Data
+
{JSON.stringify(album.appleMusicData, null, 2)}
+
+ {:else}
+
No Apple Music Data
+
This album was not searched in Apple Music or the search is pending.
+ {/if}
+
+ {/if}
+
+ {/each}
+
+
+ {/if}
+
+ {#if activeTab === 'cache'}
+
+
Redis Cache Management
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Key format: apple:album:ArtistName:AlbumName
+
Example: apple:album:藤井風:Hachikō
+
+
+ {/if}
+