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:
1 parent
4891b9bcbc
commit
b4af6f6e9f
2 files changed
+79
-3
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user