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

95 Révisions

Auteur SHA1 Message Date
kilo d5c2c6b676 Upload to nyaa.si, anidex & TokyoTosho [done] (#1633)
* Update upload.go

* Update helpers.go

* Update template_test.go

* Update upload_multiple.jet.html

* change variable names

* wrong copypaste

* change variable name

* ditto

* Fix travis

* Update main.css

* Update upload.go

* Update upload.jet.html

* Update main.css

* Update upload.go

* More compact form

* CSS changes to go along

* Update main.css

* Update upload.jet.html

* Slightly lower bottom margin

* Update upload_multiple.jet.html

* tomorrow color adjustements

* small css adjustements

* Update upload.go

* Update default_config.yml

* Update default_config.yml

* Update structs.go

* Update user.go

* Update structs.go

* Update upload.go

* Update default_config.yml

* Update upload_multiple.jet.html

* Update upload.go

* Update upload.jet.html

* Update template_test.go

* this one is optional for anidex

* Update default_config.yml

* Possible improvement
As mentionned in my comment, it seems that having a checkbox already checked and disabled for logged in user + having the input text for apikey is a bit tedious.
Moreover, asking to check and fill the input text to upload in anidex when you are not logged is doing things twice. If you don't want to upload to anidex, don't fill the input.

So this commit push a new behaviour:
* If you are logged in and you have filled your anidex/nyaasi api key : the form should only show the checkbox asking if you want to upload to nyaasi.
* If you're not logged in or you don't have filled your api key in your profile settings: you only show the input text for the api key and not the checkbox. If someone wants to upload to nyaasi/anidex, he will just need to fill the input.

* This adds back the support of anonymous upload when logged in or not.
This works simply by checking if the user wants to upload as anon (when he checks the checkbox "upload as anonymous") or by checking the emptyness of apikey.
+ reverts the condition statements since it was needed to have apikey empty

* Forgot to save this file

* This commit adds the go routines for each upload service (anidex, nyaasi, tosho).
New controller and url to check the upload status (/upload/status/:id).
If you add ?json at the end, it outputs a json format of the multi upload status.
To prevent memory overload, we only keep in memory the multiupload status for 5 minutes.
Moved multipleform struct from templates to upload utils.

* fix form display on classic theme

* This commit adds:
* Javascript refreshing of the upload status
* Localization of the pages
* Fixed some bugs

This works, only need to get torrent file now.

* Added a new function to get the Path to the torrent file.

* Added a function to check that a torrent file exists and if not generate it on multiupload

* Enabled file upload through http post request to anidex

* Fixed bugs

* Modified the behaviour to generate torrent preivously. It is a synchrone function now. So we need to make it asynchronous in download.go

Now torrents file are always generated at upload time in a background processus with the correct trackers (needed ones + the ones provided by the user).
I made the anidex tracker as a needed one to allow multiupload even if the user hasn't included in his torrent file/magnet url.

* Moving deadtrackers list to default config
Support torrent file creation when upload without scraping
* Fix possible bug where no one is seeding a torrent yet (first time upload)
Add primary tracker in torrent file

* Fixing issue with boolean pointer for private torrent

* fixing index out of range for announcelist filtering
Fixing anidex tracker not found

* Fixing lang id error

* Anidex upload works

* Fix for multiupload with magnet

* This adds TokyoTosho support. Since TokyoTosho API only support upload by URL (and not torrent file upload). We need to make the download url available without ddos protection.

Also TokyoTosho doesn't need a category select. Since it does have limited option, we can automatically convert our categories to the tokyotosho one.

* Removing the folder tosho and put categories.go directly in upload package.
Added category conversion for nyaasi too.
Added tests on category conversion.

* This should add nyaasi support.
Is not tested though.

* Updated defaut config with new nyaa.si behaviour?

* Forgot to commit this file
2018-01-03 18:21:07 +10:00
kilo 0a765b5589 Things (#1740)
* Add new followers directly to user.Followers

* Update user.go

* Remove useless condition

* Query an update of user followers if at 0 when looking at his profile

* Fix comment not appearing until you refreshed the torrent page

* call ViewHandler so that comments visually update properly

* Remove now useless imports

* Add "uploader" userstatus in comment

* GetLikings() & GetFollowers() now return count too

* Don't update follower count here

* Update follower count directly here

* show liking count

* Update user.go

* Update profile.jet.html

* Update torrentParam.go

* Fix locked torrents that were shown even when they should not

* Update torrentParam_test.go

* remove inline styling

* Update main.css

* Update upload.jet.html

* Update main.css

* Update tomorrow.css

* Update classic.css

* Update classic_colors.css

* Update index_site.jet.html

* Make announcements support markdown

* Add markdown form to announcement creation

* fix "report" text position

* Add exclude search option to exclude words

* Make sure the "NameLike" value is the search query because we edit it during a search

* Show search content in page title for /feed too

* rollback

* Add "Search" variable that shows exactly what is being searched

* Use "Search.Search" variable here instead of NameLike because NameLike is edited

* Update torrentParam_test.go

* Update torrentParam.go

* remove redundant spaces from NameLike

* Update torrentParam.go

* Update torrentParam.go

* Update torrentParam.go

* Update torrentParam.go

* turn date input into type date

* bigger date inputs

* add support for YYYY-MM-DD dates

* rollback this change

* rollback

* Update search.jet.html

* Update helpers.go

* Update template_functions.go

* Update torrentParam.go

* only uploader & staff can comment on locked torrents

* Add "Upload to Nyaa/Sukebei" button for mods

* Update torrentlist.jet.html

* Update view.jet.html

* Update view.jet.html

* fix wrong page title for notifications page
2017-11-20 11:13:00 +10:00
MMP0 03d9d4e680 Add Markdown editor to view page (#1736)
* Update view.jet.html

* Styling to make the markdown textarea smaller by default

* Fix markdown editor in fullscreen

* Different positionsand sizes are needed in classic theme

* Add class to <td> containing description textarea, needed in order to apply a CSS rule onto it
2017-11-11 19:00:32 +01:00
kilo 4385315a0f
Update upload.jet.html 2017-10-31 03:20:32 +01:00
kilo 2044a3c98a bottom margin for comment avatar & other small things (#1646)
* bottom margin for comment avatar

* Resetting API key now redirects you back to edit page

* move important faq things up in the faq

* Add div as high as header instead of top margin for #content

* Fix modtools showing behind ad

* No margin-top for body

* add functions that will be used in the future to file.go

* Update create.go

* fix css rule that didn't apply

* Fix some JS of upload form that kept shitting out errors since i updated the upload form

* Update upload.jet.html

* fix duplicate id on a form

* Fix very very slightly misaligned input

* fix html error on filelist

* Add FullDate variable to torrents

* Create Go function that returns an user-friendly date when fed a go date

* akuma must hate me for butchering the template_functions_test file

* Make use of said function in view.jet.html

* Forgot to vars.set the function

* Remove useless title

* Make use of function in listing

* modify JS to fetch full date from title instead of innerText

* Fix title date & two functions looping on non-existing objects

* Show full dates in an AM/PM format like on live

* Torrent dates on UTC+0 by default
2017-10-11 03:24:09 +02:00
kilo d6c030d9e6 [WIP] Anidex, TT & Nyaa.si uploading (#1604)
* Update main.css

* Update tomorrow.css

* Create upload_multiple.jet.html

* Create upload.js

* Update upload.jet.html

* Update upload.jet.html

* Update upload.jet.html

* Update tomorrow.css

* Update main.css

* Update tomorrow.css

* Update main.css

* Update user.go

* Update template_test.go

* Update main.css

* Update upload.jet.html

* Update edit.jet.html

* Update template_test.go

* Update upload.jet.html

* Update main.css

* new design for user edit

* Fix CRSF token

* Update upload_multiple.jet.html

* Update upload.jet.html

* Update profile.jet.html

* Update base.jet.html

* Update edit.jet.html

* Update forms.go

* Update forms_test.go

* Update forms_test.go

* Update forms.go

* Update forms_test.go

* Update main.css

* Fix 4+ torrent flags display on IE

* Fix userprofile buttons on IE, remove fancy css

* Fix torrent link being hidden on IE

* Update listing.jet.html

* Update main.css

* Update listing.jet.html

* Delete torrent_item_upload.jet.html

* Update torrent_item.jet.html

* Update main.css

* Update classic.css

* Update listing.jet.html

* Update classic.css

* Update profile.jet.html

* Update upload.jet.html

* Update classic.css

* Update classic.css

* Update main.css

* Update user.go

* Update upload.jet.html

* Update upload.jet.html

* Update edit.jet.html

* Update template_test.go

* Update forms.go

* Update forms_test.go

* Update main.css

* Update classic.css

* checkboxes next to language div

* wooo responsive checkboxes

* remove empty space

* need an !important here

* Fix flags being unaligned on IE

* Fix some inputs being too big on classic.css, remove fancy shit

* Update classic.css

* fix travis

* Update main.css

* Update upload.jet.html

* Update edit.jet.html
2017-09-30 15:10:47 +02:00
kilo 7264ab0d0a Small fixes (#1593)
* Update torrent_file_missing.jet.html

* Update en-us.all.json

* Update CHANGELOG.md

* Update main.css

* Update upload.jet.html

* Remove unused refine inputs from URL when doing a refine search

* fix cookie warning not showing up
2017-09-19 10:00:30 +10:00
kilo e1f6a97a86 Ad design changes (#1581)
* Update main.css

* Update classic.css

* Update base.jet.html

* Update classic.css

* Update main.css

* Update base.jet.html

* Update upload.jet.html
2017-09-18 11:24:08 +10:00
kilo 216d241143 alt attribute for ads images, fix missing tags on upload, fix wrong name for translation string (#1577)
* alt attribute for ads images

* fix <tr> too much

* fix missing <tr> that created HTML error

* fix wrong translation string name

* ditto

* fix accepted tags not having background on classic

* Put tag table inside upload table

* Update classic.css

* Remove prefix of dlsite tag on view

* Update main.css

* 10px bigger website

* fix wrong css selector

* fix markdown scroll visually broken in classic.css

* Add magnet link on torrent file not found page

* don't show magnet <a> if empty

* Fetch magnet link in download.go and pass it on to torrent_file_missing

* add magnet in template_test
2017-09-18 10:15:39 +10:00
kilo cedbec3246 New design for upload form (#1574)
* CSS for new upload form

* add torrent_name in translation

* Update CHANGELOG.md

* New upload form HTML, don't load kilo.js

* Update upload.jet.html

* Update main.css

* change placeholder of torrent name input

* Update upload.jet.html

* remove useless function call from upload

* responsive upload form

* Fix description being constantly bold in upload

* fix vertical align of labels in upload

* upload tags inputs in table too

* tag table styling & remove old upload tag styling

* Update main.css

* Update main.css

* Update main.css

* Update upload.jet.html

* fix flag misalignement in upload form

* Remove rules <div> from upload, provide temporary link to rules in faq (maybe will turn into a modal in the future?), remove useless input

* bigger upload button & no margin for upload rules text

* Update en-us.all.json

* Update CHANGELOG.md

* add ID to rules div

* Update upload.jet.html
2017-09-17 20:30:58 +02:00
MMP0 b203af4c87 Update upload.jet.html (#1561) 2017-09-13 15:54:59 +02:00
kilo 615ff10dc8 Fix some html errors (#1549)
* Remove useless / that created html error

* Slightly bigger font for torrent name on view.html, padding fixes

* Set kilo.js to look for span class name instead of name to remove HTML error

* Change span name into class to remove html errors

* remove name attribute

* remove link to user profile is Anon or invalid userid

* fix duplicate class attribute

* remove useless center, remove useless attribute, remove useless yield errors & bad name attribute

* turn name attribute into ID

* JS changes to go along

* fix travis

* Delete OldNav.jet.html

* Create oldNav.jet.html

* turn <li> into <span>

* Update classic.css

* Update main.css

* Update g.css

* Update tomorrow.css

* Update tomorrow.css

* Update classic_colors.css
2017-09-11 21:59:17 +02:00
kilo b3788f1167 Revert "Add background color to remake-checkbox" (#1500)
* Revert "Update CHANGELOG.md (#1497)"

This reverts commit 2450a70cce.

* Revert "Updated translation. (#1496)"

This reverts commit 2187c2e06a.

* Revert "Add background color to remake-checkbox (#1499)"

This reverts commit 5b58380bd1.
2017-09-05 09:03:26 +10:00
MMP0 5b58380bd1 Add background color to remake-checkbox (#1499) 2017-09-04 22:03:20 +10:00
akuma06 46c30a88bf Fix #1461 (#1463) 2017-09-02 03:24:22 +02:00
kilo df82737824 display: none on these inputs that do nothing at the moment but will in the future 2017-09-01 07:17:55 +02:00
kilo 6209dfbfb2 Load query.js in base as theme toggler JS requires it (#1449)
* Have to include query.js in very page because of theme toggler

* Remove query from other files

* remove query

* Remove kebab

* better color
2017-08-30 21:29:52 +10:00
kilo 5a184bfb50 "Alternating Colors" option in settings (#1440)
* Non-bold torrent name when using alternating background colors

* Add alternating colors for g.css

* Add alternating colors for classic.css

* Add alternating colors for tomorreuw

* Update classic.css

* Add alternating colors to settings page

* Add alt-colors class to tbody if enabled

* Add GetAltColorsFromRequest() function to get AltColors cookie value

* Create AltColors variable for usage in listing

* Make settings handle altColors input

* Add AltColors in user struct

* Returned the wrong variable here

* Turn function return value into bool

* Condition checks variable like a bool

* ditto

* better color for g.css

* even better color

* better

* Last change for g.css

* Improvement for tomorrow

* Update classic.css

* add alt-colors class to upload preview

* Add alt-colors to user profile

* more vivid color for g

* Fix typo

* Remove browser outline for refine when clicked on

* remove browser outline

* Fix rules that didn't apply and category icon being way too small on user profile thanks to usage of percentage

* Remove show-xs class for search inputs

* Turn refine button back into position: absolute to pin at very bottom of refine

* Alternating colors for g's trusted, remake & aplus

* Update tomorrow.css

* attempt at fixing travis

* test (will have to rollback that change)

* rollback

* will have to rollback

* will have to rollback

* will have to rollback

* will have to rollback

* add AltColors variable to template test

* rollback

* rollback

* rollback

* rollback
2017-08-30 15:21:45 +10:00
kilo 4e361ccce0 Prettier tags on upload (#1420)
* HTML changes to have tags in one div

* Add form-input class to tags inputs in upload

to have them look like regular inputs

* CSS changes to make tags inline

* Add changes to torrent edit

* Add changes to admin torrent edit

* attempt at fixing travis

* rollback admin edit in an attempt to fix travis

* Fix tags being visually broken in one very specific resolution

* fuck this shit
2017-08-28 11:42:38 +10:00
akuma06 b3e3ec6083 Fix Navigation Admin Panel (#1398)
* Fix Navigation Admin Panel

* Fix broken html on reassign page

* fix user link in comment list

* Fix Unknown bytes

* Fix switch file upload/magnet

* fix modtools background white + width

* fix /mod/ redirection url

* Fix last torrents on modpanel

* empty torrent file input

* Add hidden class to h3
2017-08-26 12:15:28 +10:00
akuma06 2b4731d16c Dbidlinks (#1396)
* Add Anidb, Vndb, Vgmdb links

* Anidb, Vndb, Vgmdb and Dlsite links into tag design
* Add external links to Anidb, Vndb, Vgmdb and dlsite

* Add filter links to tags

* Filter string translation already exists

* Fix display tags

* Update translation changelog

* Do not display tag type when default
2017-08-26 11:42:12 +10:00
akuma06 c6168be8b1 Tag Search + Tests + Search slight refactor [DONE] (#1342)
* Tag Search + Tests + Search slight refactor

First commit improving search. Different struct have their own file with their tests. This way of separating struct by files is inspired by the go packages I've seen so far.

Added new behaviour as discussed in #1334

* fix fallback to ES

* Added some comments to explain PG fallback + log err moved

* Refactored search

Nearly fully covered
WhereParams struct has disappeared for Query struct instead
In DB model, we use an interface implementing Query struct methods

* 1rst Refactor of Tags (WTF already?!)

Prepare Tags for the refactored system. Now there will be descriptive tags for a particular release (ecchi, BDSM, ....) and typed tags.
Typed tags are tags relevant to all torrents and can be limited to some input value. For example, video quality is a typed tag limited to some values (hd, full hd, sd, ...). In the same way, anidbid is also a typed tag but doesn't have default values.

Furthermore, the location storage of tags have changed, now accepted descriptive tags are stored in the torrents table in the column "tags" and they are separated by commas.
In the opposite, accepted typed tags can have have their own column in the torrents table. For example, anidbid, vndbid will populate the column DbID when accepted. On the other hand, videoquality will populate the same way as descriptive tags.

This behaviour depends on the callbackOnType function in tag/helpers.go

* fix for modtools :')

* Added anidb, vndb, dlsite & vmdb id fields in torrent model.
Tags don't have an accepted field anymore.
Accepted Tags are in torrent.AcceptedTags and non-accepted ones in torrrent.Tags.

New Helper + New Changelog for translation string.

* New upload/edit form for torrent tags.
Now the inputs are dynamically generated by the helper tag_form.
No more modal window in those form, only inputs.
Support of tags in API
New translation string for the  link to the modal on torrent view.
More comments in the functions for tags

* Improving how config for tags work. Adding a test on them with understandable messages.
Config for tags have now a Field attribute which is linked to the Torrent model. For example anidbid tag type has now a AnidbID field in config which is the name of the field in torrent model (AnidbID). Every new tag type need to have a field attribute with its counterpart in torrent Model.
Fixing some errors

* Fix compile error + Tests Errors

* Improve performance by caching the list of tags with an index
Adding/removing tags works/tested
New translation strings

TODO: test/fix adding tag on upload/edit

* Mini fix to display video quality
+ tags works/tested on modo edit

* Fix editing tags on modpanel

* Edit tags works

* Add translation string

* Add search backend for tags.
?tags=xxx,eee,ddd
?anidb=21
?vndb=23
?vgmdb=24
?vq=full_hd

* Fix Ajax tag Removal&Add

* Added form for descriptive tags

* Forgot to add the link between database and form for descriptive tags.

* Adding the increase/decrease pantsu for descriptive tags

* Fix #1370

* When you actually forgot to commit files after having forgotten commits
2017-08-22 11:48:10 +10:00
kilo a7e8ceac11 Update upload.jet.html 2017-08-03 14:47:07 +02:00
kilo f19d42cd59 Update upload.jet.html 2017-08-02 21:50:10 +02:00
kilo 1f81502ca6 Update upload.jet.html 2017-08-02 21:48:57 +02:00
kilo c32211a167 JS trigger the display 2017-08-02 21:48:03 +02:00
akuma06 0db143d685 Possibility to add tags from edit panel + upload 2017-08-01 23:38:13 +02:00
akuma06 e68637198f Add ajax tag post + improved the way templating works 2017-08-01 13:54:01 +02:00
PantsuDev cdabd79c03 Fix more style issues 2017-07-24 15:03:43 +10:00
kilo 54b2813e3c Put rules into their own file list flag list (#1259)
* Remove html rules from upload, load rules file and call the rule function

* Update faq.jet.html

* Create rules.jet.html

* forgot to remove old list

* forgot to do that

* remove <br/>

* Update main.css

* Update g.css

* add jav flag keyword

* Update kilo.js

* add h-games keyword
2017-07-22 14:07:57 +02:00
kilo 116464f43b Show seeder & leecher down to 520px wide at worst instead of 810px (#1257)
* change seeder & leecher width at lower res

* change class for seeder & leecher

* add new class to hide stuff when below 520px wide

* add those classes in upload

* change classes in torrent updating JS

* change class in torrent updating JS for upload
2017-07-22 00:27:10 +02:00
kilo 3604f3d933 Fix css missing ; & wrong class position in html (#1240)
* Update main.css

* fix wrong class
2017-07-19 23:07:39 +10:00
kilo a5986cc543 Fix padding of torrent list on mobile & torrent preview stuff (#1239)
* Update main.css

* Update main.css

* Update main.css

* Add two example torrents

* only keep previewed torrent when updating with newer ones

* Update upload.jet.html

* wrong class here

* Update main.css

* rollback

* Update upload.jet.html

* Update kilo.js

* Update upload.jet.html
2017-07-19 22:24:04 +10:00
kilo e92527748c add two keywords & a sukebei rule (#1231)
* add two keywords

* move keywords_flags vartiable outside of function

no point in creating it every single time

* Update en-us.all.json

* add sukebei rule

* Update main.css

* Update upload.jet.html

* Update upload.jet.html

* Update main.css

* Update main.css

* Update en-us.all.json

* whoopsies

* add keywords for categories

* fix display on firefox & older browsers
2017-07-18 20:51:38 +02:00
ewhal cc15ff8288 Merge pull request #1223 from Kiloutre/patch-11
Preliminary addition of rule list in upload
2017-07-19 00:15:02 +10:00
kilo 7b28e3323a fix sukebei condition 2017-07-18 15:56:50 +02:00
kilo b7fa22d3d8 rules not open by default 2017-07-18 15:44:34 +02:00
kilo 7c79f88298 Update upload.jet.html 2017-07-18 15:33:15 +02:00
kilo 6da72d0017 Update upload.jet.html 2017-07-18 15:30:45 +02:00
kilo 5eb56a4ea1 Make previewed real torrent hidden (50% opacity) and remove any link they have to avoid painful missclicks (#1222)
* Update upload.jet.html

* Add files via upload
2017-07-17 21:54:06 +02:00
kilo e757f83a16 Preliminary addition of rule list 2017-07-17 16:09:14 +02:00
akuma06 81113001df Context list on upload preview (#1220)
* Update kilo.js

* torrent item js as a separate file to prevent redudancy

* Adding context list

* Fix indent
2017-07-17 14:20:18 +02:00
kilo e3606bf91b Align search icon with refine text, fix display of category in preview on mobile, better padding on .box for mobile (#1218)
* Update main.css

* fix category image of preview torrent that got cropped at lower res

* padding on mobile

* remove css
2017-07-17 13:19:41 +02:00
kilo acda05449e this will be done in JS 2017-07-16 12:52:58 +02:00
ewhal c1acbdb2ff Merge branch 'refactor' into patch-5 2017-07-16 20:21:00 +10:00
kilo 3ed5ba0f17 that wasn't up to date with refactor 2017-07-16 10:56:09 +02:00
akuma06 7104847af4 Improved a bit kilo.js 🐤 2017-07-16 00:17:44 +02:00
kilo de45e8a861 show one torrent above & under the previewed one 2017-07-15 22:39:51 +02:00
kilo 511d074e84 it works merge pls (#1204)
* remove custom_flag.css

* remove ' that had nothing to do here

* replace sukebei variable to boolean

* fix ? operator & variable name

* attempt at fixing visual cues for anonymous torrents

* Update torrents.jet.html

* add missing ,

* useless code if user logged off so moving that

* add it back here and check if logged in

* should work almost properly now

* same here

* flag-other invisible

* Update kilo.js

* Update upload.jet.html

* should work very well now

* same here

* Delete categories.png

* Add files via upload

* Update main.css

* Update kilo.js

* Update upload.jet.html

* Update kilo.js

* Update torrents.jet.html

* proper behavior for trusted people

* different flag form id

* add id

* add language name in an span

* make that span invisible =)

* Update flags.jet.html

* Update upload.jet.html

* Update kilo.js

* whoever read this is a faggot

* Update upload.jet.html
2017-07-15 21:41:57 +02:00
kilo 2a8b4ce9c3 Update upload.jet.html 2017-07-15 16:19:30 +02:00