diff --git a/README.md b/README.md index 8d9aeea..5d60df7 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ It works together with the [Shazam Mac App](https://itunes.apple.com/us/app/shaz ### Requirements - - OS X Yosemite/El Capitan - - Shazam 1.1.2 (get it from the [App Store](https://itunes.apple.com/en/app/shazam/id897118787?mt=12)) + - macOS Yosemite/El Capitan/Sierra + - Shazam 1.2.0 (get it from the [App Store](https://itunes.apple.com/gb/app/shazam/id897118787?mt=12)) ### Installation @@ -23,30 +23,44 @@ It works together with the [Shazam Mac App](https://itunes.apple.com/us/app/shaz ## CHANGELOG -#### v1.2 (2016/01/30) +#### 1.2.1 (2016/11/28) - - Enhanced the scrobbler to detect whether the user is currently playing a song. Shazam tags won't be scrobbled anymore if you are "now playing" from another player ([issue #22](https://github.com/stephanebruckert/ShazamScrobbler/issues/22)), - - Support for Shazam 1.1.2, - - Removed "now playing" feature to be able to resolve [issue #22](https://github.com/stephanebruckert/ShazamScrobbler/issues/22). +##### Changed +- Support for Shazam 1.2.0 +- Confirmed compatibility with MacOS Sierra -#### v1.1.1 (2015/10/21) +#### 1.2 (2016/01/30) - - Fixed a minor issue causing the queued songs to not scrobble if the app has been restarted. - - Fixed a minor issue causing the time interval between two songs to be negative. +##### Added + - Enhanced the scrobbler to detect whether the user is currently playing a song. Shazam tags won't be scrobbled anymore if you are "now playing" from another player ([issue #22](https://github.com/stephanebruckert/ShazamScrobbler/issues/22)) + - Support for Shazam 1.1.2 -#### v1.1 (2015/10/09) +##### Removed + - Removed "now playing" feature to be able to resolve [issue #22](https://github.com/stephanebruckert/ShazamScrobbler/issues/22) - - New app logo. - - Added a feature to send "now playing" request and only scrobble songs if played more than 30 seconds ([issue #16](https://github.com/stephanebruckert/ShazamScrobbler/issues/16)). - - Confirmed compatibility with El Capitan. +#### 1.1.1 (2015/10/21) -#### v1.0.1 (2015/09/30) +##### Fixed + - Fixed a minor issue causing the queued songs to not scrobble if the app has been restarted + - Fixed a minor issue causing the time interval between two songs to be negative - - Fixed a major issue making it impossible for some users to connect ([issue #13](https://github.com/stephanebruckert/ShazamScrobbler/issues/13)). +#### 1.1 (2015/10/09) -#### v1 (2015/09/28) +##### Added + - New app logo + - Added a feature to send "now playing" request and only scrobble songs if played more than 30 seconds ([issue #16](https://github.com/stephanebruckert/ShazamScrobbler/issues/16)) + - Confirmed compatibility with OS X El Capitan - - Support for Shazam 1.1.1. +#### 1.0.1 (2015/09/30) + +##### Fixed + + - Fixed a major issue making it impossible for some users to connect ([issue #13](https://github.com/stephanebruckert/ShazamScrobbler/issues/13)) + +#### 1 (2015/09/28) + +##### Changed + - Support for Shazam 1.1.1 ## Thanks @@ -57,7 +71,7 @@ It works together with the [Shazam Mac App](https://itunes.apple.com/us/app/shaz - [LaunchAtLoginController](https://github.com/Mozketo/LaunchAtLoginController) by [Ben Clark-Robinson](https://github.com/Mozketo) Feel free to contribute! - + ## Licence MIT diff --git a/ShazamScrobbler.xcodeproj/project.pbxproj b/ShazamScrobbler.xcodeproj/project.pbxproj index bc4c141..63b4474 100644 --- a/ShazamScrobbler.xcodeproj/project.pbxproj +++ b/ShazamScrobbler.xcodeproj/project.pbxproj @@ -8,30 +8,30 @@ /* Begin PBXBuildFile section */ 88057F99C098F9FCF7662C09 /* libPods-ShazamScrobbler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F1D54F44336C30EFCD2B7952 /* libPods-ShazamScrobbler.a */; }; - F44FC8F61BC72CDE005B688A /* NowPlayingOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F44FC8F51BC72CDE005B688A /* NowPlayingOperation.m */; settings = {ASSET_TAGS = (); }; }; - F46159EB1BB343DA00AF80BC /* ShazamScrobblerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F46159EA1BB343DA00AF80BC /* ShazamScrobblerTests.m */; settings = {ASSET_TAGS = (); }; }; + F44FC8F61BC72CDE005B688A /* NowPlayingOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F44FC8F51BC72CDE005B688A /* NowPlayingOperation.m */; }; + F46159EB1BB343DA00AF80BC /* ShazamScrobblerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F46159EA1BB343DA00AF80BC /* ShazamScrobblerTests.m */; }; F46C01081BB34811007E4265 /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F47C95F21BB33F67004B1254 /* LoginViewController.xib */; }; - F47C95EF1BB33F5E004B1254 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95EE1BB33F5E004B1254 /* AppDelegate.m */; settings = {ASSET_TAGS = (); }; }; - F47C95F31BB33F67004B1254 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F11BB33F67004B1254 /* LoginViewController.m */; settings = {ASSET_TAGS = (); }; }; - F47C95F71BB33F75004B1254 /* MenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F61BB33F75004B1254 /* MenuController.m */; settings = {ASSET_TAGS = (); }; }; - F47C95FA1BB33F85004B1254 /* ShazamController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F91BB33F85004B1254 /* ShazamController.m */; settings = {ASSET_TAGS = (); }; }; - F47C95FD1BB33F8A004B1254 /* ShazamConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95FC1BB33F8A004B1254 /* ShazamConstants.m */; settings = {ASSET_TAGS = (); }; }; - F47C96021BB33F95004B1254 /* LastFmConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95FF1BB33F95004B1254 /* LastFmConstants.m */; settings = {ASSET_TAGS = (); }; }; - F47C96031BB33F95004B1254 /* LastFmController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C96011BB33F95004B1254 /* LastFmController.m */; settings = {ASSET_TAGS = (); }; }; - F47C96061BB33FA4004B1254 /* Song.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C96051BB33FA4004B1254 /* Song.m */; settings = {ASSET_TAGS = (); }; }; - F47C96081BB33FAD004B1254 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F47C96071BB33FAD004B1254 /* Images.xcassets */; settings = {ASSET_TAGS = (); }; }; - F47C960D1BB33FC1004B1254 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C960C1BB33FC1004B1254 /* main.m */; settings = {ASSET_TAGS = (); }; }; - F47C96101BB3415B004B1254 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F47C960E1BB3415B004B1254 /* MainMenu.xib */; settings = {ASSET_TAGS = (); }; }; - F47C96151BB34171004B1254 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F47C96111BB34171004B1254 /* Credits.rtf */; settings = {ASSET_TAGS = (); }; }; - F47C96161BB34171004B1254 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F47C96131BB34171004B1254 /* InfoPlist.strings */; settings = {ASSET_TAGS = (); }; }; + F47C95EF1BB33F5E004B1254 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95EE1BB33F5E004B1254 /* AppDelegate.m */; }; + F47C95F31BB33F67004B1254 /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F11BB33F67004B1254 /* LoginViewController.m */; }; + F47C95F71BB33F75004B1254 /* MenuController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F61BB33F75004B1254 /* MenuController.m */; }; + F47C95FA1BB33F85004B1254 /* ShazamController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95F91BB33F85004B1254 /* ShazamController.m */; }; + F47C95FD1BB33F8A004B1254 /* ShazamConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95FC1BB33F8A004B1254 /* ShazamConstants.m */; }; + F47C96021BB33F95004B1254 /* LastFmConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C95FF1BB33F95004B1254 /* LastFmConstants.m */; }; + F47C96031BB33F95004B1254 /* LastFmController.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C96011BB33F95004B1254 /* LastFmController.m */; }; + F47C96061BB33FA4004B1254 /* Song.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C96051BB33FA4004B1254 /* Song.m */; }; + F47C96081BB33FAD004B1254 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F47C96071BB33FAD004B1254 /* Images.xcassets */; }; + F47C960D1BB33FC1004B1254 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F47C960C1BB33FC1004B1254 /* main.m */; }; + F47C96101BB3415B004B1254 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F47C960E1BB3415B004B1254 /* MainMenu.xib */; }; + F47C96151BB34171004B1254 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = F47C96111BB34171004B1254 /* Credits.rtf */; }; + F47C96161BB34171004B1254 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F47C96131BB34171004B1254 /* InfoPlist.strings */; }; F48D994F19C8B0A80062A5FA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F48D994E19C8B0A80062A5FA /* Cocoa.framework */; }; F48D996E19C8B0A90062A5FA /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F48D996D19C8B0A90062A5FA /* XCTest.framework */; }; F48D996F19C8B0A90062A5FA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F48D994E19C8B0A80062A5FA /* Cocoa.framework */; }; F48D997719C8B0A90062A5FA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F48D997519C8B0A90062A5FA /* InfoPlist.strings */; }; - F4E447771BB5C89300ABD578 /* MenuConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447761BB5C89300ABD578 /* MenuConstants.m */; settings = {ASSET_TAGS = (); }; }; - F4E4477B1BB5EDBC00ABD578 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447791BB5EDBC00ABD578 /* AboutWindowController.m */; settings = {ASSET_TAGS = (); }; }; - F4E4477C1BB5EDBC00ABD578 /* AboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4E4477A1BB5EDBC00ABD578 /* AboutWindowController.xib */; settings = {ASSET_TAGS = (); }; }; - F4E447811BB600D700ABD578 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447801BB600D700ABD578 /* LaunchAtLoginController.m */; settings = {ASSET_TAGS = (); }; }; + F4E447771BB5C89300ABD578 /* MenuConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447761BB5C89300ABD578 /* MenuConstants.m */; }; + F4E4477B1BB5EDBC00ABD578 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447791BB5EDBC00ABD578 /* AboutWindowController.m */; }; + F4E4477C1BB5EDBC00ABD578 /* AboutWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4E4477A1BB5EDBC00ABD578 /* AboutWindowController.xib */; }; + F4E447811BB600D700ABD578 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E447801BB600D700ABD578 /* LaunchAtLoginController.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ diff --git a/ShazamScrobbler/AboutWindowController.xib b/ShazamScrobbler/AboutWindowController.xib index e12ebca..67a4864 100644 --- a/ShazamScrobbler/AboutWindowController.xib +++ b/ShazamScrobbler/AboutWindowController.xib @@ -1,8 +1,9 @@ - - + + - + + @@ -22,10 +23,12 @@ + + @@ -34,7 +37,8 @@ - + + @@ -42,6 +46,7 @@ + @@ -50,6 +55,7 @@ + @@ -68,6 +75,7 @@ + diff --git a/ShazamScrobbler/AppDelegate.m b/ShazamScrobbler/AppDelegate.m index f8ae445..3d23e08 100644 --- a/ShazamScrobbler/AppDelegate.m +++ b/ShazamScrobbler/AppDelegate.m @@ -21,7 +21,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification _menu = [[MenuController alloc] init]; [LastFmController init]; if ([ShazamController init]) { - [ShazamController watch:[ShazamConstants getJournalPath]]; + [ShazamController watch:[ShazamConstants getSqliteWalPath]]; [ShazamController findNewTags]; } else { [self alert]; @@ -38,7 +38,7 @@ - (void) loadView { - (void) alert { NSAlert* msgBox = [[NSAlert alloc] init]; [msgBox setAlertStyle:NSCriticalAlertStyle]; - [msgBox setMessageText: @"The scrobbler could not find the Shazam library.\n\nMake sure of two things:\n\t- you are using Shazam 1.1.1,\n\t- Shazam found at least one song.\n\nRestart the scrobbler when that's done."]; + [msgBox setMessageText: @"The scrobbler could not find the Shazam library.\n\nMake sure of two things:\n\t- you are using Shazam 1.2.0,\n\t- Shazam found at least one song.\n\nRestart the scrobbler when that's done."]; [msgBox addButtonWithTitle: @"OK"]; [msgBox runModal]; } diff --git a/ShazamScrobbler/LastFmConstants.m b/ShazamScrobbler/LastFmConstants.m index 3889016..29fafee 100644 --- a/ShazamScrobbler/LastFmConstants.m +++ b/ShazamScrobbler/LastFmConstants.m @@ -16,4 +16,4 @@ @implementation LastFmConstants : NSObject NSString* const SECRET = @"973e0ce961320c989f83a97bd2bdb132"; NSInteger const PLAYTIME = 45; -@end \ No newline at end of file +@end diff --git a/ShazamScrobbler/LoginViewController.m b/ShazamScrobbler/LoginViewController.m index 2e46e6e..89a64c6 100644 --- a/ShazamScrobbler/LoginViewController.m +++ b/ShazamScrobbler/LoginViewController.m @@ -76,7 +76,7 @@ - (void)loginSuccess { [_usernameField setEnabled:false]; [_passwordField setEnabled:false]; - [_passwordField setStringValue:@"amzingpwd"]; + [_passwordField setStringValue:@""]; _connectButton.enabled = true; [self.connectButton setTarget:self]; [self.connectButton setTitle:@"Disconnect"]; diff --git a/ShazamScrobbler/ShazamConstants.h b/ShazamScrobbler/ShazamConstants.h index a13e843..ecb62e5 100644 --- a/ShazamScrobbler/ShazamConstants.h +++ b/ShazamScrobbler/ShazamConstants.h @@ -14,11 +14,9 @@ extern NSString* const PATH; extern NSString* const FILENAME; extern NSString* const EXTENSION; -extern NSString* const JOURNAL; + (NSString*)getSqlitePath; + (NSString*)getSqliteWalPath; -+ (NSString*)getJournalPath; @end diff --git a/ShazamScrobbler/ShazamConstants.m b/ShazamScrobbler/ShazamConstants.m index dd2d153..d53bc98 100644 --- a/ShazamScrobbler/ShazamConstants.m +++ b/ShazamScrobbler/ShazamConstants.m @@ -11,11 +11,10 @@ @implementation ShazamConstants : NSObject -NSString* const PATH = @"~/Library/Group Containers/4GWDBCF5A4.group.com.shazam/com.shazam.mac.Shazam/"; +NSString* const PATH = @"~/Library/Containers/com.shazam.mac.Shazam/Data/Documents"; NSString* const FILENAME = @"ShazamDataModel"; NSString* const EXTENSION = @"sqlite"; NSString* const EXTENSIONWAL = @"sqlite-wal"; -NSString* const JOURNAL = @"Journal"; + (NSString*)getSqlitePath { return [[[[PATH stringByExpandingTildeInPath] stringByAppendingString:@"/"] stringByAppendingString:FILENAME] stringByAppendingPathExtension:EXTENSION]; @@ -25,9 +24,5 @@ + (NSString*)getSqliteWalPath { return [[[[PATH stringByExpandingTildeInPath] stringByAppendingString:@"/"] stringByAppendingString:FILENAME] stringByAppendingPathExtension:EXTENSIONWAL]; } -+ (NSString*)getJournalPath { - return [[[PATH stringByExpandingTildeInPath] stringByAppendingString:@"/"] stringByAppendingString:JOURNAL]; -} - -@end \ No newline at end of file +@end diff --git a/ShazamScrobbler/ShazamController.m b/ShazamScrobbler/ShazamController.m index dfae224..315db8c 100644 --- a/ShazamScrobbler/ShazamController.m +++ b/ShazamScrobbler/ShazamController.m @@ -172,4 +172,4 @@ + (Song*)createSongFromTag:(NSInteger)tag { return nil; } -@end \ No newline at end of file +@end diff --git a/ShazamScrobbler/ShazamScrobbler-Info.plist b/ShazamScrobbler/ShazamScrobbler-Info.plist index ddf82c9..8a96a38 100644 --- a/ShazamScrobbler/ShazamScrobbler-Info.plist +++ b/ShazamScrobbler/ShazamScrobbler-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.2 + 1.2.1 CFBundleSignature ???? CFBundleVersion - 1.2 + 1.2.1 LSApplicationCategoryType public.app-category.music LSBackgroundOnly @@ -39,7 +39,7 @@ Product Homepage https://github.com/stephanebruckert/ShazamScrobbler Shazam Compatibility - 1.1.2 + 1.2.0 NSAppTransportSecurity NSAllowsArbitraryLoads