fix: search bug when searching in playlist (#495)

master
Vidocq 4 years ago committed by GitHub
parent d9c8489c92
commit 025e28399e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -464,7 +464,11 @@ export default class {
}
}
setOutputDevice() {
if (this._howler._sounds.length <= 0 || !this._howler._sounds[0]._node) {
if (
process.env.IS_ELECTRON !== true ||
this._howler._sounds.length <= 0 ||
!this._howler._sounds[0]._node
) {
return;
}
this._howler._sounds[0]._node.setSinkId(store.state.settings.outputDevice);

@ -351,16 +351,20 @@ export default {
filteredTracks() {
return this.tracks.filter(
(track) =>
track.name
.toLowerCase()
.includes(this.searchKeyWords.toLowerCase()) ||
track.al.name
.toLowerCase()
.includes(this.searchKeyWords.toLowerCase()) ||
track.ar.find((artist) =>
artist.name
(track.name &&
track.name
.toLowerCase()
.includes(this.searchKeyWords.toLowerCase())
.includes(this.searchKeyWords.toLowerCase())) ||
(track.al.name &&
track.al.name
.toLowerCase()
.includes(this.searchKeyWords.toLowerCase())) ||
track.ar.find(
(artist) =>
artist.name &&
artist.name
.toLowerCase()
.includes(this.searchKeyWords.toLowerCase())
)
);
},

Loading…
Cancel
Save