* [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.
* 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
* 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
* No API token message if no API token
* Update CHANGELOG.md
* Update en-us.all.json
* move delete user button to the right
* prettier button hovering text color [tomorrow]
* Update en-us.all.json
* use of translation strings for certain themes
* ditto
* Remove hardcoded theme name, make use of translation strings in function if it exist
* Update template_functions_test.go
* Update template_functions_test.go
* Update template_functions.go
* fix travis
* remove useless condition
* 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
* create JS domain variable
* use domain JS variable when creating cookies
* Create getDomainName() function in Go
* Update template_functions_test.go
* Update template_functions_test.go
* recreate cookie when resetCookies() is called
* Update main.css
* Update classic.css
* show "unknown" instead of "0 0 0" if stats are unknown
* don't show top ad if there's an announcement
* remove BBCode support that broke description's line breaks
* remove useless identifier
* hide error instead of fixing it
* Update markdown_test.go
* Update markdown_test.go
* css for tags in classic
* remove wrong explanation for alternating color
* fix RSS URL in header
* remove eu cookie <div> from base
* fix cookie warning never showing up
* Update main.js
* nyaa.se-like styling for upload form on classic.css
* Smaller markdown toolbar on classic upload form
* Fix indent, non-round borders for markdown & language list on classic
* Update view.jet.html
* add fillZero function
* ditto but in test
* Update view.jet.html
* add RJ prefix to dlsite link
* Update template_functions_test.go
* Update listing.jet.html
* prevent responsiveness of upload form in classic.css
* remove now useless css rule
* fix tag input padding on classic
* Update template_functions_test.go
* rollback workaround
* rollback workaround
* rollback workaround
* remove now unused function
* ditto
* Update main.css
* rollback the rollback
* fix classic.css padding
* remove </img> tag
* Update torrents.jet.html
* Fix html tag
* fix footer & ad showing over the TOS
* move setting & add it's explanation
* Update en-us.all.json
* include nav in listing directly instead of refine
* Update search.jet.html
* remove now useless css rules
* Update main.css
* Update base.jet.html
* exclude old navigation cookie from deletion
* add torrent uploaded total size to user profile
* 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
* Update view.jet.html
* Update en-us.all.json
* Update view.jet.html
* Update CHANGELOG.md
* fix travis
* Update classic.css
* Update view.jet.html
* Update main.css
* Update classic.css
* Update classic.css
* Update classic.css
* add link to user page & avatar in comment
* stylisation for avatar in main.css
* Update classic.css
* Fix wrongly placed ::before
* Add rule list to terms of service
* import rules on register
* fix refine-container-2's inputs
* Update base.jet.html
* Update en-us.all.json
* Update CHANGELOG.md
* GenNav changes to constantly put HTML for nav arrows regardless of page
* css changes for website nav etc etc
* add OldNav global variable
* Add OldNav to test.go
* Update publicSettings.go
* change OldNav's value type
* Old navigation in settings
* add OldNav in user variables
* add oldNav input handler in settings.go
* Change OldNav's default value into false
* Create OldNav.jet.html
* Update search.jet.html
* remove character that had nothing to do here
* fix wrong variable name
* fix worng variable name and travis
* Update classic.css
* Add sort order & type to old nav
* add toString() function in test
* add toString() function
* translation string for oldnav setting
* Use translation string in settings.jet.html
* fix few html errors
* ditto
* travis fix test
* remove useless charset
* remove useless things
* add spaces before attributes
* attempt at fixing travis 2
* fix wrong variable name
* Update classic.css
* fix travis plsss
* Add torrentFileExists function
* If torrent file doesn't exist, put torrent download button opacity at 50%
* ditto for listing
* Forgot an if
* attempt at fixing travis by adding function into test templates
* Attempt at fixing travis by having sex with my own mother
* fix wrong error message
* Add torrentFileExists as global function
* Update template_functions.go
* Template rafactor
Now templates go files are in /templates in a templates package. Controllers only have controller files
* Fix template test. Forgot I moved ReassignForm