This commit is contained in:
eevee
2024-09-26 15:27:16 +03:00
parent 69a35534e8
commit 7cc86d3d37
7 changed files with 13 additions and 20 deletions
+5 -5
View File
@@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'
xcode-version: '16.0'
- name: Setup Theos
uses: actions/checkout@v4
@@ -32,16 +32,16 @@ jobs:
- name: Copy SwiftProtobuf (rootful)
run: |
mkdir swiftprotobuf && cd "$_"
wget https://github.com/whoeevee/EeveeSpotify/releases/download/swift2.0/org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm.deb
ar -x org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm.deb
wget https://github.com/whoeevee/swift-protobuf/releases/download/1.28.1/org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm.deb
ar -x org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm.deb
tar -xvf data.tar.lzma
cp -r Library/Frameworks/SwiftProtobuf.framework $THEOS/lib
- name: Copy SwiftProtobuf (rootless)
run: |
mkdir swiftprotobuf-rootless && cd "$_"
wget https://github.com/whoeevee/EeveeSpotify/releases/download/swift2.0/org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm64.deb
ar -x org.swift.protobuf.swiftprotobuf_1.26.0_iphoneos-arm64.deb
wget https://github.com/whoeevee/swift-protobuf/releases/download/1.28.1/org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm64.deb
ar -x org.swift.protobuf.swiftprotobuf_1.28.1_iphoneos-arm64.deb
tar -xvf data.tar.lzma
cp -r var/jb/Library/Frameworks/SwiftProtobuf.framework $THEOS/lib/iphone/rootless
@@ -32,7 +32,7 @@ class SPTDataLoaderServiceHook: ClassHook<NSObject>, SpotifySessionDelegate {
session,
dataTask: task,
didReceiveData: try getLyricsForCurrentTrack(
originalLyrics: try? Lyrics(serializedData: buffer)
originalLyrics: try? Lyrics(serializedBytes: buffer)
)
)
@@ -46,13 +46,13 @@ class SPTDataLoaderServiceHook: ClassHook<NSObject>, SpotifySessionDelegate {
}
do {
var customizeMessage = try CustomizeMessage(serializedData: buffer)
var customizeMessage = try CustomizeMessage(serializedBytes: buffer)
modifyRemoteConfiguration(&customizeMessage.response)
orig.URLSession(
session,
dataTask: task,
didReceiveData: try customizeMessage.serializedData()
didReceiveData: try customizeMessage.serializedBytes()
)
orig.URLSession(session, task: task, didCompleteWithError: nil)
@@ -280,5 +280,5 @@ func getLyricsForCurrentTrack(originalLyrics: Lyrics? = nil) throws -> Data {
}
preloadedLyrics = nil
return try lyrics.serializedData()
return try lyrics.serializedBytes()
}
@@ -78,13 +78,6 @@ class MusixmatchLyricsRepository: LyricsRepository {
}
private func getFirstSubtitle(_ subtitlesMessage: [String: Any]) throws -> [String: Any] {
guard
let subtitlesHeader = subtitlesMessage["header"] as? [String: Any],
let subtitlesStatusCode = subtitlesHeader["status_code"] as? Int
else {
throw LyricsError.DecodingError
}
guard
let subtitlesBody = subtitlesMessage["body"] as? [String: Any],
let subtitleList = subtitlesBody["subtitle_list"] as? [[String: Any]],
@@ -60,7 +60,7 @@ class SpotifySessionDelegateBootstrapHook: ClassHook<NSObject>, SpotifySessionDe
let buffer = URLSessionHelper.shared.obtainData(for: url)!
do {
var bootstrapMessage = try BootstrapMessage(serializedData: buffer)
var bootstrapMessage = try BootstrapMessage(serializedBytes: buffer)
if UserDefaults.patchType == .notSet {
if bootstrapMessage.attributes["type"]?.stringValue == "premium" {
@@ -81,7 +81,7 @@ class SpotifySessionDelegateBootstrapHook: ClassHook<NSObject>, SpotifySessionDe
orig.URLSession(
session,
dataTask: task,
didReceiveData: try bootstrapMessage.serializedData()
didReceiveData: try bootstrapMessage.serializedBytes()
)
NSLog("[EeveeSpotify] Modified bootstrap data")
@@ -33,7 +33,7 @@ class BundleHelper {
func resolveConfiguration() throws -> ResolveConfiguration {
return try ResolveConfiguration(
serializedData: try Data(
serializedBytes: try Data(
contentsOf: self.bundle.url(
forResource: "resolveconfiguration",
withExtension: "bnk"
+1 -1
View File
@@ -6,4 +6,4 @@ Description: A tweak to get Spotify Premium for free, just like Spotilife
Maintainer: Eevee
Author: Eevee
Section: Tweaks
Depends: ${ORION}, firmware (>= 14.0), org.swift.protobuf.swiftprotobuf
Depends: ${ORION}, firmware (>= 14.0), org.swift.protobuf.swiftprotobuf (>= 1.28.1)