mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 13:17:46 +00:00
fix: search bug when searching in playlist (#495)
This commit is contained in:
parent
d9c8489c92
commit
025e28399e
2 changed files with 18 additions and 10 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue