mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-09 05:09:39 +00:00
Bugfixing
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
"start": "concurrently \"npm run start:angular\" \"npm run start:electron\" -n angular,electron -c red,yellow",
|
||||
"start:angular": "ng serve",
|
||||
"start:electron": "nodemon --exec \"tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron ./dist/electron/src-electron/main.js --dev\" --watch src-electron/ -e ts",
|
||||
"build:windows": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && electron-builder build --windows",
|
||||
"build:mac": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && electron-builder build --mac",
|
||||
"build:linux": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && electron-builder build --linux",
|
||||
"release": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && electron-builder build"
|
||||
"build:windows": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --windows",
|
||||
"build:mac": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --mac",
|
||||
"build:linux": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build --linux",
|
||||
"release": "ng build -c production && tsc -p src-electron/tsconfig.electron.json && node src-electron/rename-to-mjs.js && electron-builder build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.6",
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Component, ElementRef, ViewChild } from '@angular/core'
|
||||
|
||||
import _ from 'lodash'
|
||||
|
||||
import { removeStyleTags } from '../../../../../src-shared/UtilFunctions.js'
|
||||
import { DownloadService } from '../../../core/services/download.service'
|
||||
import { SearchService } from '../../../core/services/search.service'
|
||||
import { SelectionService } from '../../../core/services/selection.service'
|
||||
@@ -32,7 +33,11 @@ export class StatusBarComponent {
|
||||
|
||||
async downloadSelected() {
|
||||
const selectedGroupIds = this.selectedGroupIds
|
||||
for (const chart of this.searchService.groupedSongs.filter(gs => selectedGroupIds.includes(gs[0].groupId))) {
|
||||
const selectedCharts = this.searchService.groupedSongs.filter(gs => selectedGroupIds.includes(gs[0].groupId))
|
||||
|
||||
for (const chart of _.uniqBy(selectedCharts, gs => `${removeStyleTags(gs[0].artist ?? 'Unknown Artist')
|
||||
} - ${removeStyleTags(gs[0].name ?? 'Unknown Name')
|
||||
} (${removeStyleTags(gs[0].charter ?? 'Unknown Charter')})`)) {
|
||||
this.downloadService.addDownload(chart[0])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,5 +162,9 @@ function getLoadUrl() {
|
||||
}
|
||||
|
||||
export function emitIpcEvent<E extends keyof IpcFromMainEmitEvents>(event: E, data: IpcFromMainEmitEvents[E]) {
|
||||
mainWindow.webContents.send(event, data)
|
||||
try {
|
||||
mainWindow.webContents.send(event, data)
|
||||
} catch (err) {
|
||||
// Ignore; happens when closing Bridge
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user