Jump to content

Recommended Posts

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
Link to comment

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

 

Link to comment
  • 1 month later...

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.

Link to comment
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?

Link to comment

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

Link to comment
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 👌

Link to comment

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
Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment

@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
Link to comment
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.

Link to comment
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.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...