Jump to content
caleb531

Play Song - Quickly play songs, albums, and more from iTunes

Recommended Posts

any chance this can work over shared libraries? THANKS!

 

I'm not sure that's possible with AppleScript, and I wouldn't know how to go about adding such a feature.

 

Sorry,

Caleb

Share this post


Link to post

Hello Sir,

 

Perhaps a little late to chime in here, but thanks for a superb workflow!  I was about to embark on a long process to create something of this ilk when I just stumbled on your handiwork. 

 

 

Cheers,

 

George

Share this post


Link to post

Any chance this could be made to quickly play a specific playlist?

 

That might be possible to implement, though I have no plans for doing so. I'd prefer to keep the app simple by displaying only songs in the suggestions list. I hope you can understand.

 

-Caleb

Share this post


Link to post

Hi Caleb, 

 

It seems you have done great work, although it is not working for me in Yosemite. When I type play - space -song name, it transfer me to google. Any chance that the workflow got broken with Yosemite?

 

Thank you for your help,

 

I just downloaded the latest workflow from GitHub and tested it, but everything is working as it should. Note that if you hold down the control key when choosing a song from the list, it will search the song on Google. Perhaps the control key is somehow being held down when you choose a result.

 

I'm running Yosemite myself and have no issues using my workflow.

 

-Caleb

Edited by caleb531

Share this post


Link to post

Not working for me on yosemite:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)

Share this post


Link to post

 

Not working for me on yosemite:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: 3726:3743: execution error: The variable artworkFolderName is not defined. (-2753)

 

Did you download the workflow directly from GitHub?

Share this post


Link to post

yes I downloaded the zip and double clicked the workflow file. Did I do something wrong?

 

No, you did exactly what you should have done. Fortunately, I have discovered the root cause of the issue, and have pushed a fix to GitHub.

 

Please download the new workflow and let me know if it works for you. :)

Caleb

Share this post


Link to post

No, you did exactly what you should have done. Fortunately, I have discovered the root cause of the issue, and have pushed a fix to GitHub.

 

Please download the new workflow and let me know if it works for you. :)

Caleb

Totally fixed. Awesome!

Share this post


Link to post

Totally fixed. Awesome!

 

Ah, fantastic! I hope you find the workflow easy and convenient. Ironic, though: you reported the bug just as I was working on v2.0 of the workflow, which is going to be so much more awesome. ;)

 

Enjoy!

Caleb

Share this post


Link to post

Thanks, dude.  I had that same bug.  Thanks for the fix!

 

P.S.

 

When the song is not found, the search in google options is disabled.  But when no results are found, that's when i want to search on google!  :)

In fact, I shouldn't even have to hold down control in order for that to happen...

Edited by Matthew Lancellotti

Share this post


Link to post

Hello, everyone!

 

I am pleased to announce the arrival of Play Song v2, a major new release of the workflow. Per popular request, the new release includes the ability to play not only individual songs, but albums, artists, and genres as well. See the README on the project page for details on usage.

 

Enjoy!

Caleb

Share this post


Link to post

New features sound great, but not working again:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)

Share this post


Link to post

 

New features sound great, but not working again:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)

 

I have the same problem.

Edited by Tyilo

Share this post


Link to post

 

New features sound great, but not working again:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)

 

I have the same problem.

 

Well, after a quick examination of the code, I can see how that might happen. However, in order to confirm this suspicion, I need your help:

 

Please tell me if the following path exists on your system. If it does not exist, then please tell me how far deep the path goes for you:

/Users/[YOUR USERNAME]/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/

Thanks,

Caleb

Edited by caleb531

Share this post


Link to post

Well, after a quick examination of the code, I can see how that might happen. However, in order to confirm this suspicion, I need your help:

 

Please tell me if the following path exists on your system. If it does not exist, then please tell me how far deep the path goes for you:

/Users/[YOUR USERNAME]/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/

Thanks,

Caleb

 

It exists and contains a directory called "caleb531.playsong" which contains some album artworks.

Share this post


Link to post

It exists and contains a directory called "caleb531.playsong" which contains some album artworks.

 

Ah, I didn't realize you posted a corresponding GitHub issue. Will do. :)

Caleb

Share this post


Link to post

 

New features sound great, but not working again:

Starting debug for 'Play Song'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[ERROR: alfred.workflow.input.scriptfilter] Code 1: execution error: Finder got an error: AppleEvent handler failed. (-10000)

 

Could you try running this script in Terminal:

bundleid="com.calebevans.playsong"

container=""
for f in ~/Library/Application\ Support/Alfred\ 2/Alfred.alfredpreferences/workflows/user.workflow.*/; do
    if plutil -extract bundleid xml1 "$f/info.plist" -o - | grep "$bundleid" &> /dev/null; then
        container="$f"
        break
    fi
done

if [[ "$container" = "" ]]; then
    echo 'Failed to find workflow container directory!'
    exit 1
fi

for f in "$container"/*.scpt; do
    plaintext=$(osadecompile "$f")
    # | sponge |
    echo "$plaintext" | osacompile -o "$f"
done

echo 'Recompiled scripts!'

It should recompile the script file that is causing that error.

Please report back it works.

Share this post


Link to post

Could you try running this script in Terminal:

bundleid="com.calebevans.playsong"

container=""
for f in ~/Library/Application\ Support/Alfred\ 2/Alfred.alfredpreferences/workflows/user.workflow.*/; do
    if plutil -extract bundleid xml1 "$f/info.plist" -o - | grep "$bundleid" &> /dev/null; then
        container="$f"
        break
    fi
done

if [[ "$container" = "" ]]; then
    echo 'Failed to find workflow container directory!'
    exit 1
fi

for f in "$container"/*.scpt; do
    plaintext=$(osadecompile "$f")
    # | sponge |
    echo "$plaintext" | osacompile -o "$f"
done

echo 'Recompiled scripts!'

It should recompile the script file that is causing that error.

Please report back it works.

worked!

Share this post


Link to post

worked!

 

You should also be happy to know that I've integrated Tyilo's fix into the workflow itself, and so the issue of missing results should no longer be present. The new workflow is available for download via the link in this thread's original post.

 

Enjoy using the workflow!

Caleb

Edited by caleb531

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...