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

option on torrent dialogue to change sort order #668

Closed
garfield69 opened this issue Mar 24, 2016 · 8 comments
Closed

option on torrent dialogue to change sort order #668

garfield69 opened this issue Mar 24, 2016 · 8 comments

Comments

@garfield69
Copy link
Collaborator

as discussed in this Reddit thread:

the idea is that some user might like to be able to change the sort order of torrents on the torrent dialogue.

the default for most searchProviders is peers-count but others may not have a sort capability.

so based on the searchProvider knowing if sort is supported, enable a sort menu to re-arrange the torrent results.

@SchizoDuckie
Copy link
Owner

This will be quite a lot of work since you need to have a sort order asc and desc for each search engine * for each torrent client.

While it would definitely be a nice enhancement, i think it will be fragile.

@roshavagarga
Copy link

@SchizoDuckie - I think an asc/desc option would be too much and fragile as you pointed out. As I mentioned in the reddit thread, the cleanest way to do it is to just tell the current search script to check from a different default link:

kat: adding "age:xxxx" limits the search. The xxxx can be filled only with hour, 24h, week, month and year as parameters. This is directly added to either the search string or as a part of the link you provided after %s.
nyaa: removing the sort=2 in the default search link gives an output based on last upload, while the current sort=2 gives an output based on most seeders.
tpb: current link sorts based on seeders, if 0/7/0 in that link is changed to 0/3/0 it will be sorted by upload time.

So, with an on/off switch in settings, if these 3 links are exchanged with the added input, the torrent search script will get the html from those torrent providers in order of last upload.

Default links as given by garfield:
kat: 'https://kat.cr/usearch/%s/?field=seeders&sorder=desc'
tpb: 'https://thepiratebay.se/search/%s/0/7/0'
nyaa 'https://www.nyaa.se/?page=search&sort=2&term=%s'

@garfield69 garfield69 self-assigned this Mar 30, 2016
@garfield69 garfield69 added this to the Roadmap v1.2.0 milestone Mar 30, 2016
@garfield69
Copy link
Collaborator Author

OK, I will implement a sort option on the torrent dialogue panel, but with the following restrictions:

reference:
WebSP = WEB Search Poviders (IsoHunt, KAT, Nyaa, TPB, and torrentz).
ApiSP = API Search Providers (RarBG, ShowRSS).

  • the sort menu will only be supported for WebSP for now. The ApiSP require special coding I'm not going to get into for now.
  • Only the sort orders that are available on all the WebSP will be included in the sort menu (Age, Leechers, Seeders, and Size). This provides menu consistency across WebSP and reduces support overhead.
  • Only sort list in Descending order will be supported, since only a few WebSP have Ascending order capability anyway. This means Age will be in newest to oldest order, and Size, Leechers and Seeders will be many to few order.

Example of W.I.P.
image

@SchizoDuckie
Copy link
Owner

Excellent. One tip : Instead of the menu you could make the column headers
clickable!
Op 30 mrt. 2016 09:03 schreef "garfield69" notifications@github.com:

OK, I will implement a sort option on the torrent dialogue panel, but with
the following restrictions:

reference:
WebSP = WEB Search Poviders (IsoHunt, KAT, Nyaa, TPB, and torrentz).
ApiSP = API Search Providers (RarBG, ShowRSS).

the sort menu will only be supported for WebSP for now. The ApiSP
require special coding I'm not going to get into for now.

Only the sort orders that are available on all the WebSP will be
included in the sort menu (Age, Leechers, Seeders, and Size).
This provides menu consistency across WebSP and reduces support overhead.

Only sort list in Descending order will be supported, since only a
few WebSP have Ascending order capability anyway. This means Age
will be in newest to oldest order, and Size, Leechers and Seeders
will be many to few order.

Example of W.I.P.
[image: image]
https://cloud.githubusercontent.com/assets/6933240/14133831/017d6692-f6af-11e5-9a3c-ab63d0e750f4.png


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#668 (comment)

@garfield69
Copy link
Collaborator Author

Only problem with that, is that currently the Age sort order is not displayed on the results... we are not manipulating the results we scraped, but are re-issuing the url with the appropriate sort commands included.

I will take a look at all the WebSP to see if they all have the Age data available, and if they do, I can try to make room in the search results table for it, so that we can then use your click-column-headers idea.

I'll update later with the findings.

@garfield69
Copy link
Collaborator Author

ok, findings:
nyaa - age not on first screen
kat - 1 year, 15 days, etc (plus tooltip = dd mmm yyyy, HH.mm)
tpb - mm-dd yyyy
isoHunt - 1 year, 15 days, etc.
torrentz - 1year, 15 days, etc (plus tooltip = ddd, dd mmm yyyy hh:mm:ss)
ShowRSS- n/a
RarBG - yyyy-mm-dd hh:mm:ss +zzzz

options: @SchizoDuckie please tick one

  • leave age off the torrent dialog results, keep the sort menu, don't link existing size/seeders/leechers
  • leave age off the torrent dialog results, keep the sort menu, link existing size/seeders/leechers to sort
  • add age to search results, modifies as best it fits with either 1 year/1 day display, or date, or n/a, link all headers to sort, keep sort menu
  • add age to search results, modifies as best it fits with either 1 year/1 day display, or date, or n/a, link all headers to sort, Drop sort menu
  • something else, you need to specify.

@garfield69
Copy link
Collaborator Author

To help you decide, here are some screen shots of the torrent dialogue with un-sanitised Age data:

kat
image

tpb
image

nyaa
image

isoHunt
image

torrentz
image

RarBG
image

@SchizoDuckie
Copy link
Owner

I would drop the age. ( It will be a bitch to parse and format, especially with translations, timezone offsets etc) and link the sorting to the column headers :)

That keeps the whole thing generic, consistent and simple. Just add a sorting indicator to the specific column.

garfield69 added a commit that referenced this issue Mar 30, 2016
torrent dialogue sort-columns feature.

The standard torrent dialog columns: Size, Seeders and Leechers can now
be sorted in descending order.

Unfortunately, it is not practical to add a column for Age, because all
the search providers present this information in different ways.

However, since sort-by-age was the primary reason for raising this
feature, I have elected to provide a setting, in the
torrent-search-engines panel, to enable a Sort Menu on the torrent
dialog.
The default is for the sort menu to be hidden.
The Sort menu includes an entry to sort the search results by Age, in
newest to oldest order.
garfield69 added a commit that referenced this issue Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants