Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
feat: the redesigned player also opens for Spotify Free accounts
My-Name-Is-Jeff01eeba1c803c
diff --git a/docs/tweaks.md b/docs/tweaks.mdindex 7ceb753f..648b73ab 100644--- a/docs/tweaks.md+++ b/docs/tweaks.md@@ -307,7 +307,10 @@ Redesigned:menu (ContextMenu/), Spotify's rows and then Playback Speed, Pitch (with Pitch follows speed),Reverb and Animated artwork (PlayerMenu.m), and a hold on either side of thecover plays at 2x until the finger lifts (PlayerArtwork.x), an octave higher while Pitch follows- speed is on. Animated artwork (PlayerMotion.x)+ speed is on. A Free account gets it too: Spotify's Reinvented Free player mode, whose units none of+ the hooks reach, declines while the redesign runs, so the track falls to Spotify's other Free mode,+ built from the units the redesign styles (PlayerFree.x, read from the binary, not yet seen on a Free+ account). Animated artwork (PlayerMotion.x)runs the clip edge to edge from the top over its own last rows drawn on down, with a blur coming infrom the seam under the controls and over the whole clip behind the lyrics. The clip and the covercross over as one comes and the other goes, the clip from its poster frame before the video hasdiff --git a/tweak/Sources/Redesigned/Player/Player.h b/tweak/Sources/Redesigned/Player/Player.hindex b82094e5..23ecdddd 100644--- a/tweak/Sources/Redesigned/Player/Player.h+++ b/tweak/Sources/Redesigned/Player/Player.h@@ -21,6 +21,7 @@// PlayerMenu.m the more button's system menu: Spotify's rows, then speed, pitch, reverb and// Animated artwork (Redesigned/ContextMenu)// PlayerSettings.m the Player page in Mod Settings, led by a showcase of the player+// PlayerFree.x a Spotify Free account given the player mode these units belong to//// Speed and pitch, once the redesign's own, are Shared/Player/SpeedPitch.h's; PlayerHeader.x still hands// the more button over, so a menu opened from it is taken for the player's, and hands it to PlayerMenu.m,diff --git a/tweak/Sources/Redesigned/Player/PlayerFree.x b/tweak/Sources/Redesigned/Player/PlayerFree.xnew file mode 100644index 00000000..8a7f4c23--- /dev/null+++ b/tweak/Sources/Redesigned/Player/PlayerFree.x@@ -0,0 +1,37 @@+// Player redesign: a Spotify Free account opens the redesigned player too.+//+// Spotify lays its player out by a mode: the now playing modes service asks the modes it holds in turn,+// -[SPTNowPlayingMode isActiveFor:productState:], and takes the first that answers YES. In 9.1.78 a music+// track meets, by their identifiers, NowPlayingReinventFreeMode first (8, ReinventFree_ReinventFreeNpvImpl,+// the free tier Spotify calls "MFT+ (Reinvented Free)"), which answers YES on a Free account with pick and+// shuffle (-[SPTNowPlayingProductState isPickAndShuffleEnabled]), then NowPlayingMusicFreeMode (9,+// NowPlaying_ModesImpl), which answers YES on any Free account, then NowPlayingMusicPremiumMode (11), which+// answers YES to everything. The Reinvented Free mode's units are classes of its own module+// (ReinventFreeNavigationBarUnitViewController, ReinventFreeInformationElementsUnit,+// ReinventFreePlaybackControlsElementsUnit, ReinventFreeFooterElementsUnit, DurationElementsUnit), which none+// of the redesign's hooks reach: they are on NowPlaying_ModesImpl's units, the ones both of that module's+// music modes are built from. So on a Free account the field came in behind Spotify's own header, controls+// and footer.+//+// While the redesign runs, the Reinvented Free mode declines, and the track falls to NowPlayingMusicFreeMode:+// still Spotify's player for a Free account, with its controls and its limits, laid out by the units the+// redesign styles. Nothing about the account changes, and a Premium account never reaches either mode.+// Read from the binary only (the selectors and identifiers above); no Free account's player has been+// recorded in trees/clean/.+#import "Core/SGCore.h"+#import "Redesigned/Kit/SGRKit.h"++%hook _TtC32ReinventFree_ReinventFreeNpvImpl26NowPlayingReinventFreeMode+- (BOOL)isActiveFor:(id)playerState productState:(id)productState {+ BOOL active = %orig;+ static dispatch_once_t once;+ if (active) dispatch_once(&once, ^{ SGLog(@"redesign player: Reinvented Free player declined, Spotify's Free player takes the track"); });+ return NO;+}+%end++%ctor {+ if (!SGRedesignedUI()) return;+ %init;+ SGRequireClasses(@[@"_TtC32ReinventFree_ReinventFreeNpvImpl26NowPlayingReinventFreeMode"]);+}