mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-01-19 17:22:45 +08:00
fix: search bug when searching in playlist (#495)
This commit is contained in:
parent
d9c8489c92
commit
025e28399e
|
@ -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…
Reference in New Issue
Block a user