Liquid Glass and Apple Music touches for the Spotify iOS app. A GPL-3.0 fork of spoti.pw 0.21.1.
C
feat: Karaoke's settings can hide the mic on the lyrics
My-Name-Is-Jeffb424aa642de5
diff --git a/docs/tweaks.md b/docs/tweaks.mdindex 4ac66221..d5115269 100644--- a/docs/tweaks.md+++ b/docs/tweaks.md@@ -686,7 +686,8 @@ from gone through as sung to the vocals alone, with Sing along, Original and Voc(where the iPhone reads headphone motion; a page of its own, reading out On or Off, with a live preview at its top thatfollows the head through AirPods, or sways gently without them and holds still under Reduce Motion, a line under itsaying which, then the switch; its row is on the main page too, under Karaoke's), the voice model's download (Paused and-Checking among its states) and its removal, Ignore heat warnings, and under Advanced Runs on (Automatic: the Neural Engine+Checking among its states) and its removal, Toggle from lyrics (the redesign's mic, on until switched off, issue #12),+Ignore heat warnings, and under Advanced Runs on (Automatic: the Neural Enginebeside the CPU; CPU only) and Prepare after updates, all applying straight away. Lock screen, on the mainpage under either look, opens the lock screen widget's page, titled Lock screen (Moving artwork, Lyrics or Every song, and the lyrics' style,Still or Animated, and Spotify's like and dislike buttons' flag; its podcast, audiobook and artwork flags stay indiff --git a/harness/lyrics/stubs.m b/harness/lyrics/stubs.mindex 0da30226..977fa5c0 100644--- a/harness/lyrics/stubs.m+++ b/harness/lyrics/stubs.m@@ -155,3 +155,5 @@ void SGKaraokeSeek(NSInteger ms) {}// "“Title” by Artist" the translators are told.NSString *SGLyricsSongName(NSString *trackID) { return @"“Sample” by Harness"; }+// Karaoke's settings tell the lyrics to show or hide the mic.+NSNotificationName const SGSingButtonDidChangeNotification = @"SGSingButtonDidChangeNotification";diff --git a/tweak/Sources/Redesigned/Lyrics/SGRKaraokeView.m b/tweak/Sources/Redesigned/Lyrics/SGRKaraokeView.mindex 3338db29..51f716eb 100644--- a/tweak/Sources/Redesigned/Lyrics/SGRKaraokeView.m+++ b/tweak/Sources/Redesigned/Lyrics/SGRKaraokeView.m@@ -14,6 +14,7 @@#import "LyricsLook.h"#import "MeaningSheet.h"#import "SGRSingButton.h"+#import "Shared/Sing/Sing.h"#import "Shared/LyricsSources/LyricsSources.h"#import "Shared/LyricsTranslation/LyricsTranslation.h"#import "Settings/SGPageStyle.h"@@ -1352,7 +1353,9 @@ typedef struct {for (NSNotificationName name in @[UIContentSizeCategoryDidChangeNotification, UIAccessibilityDarkerSystemColorsStatusDidChangeNotification])[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(creditStyleChanged) name:name object:nil];_sing = [SGRSingButton new];+ _sing.hidden = !SGEnabled(SGKeySingButton);[self addSubview:_sing];+ [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(singButtonChanged) name:SGSingButtonDidChangeNotification object:nil];[self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)]];[self addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(held:)]];[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(playerTransitionChanged:) name:SGPlayerTransitionNotification object:nil];@@ -1368,6 +1371,11 @@ typedef struct {return self;}+// Karaoke's settings switched the mic off or on: hidden at once, Karaoke itself as it was.+- (void)singButtonChanged {+ _sing.hidden = !SGEnabled(SGKeySingButton);+}+- (void)refreshCreditStyle {_credit.font = [[UIFontMetrics metricsForTextStyle:UIFontTextStyleCaption1]scaledFontForFont:[UIFont systemFontOfSize:kCreditSize weight:UIFontWeightSemibold] maximumPointSize:17];diff --git a/tweak/Sources/Shared/Sing/Sing.h b/tweak/Sources/Shared/Sing/Sing.hindex a67cf97e..5134a251 100644--- a/tweak/Sources/Shared/Sing/Sing.h+++ b/tweak/Sources/Shared/Sing/Sing.h@@ -30,6 +30,10 @@// The mic: on and off at once, from the button or the Sing page; off until switched on.#define SGKeySing @"spotifyglass.sing"+// Whether the redesign's lyrics show the mic in their corner; on until switched off (issue #12). Karaoke itself+// stays on its own switch, which this does not touch.+#define SGKeySingButton @"spotifyglass.sing.button"+extern NSNotificationName const SGSingButtonDidChangeNotification;// The vocals' level, 0 (gone) through 1 (as the song has them) to 2 (the vocals alone) at the slider's top.#define SGKeySingLevel @"spotifyglass.sing.level"// Keeps the model running on a hot iPhone, which otherwise lets it go from the thermal state Serious up.diff --git a/tweak/Sources/Shared/Sing/SingSettings.m b/tweak/Sources/Shared/Sing/SingSettings.mindex 0efe7197..c5dc3d9a 100644--- a/tweak/Sources/Shared/Sing/SingSettings.m+++ b/tweak/Sources/Shared/Sing/SingSettings.m@@ -180,9 +180,15 @@ UIViewController *SGSpatialVoiceSettingsPage(void) {@end+NSNotificationName const SGSingButtonDidChangeNotification = @"SGSingButtonDidChangeNotification";+UIViewController *SGSingSettingsPage(void) {SGModRow *sing = SGOptionRow(@"Karaoke", nil, SGKeySing);sing.changed = ^(BOOL on) { SGSetSingOn(on); };+ // Only the redesign's lyrics have the mic.+ SGModRow *button = SGSwitchRow(@"Toggle from lyrics", @"The mic in the corner of the lyrics", SGKeySingButton);+ button.changed = ^(BOOL on) { [NSNotificationCenter.defaultCenter postNotificationName:SGSingButtonDidChangeNotification object:nil]; };+ button.visible = ^BOOL { return SGRedesignedUIStored(); };SGModRow *heat = SGOptionRow(@"Ignore heat warnings", @"Keeps Karaoke going on a hot iPhone, which then gets hotter", SGKeySingIgnoreHeat);heat.changed = ^(BOOL on) { SGSetSingIgnoresHeat(on); };__block __weak SGModPage *page;@@ -216,7 +222,7 @@ UIViewController *SGSingSettingsPage(void) {SGModRow *prepare = SGSwitchRow(@"Prepare after updates",@"Readies the Neural Engine in the background after Vitrine or iOS updates, so Karaoke starts at full speed", SGKeySingPrepareAhead);SGSingPage *made = [[SGSingPage alloc] initWithTitle:@"Karaoke" intro:nil sections:@[- SGSection(nil, @[sing, heat, model, remove]),+ SGSection(nil, @[sing, button, heat, model, remove]),SGSection(nil, @[spatial]),SGNotedSection(@"Advanced", @[units, prepare],@"Karaoke turns a song's vocals down to sing over, or the rest down to hear the vocals alone, with a voice model that "