From 3ab4a55f499c1f498e6d6df6a9bde2f4a0c154a8 Mon Sep 17 00:00:00 2001 From: phyzical <5182053+phyzical@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:46:26 +0800 Subject: [PATCH] change tmux script, adjust version checker --- package-lock.json | 4 ++-- package.json | 2 +- tools/termux.sh | 6 +++--- util/version-checker.js | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa21f5d..5b47cda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@swapnilsoni1999/spotify-dl", - "version": "1.2.2", + "version": "1.2.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@swapnilsoni1999/spotify-dl", - "version": "1.2.2", + "version": "1.2.7", "license": "ISC", "dependencies": { "@distube/ytdl-core": "^4.14.4", diff --git a/package.json b/package.json index 2bcb98b..1b056ec 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swapnilsoni1999/spotify-dl", "productName": "Spotify Downloader", - "version": "1.2.6", + "version": "1.2.7", "description": "Spotify Songs, Playlist & Album Downloader", "main": "app.js", "bin": { diff --git a/tools/termux.sh b/tools/termux.sh index 594fe03..be16126 100755 --- a/tools/termux.sh +++ b/tools/termux.sh @@ -3,11 +3,11 @@ echo "[ spotifydl ] Installing required packages..." # Install packages -pkg install -y nodejs ffmpeg +pkg install -y nodejs ffmpeg git # Get spotify-dl from npmjs echo "[ spotifydl ] Installing spotify-dl" -npm install -g spotify-dl +npm install -g https://github.com/swapnilsoni1999/spotify-dl # Setup app sharing script echo "[ spotifydl ] Setting up scripts..." @@ -16,7 +16,7 @@ if [ ! -d "$HOME/bin" ]; then mkdir "$HOME/bin" fi -curl https://gist.githubusercontent.com/SwapnilSoni1999/e163a8c380e1cdfa65cecbf71972a579/raw/c270edd7634a88f710a735f4a5ac4cb93ad50b11/termux-url-opener-spotifydl > "$HOME/bin/termux-url-opener" +curl https://gist.githubusercontent.com/SwapnilSoni1999/e163a8c380e1cdfa65cecbf71972a579/raw/c270edd7634a88f710a735f4a5ac4cb93ad50b11/termux-url-opener-spotifydl >"$HOME/bin/termux-url-opener" echo "[ spotifydl ] Setting up storage..." termux-setup-storage diff --git a/util/version-checker.js b/util/version-checker.js index 1ab5171..7b35095 100644 --- a/util/version-checker.js +++ b/util/version-checker.js @@ -8,8 +8,8 @@ const checkVersion = async () => { ); const latestVersion = res.data[0].name; const pkg = meow('', { importMeta: import.meta }).pkg; - - if (pkg.version !== latestVersion) { + + if (pkg.version < latestVersion) { console.log( [ '\n========Update Available========', @@ -20,8 +20,8 @@ const checkVersion = async () => { ); } } catch (_e) { - console.log("Could not check current version, have checked too many times skipping"); - return; + console.log("Could not check current version, have checked too many times skipping"); + return; } };