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() { 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; return;
} }
this._howler._sounds[0]._node.setSinkId(store.state.settings.outputDevice); this._howler._sounds[0]._node.setSinkId(store.state.settings.outputDevice);

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