Skip to content

Commit

Permalink
main: download to user's music directory (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
detiam authored Nov 29, 2023
1 parent ef149b3 commit fcf81d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/api/downloader.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import fs, { promises as fsp } from 'fs';
import * as path from 'path';
import { homedir } from 'os';
import { app } from 'electron';
import { getPicUrl, getMusicUrlE } from './index';
import fetch from 'electron-fetch';
import ID3 from './media/id3';
Expand Down Expand Up @@ -45,7 +45,7 @@ class Downloader {
*/
constructor(cache, dist) {
this.cache = cache;
this.dist = dist || path.join(homedir(), 'Music', 'ElectronNCM');
this.dist = dist || path.join(app.getPath('music'), 'ElectronNCM');
}

/**
Expand Down

0 comments on commit fcf81d1

Please sign in to comment.