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

[Feature request] Jackett plugin: replace "Search engine" field's content with the tracker's name #78

Closed
Nocifer opened this issue Feb 19, 2019 · 2 comments

Comments

@Nocifer
Copy link

Nocifer commented Feb 19, 2019

It would be nice if one could run Jackett transparently from within qBittorent, like so:

2019-02-19 16-16-33 qbittorrent v4 1 5

These are all results from Jackett, not from the specific search engine plugins. It's a simple matter of replacing the current boolean toggle tracker_first with something like the following:

CONFIG_DATA = {
    ...
    'tracker_name': 0,    # (0/1/2)  append tracker in the "Name" field/prepend tracker in the "Name" field/replace the "Search Engine" field
    ...
}

if CONFIG_DATA['tracker_name'] is 0:
        res['name'] = '%s [%s]' % (result['Title'], result['Tracker'])
    elif CONFIG_DATA['tracker_name'] is 1:
        res['name'] = '[%s] %s' % (result['Tracker'], result['Title'])
    elif CONFIG_DATA['tracker_name'] is 2:
        res['name'] = '%s' % (result['Title'])
        res['engine_url'] = '%s' % (result['Tracker'])

So e.g. a value of 2 would result in the above picture. And it goes without saying that there could also be other options, e.g. "Jackett - result['Tracker']" if one wishes to also run other plugins along with Jackett, or even better something like "result['Tracker'] (via Jackett)" so the results can also be sorted by tracker name, etc.

@ngosang
Copy link
Member

ngosang commented Feb 19, 2019

It's a good idea but can't be made without changing a lot of code in qBittorrent core.
I made an attempt when I was doing #79 but it breaks the .torrent download from Jackett.

@ngosang ngosang closed this as completed Feb 19, 2019
@Nocifer
Copy link
Author

Nocifer commented Feb 20, 2019

Right, I completely neglected to consider that case. So, if I get this right, this "beautification" would have to be done inside qBittorrent core, i.e. in very broad terms pass the self.url unmodified so qB knows about it and can handle downloading, but also pass the tracker name separately, and then use that to populate the Search Engine column at the last moment. Same e.g. as if one wanted to have a "Publish Date" column (as per the request in #71 ), where I guess the date would need to be passed as is so it can be used for sorting, filtering or what have you, and any alterations to make it more presentable would have to be done just before painting it in the GUI.

Alright, that's enough food for thought :)

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