mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-05 02:43:37 +00:00
0d9fbc1ad7
This version of SickBeard uses both TVDB and TVRage to search and gather it's series data from allowing you to now have access to and download shows that you couldn't before because of being locked into only what TheTVDB had to offer. Also this edition is based off the code we used in our XEM editon so it does come with scene numbering support as well as all the other features our XEM edition has to offer. Please before using this with your existing database (sickbeard.db) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present, we HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk! Enjoy!
78 lines
No EOL
2.4 KiB
JavaScript
78 lines
No EOL
2.4 KiB
JavaScript
$(document).ready(function() {
|
|
|
|
$('#checkAll').live('click', function(){
|
|
|
|
var seasCheck = this;
|
|
|
|
$('.dirCheck').each(function(){
|
|
this.checked = seasCheck.checked;
|
|
});
|
|
});
|
|
|
|
$('#submitShowDirs').click(function(){
|
|
|
|
var dirArr = new Array();
|
|
|
|
$('.dirCheck').each(function(i,w) {
|
|
if (this.checked == true) {
|
|
var show = $(this).attr('id');
|
|
var indexer = $(this).closest('tr').find('select').val();
|
|
dirArr.push(encodeURIComponent(indexer + '|' + show));
|
|
}
|
|
});
|
|
|
|
if (dirArr.length == 0)
|
|
return false;
|
|
|
|
url = sbRoot+'/home/addShows/addExistingShows?promptForSettings='+ ($('#promptForSettings').prop('checked') ? 'on' : 'off');
|
|
|
|
url += '&shows_to_add='+dirArr.join('&shows_to_add=');
|
|
|
|
window.location.href = url;
|
|
});
|
|
|
|
|
|
function loadContent() {
|
|
var url = '';
|
|
$('.dir_check').each(function(i,w){
|
|
if ($(w).is(':checked')) {
|
|
if (url.length)
|
|
url += '&'
|
|
url += 'rootDir=' + encodeURIComponent($(w).attr('id'));
|
|
}
|
|
});
|
|
|
|
$('#tableDiv').html('<img id="searchingAnim" src="'+sbRoot+'/images/loading32.gif" height="32" width="32" /> loading folders...');
|
|
$.get(sbRoot+'/home/addShows/massAddTable', url, function(data) {
|
|
$('#tableDiv').html(data);
|
|
$("#addRootDirTable").tablesorter({
|
|
//sortList: [[1,0]],
|
|
widgets: ['zebra'],
|
|
headers: {
|
|
0: { sorter: false }
|
|
}
|
|
});
|
|
});
|
|
|
|
}
|
|
|
|
var last_txt = '';
|
|
$('#rootDirText').change(function() {
|
|
if (last_txt == $('#rootDirText').val())
|
|
return false;
|
|
else
|
|
last_txt = $('#rootDirText').val();
|
|
$('#rootDirStaticList').html('');
|
|
$('#rootDirs option').each(function(i, w) {
|
|
$('#rootDirStaticList').append('<li class="ui-state-default ui-corner-all"><input type="checkbox" class="dir_check" id="'+$(w).val()+'" checked=checked> <label for="'+$(w).val()+'" style="color:black;"><b>'+$(w).val()+'</b></label></li>')
|
|
});
|
|
loadContent();
|
|
});
|
|
|
|
$('.dir_check').live('click', loadContent);
|
|
|
|
$('.showManage').live('click', function() {
|
|
$( "#tabs" ).tabs( 'select', 0 );
|
|
});
|
|
|
|
}); |