diff --git a/Sources/EeveeSpotify/CustomLyrics.x.swift b/Sources/EeveeSpotify/CustomLyrics.x.swift index 7f0051b..400437f 100644 --- a/Sources/EeveeSpotify/CustomLyrics.x.swift +++ b/Sources/EeveeSpotify/CustomLyrics.x.swift @@ -19,7 +19,8 @@ class EncoreButtonHook: ClassHook { 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() diff --git a/Sources/EeveeSpotify/Helpers/LyricsHelper.swift b/Sources/EeveeSpotify/Helpers/LyricsHelper.swift index a19c063..55f729c 100644 --- a/Sources/EeveeSpotify/Helpers/LyricsHelper.swift +++ b/Sources/EeveeSpotify/Helpers/LyricsHelper.swift @@ -98,7 +98,9 @@ class LyricsHelper { .dropLast() lyricLines = lines.map { line in - LyricsLine.with { $0.content = line } + LyricsLine.with { + $0.content = line.lyricsNoteIfEmpty + } } } diff --git a/Sources/EeveeSpotify/Models/Extensions/String+Extension.swift b/Sources/EeveeSpotify/Models/Extensions/String+Extension.swift index 6c65683..1725f54 100644 --- a/Sources/EeveeSpotify/Models/Extensions/String+Extension.swift +++ b/Sources/EeveeSpotify/Models/Extensions/String+Extension.swift @@ -14,7 +14,7 @@ extension String { String( self .removeMatches("\\(.*\\)") - //.removeMatches("- .*") + .removeMatches("- .*") .prefix(30) //.trimmingCharacters(in: .whitespaces) ) diff --git a/Sources/EeveeSpotify/Views/EeveeSettingsView.swift b/Sources/EeveeSpotify/Views/EeveeSettingsView.swift index 041f8a5..e38f34d 100644 --- a/Sources/EeveeSpotify/Views/EeveeSettingsView.swift +++ b/Sources/EeveeSpotify/Views/EeveeSettingsView.swift @@ -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 )