ddddxxx / LyricsX

🎶 Ultimate lyrics app for macOS.
Mozilla Public License 2.0
4.78k stars 393 forks source link

Spotify 歌曲切换之后,歌词会消失 Lyrics will disappear when switch songs in Spotify #587

Open daix6 opened 1 year ago

daix6 commented 1 year ago

搭配 Spotify 使用的时候,每当切换歌时,歌词会消失。如果重新启动 LyricsX,这个时候又会有歌词。 Lyrics will disappear when switch songs in Spotify. But if I restart LyricsX, the lyrics will show.

System: Ventura 13.0.1, Intel 芯片

TerminaD commented 1 year ago

I encountered the same problem.

GuessGodThinksImAbel commented 1 year ago

同样的问题

sophiakkkk commented 1 year ago

I encountered the same issue as well

Jnnn0713 commented 1 year ago

Same problem with apple music

vhenla commented 1 year ago

same

hichris9527 commented 1 year ago

我也是遇到这个问题

Observer-L commented 1 year ago
LilQit7 commented 1 year ago

这tm不知道是什么尿性的问题

yan-yb commented 12 months ago

一样的问题......

yan-yb commented 12 months ago

一样的问题......

我发现其实是菜单栏隐藏软件,退了之后就没有这个问题了,可能有冲突吧

MKE0108 commented 11 months ago

same

MKE0108 commented 11 months ago

Sol1

Download -> autoRelauch.zip

autoRelauch 放到 文件,執行autoRelauch.App

Move autoRelauch to Document,Launch autoRelauch.App

Sol2

可以使用這個python 腳本來解決(適用於Apple music) This python script can fix this issue.(Only for Apple music)


import os
import time
import subprocess
def relaunch(app_name = "LyricsX"):
    print(f"Relaunch {app_name}!")
    app_name = "LyricsX"  # Replace with the actual command to start your software
    # Quitting the application
    os.system(f"osascript -e 'tell application \"{app_name}\" to quit'")

        # Waiting for a small amount of time to ensure the application has been quit
    time.sleep(1)
        # Starting the application again
    os.system(f"osascript -e 'tell application \"{app_name}\" to activate'")

def get_current_track_info():
    apple_script = '''
    tell application "Music"
        if it is running then
            if player state is playing then
                set currentTrack to current track
                set trackName to name of currentTrack
                set artistName to artist of currentTrack
                set albumName to album of currentTrack
                return trackName & " by " & artistName & " from " & albumName
            else
                return "Music is not playing."
            end if
        else
            return "Music is not running."
        end if
    end tell
    '''
    try:
        track_info = subprocess.check_output(["osascript", "-e", apple_script], universal_newlines=True)
        return track_info.strip()
    except subprocess.CalledProcessError as e:
        return str(e)

last_track = None
while True:
    current_track = get_current_track_info()
    if current_track != last_track and current_track != "Music is not playing." and current_track != "Music is not running.":
        relaunch()
        last_track = current_track
    time.sleep(1)
CassandraCat commented 9 months ago

this issue can solve it #601