improvements

This commit is contained in:
eevee
2024-05-10 14:11:05 +03:00
parent 8b7a8ebe9c
commit 67eac25275
4 changed files with 9 additions and 6 deletions
+4 -3
View File
@@ -19,7 +19,8 @@ class EncoreButtonHook: ClassHook<UIButton> {
func intrinsicContentSize() -> CGSize {
if target.accessibilityIdentifier == "Components.UI.LyricsHeader.ReportButton" {
if target.accessibilityIdentifier == "Components.UI.LyricsHeader.ReportButton",
UserDefaults.lyricsSource != .musixmatch {
target.isEnabled = false
}
@@ -97,13 +98,13 @@ func getCurrentTrackLyricsData() throws -> Data {
source: source
)
let lyrics = Lyrics.with {
let lyrics = try Lyrics.with {
$0.colors = LyricsColors.with {
$0.backgroundColor = Color(hex: track.extractedColorHex()).normalized.uInt32
$0.lineColor = Color.black.uInt32
$0.activeLineColor = Color.white.uInt32
}
$0.data = try! LyricsHelper.composeLyricsData(plainLyrics, source: source)
$0.data = try LyricsHelper.composeLyricsData(plainLyrics, source: source)
}
return try lyrics.serializedData()
@@ -98,7 +98,9 @@ class LyricsHelper {
.dropLast()
lyricLines = lines.map { line in
LyricsLine.with { $0.content = line }
LyricsLine.with {
$0.content = line.lyricsNoteIfEmpty
}
}
}
@@ -14,7 +14,7 @@ extension String {
String(
self
.removeMatches("\\(.*\\)")
//.removeMatches("- .*")
.removeMatches("- .*")
.prefix(30)
//.trimmingCharacters(in: .whitespaces)
)
@@ -10,7 +10,7 @@ struct EeveeSettingsView: View {
let alert = UIAlertController(
title: "Enter User Token",
message: "In order to use Musixmatch, you need to retrieve your user token from the Musixmatch app. Please enter it here.",
message: "In order to use Musixmatch, you need to retrieve your user token from the official app. Download Musixmatch from the App Store, sign up, and extract the token using MITM.",
preferredStyle: .alert
)