2017-05-12 20:51:49 +02:00
|
|
|
{% extends "layout.html" %}
|
|
|
|
{% block title %}Upload Torrent :: {{ config.SITE_NAME }}{% endblock %}
|
2017-05-26 01:03:59 +03:00
|
|
|
{% block metatags %}
|
|
|
|
<meta property="og:description" content="Upload a torrent to {{ config.SITE_NAME }}">
|
|
|
|
{% endblock %}
|
2017-05-12 20:51:49 +02:00
|
|
|
{% block body %}
|
|
|
|
{% from "_formhelpers.html" import render_field %}
|
|
|
|
{% from "_formhelpers.html" import render_upload %}
|
2017-05-14 14:55:40 +10:00
|
|
|
{% from "_formhelpers.html" import render_markdown_editor %}
|
2017-05-12 20:51:49 +02:00
|
|
|
|
|
|
|
<h1>Upload Torrent</h1>
|
|
|
|
|
2017-05-18 15:09:35 +02:00
|
|
|
{% if not g.user %}
|
2017-05-12 20:51:49 +02:00
|
|
|
<p>You are not logged in, and are uploading anonymously.</p>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2017-05-17 19:48:34 +03:00
|
|
|
<div id="upload-drop-zone"><span>Drop here!</span></div>
|
2017-05-12 20:51:49 +02:00
|
|
|
<form method="POST" enctype="multipart/form-data">
|
2017-05-22 16:28:06 +03:00
|
|
|
{{ upload_form.csrf_token }}
|
|
|
|
|
2017-07-24 15:46:39 +02:00
|
|
|
{% if config.ENFORCE_MAIN_ANNOUNCE_URL %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10">
|
|
|
|
<div class="alert alert-info" role="alert">
|
|
|
|
<p><strong>Important:</strong> Please include <kbd>{{ config.MAIN_ANNOUNCE_URL }}</kbd> in your trackers</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-10">
|
|
|
|
<div class="alert alert-warning" role="alert">
|
|
|
|
<p>Make sure you've read <a href="{{ url_for('site_rules') }}">
|
|
|
|
the rules</a> before uploading your torrent.</p>
|
|
|
|
<p><strong>Only upload torrents for content that originates
|
|
|
|
from and/or is specific to China, Japan, and/or Korea.</strong></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-12 20:51:49 +02:00
|
|
|
<div class="row">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-10">
|
2017-05-18 15:09:35 +02:00
|
|
|
{{ render_upload(upload_form.torrent_file, accept=".torrent") }}
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-6">
|
2017-05-18 15:09:35 +02:00
|
|
|
{{ render_field(upload_form.display_name, class_='form-control', placeholder='Display name') }}
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-4">
|
2017-05-18 15:09:35 +02:00
|
|
|
{{ render_field(upload_form.category, class_='form-control')}}
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-05-24 04:04:32 +00:00
|
|
|
<div class="row"></div>
|
2017-05-20 22:00:45 +03:00
|
|
|
<div class="row form-group">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-6">
|
2017-05-18 15:09:35 +02:00
|
|
|
{{ render_field(upload_form.information, class_='form-control', placeholder='Your website or IRC channel') }}
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-6">
|
2017-05-23 01:17:18 -04:00
|
|
|
<label class="control-label">Torrent flags</label><br>
|
2017-05-24 04:08:16 +00:00
|
|
|
|
2017-05-24 04:04:32 +00:00
|
|
|
<div class="btn-group" data-toggle="buttons">
|
|
|
|
<label class="btn btn-default {% if not g.user %}active disabled{% endif %}" title="Upload torrent anonymously (don't display your username)">
|
|
|
|
{{ upload_form.is_anonymous(disabled=(False if g.user else ""), checked=(False if g.user else "")) }}
|
2017-05-24 00:57:07 -04:00
|
|
|
{% if not g.user %}<span class="glyphicon glyphicon-ban-circle"></span>{% endif %}
|
2017-05-24 04:08:16 +00:00
|
|
|
{% if g.user %}<span class="glyphicon glyphicon-check"></span>{% endif %}
|
|
|
|
{% if g.user %}<span class="glyphicon glyphicon-unchecked"></span>{% endif %}
|
2017-05-24 04:04:32 +00:00
|
|
|
Anonymous
|
|
|
|
</label>
|
|
|
|
<label class="btn btn-grey" title="Hide torrent from listing">
|
|
|
|
{{ upload_form.is_hidden }}
|
2017-05-24 04:08:16 +00:00
|
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
2017-05-24 04:04:32 +00:00
|
|
|
Hidden
|
|
|
|
</label>
|
2017-05-24 11:31:29 +03:00
|
|
|
</div>
|
2017-05-24 08:37:13 +00:00
|
|
|
<div class="hidden-xl hidden-lg"><br></div>
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="btn-group" data-toggle="buttons">
|
|
|
|
|
2017-05-24 04:04:32 +00:00
|
|
|
<label class="btn btn-danger" title="This torrent is derived from another release">
|
|
|
|
{{ upload_form.is_remake }}
|
2017-05-24 04:08:16 +00:00
|
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
2017-05-24 04:04:32 +00:00
|
|
|
Remake
|
|
|
|
</label>
|
|
|
|
<label class="btn btn-warning" title="This torrent is a complete batch (eg. season)">
|
|
|
|
{{ upload_form.is_complete }}
|
2017-05-24 04:08:16 +00:00
|
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
2017-05-24 04:04:32 +00:00
|
|
|
Complete
|
|
|
|
</label>
|
|
|
|
{% if g.user.is_trusted %}
|
|
|
|
<label class="btn btn-success active" title="Mark torrent trusted">
|
|
|
|
{{ upload_form.is_trusted(checked="") }}
|
2017-05-24 04:08:16 +00:00
|
|
|
<span class="glyphicon glyphicon-check"></span>
|
|
|
|
<span class="glyphicon glyphicon-unchecked"></span>
|
2017-05-24 04:04:32 +00:00
|
|
|
Trusted
|
|
|
|
</label>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
2017-05-20 22:00:45 +03:00
|
|
|
</div>
|
2017-05-12 20:51:49 +02:00
|
|
|
<div class="row">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-12">
|
2017-05-18 15:09:35 +02:00
|
|
|
{{ render_markdown_editor(upload_form.description, field_name='description') }}
|
2017-05-12 20:51:49 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-05-18 15:09:35 +02:00
|
|
|
{% if config.USE_RECAPTCHA and not g.user %}
|
|
|
|
<div class="row">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="col-md-4">
|
2017-05-18 15:09:35 +02:00
|
|
|
{% for error in upload_form.recaptcha.errors %}
|
|
|
|
{{ error }}
|
|
|
|
{% endfor %}
|
|
|
|
{{ upload_form.recaptcha }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<br>
|
|
|
|
|
2017-05-12 20:51:49 +02:00
|
|
|
<div class="row">
|
2017-05-24 11:31:29 +03:00
|
|
|
<div class="form-group col-md-6">
|
2017-05-12 20:51:49 +02:00
|
|
|
<input type="submit" value="Upload" class="btn btn-primary">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|