Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
daix6 opened this issue Dec 29, 2022 · 13 comments

Comments

@daix6
Copy link

daix6 commented Dec 29, 2022

搭配 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
Copy link

I encountered the same problem.

@GuessGodThinksImAbel
Copy link

同样的问题

@sophiakkkk
Copy link

I encountered the same issue as well

@Jnnn0713
Copy link

Jnnn0713 commented Apr 5, 2023

Same problem with apple music

@vhenla
Copy link

vhenla commented Apr 7, 2023

same

@hichris9527
Copy link

我也是遇到这个问题

@Observer-L
Copy link

  • 1

@LilQit7
Copy link

LilQit7 commented Jul 24, 2023

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

@yan-yb
Copy link

yan-yb commented Nov 22, 2023

一样的问题......

@yan-yb
Copy link

yan-yb commented Nov 22, 2023

一样的问题......

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

@MKE0108
Copy link

MKE0108 commented Dec 10, 2023

same

@MKE0108
Copy link

MKE0108 commented Dec 10, 2023

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
Copy link

this issue can solve it #601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests