mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
v2.1
This commit is contained in:
@@ -29,7 +29,9 @@ class EncoreButtonHook: ClassHook<UIButton> {
|
||||
|
||||
func getCurrentTrackLyricsData() throws -> Data {
|
||||
|
||||
let track = HookedInstances.currentTrack!
|
||||
guard let track = HookedInstances.currentTrack else {
|
||||
throw GeniusLyricsError.NoCurrentTrack
|
||||
}
|
||||
|
||||
let title = track.trackTitle()
|
||||
.removeMatches("\\(.*\\)")
|
||||
|
||||
@@ -5,9 +5,9 @@ class HookedInstances {
|
||||
static var currentTrack: SPTPlayerTrack?
|
||||
}
|
||||
|
||||
class SPTNowPlayingContentLayerViewModelHook: ClassHook<NSObject> {
|
||||
class SPTNowPlayingModelHook: ClassHook<NSObject> {
|
||||
|
||||
static let targetName = "SPTNowPlayingContentLayerViewModel"
|
||||
static let targetName = "SPTNowPlayingModel"
|
||||
|
||||
func currentTrack() -> SPTPlayerTrack? {
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Foundation
|
||||
|
||||
enum GeniusLyricsError: Swift.Error {
|
||||
case NoCurrentTrack
|
||||
case DecodingError
|
||||
case NoSuchSong
|
||||
}
|
||||
Reference in New Issue
Block a user