diff --git a/bun.lock b/bun.lock
index 42cc1e8..02c82bf 100644
--- a/bun.lock
+++ b/bun.lock
@@ -4,24 +4,24 @@
"workspaces": {
"": {
"dependencies": {
- "@swc/helpers": "latest",
- "serve": "latest",
+ "@swc/helpers": "^0.5.18",
+ "serve": "^14.2.5",
},
"devDependencies": {
- "@rollup/plugin-commonjs": "latest",
- "@rollup/plugin-node-resolve": "latest",
- "@swc/core": "latest",
- "@types/react": "latest",
- "@types/react-native": "latest",
- "@typescript-eslint/eslint-plugin": "latest",
- "@typescript-eslint/parser": "latest",
- "esbuild": "latest",
- "eslint": "latest",
- "eslint-plugin-react": "latest",
- "rollup": "latest",
- "rollup-plugin-esbuild": "latest",
- "typescript": "latest",
- "vendetta-types": "latest",
+ "@rollup/plugin-commonjs": "^29.0.0",
+ "@rollup/plugin-node-resolve": "^16.0.3",
+ "@swc/core": "^1.15.11",
+ "@types/react": "^19.2.10",
+ "@types/react-native": "^0.73.0",
+ "@typescript-eslint/eslint-plugin": "^8.54.0",
+ "@typescript-eslint/parser": "^8.54.0",
+ "esbuild": "^0.27.2",
+ "eslint": "^9.39.2",
+ "eslint-plugin-react": "^7.37.5",
+ "rollup": "^4.57.1",
+ "rollup-plugin-esbuild": "^6.2.1",
+ "typescript": "^5.9.3",
+ "vendetta-types": "^2.4.21",
},
},
},
diff --git a/plugins/multi-scrobbler/src/ui/pages/pages/components/RPCPreview.tsx b/plugins/multi-scrobbler/src/ui/pages/pages/components/RPCPreview.tsx
index 1c028fe..203527b 100644
--- a/plugins/multi-scrobbler/src/ui/pages/pages/components/RPCPreview.tsx
+++ b/plugins/multi-scrobbler/src/ui/pages/pages/components/RPCPreview.tsx
@@ -89,7 +89,7 @@ export default function RPCPreview() {
try {
const primaryArtist = artists[0] || "Unknown Artist";
const trackInfoResponse = await fetch(
- `https://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=${getStorage("apiKey")}&artist=${encodeURIComponent(primaryArtist)}&track=${encodeURIComponent(track.name)}&format=json&username=${getStorage("username")}`,
+ `https://ws.audioscrobbler.com/2.0/?method=track.getInfo&api_key=${getStorage("apiKey")}&artist=${encodeURIComponent(primaryArtist)}&track=${encodeURIComponent(track.name)}&format=json&u[...]`
);
const trackInfo = await trackInfoResponse.json();
if (trackInfo.track && trackInfo.track.duration) {
@@ -195,8 +195,11 @@ export default function RPCPreview() {
}
};
+ // Store getStorage calls with defaults to prevent undefined rendering
const activityType = getStorage("listeningTo") ? "Listening to" : "Playing";
- const appName = getStorage("appName", "Music");
+ const appName = getStorage("appName") || "Music";
+ const showLargeText = getStorage("showLargeText", true);
+ const showTimestamp = getStorage("showTimestamp", false);
if (isLoading) {
return (
@@ -251,13 +254,13 @@ export default function RPCPreview() {
{previewTrack.artist}
- {getStorage("showLargeText") && previewText !== "No tooltip text" && (
+ {showLargeText && previewText !== "No tooltip text" && (
{previewText}
)}
- {getStorage("showTimestamp") && previewTrack.duration && (
+ {showTimestamp && previewTrack.duration ? (
{formatTime(progressData.current)}
@@ -274,7 +277,7 @@ export default function RPCPreview() {
{formatTime(progressData.total)}
- )}
+ ) : null}
@@ -419,4 +422,4 @@ const styles = RN.StyleSheet.create({
minWidth: 35,
textAlign: "center",
},
-});
+});
\ No newline at end of file