fix(spotify): parse web player correctly

This commit is contained in:
Jan De Dobbeleer 2022-03-21 15:03:46 +01:00 committed by Jan De Dobbeleer
parent 98e0039200
commit 744764a05e
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ func (s *Spotify) Enabled() bool {
func (s *Spotify) parseWebSpotifyTitle(windowTitle string) bool {
windowTitle = strings.TrimPrefix(windowTitle, "Spotify - ")
return s.parseSpotifyTitle(windowTitle, " · ")
return s.parseSpotifyTitle(windowTitle, " ")
}
func (s *Spotify) parseSpotifyTitle(windowTitle, separator string) bool {

View file

@ -58,7 +58,7 @@ func TestSpotifyWindowsPWA(t *testing.T) {
Case: "Playing",
ExpectedString: "\ue602 Snow in Stockholm - Sarah, the Illstrumentalist",
ExpectedEnabled: true,
Title: "Spotify - Snow in Stockholm · Sarah, the Illstrumentalist",
Title: "Spotify - Snow in Stockholm Sarah, the Illstrumentalist",
},
{
Case: "Stopped",