{% extends "base.html" %}

{% block title %}Add show{% endblock %}

{% block container %}
<div class="page-header">
    <h1>Add show</h1>
</div>
<div class="row-fluid">
    <div class="span6">
        <div class="white-panel">
            <h2>New show</h2>
            <p>For shows that you haven't downloaded yet, this option finds a show on theTVDB.com, creates a directory for its episodes, and adds it to Sick Beard.</p>
            
            <hr class="greybar"/>
            <a class="btn btn-large" href="/show/add/new/">Add new show</a>
        </div>
    </div>
    <div class="span6">
        <div class="white-panel">
            <h2>Existing show</h2>
            <p>Use this option to add shows that already have a folder created on your hard drive. Joan will scan your existing metadata/episodes and add the show accordingly.</p>

            <hr class="greybar"/>
            <a id="id_browse" class="btn btn-large"  href="/show/add/existing/">Add existing show</a>

        </div>
    </div>
  
</div>

{% include "modal_browse.html" %}

{% endblock %}

{% block script %}
<script>

$('#id_browse').on('click',function(e){
    e.preventDefault();
    filePicker({ 
            startPath : '', 
            show : true
        }, 
        function(folder){ 
            window.location = '/show/add/existing/?folder=' + encodeURIComponent(folder);
        }
    );
});
</script>    
{% endblock %}