removed unused include and added MRMediaRemoteGetNowPlayingApplicationPID
This commit is contained in:
parent
06514cc4a0
commit
c9f28744c2
|
@ -1,9 +1,18 @@
|
|||
#ifdef __APPLE__
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "../MediaRemote.hpp"
|
||||
#include "../backend.hpp"
|
||||
|
||||
std::shared_ptr<MediaInfo> backend::getMediaInformation() {
|
||||
MRMediaRemoteGetNowPlayingApplicationPID(dispatch_get_main_queue(), ^(pid_t pid) {
|
||||
if (pid > 0) {
|
||||
NSRunningApplication *app = [NSRunningApplication runningApplicationWithProcessIdentifier:pid];
|
||||
if (app) {
|
||||
NSLog(@"%@", app.bundleIdentifier);
|
||||
}
|
||||
}
|
||||
});
|
||||
MRMediaRemoteGetNowPlayingInfo(dispatch_get_main_queue(), ^(CFDictionaryRef result) {
|
||||
if (result) {
|
||||
NSDictionary *playingInfo = (__bridge NSDictionary *)(result);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include <wx/wx.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
#include "backend.hpp"
|
||||
|
|
Loading…
Reference in New Issue