{{ extends "layouts/index_site" }} {{ import "layouts/partials/helpers/csrf" }} {{ import "layouts/partials/helpers/captcha" }} {{ import "layouts/partials/helpers/errors" }} {{ import "layouts/partials/helpers/tags" }} {{ import "layouts/partials/helpers/treeview" }} {{ import "layouts/partials/helpers/tag_form" }} {{block title()}}{{Torrent.Name}}{{end}} {{block content_body()}}

{{Torrent.Name}}


{{if Torrent.UploaderID == 0}} {{end}} {{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }} {{end}} {{ if Torrent.AnidbID > 0 || Torrent.VndbID > 0 || Torrent.VgmdbID > 0 || Torrent.Dlsite != "" }} {{ end }} {{ if len(Torrent.AcceptedTags) > 0 }} {{end}} {* if tags are not accepted and user is not logged, we don't display them *} {{ if User.ID > 0 }} {{ end }} {{ if Torrent.VideoQuality != "" }} {{ end }}
{{ T("category") }}: {{ CategoryName(Torrent.Category, Torrent.SubCategory) == "" ? T("unknown") : T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}
{{ T("uploaded_by") }}:{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }} {{else}}
{{ T("website_link") }}: {{if Torrent.WebsiteLink != ""}}{{Torrent.WebsiteLink}} {{else}}N/A{{end}}
{{ T("hash")}}: {{Torrent.Hash}}
{{ T("size")}}: {{ fileSize(Torrent.Filesize, T, true) }}
{{ T("torrent_language")}}: {{ range _, language := Torrent.Languages}} {{ if language != "" }} 5 }}class="big"{{ end }}> {{ LanguageNameFromCode(language, T) }} {{ LanguageNameFromCode(language, T) }} {{end}} {{end}}
{{ T("related_to") }} {{ if Torrent.AnidbID > 0 }} {{ T("tagtype_anidbid") }}: {{ Torrent.AnidbID }} {{end}} {{ if Torrent.VndbID > 0 }} {{ T("tagtype_vndbid") }}: {{ Torrent.VndbID }} {{end}} {{ if Torrent.VgmdbID > 0 }} {{ T("tagtype_vgmdbid") }}: {{ Torrent.VgmdbID }} {{end}} {{ if Torrent.Dlsite != "" }} {{ T("tagtype_dlsite") }}: {{ Torrent.Dlsite }} {{end}}
{{ T("accepted_tags")}}: {{ range Torrent.AcceptedTags }} {{ yield tag(tag=., accepted=true, torrentID=Torrent.ID) }} {{end}}
{{ T("recommended_tags")}}: {{ range Torrent.Tags }} {{ yield tag(tag=., accepted=false, torrentID=Torrent.ID) }} {{end}} {{ T("complement") }}
{{ T("tagtype_videoquality") }}: {{ T("tagvalue_"+Torrent.VideoQuality) }}
{{ T("date") }}: {{formatDate(Torrent.FullDate, false)}}
{{ T("seeders")}}: {{if Torrent.StatsObsolete[0] }}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}
{{ T("leechers")}}: {{if Torrent.StatsObsolete[0] }}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}
{{ T("completed")}}: {{if Torrent.StatsObsolete[0] }}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}}
{{ T("last_scraped")}} {{formatDate(Torrent.LastScrape, false)}}{{else}}">{{ T("unknown")}}{{end}}
{{ T("magnet_link")}}
{{ T("torrent_file")}}
{{ T("report_btn") }} {{ if User.ID > 0}} {{ if User.HasAdmin()}}
{{ yield csrf_field()}}
{{ T("edit") }} {{ else if User.CurrentUserIdentical(Torrent.UploaderID) }}
{{ yield csrf_field()}}
{{ T("edit") }} {{end}} {{end}}

{{ T("description")}}

{{ if Torrent.Description != ""}}
{{Torrent.Description|raw}}
{{else}}

{{ T("no_description") }}

{{end}} 0}}checked{{end}}/>
{{ if len(Torrent.FileList) > 0 }} {{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, "root")) }} {{else}} {{end}}
{{ T("file_name")}} {{ T("size")}}
{{ T("no_files") }}

{{ T("comments")}}

{{idx := 1}} {{previousComment := ""}} {{previousUser := 0}} {{range index, element := Torrent.Comments}} {{if previousComment != element.Content || previousUser != element.UserID}}
{{idx}} {{formatDate(element.Date, false)}} {{if element.UserID > 0}}{{element.Username}}{{if element.UserStatus != ""}}{{T(element.UserStatus)}}{{end}}{{else}} れんちょん{{end}}
{{element.Content|raw}}
{{idx = idx + 1}} {{end}} {{previousComment = element.Content}} {{previousUser = element.UserID}} {{end}} {{ if len(Torrent.Comments) == 0 }}

{{ T("torrent_no_comments") }}

{{ end }}
{{ yield csrf_field()}}

{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}

{{T("comment_markdown_notice")}}

{{ yield captcha(captchaid=CaptchaID)}}
{{if User.ID > 0}}{{end}}
{{ if User.ID > 0 }} {{end}} {{end}} {{ block footer_js()}} {{ if User.ID > 0 }} {{end}} {{end}}