From 00c91839ae4ed1b2c0471a6ae4432babfe52a317 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Tue, 26 Dec 2023 12:34:42 +0100 Subject: [PATCH] spotrem: keep variable in app local scope --- apps/spotrem/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/spotrem/app.js b/apps/spotrem/app.js index d03aede34..964e766d0 100644 --- a/apps/spotrem/app.js +++ b/apps/spotrem/app.js @@ -144,22 +144,22 @@ let assembleSearchString = function() { return (artist=="" ? "":("artist:\""+artist+"\"")) + ((artist!="" && track!="") ? " ":"") + (track=="" ? "":("track:\""+track+"\"")) + (((artist!="" && album!="") || (track!="" && album!="")) ? " ":"") + (album=="" ? "":(" album:\""+album+"\"")); }; -simpleSearch = ""; +let simpleSearch = ""; let simpleSearchTerm = function() { // input a simple search term without tags, overrides search with tags (artist and track) require("textinput").input({text:simpleSearch}).then(result => {simpleSearch = result;}).then(() => {E.showMenu(searchMenu);}); }; -artist = ""; +let artist = ""; let artistSearchTerm = function() { // input artist to search for require("textinput").input({text:artist}).then(result => {artist = result;}).then(() => {E.showMenu(searchMenu);}); }; -track = ""; +let track = ""; let trackSearchTerm = function() { // input track to search for require("textinput").input({text:track}).then(result => {track = result;}).then(() => {E.showMenu(searchMenu);}); }; -album = ""; +let album = ""; let albumSearchTerm = function() { // input album to search for require("textinput").input({text:album}).then(result => {album = result;}).then(() => {E.showMenu(searchMenu);}); };