+static bool nowplaying_;
+
+static bool NowPlaying() {
+ if (kCFCoreFoundationVersionNumber < 800)
+ return false;
+ if (!nowplaying_)
+ return false;
+
+ SBLockScreenViewController *controller([[$SBLockScreenManager sharedInstance] lockScreenViewController]);
+ if (controller != nil) {
+ SBLockScreenNowPlayingPluginController *now(MSHookIvar<SBLockScreenNowPlayingPluginController *>(controller, "_nowPlayingController"));
+ if (now != nil && [now isNowPlayingPluginActive])
+ return true;
+ }
+
+ return false;
+}