Jump to content

Recommended Posts

Posted (edited)

Hello!

 

I've updated Alfred KAT, and it's now wayyyyyyy faster (like 5 times). You can download torrents easily while avoiding all the popups.

 

It's on Packal and GitHub.

 

Packal: http://www.packal.org/workflow/alfred-kat

GitHub: https://github.com/godbout/alfred-kat/releases

 

Have fun!

Edited by godbout

Share this post


Link to post

Hi godbout,

 

Just installed the latest version of the workflow from Github and returned the following error:

Starting debug for 'KAT'

[2019-04-01 13:58:19][input.scriptfilter] Queuing argument 'f'
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'fi'
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'fig'
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'figh'
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'fight'
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'fight '
[2019-04-01 13:58:20][input.scriptfilter] Queuing argument 'fight c'
[2019-04-01 13:58:21][input.scriptfilter] Queuing argument 'fight cl'
[2019-04-01 13:58:21][input.scriptfilter] Queuing argument 'fight clu'
[2019-04-01 13:58:21][input.scriptfilter] Queuing argument 'fight cluv'
[2019-04-01 13:58:22][input.scriptfilter] Queuing argument 'fight clu'
[2019-04-01 13:58:22][input.scriptfilter] Queuing argument 'fight club'
[2019-04-01 13:58:23][input.scriptfilter] Script with argument 'fight club' finished
[2019-04-01 13:58:23][ERROR: input.scriptfilter] Code 255: Parse error: parse error in /Users/folders/Alfred.alfredpreferences/workflows/user.workflow.E00BBE73-F9AC-40E2-8F06-D6687E55C608/src/Workflow.php on line 22
[2019-04-01 13:58:23][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Parse error: parse error in /Users/folders/Alfred.alfredpreferences/workflows/user.workflow.E00BBE73-F9AC-40E2-8F06-D6687E55C608/src/Workflow.php on line 22

 

Share this post


Link to post

Hey sorry! Didn't get any email or anything about you replying. Is it working now?

 

I'm coming here to post an update, something due to how KAT changed their site. But it shouldn't affect the issue you have. You're still having it?

 

New version is available on GitHub and Packal.

Share this post


Link to post
17 hours ago, godbout said:

Hey sorry! Didn't get any email or anything about you replying. Is it working now?

 

I'm coming here to post an update, something due to how KAT changed their site. But it shouldn't affect the issue you have. You're still having it?

 

New version is available on GitHub and Packal.

Hello godbout,

 

When I choose a torrent to download it opens up the torrent file in soda player, but I want it to open in transmission. Is there any way to change it?

Share this post


Link to post

Hello!

 

The Workflow doesn't enforce any app. It's opening through the app on your Mac that has been put as default for magnet links. You can change this in several ways, but the easier is probably to go through the Transmissions preferences window. Have a look at the screenshot attached! Then all your magnets links will open through Transmission.

General_and_Transmission.png

Share this post


Link to post
34 minutes ago, godbout said:

Hello!

 

The Workflow doesn't enforce any app. It's opening through the app on your Mac that has been put as default for magnet links. You can change this in several ways, but the easier is probably to go through the Transmissions preferences window. Have a look at the screenshot attached! Then all your magnets links will open through Transmission.

General_and_Transmission.png

 

Actually, I thought Transmission was the default app but looks like it wasn't. It works hassle-free now 👌

Share this post


Link to post
Posted (edited)

Would you consider to integrate your workflow with transmission-cli? It can be installed with `brew install transmission` and work headless. That would allow us to start downloading the file from Alfred without the need of any GUI BitTorrent client which is the perfect scenario.

 

A possible implementation would include a check for the existence of the CLI in the user machine, otherwise the current flow is used. An environment variable on the workflow configuration sheet would make the job as well (the user would set the value to 1 to use the flow with the integration).

Edited by xilopaint

Share this post


Link to post
55 minutes ago, xilopaint said:

Would you consider to integrate your workflow with transmission-cli?

 

You can create a wrapper app with Automator or Platypus containing a script that passes the magnet URL to transmission-cli.


That's what I do for .sublime-project files (for some reason, the GUI app doesn't open them properly, but the subl CLI command does).

 

You can also make it work everywhere, not just in Alfred, though I suppose you might not want that behaviour everywhere.

Share this post


Link to post
Posted (edited)
2 hours ago, deanishe said:

 

You can create a wrapper app with Automator or Platypus containing a script that passes the magnet URL to transmission-cli.


That's what I do for .sublime-project files (for some reason, the GUI app doesn't open them properly, but the subl CLI command does).

 

You can also make it work everywhere, not just in Alfred, though I suppose you might not want that behaviour everywhere.

 

But the Script Filter doesn't output the magnet link.

Edited by xilopaint

Share this post


Link to post
19 minutes ago, xilopaint said:

But the Script Filter doesn't output the magnet link.

 

No, but opening magnet:// links in the default app is exactly how the workflow works:

 

On 5/29/2019 at 11:41 AM, godbout said:

It's opening through the app on your Mac that has been put as default for magnet links.

 

I do something very similar myself (I have a custom app assigned as the default handler for magnet:// links), and it works perfectly with the workflow.

Share this post


Link to post
7 hours ago, deanishe said:

 

No, but opening magnet:// links in the default app is exactly how the workflow works

 

I just don't know how to pass the magnet link to the command-line interface if it's not output by the workflow.

Share this post


Link to post

Oh, right. I was talking about a separate app to handle magnet links system-wide, not editing the workflow.

 

Have you looked at the source code? There must be a /usr/bin/open command in there somewhere that you can swap for /usr/local/bin/transmission-cli.

Share this post


Link to post
26 minutes ago, deanishe said:

Oh, right. I was talking about a separate app to handle magnet links system-wide, not editing the workflow.

 

Have you looked at the source code? There must be a /usr/bin/open command in there somewhere that you can swap for /usr/local/bin/transmission-cli.

 

Thanks! I achieved to do it by changing this:

public static function download($magnetLink = '')
    {
        $crawler = (new Client())->request('GET', getenv('url') . $magnetLink);
        $magnetLink = $crawler->filter('#tab-technical a.siteButton.giantButton')->attr('href');
        return exec("open $magnetLink 2>&1", $result);
        
    }

 

to this:

public static function download($magnetLink = '')
    {
        $crawler = (new Client())->request('GET', getenv('url') . $magnetLink);
        $magnetLink = $crawler->filter('#tab-technical a.siteButton.giantButton')->attr('href');
        return exec("/usr/local/bin/transmission-remote -a \"$magnetLink\" 2>&1", $result);
    }

 

Still I think this integration would be a nice improvement to the workflow.

Share this post


Link to post
1 hour ago, xilopaint said:

Still I think this integration would be a nice improvement to the workflow.

 

Of course it would, and I understand where you’re coming from. But users ask for the same feature in every workflow that opens stuff. I’ve had people moan that my Safari workflow opens URLs in Safari…

 

IMO, a workflow author should implement opening in the default app via a discrete workflow element, not buried in code, so it’s easy for users to change, but the rest is on the user.

 

I mean, in most cases, the reason ultimately boils down to “I have a problem with my own defaults”. That generally doesn’t seem like it should be made the workflow author’s problem.

Share this post


Link to post

Wow that workflow is getting famous. Excellent. I'm gonna add a nice License Activation box for next week 👍️ 😂

Share this post


Link to post
Posted (edited)
21 hours ago, deanishe said:

IMO, a workflow author should implement opening in the default app via a discrete workflow element, not buried in code, so it’s easy for users to change, but the rest is on the user.

 

Any suggestion of how that would like in the above-mentioned workflow?

 

I mainly build things for myself and I don't like to think in advance for other use cases :D

I was thinking of adding the cli through a modifier, like cmd.

Edited by deanishe
Remove Grammarly crud

Share this post


Link to post
12 minutes ago, deanishe said:

IMO, a workflow author should implement opening in the default app via a discrete workflow element, not buried in code, so it’s easy for users to change, but the rest is on the user.

 

I mean, in most cases, the reason ultimately boils down to “I have a problem with my own defaults”. That generally doesn’t seem like it should be made the workflow author’s problem.

 

The problem here is the user has to make the changes for every release if the workflow author doesn't implement them.

Share this post


Link to post
Posted (edited)

@godbout a key modifier seems fine to me. You can use a dynamic subtext to show a warning like (e.g. "You don't have transmission command-line utilities installed") if the action is not applicable to that user.

 

EDIT: Weirdly I can't quote your last post. A forum bug?

Edited by xilopaint

Share this post


Link to post
Just now, xilopaint said:

The problem here is the user has to make the changes for every release if the workflow author doesn't implement them.

 

Disagree. It seems to me that the problem here is that you're not happy with the your own system configuration and instead of spending 15 minutes putting a single line of bash in an Automator/Platypus app to fix it, you want @godbout to spend an hour or two of his time adapting his workflow to suit you instead.

 

I mean, you didn't even consider how to support command-line clients in general (e.g. "provide an optional workflow variable to specify a shell command to open the magnet:// URL"). You just asked him to hard-code your favourite one.

Share this post


Link to post
6 minutes ago, xilopaint said:

Weirdly I can't quote your last post. A forum bug?

 

Looks that way. My post that you quoted looks weird, too.

Share this post


Link to post
2 minutes ago, deanishe said:

I mean, you didn't even consider how to support command-line clients in general (e.g. "provide an optional workflow variable to specify a shell command to open the magnet:// URL"). You just asked him to hard-code your favourite one.

 

I don't even know if other CLI clients exist.

Share this post


Link to post
1 minute ago, xilopaint said:

I don't even know if other CLI clients exist.

 

rtorrent and deluge spring to mind.

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...