Skip to content

Commit

Permalink
Merge branch 'spicetify:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Lseoksee authored Aug 13, 2024
2 parents a8cf556 + b63a9c7 commit 1a1bc40
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CustomApps/lyrics-plus/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ const KaraokeLine = ({ text, isActive, position, startTime }) => {
className: `lyrics-lyricsContainer-Karaoke-Word${isWordActive ? " lyrics-lyricsContainer-Karaoke-WordActive" : ""}`,
style: {
"--word-duration": `${time}ms`,
// don't animate unless we have to
transition: !isWordActive ? "all 0s linear" : "",
},
},
word
Expand Down
2 changes: 1 addition & 1 deletion CustomApps/lyrics-plus/ProviderGenius.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const ProviderGenius = (() => {
let lyrics;
let hits;
for (const title of titles) {
const query = new URLSearchParams({ per_page: 20, q: encodeURIComponent(`${title} ${info.artist}`) });
const query = new URLSearchParams({ per_page: 20, q: `${info.artist} ${title}` });
const url = `https://genius.com/api/search/song?${query.toString()}`;

const geniusSearch = await Spicetify.CosmosAsync.get(url);
Expand Down
14 changes: 13 additions & 1 deletion CustomApps/lyrics-plus/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,23 @@ div.lyrics-tabBar-headerItemLink {

.lyrics-lyricsContainer-Karaoke-WordActive {
color: var(--lyrics-color-active) !important;
background-position: top left !important;
}

.lyrics-lyricsContainer-Karaoke-Word {
color: var(--lyrics-color-inactive);
transition: var(--word-duration) color ease;
background-image: linear-gradient(to right,
var(--lyrics-color-active),
var(--lyrics-color-active) 45%,
var(--lyrics-color-inactive) 55%,
var(--lyrics-color-inactive));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 225% 100%;
background-position: top left 100%;
transition-property: color, background-position;
transition-duration: calc(var(--word-duration) + 0.05s);
transition-timing-function: linear;
}

.lyrics-lyricsContainer-LyricsLine a {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.21
require (
github.com/go-ini/ini v1.67.0
github.com/mattn/go-colorable v0.1.13
golang.org/x/net v0.27.0
golang.org/x/net v0.28.0
)

require (
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/stretchr/testify v1.7.1 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/sys v0.23.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion src/preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func exposeAPIs_main(input string) string {
// Spicetify._platform
utils.Replace(
&input,
`(setTitlebarHeight[\w(){}.,&$!=;"" ]+)(\{version:[\w$]+,)`,
`(setTitlebarHeight[\w(){}>:.,&$!=;"" ]+)(\{version:[a-zA-Z_\$][\w\$]*,)`,
func(submatches ...string) string {
return fmt.Sprintf("%sSpicetify._platform=%s", submatches[1], submatches[2])
})
Expand Down

0 comments on commit 1a1bc40

Please sign in to comment.