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

175 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 418dc81e19 Fix unintended behavior for theme toggler when logged in, fix missing styling for a button & background of markdown for classic theme (#1747)
* missing background color, 

fix missing background color on markdown editor on torrent view page
fix missing classic styling on "Upload to Nyaa/Sukebei" button

* Fix theme toggler that didn't behave as intended

Fix theme toggler that didn't behave as intended when the user was logged in and his theme cookie had a different value than his user theme setting

* Classic theme default on nyaa.pt
2017-12-21 22:40:23 +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
kilo 5dcd30676f
Janitor (#1728)
* Fix "torrent is being generated" message showing up even when the torrent couldn't be generated

* Add janitor user status

* Remove usage of deprecated HasAdmin() function

* Give Janitors access to mod panel

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Update edit.go

* Update profile.go

* Rollback bad changes, remove redundant email check and stop using deprecated function

* Show every userstatus (member, janitor, banned, mod) in comments

* Return empty status if anonymous

* Show no userstatus for anonymous profile

* Show moderation link to janitors too

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Stop using deprecated HasAdmin() function

* Add Janitor to userstatus select in user edit

* "Janitor" translation string

* didnt mean to commit this change

* rollback wrongfully comitted changes

* rollback commit

* Update CHANGELOG.md

* Fix wrong id for translation

* remove deprecated HasAdmin() function again

* change name of variable used in comment loop for clarity purposes

* visual cue for locked torrents in torrent listing for admins

* add visual cues for hidden torrents in admin torrent listing

* Dont show delete buttons for janitors

* janitor cannot delete torrents

* show block/unblock button in torrent list for janitors instead of delete button

* fix function that didnt get executed

* add ban buttons on userlist & visual cue for banned users

* Fix "user successfully deleted" message showing even if user wasnt deleted

* Add "ban" button, no "delete" button for jantiors

* add "unban" and "ban" translation strings

* add "unban" and "ban" translation strings

* different <form> for ban button

* Update index.jet.html

* add userprofile ban route

* add toggleBan() function, janitors dont need captcha either

* fix panic error when deleting an anonymous comment

* add user_banned_by and user_unbanned_by

* add user_banned_by and user_unbanned_by

* Make ToggleBan() return whether or not the user is now banned

* Add handler for /ban route

* change log filter

* hide locked torrents from regular users

* hide locked torrents from regular users

* hide locked torrent from api search for regular users

* change function to CurrentOrJanitor

* change function to currentorjanitor

* change function to currentorjanitor

* add CurrentOrJanitor function

* fix extra (

* fix extra ) and wrong variable name

* Fix wrong value for janitor user status

* Fix user edit that did not work because of "unique constraint user.emails" error

* only immediately visually update user if user has been updated successfully

* use FindAllForAdminsOrderBy in order to preload users

* create FindAllForAdminsOrderBy that preloads users

* Show username instead of ID in Uploader column in admin panel

* Fix userprofile buttons overflowing at some specific resolutions

* Mods can set users as janitors

* Show ban/unban buttons on userprofile for janitors

* Identical styling for usermenu links and buttons

* dont show ban buttons on other staff

* add ban message through get parameter

* make toggleBan() trigger user update

* Add "user_banned" and "user_unbanned"

* add "user_banned" and "user_unbanned"

* Visual cue for banned user

* banned users can still log in

* visual cue for banned user in  badgemenu

* locked status if banned user on upload

* banned users cannot comment

* Put "banned" text between ()

* add GetCategoryName() to template_test

* add GetCategoryName() that returns full category name from full category string

* Show search content in page title if it exists, or search category if it exists, otherwise shows "Home"

* error message when user uploads an torrent & is banned

* add torrent_uploaded_locked

* add torrent_uploaded_locked

* fix delete definitely button that never appeared

* Show delete definitely button on admin panel index

* admins can undelete a torrent by editing it's status

* Trigger ViewHandler() directly instead of redirecting

* Render the template directly instead of triggering torrent view handler

* bigger usermenu buttons once responsive design kicks in

* make btn-* class non-bold

* Responsive notification page

* visual cue for locked torrents in torrent listing

* Update search.go

* Update search.go

* Update api.go

* Update helpers.go

* Update template.go

* Update torrentParam.go

* remove "hidden" class

* Update search.go

* fix an html error

* Add files via upload

* Update admin.jet.html

* Update index.go

* Update index.go

* Update router.go

* Update torrentParam_test.go

* Update torrentParam_test.go

* fix extra "

* fix bad copypaste

* Update CHANGELOG.md

* Update guidelines.jet.html

* Update CHANGELOG.md

* add Guidelines and Moderation Guidelines

* fix missing commas

* Update torrentlist.jet.html

* Update find.go

* Update stats.go

* Update view.jet.html

* Update index.jet.html
2017-11-14 09:39:39 +01:00
kilo fdbf06e610 Increase max torrent per page, fix HTML errors, other fixes (#1723)
* Increase max torrent per page

* Increase max torrent per page

* fix html error by changing an ID into a class

* change css selector from id to class

* Update oldNav.jet.html

* Update classic.css

* Update captcha.jet.html

* Fix order of torrents in admin panel index

* Update settings.jet.html

* make lang postform have same name as cookie
2017-11-09 11:53:38 +10:00
kilo 213780f0eb
Small fixes (#1715)
* Update main.css

* saving settings now clear old cookies of current domain

* Update main.js

* Update classic.css

* Update settings.go

* Update main.css

* Update commentlist.jet.html

* Update generate.go

* Update default_config.yml

* Update structs.go

* Update default_config.yml

* Update find.go

* Update find.go

* Update stats.go

* Update interaction.go
2017-11-08 09:32:06 +01:00
kilo ca271e2ac6
Username search for admin comment list, inputs for userid & username search in said comment list (#1713)
* Update comments.go

* Update commentlist.jet.html

* Update comments.go

When you search a username and you have a userid in the url, the conditions string doesn't have "AND" in it. I made the username search a priority and if there is not username provided, it falls back to userid in url.
2017-11-06 09:17:14 +01:00
kilo e8dfeaea4a
Fix report creation from report template for anonymous users & small css adjustement (#1712)
* Fix report creation from report template for anonymous users

* small adjustement for styling of usernames in comment

* lower margin-top for comment content

* Update en-us.all.json

* Update CHANGELOG.md

* fix torrent link button's styling getting messed up from
2017-11-05 07:43:53 +01:00
kilo 8ec3c2a743
Add possibility of reporting without JS, add report reason for NSFW content, Add possibility of getting a torrent by Hash in refine (#1709)
* Add possibility of reporting without JS

* Add report message input and new report reason to /report/:id page

* add new report reason here too

* Update en-us.all.json

* Update CHANGELOG.md

* only show if not sukebei

* ditto

* fix label for value

* ditto

* fix overly big report message column

* Update main.css

* Update search.jet.html

* Add possibility of getting a torrent by Hash in refine

* Update search.go

* Update search.go

* fix template_test

* ditto

* fix Sprintf wrongly using a Token

* rollback that

* Update callback.go

* remove line that creates error

* fix travis
2017-11-04 06:42:36 +01:00
kilo 0e1a907a9a
Update announcements.go 2017-11-02 04:23:58 +01:00
kilo 54b29698db
Update announcements.go 2017-11-02 04:00:05 +01:00
kilo 287f0b0fac
Update follow.go 2017-10-31 23:07:03 +01:00
kilo ce8e882761
Update report.go 2017-10-31 06:35:45 +01:00
kilo 5268d25a2d
Update reports.go 2017-10-31 06:21:20 +01:00
kilo 7a50f9f145
fix travis 2017-10-31 04:35:28 +01:00
kilo 9d485e5a77
Update profile.go 2017-10-31 02:41:03 +01:00
kilo 3eb23e1e9d
Update themeToggle.go 2017-10-31 02:36:08 +01:00
kilo 90320dfa2b
remove annoying messages 2017-10-31 02:25:09 +01:00
kilo 03d92ab639
Update torrents.go 2017-10-31 02:00:06 +01:00
kilo 6931952a63
rollback that 2017-10-31 01:57:21 +01:00
kilo f0be33c7c1
Update follow.go 2017-10-29 19:54:59 +01:00
kilo 7490e44a67
Update profile.go 2017-10-29 19:30:16 +01:00
kilo 657454f40b
Update view.go 2017-10-29 19:17:55 +01:00
kilo 2e26be863b
Update delete.go 2017-10-29 05:31:49 +01:00
kilo a29aa87a1f
Update helpers.go 2017-10-29 05:31:43 +01:00
kilo 71fddc2d39
Update torrents.go 2017-10-29 05:31:37 +01:00
kilo 6f6cb4c80e
Update report.go 2017-10-29 04:47:54 +01:00
kilo ac933b1ec0
Update profile.go 2017-10-29 03:45:21 +01:00
kilo 38061f3521
Update themeToggle.go 2017-10-29 01:01:50 +02:00
kilo b03053290c
Update profile.go 2017-10-29 00:17:22 +02:00
kilo 530fd0555a
Sukebei colors for classic theme, subscribe link on torrent pages (#1696)
* Add files via upload

* change url of files

* Delete topbar.png

* Delete dl-link.png

* Add files via upload

* sukebei colors for classic theme

* stylisation for follow link on torrents

* Update main.css

* Update tomorrow.css

* Update follow.go

* Update profile.jet.html

* Update user.go

* Update view.jet.html

* Update view.go

* Update view.jet.html

* Update view.jet.html

* Update tomorrow.css
2017-10-28 21:50:32 +02:00
kilo dd94402f04
Fixes & improvements (#1684)
* Update main.css

* Update torrent_item.jet.html

* Update main.js

* Update torrent_item.jet.html

* Update main.js

* Update main.js

* Update main.js

* Update main.js

* Update main.js

* Update template_functions_test.go

* Update template_functions_test.go

* Update user.go

* Update profile.jet.html

* Update view.jet.html

* Update template_functions.go

* Update en-us.all.json

* Add files via upload

* Update CHANGELOG.md

* Update main.css

* Update template_functions.go

* Add files via upload

* Update en-us.all.json

* Update template_functions_test.go

* Update view.jet.html

* Update main.css

* Update ja-jp.all.json

* Update main.css

* Update edit.jet.html

* Update main.css

* Update tomorrow.css

* Update ja-jp.all.json

* Update main.css

* Update view.jet.html

* Update comment.go

* Update create.go

* Update classic.css

* Make GetOldNavFromRequest return true by default

* Update view.jet.html

* Force torrent date in UTC+0 timezone during display

* ditto

* Update ja-jp.all.json

* Update oldNav.jet.html

* Update structs.go

* Update default_config.yml

* Update torrent.go

* Update stats.go

* Update stats.go

* Update user.go

* Update template_functions.go

* Update template_functions_test.go

* Update torrent.go

* Update comment.go

* Update view.jet.html

* Update main.css

* Update user.go

* Update template_functions.go

* Update profile.jet.html

* Update main.js
2017-10-28 18:28:59 +02:00
akuma06 b2b48f61b0 Torrent Generation on not found error (#1600)
* [WIP] Torrent Generation on not found error
As asked in #1517, it allows on-the-fly torrent generation. Since it uses magnet links, it needs some time to connect to peers. So it can't be instant generation, we need the user to wait and try after a minute at least.

* Replace Fatal by simple error

* attempt at fixing travis

* del

* Add Anacrolyx dependency

* Add back difflib

* Remove .torrent suffix in the url example

* Add some explanations when file missing page shown

* Ignore downloads directory

* Either use cache (third-party site) or own download directory

* Wrong import

* If there is an error then it means we aren't generating a torrent file

May it be "torrent not found" or "We do not store torrent files" which are the two only existing errors for this page

* hash is never empty

* TorrentLink may be empty at times

So we add a /download/:hash link if it is

* Update README.md

* Made a mistake here, need to check if false

* Update en-us.all.json

* Update CHANGELOG.md

* Torrent file generation can be triggered by click on button if JS enabled

* Update download.go

* Update download.go

* Use c.JSON instead of text/template

* Return to default behavior if we don't generate the file

* Don't do the query if returned to default behavior

* Add "Could not generate torrent file" error

* Fix JS condition & lower delay until button updates

* Start download automatically once torrent file is generated

* Fix torrentFileExists() constantly returning false if external torrent download URL

* torrent-view-data is two tables instead of one

This allows the removal of useless things without any problem (e.g Website link), but also a better responsibe design since the previous one separated stats after a certain res looking very wonky

* CSS changes to go along

* Remove useless <b></b>

* Update main.css

* In torrentFileExists, check if filestorage path exists instead of looking at the domain in torrent link

When checking if the file is stored on another server i used to simply check if the domain name was inside the torrent link, but we can straight up check for filestorage length

* Fix JS of on-demand stat fetching

* ScrapeAge variable accessible through view.jet.html

Contains last scraped time in hours, is at -1 is torrent has never been scraped
Stats will get updated if it's either at -1 or above 1460 (2 months old)

* Refresh stats if older than two months OR unknown and older than 24h

Show last scraped date even if stats are unknown

* Add StatsObsolete variable to torrent

Indicating if:
- They can be shown
- They need to be updated

* Update scraped data even if Unknown, prevent users from trying to fetch stats every seconds

* Torrent file stored locally by default

* no need to do all of that if no filestorage

* fix filestorage path

* Fix torrent download button stuck on "Generating torrent file" at rare times

* fix some css rules that didn't work on IE

* Fix panic error

Seems like this error is a known bug from  anacrolyx torrent https://github.com/anacrolix/torrent/issues/83

To prevent it, I'm creating a single client and modifying the socket.go to make it not raise a panic but a simple error log.
2017-10-21 09:40:43 +02:00
akuma06 33c83030b9 Fix Api documetation (#1685)
* Fix Api documetation

Fix #1682
* Remove unused SubCategory field from struct TorrentRequest
* Change `category` argument in documentation to correct `c` (same key as the one in Search)

* Apidoc generation

* Remove SubCategory from template_test's torrentValidator

* Update template_test.go
2017-10-18 22:27:55 +02:00
Kylart 0728e03f33 Update actually is a PUT method (#1680)
User actually is a GET method
2017-10-18 06:02:37 +02:00
kilo c791e3bc08 Show refine constantly in no results page (#1675)
* Update search.jet.html

* show refine constantly in "no results" page

* no results page is now a box

* remove useless class
2017-10-16 19:52:36 +10:00
akuma06 2dc84d03ca Fix for api (#1676)
To change the apidoc, you need to:
* change one file controllers/api/api.go
* then run the command `apidoc -i controllers/api/ -o apidoc/`
2017-10-16 19:33:14 +10:00
kilo a4ea57e771 Update last-scraped date on view even if stats.go return unknown stats & other things (#1673)
* Update view.jet.html

* reduce the time limit of how fast stats.go is supposed to be called

* Update router.go

* add subcategory display in old navigation

* css to go along

* remove useless variable

* Update oldNav.jet.html

* fix travis

* fix missing css line that had user search input & link way wider than they should've been

* "See more torrents from" now make use of user torrent search route

* remove useless variable

* use stat obsolete variable in listing instead of checking the date
2017-10-16 17:03:18 +10:00
kilo 2f0e06cfe4 Update stats.go (#1672) 2017-10-16 04:55:38 +02:00
kilo ebfcf90d99 Update classic.css (#1670)
* Update classic.css

* coveralls test

* add additional user search route
2017-10-16 03:08:21 +02:00
kilo 1ec2a77974 fix wrong translation string being used on user edit page for mods & improve stats.go (#1665)
* fix wrong translation string being used on user edit page for mods

* fix css rule that did not apply

* fix error in stats.go

* stats.go scrapes default trackers if torrent has no tracker

* remove useless thing

* change behavior of right arrow in page list (now goes to latest page)

* fix { too much

* Update view.jet.html

* Update view.jet.html

* pin user search input & link at the bottom of user page

* HTML to go along
2017-10-15 13:18:57 +02:00
kilo 61d1aa4195 Different color for cookie warning on sukebei (g.css) & copy pasting improvements from another PR (#1660)
* Different color for cookie warning on sukebei

* Copy paste improvement from another PR since it's going to take time until it's complete

* ditto

* ditto

* ditto

* Update main.css

* JS fallback for /settings page on mirrors

* Update main.js

* Update settings.jet.html
2017-10-15 15:31:05 +10:00
kilo ba058ec3e1 Prevent session cookie from existing on .pantsu.cat & other things (#1658)
* Update user.go

* Update main.css

* add comment

* fix JS function that did not  behave as intended

* Update classic.css

* Update classic.css

* Update search.jet.html

* Update en-us.all.json

* Update site.jet.html

* Update router.go

* Update search.go

* Update helpers.go

* Update search.go
2017-10-14 11:16:34 +10:00
kilo bde8ff4f49 Fix invalid comment date when JS is enabled, wrong url in an admin torrent list link, malformed pubDate for RSS feed (#1654)
* Fix invalid comment date when JS is enabled

* fix travis

* fix wrong url in admin torrent list

* Fix wrong pubDate for /feed

* Different function name

* same changes as rss for magnet rss

* travis test

* fix delete button on torrent view

* Update edit.jet.html

* Update index.jet.html

* Update userlist.jet.html

* Update torrentlist.jet.html
2017-10-12 17:53:04 +02:00
kilo 83540ad31c Fix a condition that didn't behave as intended (#1651)
* Update profile.go

* Update router.go

* Update torrents.go

* Update router.go

* Update announcements.go

* Update comments.go

* Update oauth.go

* Update reports.go

* Update router.go

* Update index.jet.html

* Update torrentlist.jet.html

* Update commentlist.jet.html

* Update announcements.jet.html

* Update clientlist.jet.html

* Update torrent_report.jet.html

* Update userlist.jet.html

* Update userlist.jet.html

* Update userlist.jet.html

* Update edit.jet.html

* Update delete.go

* Update edit.jet.html

* Update index.jet.html

* Update profile.go

* Update router.go

* Update profile.go

* Update edit.jet.html

* Update userlist.jet.html

* Update index.jet.html

* remove hotfix that didn't even hit live
2017-10-12 02:54:01 +02:00
kilo 0f83b95625 fix image display in comments (#1650)
* fix image display in comments

* Update main.css

* temporary ghetto fix

* Update view.jet.html
2017-10-12 01:26:43 +02:00
kilo 0459475ed4 Make golang theme toggler behave exactly like JS one (#1648)
* Make golang theme toggler behave exactly like JS one

* fix red buttons with same red text color on sukebei
2017-10-11 17:31:54 +02: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 88904bade9 Medium changes (#1642)
* lower top margin for comment usernames & avatar

* Update classic.css

* temporary workaround to hide quadrupled comments

* Update view.jet.html

* Add "search from user" input below user rss link, change styling of follow button to fit other links

* all into the same div

* Remove padding of usersearch input in panel, remove useless css rule

* min-width for user buttons, max-width for the input

* Don't show "search from this user" if it's your profile

* remove max-width when responsive userprofile kicks in

* remove useless css rule

* Update view.jet.html

* le fix

* optimize stats.go a bit and add comments

* Update stats.go

* Update template_functions_test.go

* Update template_functions.go

* Remove hardcoded theme list, generate dynamically

* ditto

* Add possibility of forcing a theme for everyone

* in the .yml config file

* Make it ignore both user settings and cookies

* add forced theme in default theme config struct

* Update publicSettings.go

* fix missing , & travis

* Update template_functions_test.go

* Update main.css

* fix travis

* Update template_functions_test.go

* travis
2017-10-07 01:39:38 +02:00
kilo 67d8492380 On-demand stats fetching (#1621)
* Update view.jet.html

* Update router.go

* Create stats.go

* Update view.jet.html

* Update stats.go

* Update stats.go

* rollback

* returns -1 by default

* Update stats.go

* Update stats.go

* Import goscrape & torrent

* copypaste stats.go from scrapers

* travis

* Update stats.go

* Update stats.go

* Put fresh stats into a <span>

* Background-color for freshly fetched stats

* ditto but for tomorrow

* "Loading..." text in case it gets a bit too long

* Stat fetching in controller (missing DB update)

* Update last scraped date too

* update torrent.Scrape tho it doesn't  do anything

* forgot to edit a name

* Update scrape.go

* Update stats.go

* Update stats.go

* flush cache to update stats in listing

* Change function name

* Update stats.go

* Update stats.go

* fix travis

* Update view.jet.html

* Update stats.go

* Update stats.go

* Update stats.go

* Update stats.go

* Update stats.go
2017-10-06 17:06:14 +02:00