diff --git a/package.json b/package.json index 40ecd67..2251346 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "src/**/*", "node_modules/iofs/*", "node_modules/sqlite3/*", - "node_modules/crypto.js/*" + "node_modules/crypto.js/*", + "node_modules/music-metadata/*" ], "mac": { "category": "public.app-category.music", diff --git a/src/js/app.js b/src/js/app.js index 77d2f4f..c6d5a29 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -52,7 +52,7 @@ Anot({ }, async mounted() { var list = app.dispatch('get-all-songs') - // var list = app.dispatch('scan-dir', { dir: '/Volumes/extends/music' }) + // var list = app.dispatch('scan-dir', { dir: '/Volumes/ooc/music' }) kb.on(['left'], ev => { var time = this.song.time - 5 @@ -85,19 +85,21 @@ Anot({ // for (let it of list) { // let { album, artist, title, duration } = await this.getID3(it.file_path) - // it.name = title || it.name // it.artist = artist // it.album = album // it.duration = duration + // app.dispatch('add-song', { // name: it.name, // artist, // album, // duration, - // file_path: it.path + // file_path: it.file_path // }) // } + + // console.log(list) this.list = list player.volume = this.volume / 100 diff --git a/src/tools/windows.js b/src/tools/windows.js index 1c7bfc5..d6f190e 100644 --- a/src/tools/windows.js +++ b/src/tools/windows.js @@ -9,7 +9,7 @@ const { BrowserWindow } = require('electron') /** * 应用主窗口 */ -exports.createMainWindow = function(icon) { +exports.createMainWindow = function (icon) { // 创建浏览器窗口 let win = new BrowserWindow({ title: 'sonist', @@ -38,7 +38,7 @@ exports.createMainWindow = function(icon) { win.on('ready-to-show', _ => { win.show() - win.openDevTools() + // win.openDevTools() }) win.on('close', ev => { @@ -52,7 +52,7 @@ exports.createMainWindow = function(icon) { /** * 应用迷你窗口 */ -exports.createMiniWindow = function(screen) { +exports.createMiniWindow = function (screen) { let win = new BrowserWindow({ title: '', width: 320,