* [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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Change DLSite to String
Fix#1573
Plus it seems the filtering search for ES didn't work for anidbid, vndbid and vgmdb. Should be fixed now.
* Update helpers.go
* 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
* 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