feat(offline): add NowPlayingBar offline indicators

- Add offline indicator icon in right section when offline
- Disable lyrics button with tooltip when offline
- Skip Last.fm scrobbling when in offline mode
- Use offline-small.svg for compact indicator
This commit is contained in:
vicrodh committed 2026-01-15 23:11:33 -06:00
1 parent 4891b9bcbc
commit b4af6f6e9f
2 files changed
+79 -3

No files matched your search

+7
View File
@@ -25,6 +25,7 @@ import {
castPause,
castStop
} from '$lib/stores/castStore';
import { isOffline as checkIsOffline } from '$lib/stores/offlineStore';
// ============ Types ============
@@ -278,6 +279,12 @@ export async function updateLastfmNowPlaying(
durationSecs: number,
trackId: number
): Promise<void> {
// Skip scrobbling when offline
if (checkIsOffline()) {
console.log('Last.fm: Skipping scrobble (offline mode)');
return;
}
// Check if scrobbling is enabled
const scrobblingEnabled = localStorage.getItem('qbz-lastfm-scrobbling') !== 'false';
const sessionKey = localStorage.getItem('qbz-lastfm-session-key');