diff --git a/plugins/Last.fm/src/Settings.tsx b/plugins/Last.fm/src/Settings.tsx
index 4bbeed2..a0126e0 100644
--- a/plugins/Last.fm/src/Settings.tsx
+++ b/plugins/Last.fm/src/Settings.tsx
@@ -65,7 +65,7 @@ export default function Settings() {
settings.timeInterval = Number(value)}
+ onChangeText={(value: string) => settings.timeInterval = value}
title="Update interval (in seconds)"
placeholder={Constants.DEFAULT_TIME_INTERVAL.toString()}
keyboardType="numeric"
diff --git a/plugins/Last.fm/src/utils.ts b/plugins/Last.fm/src/utils.ts
index e65698c..e16102f 100644
--- a/plugins/Last.fm/src/utils.ts
+++ b/plugins/Last.fm/src/utils.ts
@@ -221,6 +221,6 @@ export async function initialize() {
flush();
}
}),
- (currentSettings.timeInterval || Constants.DEFAULT_TIME_INTERVAL) * 1000
+ (Number(currentSettings.timeInterval) || Constants.DEFAULT_TIME_INTERVAL) * 1000
);
}
diff --git a/plugins/defs.d.ts b/plugins/defs.d.ts
index e855bca..1587215 100644
--- a/plugins/defs.d.ts
+++ b/plugins/defs.d.ts
@@ -29,7 +29,7 @@ type LFMSettings = {
appName: string;
username: string;
showTimestamp: boolean;
- timeInterval: number;
+ timeInterval: number | string;
listeningTo: boolean;
ignoreSpotify: boolean;
verboseLogging: boolean;