diff --git a/package.json b/package.json index ff2a01a..730c74d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swapnilsoni1999/spotify-dl", "productName": "Spotify Downloader", - "version": "1.2.3", + "version": "1.2.4", "description": "Spotify Songs, Playlist & Album Downloader", "main": "app.js", "bin": { diff --git a/util/constants.js b/util/constants.js index 8ec5097..4ed71a9 100644 --- a/util/constants.js +++ b/util/constants.js @@ -1,4 +1,7 @@ import path from 'path'; +import { fileURLToPath } from 'url'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default { AUTH: { @@ -54,7 +57,7 @@ export default { YOUTUBE_SEARCH: { // this roughly equates to a max of 30mb MAX_MINUTES: 15, - GENERIC_IMAGE: path.join(process.cwd(), "logo.png"), + GENERIC_IMAGE: path.join(__dirname, "logo.png"), VALID_CONTEXTS: ['itemName', 'albumName', 'artistName'], }, };