Merge pull request #2127 from runnableAir/fix_player_enable

Fix: 右键播放歌曲无法激活播放栏
This commit is contained in:
pan93412 2024-03-01 00:13:14 -06:00 committed by GitHub
commit 741fdc973c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -823,6 +823,9 @@ export default class {
this._howler?.once('play', () => {
this._howler?.fade(0, this.volume, PLAY_PAUSE_FADE_DURATION);
// 播放时确保开启player.
// 避免因"忘记设置"导致在播放时播放器不显示的Bug
this._enabled = true;
this._setPlaying(true);
if (this._currentTrack.name) {
setTitle(this._currentTrack);
@ -879,7 +882,6 @@ export default class {
autoPlayTrackID = 'first'
) {
this._isPersonalFM = false;
if (!this._enabled) this._enabled = true;
this.list = trackIDs;
this.current = 0;
this._playlistSource = {
@ -941,7 +943,6 @@ export default class {
}
playPersonalFM() {
this._isPersonalFM = true;
if (!this._enabled) this._enabled = true;
if (this.currentTrackID !== this._personalFMTrack.id) {
this._replaceCurrentTrack(this._personalFMTrack.id, true);
} else {