This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
appcat
/
sonist
Archived
1
0
Fork 0
master
宇天 2020-11-23 22:39:19 +08:00
parent 995a967312
commit ea229c0a38
3 changed files with 10 additions and 7 deletions

View File

@ -39,7 +39,8 @@
"src/**/*", "src/**/*",
"node_modules/iofs/*", "node_modules/iofs/*",
"node_modules/sqlite3/*", "node_modules/sqlite3/*",
"node_modules/crypto.js/*" "node_modules/crypto.js/*",
"node_modules/music-metadata/*"
], ],
"mac": { "mac": {
"category": "public.app-category.music", "category": "public.app-category.music",

View File

@ -52,7 +52,7 @@ Anot({
}, },
async mounted() { async mounted() {
var list = app.dispatch('get-all-songs') 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 => { kb.on(['left'], ev => {
var time = this.song.time - 5 var time = this.song.time - 5
@ -85,19 +85,21 @@ Anot({
// for (let it of list) { // for (let it of list) {
// let { album, artist, title, duration } = await this.getID3(it.file_path) // let { album, artist, title, duration } = await this.getID3(it.file_path)
// it.name = title || it.name // it.name = title || it.name
// it.artist = artist // it.artist = artist
// it.album = album // it.album = album
// it.duration = duration // it.duration = duration
// app.dispatch('add-song', { // app.dispatch('add-song', {
// name: it.name, // name: it.name,
// artist, // artist,
// album, // album,
// duration, // duration,
// file_path: it.path // file_path: it.file_path
// }) // })
// } // }
// console.log(list)
this.list = list this.list = list
player.volume = this.volume / 100 player.volume = this.volume / 100

View File

@ -9,7 +9,7 @@ const { BrowserWindow } = require('electron')
/** /**
* 应用主窗口 * 应用主窗口
*/ */
exports.createMainWindow = function(icon) { exports.createMainWindow = function (icon) {
// 创建浏览器窗口 // 创建浏览器窗口
let win = new BrowserWindow({ let win = new BrowserWindow({
title: 'sonist', title: 'sonist',
@ -38,7 +38,7 @@ exports.createMainWindow = function(icon) {
win.on('ready-to-show', _ => { win.on('ready-to-show', _ => {
win.show() win.show()
win.openDevTools() // win.openDevTools()
}) })
win.on('close', ev => { win.on('close', ev => {
@ -52,7 +52,7 @@ exports.createMainWindow = function(icon) {
/** /**
* 应用迷你窗口 * 应用迷你窗口
*/ */
exports.createMiniWindow = function(screen) { exports.createMiniWindow = function (screen) {
let win = new BrowserWindow({ let win = new BrowserWindow({
title: '', title: '',
width: 320, width: 320,