Commit Graph

40 Commits

Author SHA1 Message Date
queue 4fcef92b94
elasticsearch 7.x compatability (#576)
* es_mapping: update turning off dynamic mappings

they changed it in 6.x

https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html
https://github.com/elastic/elasticsearch/pull/25734

* es_mapping: remove _all field

deprecated in 6.0 anyway

* es_mapping.yml: fix deprecated mapping type

https://www.elastic.co/guide/en/elasticsearch/reference/6.7/removal-of-types.html#_schedule_for_removal_of_mapping_types

it gives a really unhelpful error otherwise, oof.

* es: fix remaining 7.xisms

the enabled: false apparently only applies to
"object" fields now, need index: false

and the _type got removed everywhere. Seems to work now.

* Fix weird offset error with word_delimiter_graph

yet another es7-ism i guess

* Fix warning and some app stuff for ES 7.x

Co-authored-by: Arylide <Arylide@users.noreply.github.com>
2020-07-12 00:10:47 -07:00
Nicolas F 8f1925ce05 search_results: various fixes to the DOM
Avoid repeated style attributes, instead use nth-child CSS selectors
and classes where appropriate.

Also, get rid of the useless <div> around column headings. They don't
seem to do anything useful and are just more stuff for the browser's
layout engine to juggle around.

We can also use Jinja2 to remove some of the unnecessary whitespace
around table headings, which makes things like copy-pasting in Firefox
act less weird. This includes some other whitespace fixes too.
2019-04-30 23:11:40 +02:00
Alex Ingram 1374375a16 Fix category icon display issue. (#547) 2019-02-24 15:07:49 +01:00
Nicolas F a6d800b4ca templates: move icon_dir set outside of the loop
Someone put this inside the loop despite it essentially being
constant. Probably makes immeasurably little difference perf-wise,
but why not fix it anyway.
2019-01-12 20:15:15 +01:00
TheAMM bf090c0fab torrents: clean up & optimize magnets further
Removes the specialized template ES magnet creator, since create_magnet()
can use both Torrents and ES objects. Search results will get the
properly escaped magnets, now.
Slightly optimizes the tracker adding and string joins.
RIP base32, wonder how many bad clients will break with sha1.
2018-07-21 22:06:58 +03:00
nyaadev 57a71be7b8 minor changes 2017-08-31 14:20:34 +02:00
Kfir Hadas ef56e54521 Move torrent magnet and torrent download into 'torrents' blueprint 2017-07-27 14:14:00 +03:00
Kfir Hadas 9acdd14e81 Move /view/<int:torrent_id> route into 'torrents' blueprint
and update templates.
2017-07-27 14:14:00 +03:00
Kfir Hadas eccb0ebdff Move '/' and '/rss' routes into 'main' blueprint
and update templates.
2017-07-27 14:14:00 +03:00
Kfir Hadas 0887dde6fc Move /user/<user_name> route into a blueprint
Move supporting functions and variables into other files
* nyaa.utils:
  - cached_function
  - chain_get
* nyaa.search:
  - DEFAULT_MAX_SEARCH_RESULT
  - DEFAULT_PER_PAGE
  - SERACH_PAGINATE_DISPLAY_MSG
  - _generate_query_string
2017-07-27 14:14:00 +03:00
nyaazi 5525337931 Replace the header titles 2017-05-30 10:29:59 +03:00
TheAMM 32fa021f34 Turn comments icon on search result into link to comments
Also cleans up torrent.id/torrent.meta.id
2017-05-28 02:46:04 +03:00
Anna-Maria Meriniemi f02836f75e Merge pull request #194 from shm0o/url-stuff
More `url_for`
2017-05-28 02:42:42 +03:00
Kfir Hadas aad5a0c6ea Update style
Add support for sorting comments (in advance),
add th for sorting by comments_count, add title to the counter box and fix it being under the torrent's name,
2017-05-26 18:25:56 +03:00
Kfir Hadas 90695cad11 Add number of comments to torrent lists
Will only show when number of comments is above zero.
2017-05-26 16:50:31 +03:00
shm0o c178f905b0 templates/search_results.html: use url_for for the appropriate endpoints 2017-05-25 19:33:47 -04:00
aldacron 142dd5359c Resolves #129 and refactored create magnet es naming 2017-05-24 23:19:08 -07:00
TheAMM 3a4280ccc5 Redirect searches with an info hash to torrent if found
Redirect will not happen on RSS or user page views (/searches).
Adds a helper to models.Torrent to search with a hex hash
Reformats "special search logic"
2017-05-24 17:34:36 +03:00
TheAMM aeef80edaa Clean up user search suggestion 2017-05-24 13:34:33 +03:00
ReimuHakurei f215f0803c Add per-user filter on search page based on query. 2017-05-24 08:33:32 +00:00
ReimuHakurei 8d393f5917 Make our HTML actually valid. Fix indentation. 2017-05-24 06:06:39 +00:00
TheAMM e554f9ae97 Fix category name on icon titletext, fixes #131
Also reformats the cat_id if-logic
2017-05-19 15:24:09 +03:00
Ricardo Ribeiro d8ef29755e Remove trailing spacebar on search_results 2017-05-16 15:08:47 +01:00
Ricardo Ribeiro 1f0f8cbeae Add full torrent name to link "title"
Now on ElasticSearch results as well
2017-05-16 14:49:15 +01:00
aldacron 00c768c722 merged elasticsearch, let's hope this doesn't break shit 2017-05-16 01:28:55 -07:00
aldacron 1d0177480e updated time display 2017-05-16 01:04:08 -07:00
aldacron 2005174358 finished up rss, changed rss behavior to include pre-defined trackers only, also cleaned up debug statements 2017-05-16 00:46:25 -07:00
aldacron 899aa01473 hooked up ES... 90% done, need to figure out how to generate magnet URIs 2017-05-15 23:51:58 -07:00
sharkykh 5c75424243 Fix 'Link' column header width
Set optimal width of 70px
2017-05-15 11:54:28 +03:00
queue 85ba16545f es: fix highlighting without query term
I like highlighting.
2017-05-14 22:26:44 -06:00
Johnny Ding 8bca32a626 Merge pull request #50 from qqueue/elasticsearchin
elasticsearch-based search (WIP)
2017-05-14 20:06:33 -07:00
TheAMM cf77b03a6f Convert UTC to local time in JS
Also adds classes to row headers to accurately access them in JS.
Updates the serverside date format in view.html to match YYYY-MM-DD HH:MM
2017-05-14 11:23:02 +03:00
queue 8c951210d4 es: implement highlighting
no apologies for styling. somebody else with opinions will fix it later.
2017-05-14 02:19:42 -06:00
queue 3cbe2e4221 WIP hack in es as the provider for search results
real sketch. lots of stuff is still broken. But! you can
make elasticsearch q= style queries and it shows up properly.
only first page works; need to adapt pager to elasticsearch's "total-hits" thing.
2017-05-14 02:01:26 -06:00
TheAMM 5af55245ec [templates] Add category links to /view, add hover-text to category icons in list 2017-05-13 08:17:22 +03:00
nyaadev b2b8ae9722 S T O P H A R D C O D I N G U R L S 2017-05-13 01:59:52 +02:00
TheAMM 39230e1f39 [templates] Add JS-calculated hovertext for date ages
On torrent listing and torrent view, mouse over the times to see "X hours Y minutes Z seconds ago" etc
2017-05-13 02:41:52 +03:00
TheAMM 517d3e8e32 [templates, config] Add SITE_FLAVOR for selecting nyaa/sukebei, update templates
By default TABLE_PREFIX is derived from flavor.
Added back Date column, adjusted column widths
2017-05-13 02:41:52 +03:00
TheAMM 4f9ddfd7bc [templates] Clean up row headers to use a common macro, add title for s/l/d icons 2017-05-12 22:24:45 +03:00
nyaadev 00d65e312c Initial commit. 2017-05-12 20:51:49 +02:00