Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrayPlay won't let me quit iTunes #2

Open
Fofer opened this issue May 9, 2015 · 1 comment
Open

TrayPlay won't let me quit iTunes #2

Fofer opened this issue May 9, 2015 · 1 comment

Comments

@Fofer
Copy link

Fofer commented May 9, 2015

When TrayPlay launches on my Mac, it automatically launches iTunes. If I try to quit iTunes, it automatically relaunches.

The only way I can quit iTunes, is to first quit TrayPlay.

Any help?

OS X 10.10.3
iTunes 12.1.2.27
TrayPlay version 1.0.3

@mborgerson
Copy link
Owner

Yep. This is a bug. Thanks for reporting it!

Technical notes: It also happens with Spotify selected. This bug is caused by the way TrayPlay polls the application (i.e. iTunes, Spotify) for current status. See the update method. TrayPlay could check to see if the application is open before querying status and possibly display a message if the app is not currently open with a button to open the app and start playing.

Here's a way to check to see if an application is running:

BOOL isAppRunning(NSString *appLocalizedName)
{
    NSArray *apps = [[NSWorkspace sharedWorkspace] runningApplications];
    for (NSRunningApplication *app in apps)
        if ([app.localizedName isEqualToString:appLocalizedName])
            return YES;
    return NO;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants