Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

419 Révisions

Auteur SHA1 Message Date
PantsuDev 2204207dd9 fix rss 2017-07-03 11:41:45 +10:00
yiiT b59b5c092b Add /feed/magnet which displays the magnet instead of the torrent link (#1069)
* Add /feed/magnet which displays the magnet instead of the torrent link
2017-06-24 19:45:56 -05:00
akuma06 0c990447eb Fix for API request hidden torrents
Usernames were not hidden when doing api request
2017-06-24 10:53:22 +02:00
PantsuDev 1936c74085 Make commentlength and descriptionlength configurable 2017-06-22 10:21:59 +10:00
akuma06 424a62549c Fix RSS link
Fix for #1051
2017-06-21 15:38:08 +02:00
akuma06 eaf4e23266 Fix hidden on User Profile (#1039)
When a user had hidden torrents, they were still listed on his user page even if it's not the actual user who is viewing it.
That's why I added a new function for searching which filter out hidden torrents.
Now when a user go to his own page (or a moderator), he can see all his torrents.
However if another person visit the page, only non hidden torrents will be listed.
I added the hidden parameter in ES database, it permits also to use the search instead of SQL when listing torrents on the user page. Less load time, go with the idea that we should use ES everywhere when needed.
2017-06-21 11:58:54 +10:00
akuma06 2f81a44e99 Fixing Torznab bug
Now empty tags shouldn't appear
2017-06-20 14:27:36 +02:00
akuma06 9307087024 Refine form linked up & edited buildversion to commit hash (#1025)
Added the use of the new search form made by @kipukun
Buildversion are now commit hash. Please read the readme for new build
command (or just build using package.sh).
2017-06-20 10:06:01 +10:00
PantsuDev 0cfacdd48d Fix up rss handler spec violations 2017-06-19 09:55:09 +10:00
akuma06 b4add6054a Fix for cat=5070 2017-06-18 01:19:46 +02:00
akuma06 ad3a44e2f8 Torznab fix (#1019)
* Torznab fix

Added multiple category search
Fixed issues in #1017
Now category from searchParam & torrentParam are arrays of category
New Struct Categories

* Fix travis error due to database code
2017-06-18 08:30:12 +10:00
PantsuDev 41ca528ae2 Add additional url for torznab feeds 2017-06-17 23:58:45 +10:00
akuma06 5e65b20c89 Added two new functions for @kipukun
GetCategory categoryID  keepParent (eg: GetCategory "3" true <= for all
anime)
Modified
GetCategories to (keepParent, keepChild) (eg: GetCategories true true <=
for every catagories)
2017-06-17 04:24:30 +02:00
akuma06 8bddc86843 Fix torznab to /api also
Torznab can still be accessed to /feed/torznab and also to
/api?t=something
2017-06-16 01:30:09 +02:00
akuma06 fb2c69a612 Torznab caps compatible 2017-06-15 21:54:06 +02:00
akuma06 6681a6b985 fix on router 2017-06-15 15:45:00 +02:00
akuma06 c1270e549a EZTV and Torznab support
EZTV is fully supported afaik and can be accessed to /feed/eztv
Torznab is supported on display, miss t=caps route and can be accessed
to /feed/torznab
2017-06-15 15:43:18 +02:00
pantsudev 84aab574f1 Continue implementing torznab 2017-06-15 20:48:38 +10:00
pantsudev acebb31d3d RSS feed should be compatible with sonarr now 2017-06-15 18:24:50 +10:00
akuma06 93364dac77 activity log for users (#1002)
List Torrent delete log
Torrent edit log
Comment delete log
And every other logged activities
Can be filtered out by a filter tag ("edit" or "delete" supported)
Pages navigation

Can be accessed by /activities

Added some translation string
Fixed hidden username on api request
Fixed comments username on modpanel
New Activity model
New Activity handler
New Activity Service
Fixed some updating issue for ES when moderating torrents

Be aware deleting torrents and comments return the model now!
2017-06-15 12:44:46 +10:00
akuma06 0662b3fb41 Audio captcha (#995)
* Megacheck friendly

applied megacheck and fixed some unwanted behaviour (markdown)

* Forgot this file

* Captcha Audio

Should make #993 happen

* Fix style issue in  comments

* Added margin auto and width on input

* Moved width on captcha div instead

* fixing width issue with audio tag

* Captcha final style fix
2017-06-14 20:10:03 +10:00
akuma06 63fbbaa491 gosimple friendly 2017-06-14 09:20:42 +02:00
pantsudev aa08ec9f67 Tidy up and remove useless code 2017-06-14 16:36:38 +10:00
pantsudev 5186e65dfc Replace homehandler with search handler 2017-06-14 13:53:54 +10:00
akuma06 b0aa111511 API update completely functionnal for app usage (#987)
The api has been tested and works as intended.
Now users do not have to go on the website to get back their token, they
just have to register.
Torrents show the right stats and username on api request when search is
done
User model when converted to JSON gives us the apitoken and md5 hash of
email (for gravatar)
Verification on upload is done by token and username instead of token
only
Errors are now given in json format in the api
Global api response handler for less code redundancy and same response
pattern
Moved user auth check in cookie_helper to user.go
Fixed bug with CSRF prevention in /api
Added translation strings
2017-06-13 16:01:57 +10:00
sfan5 fe26d356ef Fix incorrect CDATAs in RSS feed (closes #405) 2017-06-12 19:18:07 +02:00
Ramon Dantas d8e17478f8 Country flags (language) for torrents. (#970)
* Add flags for torrents

Add a new field, .Language, to the Torrent model, and a new package,
torrentLanguages, which maps languages to flags. Added also a flag icon pack
from googlei18n/region-flags, with (mostly) public domain flags from Wikipedia.

* Optimize flags

* Use FlagSprites CSS instead of .png files

* Only use flags for languages we support

* Add test for CSS flags

Ensure that we have all the flags for the languages we support.

* Add AdditionalLanguages field to config

This allows us to support additional languages for new uploaded torrents,
even if we have no translation for it.

* Minor CSS fix

* Add "other" and "multiple" torrent languages

Also removed the TorrentLanguage struct, as it wasn't much useful.

* Fix test

* Add colspan=2 to category when language is empty

Also hide the language column if empty.

* Add lang field to search.

Hopefully it works with Elasticsearch as well, but I haven't tested
(lol Java)

* Add language field to ES index and settings

* Add language column to JS template

* Add keyword type to language ES field

* Remove 'raw' from keyword

* Set "simple" analyzer on language

* Document .Language field on Torrent model
2017-06-12 09:14:26 +10:00
akuma06 aa77b3bac1 Fix the fact that we didn't have uploader name on api search 2017-06-10 19:46:04 +02:00
sfan5 1675b12cad Fix incorrect feed URLs (closes #971) 2017-06-08 20:08:30 +02:00
akuma06 1f36b3e896 Set the path to "/" 2017-06-06 23:29:00 +02:00
akuma06 f5740c7f28 Aria-label for navigation pages
Just added an aria-label attribute on pages number
2017-06-06 22:38:43 +02:00
akuma06 d109b4783c Fix cookies shared between domains
Just applied what we are already doing with user cookies to the
publicSettings.
Also changed the updateUserCore by updateRawUser <= less query for the
same result.
2017-06-06 22:05:44 +02:00
sfan5 576e11bf42 Fix both error message + HTML showing on home page
Also remove util.SendError since it's not very useful.
2017-06-06 16:24:15 +02:00
akuma06 5068d83402 Merge branch 'dev' into custom-mascot 2017-06-06 00:38:20 +02:00
akuma06 23210b0250 Report modal fix (#935)
* fix uploaderid when torrent is hidden

Added a new function template to generate a link for uploaders name
In the view we have the actual uploaderID and uploaderName now

* fix template.HTML to string conversion

* Add a modal for reporting

Replace the popup
Use of Modal.js
Include Captcha

* forgot a div end tag

* Moved modal at the end

* Updated translation missing %s

* Added an information message

New translation string

* Forgot %s

* wrong id check
2017-06-06 00:06:52 +02:00
akuma06 01a3143a08 fix uploaderid when torrent is hidden (#930)
Added a new function template to generate a link for uploaders name
In the view we have the actual uploaderID and uploaderName now
2017-06-06 00:06:04 +02:00
ElegantMonkey e10070b2a9 Add customizable mascot by URL.
Add a new setting for customizable mascots, with a new User field
MascotURL, and a corresponding cookie setting.
2017-06-05 11:32:48 -03:00
akuma06 b61fe55f82 New upload API (#897)
* New upload API (WIP)

* update

* Last fix

* Adding changes from update.go to api.go

* fix bracket

* fix import
2017-06-05 08:19:25 -05:00
akuma06 38a55e88e9 Fix for csrf (#923)
* Merge remote-tracking branch 'refs/remotes/origin/dev' into fix-for-csrf

Fix CSRF protection

Seems like it doesn't work anymore...
I tried to
fix it but couldn't get /api without csrf. So I changed the
dependency
for another csrf package (nosurf).
Behavior: Same as previously. You
just have to include the block
csrf_token

* changing dependency to nosurf
2017-06-05 11:33:48 +10:00
akuma06 75528da943 Fix user logout (#924)
* Logout is now a posted form

Instead of using a get method, I've moved it to a post method.
Doing that made possible to use CSRF token and also fix #902

* Update _badgemenu.html
2017-06-05 11:33:16 +10:00
tomleb e60eceba63 Reduce number of queries, update systemd unit service (#925)
* Update/add systemd services

* Avoid roundtrip back to postgresql when doing ES search

* Use only one ES client
2017-06-05 11:33:02 +10:00
PantsuDev 93af9a7df4
Revert "Hopefully patch exploit that allows anyone to log users out"
This reverts commit b0a3555afe.
2017-06-04 21:19:44 +10:00
PantsuDev e34ddd1404
Reduce size of descriptions 2017-06-04 15:56:36 +10:00
PantsuDev b0a3555afe
Hopefully patch exploit that allows anyone to log users out 2017-06-04 15:38:38 +10:00
akuma06 38e8ee3a7a New modpanel fix (#895)
* Comments count number

* New Modpanel fix

Fixes #755 (@ilikecats)
modpanel tables have margins
modpanel delete buttons are red
some coloring for buttons
reassign form looks better
reassign form textarea have rows="20" cols="40"
"save changes" btn green
report reasons are now translated in modpanel
delete is a real button on modpanel users page

* moved getReportDescription
2017-06-04 02:28:33 +02:00
Atvaark 99ad76f76f Add web address config (#888)
* This allows changing the nyaa, sukebei and status URL via config.
  Previously only the nyaa address was configurable
* This helps testing changes locally without having to set up
  a TLS terminating proxy
* Also refactored uses of hardcoded URLs in the html templates
  The html templates will now also use the configured urls
2017-06-03 11:45:24 +10:00
akuma06 e62ebb05ba Mass edit mod api JS (done) (#868)
* Mass Edit MOD api JS (WIP)

In continuity with the mass edit mod api, this is the javascript use of
it.
##What does it do?
* Delete of multiple torrents on index/search
* Category change of multiple torrents
* Change of owner of multiple torrents
* Lock & delete of multiple torrents

##How?
* New toolbar only visible for mods
* Checkboxes added only for mods
* Selection and click on the button in toolbar
* Nothing is submitted, you have to review the changes in a modal window
listing them.
* Then the ajax queries are initialized one at a time with a progression
bar
* You can always at any moment delete entries from the queuing list

* Improved progress bar

* Deleting part almost done

Improved modal design
All dom interactions should be done
Prepared Query for only one callback
Improved Modal to keep a link to the active modal

* Finished =D

Added some translation string

* Forgot the refreshing of the page

Just an option that can be disabled by making refreshTimeout to 0
2017-06-02 12:51:44 +10:00
akuma06 08c342e4e7 Added a check on LastID function 2017-05-31 21:07:56 +02:00
akuma06 9e0424ec5e Add Build version
Main version can be set in config/default_config.yml
Build version need to be set by build command: go build -ldflags "-X
main.buildversion=$(date -u +.%Y%m%d.%H%M%S)"
Or by using package.sh
Or by using the godep command: godep go build -ldflags "-X
main.buildversion=$(date -u +.%Y%m%d.%H%M%S)"
2017-05-31 12:20:06 +02:00
akuma06 e116b30b40 Better handle of test files
After some thoughts, it is better to use the config from config files
than default ones
2017-05-31 10:49:01 +02:00