Skip to content

Commit

Permalink
Remove spaces in username, fixes #39 (#40)
Browse files Browse the repository at this point in the history
* Remove spaces in username

* Update CHANGELOG.md
  • Loading branch information
hugo9464 authored Nov 26, 2021
1 parent 89772a3 commit c2326cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## CHANGELOG

### Unrelaesed
- Remove spaces from login

### 1.3.0 (2021/11/23)

- Scrobble with album name [issue #37](https://github.com/ShazamScrobbler/shazamscrobbler-macos/issues/37)
Expand Down
1 change: 1 addition & 0 deletions ShazamScrobbler/LastFmController.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ + (void)init {
+ (bool)login:(NSString*)username withPassword:(NSString*)password {
LoginViewController *loginController = ((AppDelegate *)[NSApplication sharedApplication].delegate).loginViewController;
[loginController connecting];
username = [username stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
[[LastFm sharedInstance] getSessionForUser:username password:password successHandler:^(NSDictionary *result) {
[LastFm sharedInstance].session = result[@"key"];
[LastFm sharedInstance].username = result[@"name"];
Expand Down

0 comments on commit c2326cc

Please sign in to comment.