diff --git a/README.md b/README.md index deae0b64..f46316e6 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ Several months ago, Spotilife, the only tweak to get Spotify Premium, stopped wo Upon login, Spotify fetches user data, including active subscription, and caches it in the `offline.bnk` file in the `/Library/Application Support/PersistentCache` directory. It uses its proprietary binary format to store data, incorporating a length byte before each value, among other conventions. Certain keys, such as `player-license`, `financial-product`, and `type`, determines the user abilities. -The tweak patches this file while initializing; Spotify loads it and assumes you have Premium. To be honest, it doesn't really patch due to challenges with dynamic length and varied bytes. Ideally, there should be a parser capable of deserializing and serializing such format. However, for now, the tweak simply extracts the username from the current `offline.bnk` file and inserts it into `premiumblank.bnk` (a file containing all premium values preset), replacing `offline.bnk` (`financial-product` is trial because I have no premium `offline.bnk`, but it doesn't matter). +The tweak patches this file while initializing; Spotify loads it and assumes you have Premium. To be honest, it doesn't really patch due to challenges with dynamic length and varied bytes. Ideally, there should be a parser capable of deserializing and serializing such format. However, for now, the tweak simply extracts the username from the current `offline.bnk` file and inserts it into `premiumblank.bnk` (a file containing all premium values preset), replacing `offline.bnk`. ![Hex](Images/hex.png) -Tweak also removes the Premium tab and changes query parameters `trackRows` and `video` in HTTP requests to true, so Spotify loads videos and not just track names at the artist page. Sorry if the code seems cringe; the main focus is on the concept. It can stop working just like Spotilife, but so far, it works on the latest Spotify 8.9.## (Spotilife also patches `offline.bnk`, but it changes obscure bytes that do nothing on new versions). Spotify reloads user data from time to time (and on changing network, for example), so if Premium stops working, simply restart the app. +Tweak also changes query parameters `trackRows` and `video` in HTTP requests to true, so Spotify loads videos and not just track names at the artist page. Sorry if the code seems cringe; the main focus is on the concept. It can stop working just like Spotilife, but so far, it works on the latest Spotify 8.9.## (Spotilife also patches `offline.bnk`, but it changes obscure bytes that do nothing on new versions). Spotify reloads user data from time to time (and on changing network, for example), so if Premium stops working, simply restart the app. There is no offline or very high quality (similar to Spotilife) because these features are server-sided (i.e., you can't get very high quality tracks from the server without a subscription). In theory, it might be possible to implement offline mode locally, but not in this tweak. diff --git a/Sources/EeveeSpotify/SpotifyHidePremium.x.swift b/Sources/EeveeSpotify/SpotifyHidePremium.x.swift deleted file mode 100644 index ec6cace9..00000000 --- a/Sources/EeveeSpotify/SpotifyHidePremium.x.swift +++ /dev/null @@ -1,26 +0,0 @@ -import Orion -import UIKit - -class UITabBarHook: ClassHook { - - // there is only one UITabBar, so no problem - func items() -> [UITabBarItem] { - return Array(orig.items().prefix(3)) - } -} - -class UITabBarButtonLabelHook: ClassHook { - - static let targetName = "UITabBarButtonLabel" - - func text() -> String { - - let text = orig.text() - - if text == "Premium" { - target.superview?.removeFromSuperview() - } - - return text - } -} \ No newline at end of file diff --git a/Sources/EeveeSpotify/Tweak.x.swift b/Sources/EeveeSpotify/Tweak.x.swift index 2ddf8951..878cd369 100644 --- a/Sources/EeveeSpotify/Tweak.x.swift +++ b/Sources/EeveeSpotify/Tweak.x.swift @@ -60,19 +60,18 @@ struct EeveeSpotify: Tweak { try blankData.write(to: filePath) NSLog("[EeveeSpotify] Successfully applied") - - Timer.scheduledTimer(withTimeInterval: 20, repeats: true) { _ in - do { - try blankData.write(to: filePath) - NSLog("[EeveeSpotify] Successfully reapplied") - } - catch { - NSLog("[EeveeSpotify] Unable to reapply (write data): \(error)") - } - } } catch { + + DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { + + WindowHelper.shared.showPopup( + message: "Unable to apply tweak: \(error)", + buttonText: "OK" + ) + } + NSLog("[EeveeSpotify] Unable to apply tweak: \(error)") } } diff --git a/control b/control index dfebea13..b032b7d8 100644 --- a/control +++ b/control @@ -1,6 +1,6 @@ Package: com.eevee.spotify Name: EeveeSpotify -Version: 1.1 +Version: 1.2 Architecture: iphoneos-arm Description: A tweak to get Spotify Premium for free, just like Spotilife Maintainer: Eevee diff --git a/layout/Library/Application Support/EeveeSpotify.bundle/premiumblank.bnk b/layout/Library/Application Support/EeveeSpotify.bundle/premiumblank.bnk index 90b22488..8949c42a 100644 Binary files a/layout/Library/Application Support/EeveeSpotify.bundle/premiumblank.bnk and b/layout/Library/Application Support/EeveeSpotify.bundle/premiumblank.bnk differ