<commit_before><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Torrent Manager</title>

    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="assets/fontawesome/css/font-awesome.min.css" />
    <link rel="stylesheet" href="assets/alertify/alertify.core.css" />
    <link rel="stylesheet" href="assets/alertify/alertify.default.css" />

    <script data-pace-options='{ "ajax": true }' src="assets/pacejs/pace.min.js"></script>
    <link rel="stylesheet" href="assets/pacejs/corner-indicator.css" />
</head>
<body>
    <script type="text/x-handlebars">
        <nav class="navbar navbar-default" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Torrent Manager</a>
            </div>

            <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li>{{#link-to 'file-manager'}}File Manager{{/link-to}}</li>
                    <li>{{#link-to 'download-manager'}}Download Manager{{/link-to}}</li>
                    <li>{{#link-to 'torrent-search'}}Torrent Search{{/link-to}}</li>
                    <li>{{#link-to 'subtitle-search'}}Subtitle Search{{/link-to}}</li>
                </ul>
            </div>
        </nav>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    {{ outlet }}
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="upload-from-url">
        <div class="modal fade" id="upload-from-url-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Upload From Url</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="url" value=url class="form-control" placeholder="Url"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "upload"}}>Upload</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="create-folder">
        <div class="modal fade" id="create-folder-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Create Folder</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="text" value=folder class="form-control" placeholder="Folder"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "create"}}>Create</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="rename">
        <div class="modal fade" id="rename-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Rename Folder</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="text" value=newPath class="form-control" placeholder="Name"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "rename"}}>Rename</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="file-manager">
        {{render 'upload-from-url'}}
        {{render 'create-folder'}}
        {{render 'rename'}}

        <div style="margin-bottom: 10px;">
            <ol class="breadcrumb">
                <li><a href="javascript:;" {{action 'cd' '/'}}>Root</a></li>
                {{#each breadcrumbs}}
                    <li></li>
                    <li><a href="javascript:;" {{action 'cd' path}}>{{unbound name}}</a></li>
                {{/each}}
            </ol>
        </div>
        <div style="margin-bottom: 10px;">
            <div class="btn-group">
                <button type="button" data-toggle="modal" data-target="#create-folder-modal" class="btn btn-default btn-sm"><span class="fa fa-folder"></span> Create Folder</button>
                {{#if moveFile}}
                    <button type="button" {{action 'move'}} class="btn btn-success btn-sm"><span class="fa fa-briefcase"></span> Move Here</button>
                    <button type="button" {{action 'unsetMoveFile'}} class="btn btn-danger btn-sm"><span class="fa fa-briefcase"></span> Cancel Move</button>
                {{/if}}
                <button type="button" data-toggle="modal" data-target="#upload-from-url-modal" class="btn btn-default btn-sm"><span class="fa fa-upload"></span> Upload From Url</button>
            </div>
        </div>
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th style="width: 30px"></th>
                    <th>Name</th>
                    <th style="width: 120px;">Size</th>
                </tr>
            </thead>
            <tbody>
                {{#each folders}}
                    {{render "path-folder-item" this}}
                {{/each}}
                {{#each files}}
                    {{render "path-item" this}}
                {{/each}}
            </tbody>
        </table>
    </script>

    <script type="text/x-handlebars" id="path-folder-item">
        <tr>
            <td><span class="fa fa-folder"></span></td>
            <td>
                {{name}}
                <div style="margin-top: 10px;">
                    {{#unless isMoveFile}}
                        <a href="javascript:;" {{action 'cd'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-folder-open-o"></span> Open</a>
                    {{/unless}}
                    <a href="javascript:;" {{action 'rename'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-edit"></span> Rename</a>
                    <a href="javascript:;" {{action 'unlink'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-trash-o"></span> Remove</a>
                    {{#if isMoveFile}}
                        <a href="javascript:;" {{action 'unsetMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Cancel Move</a>
                    {{else}}
                        <a href="javascript:;" {{action 'setMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Move</a>
                    {{/if}}
                    <div class="clearfix"></div>
                </div>
            </td>
            <td>{{totalSize}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="path-item">
        <tr>
            <td><span class="fa fa-file"></span></td>
            <td>
                {{name}}
                <div style="margin-top: 10px;">
                    <a href="/api/v1/download?path={{unbound path}}" target="_blank" class="pull-left" style="margin-right: 10px;"><span class="fa fa-download"></span> Download</a>
                    <a href="javascript:;" {{action 'rename'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-edit"></span> Rename</a>
                    <a href="javascript:;" {{action 'unlink'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-trash-o"></span> Remove</a>
                    {{#if isMoveFile}}
                        <a href="javascript:;" {{action 'unsetMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Cancel Move</a>
                    {{else}}
                        <a href="javascript:;" {{action 'setMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Move</a>
                    {{/if}}

                    {{#if isVideo}}
                        <a href="javascript:;" {{action 'watch' path contentType}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-video-camera"></span> Watch</a>
                    {{/if}}

                    {{#if isSubtitle}}
                        {{#if isSelectedSubtitle}}
                            <a href="javascript:;" class="pull-left" {{action 'unsetSubtitle'}}><span class="fa fa-bars"></span> Unset Subtitle</a>
                        {{else}}
                            <a href="javascript:;" class="pull-left" {{action 'setSubtitle'}}><span class="fa fa-bars"></span> Set Subtitle</a>
                        {{/if}}
                        <div class="clearfix"></div>
                    {{/if}}

                    {{#if isArchive}}
                        <a href="javascript:;" class="pull-left" {{action 'extract'}}><span class="fa fa-archive"></span> Extract</a>
                    {{/if}}

                    <div class="clearfix"></div>
                </div>
            </td>
            <td>{{size}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="video">
        <div style="text-align:center; width: 100%; height:100%;">
            <video controls width="640px" height="480px">
                {{#if subtitle}}
                    <track kind="subtitles" label="{{unbound subtitle.name}}" src="/api/v1/subtitle{{unbound subtitle.path}}" default></track>
                {{/if}}
                <source src="/api/v1/stream?path={{unbound path}}" type="{{unbound contentType}}" />
            </video>
        </div>
    </script>

    <script type="text/x-handlebars" id="torrent-search">
        <div style="margin-bottom: 20px;">
            <form>
                <div class="from-group">
                    <div class="input-group">
                        {{input action="search" type="text" value=search class="form-control"}}
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" {{action 'clearPageAndSearch'}}><span class="fa fa-search"></span> Ara</button>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div style="float: left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=fields optionValuePath="content.key" optionLabelPath="content.name" value=field class="form-control"}}
                    </div>
                    <div style="float: left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=order_list optionValuePath="content.key" optionLabelPath="content.name" value=order class="form-control"}}
                    </div>
                    <div style="float: left;margin-top:5px; width: 150px;">
                        {{view Ember.Select content=categories optionValuePath="content.key" optionLabelPath="content.name" value=category class="form-control"}}
                    </div>
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>

        <table class="table table-bordered table-striped table-hover">
            <thead>
            <tr>
                <th>Name</th>
                <th style="width: 50px;">SE</th>
                <th style="width: 50px;">LE</th>
            </tr>
            </thead>
            <tbody>
            {{#each torrents}}
                {{render "torrent-search-item" this}}
            {{/each}}
            </tbody>
        </table>

        <div style="margin: 10px 0;">
            Page : {{page}}
            <ul class="pager">
                <li><a href="javascript:;" {{action 'prevPage'}}>Previous</a></li>
                <li><a href="javascript:;" {{action 'nextPage'}}>Next</a></li>
            </ul>
        </div>
    </script>

    <script type="text/x-handlebars" id="torrent-search-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top:10px;">
                    <a href="javascript:;" {{action 'start'}}>Start Download</a> -
                    <a href="javascript:;" {{action 'showFiles'}}>Show Files</a> -
                    {{size}} - {{date}}
                </div>
                <div style="margin-top:10px">
                    {{{html}}}
                </div>
            </td>
            <td>{{seeders}}</td>
            <td>{{leechers}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="subtitle-search">
        <div style="margin-bottom: 20px;">
            <form>
                <div class="from-group">
                    <div class="input-group">
                        {{input action="search" type="text" value=search class="form-control"}}
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" {{action 'clearPageAndSearch'}}><span class="fa fa-search"></span> Ara</button>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div style="float:left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=ISOLang optionValuePath="content.key" optionLabelPath="content.name" value=language class="form-control"}}
                    </div>
                    <div style="float:left;margin-top:5px; width: 150px;">
                        {{view Ember.Select content=sources optionValuePath="content.key" optionLabelPath="content.name" value=source class="form-control"}}
                    </div>
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>

        <table class="table table-bordered table-striped table-hover">
            <thead>
            <tr>
                <th>Name</th>
            </tr>
            </thead>
            <tbody>
            {{#each subtitles}}
                {{render "subtitle-search-item" this}}
            {{/each}}
            </tbody>
        </table>

        <div style="margin: 10px 0;">
            Page : {{page}}
            <ul class="pager">
                <li><a href="javascript:;" {{action 'prevPage'}}>Previous</a></li>
                <li><a href="javascript:;" {{action 'nextPage'}}>Next</a></li>
            </ul>
        </div>
    </script>

    <script type="text/x-handlebars" id="subtitle-search-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top: 10px; font-size: 11px;">
                    <span class="pull-left" style="margin-right:10px;"><strong>Movie Year</strong>: {{year}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Type</strong>: {{movieKind}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Season</strong>: {{seriesSeason}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Episode</strong>: {{seriesEpisode}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Latest Update</strong>: {{latestUpdate}}</span>
                    <a href="javascript:;" class="pull-left" {{action 'uploadFile'}}>Upload</a>
                    <div class="clearfix"></div>
                </div>
            </td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="download-manager">
        <div style="margin: 10px 0">
            <a href="javascript:;" {{action 'refresh'}}>Refresh</a>
        </div>
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>Name</th>
                </tr>
            </thead>
            <tbody>
                {{#each torrents}}
                    {{render "download-manager-item" this}}
                {{/each}}
            </tbody>
        </table>
    </script>

    <script type="text/x-handlebars" id="download-manager-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top: 10px; font-size: 11px;">
                    <span class="pull-left" style="margin-right:10px;"><strong>Size</strong>: {{totalSize}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Status</strong>: {{status}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Completed</strong>: %{{percentDone}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Downloaded</strong>: {{downloaded}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Upload Peers</strong>: {{peersGettingFromUs}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Download Peers</strong>: {{peersSendingToUs}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>ETA</strong>: {{eta}}</span>
                    <div class="clearfix"></div>
                </div>
                <div style="margin-top: 10px;">
                    {{#if isStopped}}
                        <a href="javascript:;" {{action 'start'}} style="margin-right: 10px;">Start</a>
                    {{else}}
                        <a href="javascript:;" {{action 'stop'}} style="margin-right: 10px;">Stop</a>
                    {{/if}}
                    <a href="javascript:;" {{action 'remove'}} style="margin-right: 10px;">Remove</a>
                    <div class="clearfix"></div>
                </div>
            </td>
        </tr>
    </script>

    <script src="lib/underscore-min.js"></script>
    <script src="lib/jquery-2.1.0.min.js"></script>
    <script src="assets/alertify/alertify.js"></script>
    <script src="assets/bootstrap/js/bootstrap.min.js"></script>

    <script src="lib/handlebars-v1.3.0.js"></script>
    <script src="lib/ember-1.5.0.js"></script>

    <script src="isolang.js"></script>
    <script src="app.js"></script>
</body>
</html>
<commit_msg>meta viewport<commit_after><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Torrent Manager</title>

    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="assets/fontawesome/css/font-awesome.min.css" />
    <link rel="stylesheet" href="assets/alertify/alertify.core.css" />
    <link rel="stylesheet" href="assets/alertify/alertify.default.css" />

    <script data-pace-options='{ "ajax": true }' src="assets/pacejs/pace.min.js"></script>
    <link rel="stylesheet" href="assets/pacejs/corner-indicator.css" />
</head>
<body>
    <script type="text/x-handlebars">
        <nav class="navbar navbar-default" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Torrent Manager</a>
            </div>

            <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li>{{#link-to 'file-manager'}}File Manager{{/link-to}}</li>
                    <li>{{#link-to 'download-manager'}}Download Manager{{/link-to}}</li>
                    <li>{{#link-to 'torrent-search'}}Torrent Search{{/link-to}}</li>
                    <li>{{#link-to 'subtitle-search'}}Subtitle Search{{/link-to}}</li>
                </ul>
            </div>
        </nav>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    {{ outlet }}
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="upload-from-url">
        <div class="modal fade" id="upload-from-url-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Upload From Url</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="url" value=url class="form-control" placeholder="Url"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "upload"}}>Upload</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="create-folder">
        <div class="modal fade" id="create-folder-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Create Folder</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="text" value=folder class="form-control" placeholder="Folder"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "create"}}>Create</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="rename">
        <div class="modal fade" id="rename-modal">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Rename Folder</h4>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            {{input type="text" value=newPath class="form-control" placeholder="Name"}}
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" {{action "rename"}}>Rename</button>
                    </div>
                </div>
            </div>
        </div>
    </script>

    <script type="text/x-handlebars" id="file-manager">
        {{render 'upload-from-url'}}
        {{render 'create-folder'}}
        {{render 'rename'}}

        <div style="margin-bottom: 10px;">
            <ol class="breadcrumb">
                <li><a href="javascript:;" {{action 'cd' '/'}}>Root</a></li>
                {{#each breadcrumbs}}
                    <li></li>
                    <li><a href="javascript:;" {{action 'cd' path}}>{{unbound name}}</a></li>
                {{/each}}
            </ol>
        </div>
        <div style="margin-bottom: 10px;">
            <div class="btn-group">
                <button type="button" data-toggle="modal" data-target="#create-folder-modal" class="btn btn-default btn-sm"><span class="fa fa-folder"></span> Create Folder</button>
                {{#if moveFile}}
                    <button type="button" {{action 'move'}} class="btn btn-success btn-sm"><span class="fa fa-briefcase"></span> Move Here</button>
                    <button type="button" {{action 'unsetMoveFile'}} class="btn btn-danger btn-sm"><span class="fa fa-briefcase"></span> Cancel Move</button>
                {{/if}}
                <button type="button" data-toggle="modal" data-target="#upload-from-url-modal" class="btn btn-default btn-sm"><span class="fa fa-upload"></span> Upload From Url</button>
            </div>
        </div>
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th style="width: 30px"></th>
                    <th>Name</th>
                    <th style="width: 120px;">Size</th>
                </tr>
            </thead>
            <tbody>
                {{#each folders}}
                    {{render "path-folder-item" this}}
                {{/each}}
                {{#each files}}
                    {{render "path-item" this}}
                {{/each}}
            </tbody>
        </table>
    </script>

    <script type="text/x-handlebars" id="path-folder-item">
        <tr>
            <td><span class="fa fa-folder"></span></td>
            <td>
                {{name}}
                <div style="margin-top: 10px;">
                    {{#unless isMoveFile}}
                        <a href="javascript:;" {{action 'cd'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-folder-open-o"></span> Open</a>
                    {{/unless}}
                    <a href="javascript:;" {{action 'rename'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-edit"></span> Rename</a>
                    <a href="javascript:;" {{action 'unlink'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-trash-o"></span> Remove</a>
                    {{#if isMoveFile}}
                        <a href="javascript:;" {{action 'unsetMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Cancel Move</a>
                    {{else}}
                        <a href="javascript:;" {{action 'setMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Move</a>
                    {{/if}}
                    <div class="clearfix"></div>
                </div>
            </td>
            <td>{{totalSize}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="path-item">
        <tr>
            <td><span class="fa fa-file"></span></td>
            <td>
                {{name}}
                <div style="margin-top: 10px;">
                    <a href="/api/v1/download?path={{unbound path}}" target="_blank" class="pull-left" style="margin-right: 10px;"><span class="fa fa-download"></span> Download</a>
                    <a href="javascript:;" {{action 'rename'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-edit"></span> Rename</a>
                    <a href="javascript:;" {{action 'unlink'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-trash-o"></span> Remove</a>
                    {{#if isMoveFile}}
                        <a href="javascript:;" {{action 'unsetMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Cancel Move</a>
                    {{else}}
                        <a href="javascript:;" {{action 'setMoveFile'}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-briefcase"></span> Move</a>
                    {{/if}}

                    {{#if isVideo}}
                        <a href="javascript:;" {{action 'watch' path contentType}} class="pull-left" style="margin-right: 10px;"><span class="fa fa-video-camera"></span> Watch</a>
                    {{/if}}

                    {{#if isSubtitle}}
                        {{#if isSelectedSubtitle}}
                            <a href="javascript:;" class="pull-left" {{action 'unsetSubtitle'}}><span class="fa fa-bars"></span> Unset Subtitle</a>
                        {{else}}
                            <a href="javascript:;" class="pull-left" {{action 'setSubtitle'}}><span class="fa fa-bars"></span> Set Subtitle</a>
                        {{/if}}
                        <div class="clearfix"></div>
                    {{/if}}

                    {{#if isArchive}}
                        <a href="javascript:;" class="pull-left" {{action 'extract'}}><span class="fa fa-archive"></span> Extract</a>
                    {{/if}}

                    <div class="clearfix"></div>
                </div>
            </td>
            <td>{{size}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="video">
        <div style="text-align:center; width: 100%; height:100%;">
            <video controls width="640px" height="480px">
                {{#if subtitle}}
                    <track kind="subtitles" label="{{unbound subtitle.name}}" src="/api/v1/subtitle{{unbound subtitle.path}}" default></track>
                {{/if}}
                <source src="/api/v1/stream?path={{unbound path}}" type="{{unbound contentType}}" />
            </video>
        </div>
    </script>

    <script type="text/x-handlebars" id="torrent-search">
        <div style="margin-bottom: 20px;">
            <form>
                <div class="from-group">
                    <div class="input-group">
                        {{input action="search" type="text" value=search class="form-control"}}
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" {{action 'clearPageAndSearch'}}><span class="fa fa-search"></span> Ara</button>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div style="float: left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=fields optionValuePath="content.key" optionLabelPath="content.name" value=field class="form-control"}}
                    </div>
                    <div style="float: left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=order_list optionValuePath="content.key" optionLabelPath="content.name" value=order class="form-control"}}
                    </div>
                    <div style="float: left;margin-top:5px; width: 150px;">
                        {{view Ember.Select content=categories optionValuePath="content.key" optionLabelPath="content.name" value=category class="form-control"}}
                    </div>
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>

        <table class="table table-bordered table-striped table-hover">
            <thead>
            <tr>
                <th>Name</th>
                <th style="width: 50px;">SE</th>
                <th style="width: 50px;">LE</th>
            </tr>
            </thead>
            <tbody>
            {{#each torrents}}
                {{render "torrent-search-item" this}}
            {{/each}}
            </tbody>
        </table>

        <div style="margin: 10px 0;">
            Page : {{page}}
            <ul class="pager">
                <li><a href="javascript:;" {{action 'prevPage'}}>Previous</a></li>
                <li><a href="javascript:;" {{action 'nextPage'}}>Next</a></li>
            </ul>
        </div>
    </script>

    <script type="text/x-handlebars" id="torrent-search-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top:10px;">
                    <a href="javascript:;" {{action 'start'}}>Start Download</a> -
                    <a href="javascript:;" {{action 'showFiles'}}>Show Files</a> -
                    {{size}} - {{date}}
                </div>
                <div style="margin-top:10px">
                    {{{html}}}
                </div>
            </td>
            <td>{{seeders}}</td>
            <td>{{leechers}}</td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="subtitle-search">
        <div style="margin-bottom: 20px;">
            <form>
                <div class="from-group">
                    <div class="input-group">
                        {{input action="search" type="text" value=search class="form-control"}}
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" {{action 'clearPageAndSearch'}}><span class="fa fa-search"></span> Ara</button>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div style="float:left;margin-top:5px; width: 150px;margin-right: 10px;">
                        {{view Ember.Select content=ISOLang optionValuePath="content.key" optionLabelPath="content.name" value=language class="form-control"}}
                    </div>
                    <div style="float:left;margin-top:5px; width: 150px;">
                        {{view Ember.Select content=sources optionValuePath="content.key" optionLabelPath="content.name" value=source class="form-control"}}
                    </div>
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>

        <table class="table table-bordered table-striped table-hover">
            <thead>
            <tr>
                <th>Name</th>
            </tr>
            </thead>
            <tbody>
            {{#each subtitles}}
                {{render "subtitle-search-item" this}}
            {{/each}}
            </tbody>
        </table>

        <div style="margin: 10px 0;">
            Page : {{page}}
            <ul class="pager">
                <li><a href="javascript:;" {{action 'prevPage'}}>Previous</a></li>
                <li><a href="javascript:;" {{action 'nextPage'}}>Next</a></li>
            </ul>
        </div>
    </script>

    <script type="text/x-handlebars" id="subtitle-search-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top: 10px; font-size: 11px;">
                    <span class="pull-left" style="margin-right:10px;"><strong>Movie Year</strong>: {{year}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Type</strong>: {{movieKind}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Season</strong>: {{seriesSeason}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Episode</strong>: {{seriesEpisode}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Latest Update</strong>: {{latestUpdate}}</span>
                    <a href="javascript:;" class="pull-left" {{action 'uploadFile'}}>Upload</a>
                    <div class="clearfix"></div>
                </div>
            </td>
        </tr>
    </script>

    <script type="text/x-handlebars" id="download-manager">
        <div style="margin: 10px 0">
            <a href="javascript:;" {{action 'refresh'}}>Refresh</a>
        </div>
        <table class="table table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>Name</th>
                </tr>
            </thead>
            <tbody>
                {{#each torrents}}
                    {{render "download-manager-item" this}}
                {{/each}}
            </tbody>
        </table>
    </script>

    <script type="text/x-handlebars" id="download-manager-item">
        <tr>
            <td>
                <strong>{{name}}</strong>
                <div style="margin-top: 10px; font-size: 11px;">
                    <span class="pull-left" style="margin-right:10px;"><strong>Size</strong>: {{totalSize}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Status</strong>: {{status}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Completed</strong>: %{{percentDone}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Downloaded</strong>: {{downloaded}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Upload Peers</strong>: {{peersGettingFromUs}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>Download Peers</strong>: {{peersSendingToUs}}</span>
                    <span class="pull-left" style="margin-right:10px;"><strong>ETA</strong>: {{eta}}</span>
                    <div class="clearfix"></div>
                </div>
                <div style="margin-top: 10px;">
                    {{#if isStopped}}
                        <a href="javascript:;" {{action 'start'}} style="margin-right: 10px;">Start</a>
                    {{else}}
                        <a href="javascript:;" {{action 'stop'}} style="margin-right: 10px;">Stop</a>
                    {{/if}}
                    <a href="javascript:;" {{action 'remove'}} style="margin-right: 10px;">Remove</a>
                    <div class="clearfix"></div>
                </div>
            </td>
        </tr>
    </script>

    <script src="lib/underscore-min.js"></script>
    <script src="lib/jquery-2.1.0.min.js"></script>
    <script src="assets/alertify/alertify.js"></script>
    <script src="assets/bootstrap/js/bootstrap.min.js"></script>

    <script src="lib/handlebars-v1.3.0.js"></script>
    <script src="lib/ember-1.5.0.js"></script>

    <script src="isolang.js"></script>
    <script src="app.js"></script>
</body>
</html>

{'fraction_non_alphanumeric': 0.17717039379564792, 'fraction_numerical': 0.007855834149034962, 'mean_word_length': 1.6787683205593653, 'pattern_counts': {'":': 2, '<': 1023, '<?xml version=': 0, '>': 1023, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3901739', 'n_tokens_mistral': 11699, 'n_tokens_neox': 10764, 'n_words': 2050}