Skip to content

Commit

Permalink
Fixed a login issue with spotify
Browse files Browse the repository at this point in the history
  • Loading branch information
obrhoff committed Mar 3, 2022
1 parent 5248478 commit be2e796
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions MusaicFM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,12 @@
buildSettings = {
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = YE33ZK7Z99;
INFOPLIST_FILE = MusaicFM/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.2.4;
MARKETING_VERSION = 1.2.5;
PRODUCT_BUNDLE_IDENTIFIER = com.obrhoff.MusaicFM;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -548,12 +548,12 @@
CODE_SIGN_IDENTITY = "Developer ID Application: Dennis Oberhoff (YE33ZK7Z99)";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = YE33ZK7Z99;
INFOPLIST_FILE = MusaicFM/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.2.4;
MARKETING_VERSION = 1.2.5;
PRODUCT_BUNDLE_IDENTIFIER = com.obrhoff.MusaicFM;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -642,8 +642,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SDWebImage/SDWebImage";
requirement = {
kind = exactVersion;
version = 5.11.1;
kind = upToNextMajorVersion;
minimumVersion = 5.11.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
12 changes: 8 additions & 4 deletions MusaicFM/PreferencesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ - (void)controlTextDidChange:(NSNotification*)obj
[self didChangeText];
}

- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction
decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
{

NSURLComponents* components = [NSURLComponents componentsWithURL:webView.URL resolvingAgainstBaseURL:NO];
NSURLComponents* components = [NSURLComponents componentsWithURL:[navigationAction request].URL resolvingAgainstBaseURL:NO];
NSURLComponents* callbackComponents = [NSURLComponents componentsWithString:spotifyRedirectUrl];

if (![components.scheme isEqualToString:callbackComponents.scheme]) {
Expand Down Expand Up @@ -231,8 +232,11 @@ - (NSString*)windowNibName

- (NSArray*)radioButtons
{
return @[ self.lastfmPlayedAlbumsRadio, self.lastFmTagRadio, self.spotifyPlayedAlbumsRadio,
self.spotifyNewRadio, self.spotifyFavoriteSongsRadio];
return @[ self.lastfmPlayedAlbumsRadio,
self.lastFmTagRadio,
self.spotifyPlayedAlbumsRadio,
self.spotifyNewRadio,
self.spotifyFavoriteSongsRadio];
}

@end

0 comments on commit be2e796

Please sign in to comment.