Skip to content

Commit

Permalink
1. 修复了在window和Linux上桌面歌词不显示的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stark81 committed Nov 30, 2023
1 parent 4560760 commit 74e5c57
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/views/lyrics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import { mapState, mapMutations } from 'vuex';
import { formatTrackTime } from '@/utils/common';
import { getLyric } from '@/api/track';
import { lyricParser } from '@/utils/lyrics';
import { isMac } from '@/utils/platform';
export default {
name: 'Lyrics',
Expand Down Expand Up @@ -173,17 +172,15 @@ export default {
currentTrack() {
this.getLyric().then(data => {
this.$parent.hasLyric = data;
if (isMac) {
const { ipcRenderer } = require('electron');
const lyric = [
{
content: this.currentTrack.name,
time: 0.0,
rawTime: '[00:00.000]',
},
].concat(this.lyric);
ipcRenderer.send('sendLyrics', [lyric, this.tlyric]);
}
const { ipcRenderer } = require('electron');
const lyric = [
{
content: this.currentTrack.name,
time: 0.0,
rawTime: '[00:00.000]',
},
].concat(this.lyric);
ipcRenderer.send('sendLyrics', [lyric, this.tlyric]);
});
},
lyricDelay(val) {
Expand Down

0 comments on commit 74e5c57

Please sign in to comment.