* [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.
* 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 amount of torrents shown in user profile
* Additional routes for user search
* Handler for user not found page
* User not found error page, with input to search username
* Move theme css in their own folder
* Delete g.css
* Delete classic.css
* Delete classic_colors.css
* Delete tomorrow.css
* Delete bg-body.png
* Delete bg-header-tile.png
* Delete s_bg-header-tile.png
* Change path used by stylesheet in html head
* Change theme path used by JS theme changers
* Update user_not_found.jet.html
* Update CHANGELOG.md
* Update en-us.all.json
* fix ad scrolling
* remove useless stuff
* fix travis & json file
* fix travis again
* remove duplicate
* Update CHANGELOG.md
* Writing an username instead of an userid in userprofile URL will no longer return the Anonymous profile
* redirect to username search instead of rendering a template without checking if username exists
* Styling for new "Search from user" input in profile
* new "Search from this user" input
* Add RSS link on user profile
* fix rss icon being misaligned
* start comment count at 1 instead of 0
* fix misalignement of category in refine in japanese
* Add new routes for user search
* Update torrents.jet.html
* add translation string
* Update en-us.all.json
* Update CHANGELOG.md
* remove margin-right of torrent button icon
* Add /username/XXX/Search route
* /username/XXX route doesn't redirect anymore
* 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
* 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
* 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
* 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