somefixes
This commit is contained in:
parent
5bd5d92370
commit
9578dcf85c
4 changed files with 30 additions and 21 deletions
|
@ -1192,6 +1192,10 @@ export class BrowserWindow {
|
||||||
LocalFiles.cleanUpDB()
|
LocalFiles.cleanUpDB()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
LocalFiles.eventEmitter.on('newtracks', (data) => {
|
||||||
|
BrowserWindow.win.webContents.send('getUpdatedLocalList', data);
|
||||||
|
});
|
||||||
|
|
||||||
ipcMain.on('writeWAV', (event, leftpcm, rightpcm, bufferlength) => {
|
ipcMain.on('writeWAV', (event, leftpcm, rightpcm, bufferlength) => {
|
||||||
|
|
||||||
function interleave16(leftChannel: any, rightChannel: any) {
|
function interleave16(leftChannel: any, rightChannel: any) {
|
||||||
|
|
|
@ -5,11 +5,15 @@ import { utils } from '../../base/utils';
|
||||||
import * as mm from 'music-metadata';
|
import * as mm from 'music-metadata';
|
||||||
import {Md5} from 'ts-md5/dist/md5';
|
import {Md5} from 'ts-md5/dist/md5';
|
||||||
import e from "express";
|
import e from "express";
|
||||||
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class LocalFiles {
|
export class LocalFiles {
|
||||||
static localSongs: any = [];
|
static localSongs: any = [];
|
||||||
static localSongsArts: any = [];
|
static localSongsArts: any = [];
|
||||||
public static DB = ProviderDB.db;
|
public static DB = ProviderDB.db;
|
||||||
|
static eventEmitter = new EventEmitter();
|
||||||
|
|
||||||
static getDataType(item_id : String | any){
|
static getDataType(item_id : String | any){
|
||||||
if ((item_id ?? ('')).startsWith('ciderlocalart'))
|
if ((item_id ?? ('')).startsWith('ciderlocalart'))
|
||||||
|
@ -105,8 +109,10 @@ export class LocalFiles {
|
||||||
ProviderDB.db.putIfNotExists(form)
|
ProviderDB.db.putIfNotExists(form)
|
||||||
ProviderDB.db.putIfNotExists(art)
|
ProviderDB.db.putIfNotExists(art)
|
||||||
metadatalist.push(form)
|
metadatalist.push(form)
|
||||||
|
|
||||||
|
if (this.localSongs.length === 0 && numid % 10 === 0) { // send updated chunks only if there is no previous database
|
||||||
|
this.eventEmitter.emit('newtracks', metadatalist)}
|
||||||
}
|
}
|
||||||
//delete removed tracks
|
|
||||||
} catch (e) { }
|
} catch (e) { }
|
||||||
}
|
}
|
||||||
this.localSongs = metadatalist;
|
this.localSongs = metadatalist;
|
||||||
|
|
|
@ -140,7 +140,6 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="col right-col" v-if="tabMode != ''">
|
<div class="col right-col" v-if="tabMode != ''">
|
||||||
<!-- <div class="fs-info">
|
<!-- <div class="fs-info">
|
||||||
<div>Name</div>
|
<div>Name</div>
|
||||||
|
|
|
@ -18,6 +18,24 @@
|
||||||
<span>{{$root.getLz('settings.header.general')}}</span>
|
<span>{{$root.getLz('settings.header.general')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-option-body">
|
<div class="settings-option-body">
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
{{$root.getLz('term.language')}}
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<label>
|
||||||
|
<select class="md-select" @change="$root.setLz('');$root.setLzManual()"
|
||||||
|
v-model="app.cfg.general.language">
|
||||||
|
<optgroup :label="index" v-for="(categories, index) in getLanguages()">
|
||||||
|
<option v-for="lang in categories" :value="lang.code">{{lang.nameNative}}
|
||||||
|
({{
|
||||||
|
lang.nameEnglish }})
|
||||||
|
</option>
|
||||||
|
</optgroup>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('term.accountSettings')}}
|
{{$root.getLz('term.accountSettings')}}
|
||||||
|
@ -1317,24 +1335,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="md-option-line">
|
|
||||||
<div class="md-option-segment">
|
|
||||||
{{$root.getLz('term.language')}}
|
|
||||||
</div>
|
|
||||||
<div class="md-option-segment md-option-segment_auto">
|
|
||||||
<label>
|
|
||||||
<select class="md-select" @change="$root.setLz('');$root.setLzManual()"
|
|
||||||
v-model="app.cfg.general.language">
|
|
||||||
<optgroup :label="index" v-for="(categories, index) in getLanguages()">
|
|
||||||
<option v-for="lang in categories" :value="lang.code">{{lang.nameNative}}
|
|
||||||
({{
|
|
||||||
lang.nameEnglish }})
|
|
||||||
</option>
|
|
||||||
</optgroup>
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="md-option-line update-check" v-if="app.platform === 'win32'">
|
<div class="md-option-line update-check" v-if="app.platform === 'win32'">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('settings.option.visual.transparent')}}<br>
|
{{$root.getLz('settings.option.visual.transparent')}}<br>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue