Private GIT

Skip to content
Snippets Groups Projects
Commit efc0e936 authored by Dario's avatar Dario
Browse files

Merge branch 'develop' into develop

parents c83abad8 ab4c9fc5
No related branches found
No related tags found
No related merge requests found
Showing
with 579 additions and 593 deletions
### Questions about SickRage?
To get your questions answered, please ask on the [SickRage Forum](http://sickrage.tv/), or [#sickrage](http://webchat.freenode.net/?channels=sickrage) IRC channel on irc.freenode.net
To get your questions answered, please ask on the [SickRage Forum](http://sickrage.tv/), or [#sickrage-issues](http://webchat.freenode.net/?channels=sickrage-issues) IRC channel on irc.freenode.net
# Contributing to SickRage
......@@ -21,7 +21,7 @@ The goal of this guide is to provide the best way to contribute to the official
The SickRage development team frequently tracks posts on the [SickRage Forum](http://sickrage.tv/). If you have longer posts or questions please feel free to post them there. If you think you've found a bug please [file it in the bug tracker](#how-to-report-bugs).
Additionally most of the SickRage development team can be found in the [#sickrage](http://webchat.freenode.net/?channels=sickrage) IRC channel on irc.freenode.net.
Additionally most of the SickRage development team can be found in the [#sickrage-issues](http://webchat.freenode.net/?channels=sickrage-issues) IRC channel on irc.freenode.net.
## How to Report Bugs
......@@ -30,7 +30,7 @@ Additionally most of the SickRage development team can be found in the [#sickrag
Many bugs reported are actually issues with the user mis-understanding of how something works (there are a bit of moving parts to an ideal setup) and most of the time can be fixed by just changing some settings to fit the users needs.
If you are new to SickRage, it is usually a much better idea to ask for help first in the [Using SickRage Forum](http://sickrage.tv) or the [SickRage IRC channel](http://webchat.freenode.net/?channels=sickrage). You will get much quicker support, and you will help avoid tying up the SickRage team with invalid bug reports.
If you are new to SickRage, it is usually a much better idea to ask for help first in the [Using SickRage Forum](http://sickrage.tv) or the [SickRage IRC channel](http://webchat.freenode.net/?channels=sickrage-issues). You will get much quicker support, and you will help avoid tying up the SickRage team with invalid bug reports.
### Try the latest version of SickRage
......
This diff is collapsed.
File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
$(document).ready(function(){
$('#submitMassRemove').on('click', function(){
var removeArr = [];
$('.removeCheck').each(function() {
if (this.checked === true) {
removeArr.push($(this).attr('id').split('-')[1]);
}
});
if (removeArr.length === 0) { return false; }
window.location.href = srRoot + '/manage/failedDownloads?toRemove='+removeArr.join('|');
});
$('.bulkCheck').on('click', function(){
var bulkCheck = this;
var whichBulkCheck = $(bulkCheck).attr('id');
$('.'+whichBulkCheck+':visible').each(function(){
this.checked = bulkCheck.checked;
});
});
if($('.removeCheck').length){
$('.removeCheck').each(function(name) {
var lastCheck = null;
$(name).click(function(event) {
if(!lastCheck || !event.shiftKey) {
lastCheck = this;
return;
}
var check = this;
var found = 0;
$(name+':visible').each(function() {
switch (found) {
case 2: return false;
case 1: this.checked = lastCheck.checked;
}
if (this === check || this === lastCheck) { found++; }
});
});
});
}
});
$(document).ready(function(){
$('#srRoot').ajaxEpSearch({'colorRow': true});
$('#srRoot').ajaxEpSubtitlesSearch();
$('#seasonJump').on('change', function(){
var id = $('#seasonJump option:selected').val();
if (id && id !== 'jump') {
var season = $('#seasonJump option:selected').data('season');
$('html,body').animate({scrollTop: $('[name ="' + id.substring(1) + '"]').offset().top - 50}, 'slow');
$('#collapseSeason-' + season).collapse('show');
location.hash = id;
}
$(this).val('jump');
});
$("#prevShow").on('click', function(){
$('#pickShow option:selected').prev('option').prop('selected', 'selected');
$("#pickShow").change();
});
$("#nextShow").on('click', function(){
$('#pickShow option:selected').next('option').prop('selected', 'selected');
$("#pickShow").change();
});
$('#changeStatus').on('click', function(){
var srRoot = $('#srRoot').val();
var epArr = [];
$('.epCheck').each(function () {
if (this.checked === true) {
epArr.push($(this).attr('id'));
}
});
if (epArr.length === 0) { return false; }
window.location.href = srRoot + '/home/setStatus?show=' + $('#showID').attr('value') + '&eps=' + epArr.join('|') + '&status=' + $('#statusSelect').val();
});
$('.seasonCheck').on('click', function(){
var seasCheck = this;
var seasNo = $(seasCheck).attr('id');
$('#collapseSeason-' + seasNo).collapse('show');
$('.epCheck:visible').each(function () {
var epParts = $(this).attr('id').split('x');
if (epParts[0] === seasNo) {
this.checked = seasCheck.checked;
}
});
});
var lastCheck = null;
$('.epCheck').on('click', function (event) {
if (!lastCheck || !event.shiftKey) {
lastCheck = this;
return;
}
var check = this;
var found = 0;
$('.epCheck').each(function() {
switch (found) {
case 2:
return false;
case 1:
this.checked = lastCheck.checked;
}
if (this === check || this === lastCheck) {
found++;
}
});
});
// selects all visible episode checkboxes.
$('.seriesCheck').on('click', function () {
$('.epCheck:visible').each(function () {
this.checked = true;
});
$('.seasonCheck:visible').each(function () {
this.checked = true;
});
});
// clears all visible episode checkboxes and the season selectors
$('.clearAll').on('click', function () {
$('.epCheck:visible').each(function () {
this.checked = false;
});
$('.seasonCheck:visible').each(function () {
this.checked = false;
});
});
// handle the show selection dropbox
$('#pickShow').on('change', function () {
var srRoot = $('#srRoot').val();
var val = $(this).val();
if (val === 0) {
return;
}
window.location.href = srRoot + '/home/displayShow?show=' + val;
});
// show/hide different types of rows when the checkboxes are changed
$("#checkboxControls input").change(function () {
var whichClass = $(this).attr('id');
$(this).showHideRows(whichClass);
});
// initially show/hide all the rows according to the checkboxes
$("#checkboxControls input").each(function() {
var status = $(this).prop('checked');
$("tr." + $(this).attr('id')).each(function() {
if(status) {
$(this).show();
} else {
$(this).hide();
}
});
});
$.fn.showHideRows = function(whichClass) {
var status = $('#checkboxControls > input, #' + whichClass).prop('checked');
$("tr." + whichClass).each(function() {
if (status) {
$(this).show();
} else {
$(this).hide();
}
});
// hide season headers with no episodes under them
$('tr.seasonheader').each(function () {
var numRows = 0;
var seasonNo = $(this).attr('id');
$('tr.' + seasonNo + ' :visible').each(function () {
numRows++;
});
if (numRows === 0) {
$(this).hide();
$('#' + seasonNo + '-cols').hide();
} else {
$(this).show();
$('#' + seasonNo + '-cols').show();
}
});
};
function setEpisodeSceneNumbering(forSeason, forEpisode, sceneSeason, sceneEpisode) {
var srRoot = $('#srRoot').val();
var showId = $('#showID').val();
var indexer = $('#indexer').val();
if (sceneSeason === '') { sceneSeason = null; }
if (sceneEpisode === '') { sceneEpisode = null; }
$.getJSON(srRoot + '/home/setSceneNumbering',{
'show': showId,
'indexer': indexer,
'forSeason': forSeason,
'forEpisode': forEpisode,
'sceneSeason': sceneSeason,
'sceneEpisode': sceneEpisode
}, function(data) {
// Set the values we get back
if (data.sceneSeason === null || data.sceneEpisode === null) {
$('#sceneSeasonXEpisode_' + showId + '_' + forSeason + '_' + forEpisode).val('');
} else {
$('#sceneSeasonXEpisode_' + showId + '_' + forSeason + '_' + forEpisode).val(data.sceneSeason + 'x' + data.sceneEpisode);
}
if (!data.success) {
if (data.errorMessage) {
alert(data.errorMessage);
} else {
alert('Update failed.');
}
}
});
}
function setAbsoluteSceneNumbering(forAbsolute, sceneAbsolute) {
var srRoot = $('#srRoot').val();
var showId = $('#showID').val();
var indexer = $('#indexer').val();
if (sceneAbsolute === '') { sceneAbsolute = null; }
$.getJSON(srRoot + '/home/setSceneNumbering', {
'show': showId,
'indexer': indexer,
'forAbsolute': forAbsolute,
'sceneAbsolute': sceneAbsolute
},
function(data) {
// Set the values we get back
if (data.sceneAbsolute === null) {
$('#sceneAbsolute_' + showId + '_' + forAbsolute).val('');
} else {
$('#sceneAbsolute_' + showId + '_' + forAbsolute).val(data.sceneAbsolute);
}
if (!data.success) {
if (data.errorMessage) {
alert(data.errorMessage);
} else {
alert('Update failed.');
}
}
});
}
$('.sceneSeasonXEpisode').on('change', function() {
// Strip non-numeric characters
$(this).val($(this).val().replace(/[^0-9xX]*/g, ''));
var forSeason = $(this).attr('data-for-season');
var forEpisode = $(this).attr('data-for-episode');
var m = $(this).val().match(/^(\d+)x(\d+)$/i);
var sceneSeason = null, sceneEpisode = null;
if (m) {
sceneSeason = m[1];
sceneEpisode = m[2];
}
setEpisodeSceneNumbering(forSeason, forEpisode, sceneSeason, sceneEpisode);
});
$('.sceneAbsolute').on('change', function() {
// Strip non-numeric characters
$(this).val($(this).val().replace(/[^0-9xX]*/g, ''));
var forAbsolute = $(this).attr('data-for-absolute');
var m = $(this).val().match(/^(\d{1,3})$/i);
var sceneAbsolute = null;
if (m) {
sceneAbsolute = m[1];
}
setAbsoluteSceneNumbering(forAbsolute, sceneAbsolute);
});
$('.addQTip').each(function () {
$(this).css({'cursor':'help', 'text-shadow':'0px 0px 0.5px #666'});
$(this).qtip({
show: {solo:true},
position: {viewport:$(window), my:'left center', adjust:{ y: -10, x: 2 }},
style: {tip:{corner:true, method:'polygon'}, classes:'qtip-rounded qtip-shadow ui-tooltip-sb'}
});
});
$.fn.generateStars = function() {
return this.each(function(i,e){$(e).html($('<span/>').width($(e).text()*12));});
};
$('.imdbstars').generateStars();
$("#showTable, #animeTable").tablesorter({
widgets: ['saveSort', 'stickyHeaders', 'columnSelector'],
widgetOptions : {
columnSelector_saveColumns: true, // jshint ignore:line
columnSelector_layout : '<br><label><input type="checkbox">{name}</label>', // jshint ignore:line
columnSelector_mediaquery: false, // jshint ignore:line
columnSelector_cssChecked : 'checked' // jshint ignore:line
}
});
$('#popover').popover({
placement: 'bottom',
html: true, // required if content has HTML
content: '<div id="popover-target"></div>'
})
// bootstrap popover event triggered when the popover opens
.on('shown.bs.popover', function (){
$.tablesorter.columnSelector.attachTo($("#showTable, #animeTable"), '#popover-target');
});
});
$(document).ready(function(){
$("#historyTable:has(tbody tr)").tablesorter({
widgets: ['zebra', 'filter'],
sortList: [[0,1]],
textExtraction: (function(){
if(isMeta('sickbeard.HISTORY_LAYOUT', ['detailed'])){
return {
0: function(node) { return $(node).find('time').attr('datetime'); },
4: function(node) { return $(node).find("span").text().toLowerCase(); }
};
} else {
return {
0: function(node) { return $(node).find('time').attr('datetime'); },
1: function(node) { return $(node).find("span").text().toLowerCase(); },
2: function(node) { return $(node).attr("provider").toLowerCase(); },
5: function(node) { return $(node).attr("quality").toLowerCase(); }
};
}
}()),
headers: (function(){
if(isMeta('sickbeard.HISTORY_LAYOUT', ['detailed'])){
return {
0: { sorter: 'realISODate' },
4: { sorter: 'quality' }
};
} else {
return {
0: { sorter: 'realISODate' },
4: { sorter: false },
5: { sorter: 'quality' }
};
}
}())
});
$('#history_limit').on('change', function() {
var url = srRoot + '/history/?limit=' + $(this).val();
window.location.href = url;
});
});
$(document).ready(function(){
// Resets the tables sorting, needed as we only use a single call for both tables in tablesorter
$('.resetsorting').on('click', function(){
$('table').trigger('filterReset');
});
// This needs to be refined to work a little faster.
$('.progressbar').each(function(progressbar){
var showId = $(this).data('show-id');
var percentage = $(this).data('progress-percentage');
var classToAdd = percentage === 100 ? 100 : percentage > 80 ? 80 : percentage > 60 ? 60 : percentage > 40 ? 40 : 20;
$(this).progressbar({ value: percentage });
if($(this).data('progress-text')) {
$(this).append('<div class="progressbarText" title="' + $(this).data('progress-tip') + '">' + $(this).data('progress-text') + '</div>');
}
$(this).find('.ui-progressbar-value').addClass('progress-' + classToAdd);
});
$("img#network").on('error', function(){
$(this).parent().text($(this).attr('alt'));
$(this).remove();
});
$("#showListTableShows:has(tbody tr), #showListTableAnime:has(tbody tr)").tablesorter({
sortList: [[7,1],[2,0]],
textExtraction: {
0: function(node) { return $(node).find('time').attr('datetime'); },
1: function(node) { return $(node).find('time').attr('datetime'); },
3: function(node) { return $(node).find("span").prop("title").toLowerCase(); },
4: function(node) { return $(node).find("span").text().toLowerCase(); },
5: function(node) { return $(node).find("span:first").text(); },
6: function(node) { return $(node).find("img").attr("alt"); }
},
widgets: ['saveSort', 'zebra', 'stickyHeaders', 'filter', 'columnSelector'],
headers: (function(){
if(metaToBool('sickbeard.FILTER_ROW')){
return {
0: { sorter: 'realISODate' },
1: { sorter: 'realISODate' },
2: { sorter: 'loadingNames' },
4: { sorter: 'quality' },
5: { sorter: 'eps' },
6: { filter : 'parsed' }
};
} else {
return {
0: { sorter: 'realISODate' },
1: { sorter: 'realISODate' },
2: { sorter: 'loadingNames' },
4: { sorter: 'quality' },
5: { sorter: 'eps' }
};
}
}()),
widgetOptions: (function(){
if(metaToBool('sickbeard.FILTER_ROW')){
return {
filter_columnFilters: true, // jshint ignore:line
filter_hideFilters : true, // jshint ignore:line
filter_saveFilters : true, // jshint ignore:line
filter_functions : { // jshint ignore:line
5:function(e, n, f, i, r, c) {
var test = false;
var pct = Math.floor((n % 1) * 1000);
if (f === '') {
test = true;
} else {
var result = f.match(/(<|<=|>=|>)\s(\d+)/i);
if (result) {
if (result[1] === "<") {
if (pct < parseInt(result[2])) {
test = true;
}
} else if (result[1] === "<=") {
if (pct <= parseInt(result[2])) {
test = true;
}
} else if (result[1] === ">=") {
if (pct >= parseInt(result[2])) {
test = true;
}
} else if (result[1] === ">") {
if (pct > parseInt(result[2])) {
test = true;
}
}
}
result = f.match(/(\d+)\s(-|to)\s(\d+)/i);
if (result) {
if ((result[2] === "-") || (result[2] === "to")) {
if ((pct >= parseInt(result[1])) && (pct <= parseInt(result[3]))) {
test = true;
}
}
}
result = f.match(/(=)?\s?(\d+)\s?(=)?/i);
if (result) {
if ((result[1] === "=") || (result[3] === "=")) {
if (parseInt(result[2]) === pct) {
test = true;
}
}
}
if (!isNaN(parseFloat(f)) && isFinite(f)) {
if (parseInt(f) === pct) {
test = true;
}
}
}
return test;
}
},
columnSelector_mediaquery: false
};
} else {
return {
filter_columnFilters: false
};
}
}()),
sortStable: true,
sortAppend: [[2,0]]
});
if ($("#showListTableShows").find("tbody").find("tr").size() > 0){
$.tablesorter.filter.bindSearch( "#showListTableShows", $('.search') );
}
if(metaToBool('sickbeard.ANIME_SPLIT_HOME')){
if($("#showListTableAnime").find("tbody").find("tr").size() > 0){
$.tablesorter.filter.bindSearch( "#showListTableAnime", $('.search') );
}
}
var $container = [$('#container'), $('#container-anime')];
$.each($container, function (j){
this.isotope({
itemSelector: '.show',
sortBy : getMeta('sickbeard.POSTER_SORTBY'),
sortAscending: getMeta('sickbeard.POSTER_SORTDIR'),
layoutMode: 'masonry',
masonry: {
columnWidth: 13,
isFitWidth: true
},
getSortData: {
name: function(itemElem){
var name = $(itemElem).attr('data-name');
return (metaToBool('sickbeard.SORT_ARTICLE') ? (name || '') : (name || '').replace(/^(The|A|An)\s/i,''));
},
network: '[data-network]',
date: function(itemElem){
var date = $(itemElem).attr('data-date');
return date.length && parseInt(date, 10) || Number.POSITIVE_INFINITY;
},
progress: function(itemElem){
var progress = $(itemElem).attr('data-progress');
return progress.length && parseInt(progress, 10) || Number.NEGATIVE_INFINITY;
}
}
});
});
$('#postersort').on('change', function(){
var sortValue = this.value;
$('#container').isotope({sortBy: sortValue});
$('#container-anime').isotope({sortBy: sortValue});
$.get(this.options[this.selectedIndex].getAttribute('data-sort'));
});
$('#postersortdirection').on('change', function(){
var sortDirection = this.value;
sortDirection = sortDirection == 'true';
$('#container').isotope({sortAscending: sortDirection});
$('#container-anime').isotope({sortAscending: sortDirection});
$.get(this.options[this.selectedIndex].getAttribute('data-sort'));
});
$('#popover').popover({
placement: 'bottom',
html: true, // required if content has HTML
content: '<div id="popover-target"></div>'
}).on('shown.bs.popover', function () { // bootstrap popover event triggered when the popover opens
// call this function to copy the column selection code into the popover
$.tablesorter.columnSelector.attachTo( $('#showListTableShows'), '#popover-target');
if(metaToBool('sickbeard.ANIME_SPLIT_HOME')){
$.tablesorter.columnSelector.attachTo( $('#showListTableAnime'), '#popover-target');
}
});
});
$('#episodeDir').fileBrowser({ title: 'Select Unprocessed Episode Folder', key: 'postprocessPath' });
$(document).ready(function(){
});
$(document).ready(function(){
});
$(document).ready(function(){
});
......@@ -4,5 +4,5 @@
from sickbeard import GIT_USERNAME
username = ("SickRageUI|?", GIT_USERNAME)[bool(GIT_USERNAME)]
%>
<iframe id="extFrame" src="https://kiwiirc.com/client/irc.freenode.net/?nick=${username}&theme=basic#sickrage" width="100%" height="500" frameBorder="0" style="border: 1px black solid;"></iframe>
<iframe id="extFrame" src="https://kiwiirc.com/client/irc.freenode.net/?nick=${username}&theme=basic#sickrage-issues" width="100%" height="500" frameBorder="0" style="border: 1px black solid;"></iframe>
</%block>
......@@ -67,7 +67,7 @@
<tr><td class="infoTableHeader"><i class="icon16-WiKi"></i> WiKi</td><td class="infoTableCell"><a href="${anon_url('https://github.com/SickRage/sickrage-issues/wiki')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">https://github.com/SickRage/sickrage-issues/wiki</a></td></tr>
<tr><td class="infoTableHeader"><i class="icon16-web"></i> Forums</td><td class="infoTableCell"><a href="${anon_url('http://sickrage.tv/forums/')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">http://sickrage.tv/forums/</a></td></tr>
<tr><td class="infoTableHeader"><i class="icon16-github"></i> Source</td><td class="infoTableCell"><a href="${anon_url('https://github.com/SickRage/SickRage/')}" rel="noreferrer" onclick="window.open(this.href, '_blank'); return false;">https://github.com/SickRage/SickRage/</a></td></tr>
<tr><td class="infoTableHeader"><i class="icon16-mirc"></i> IRChat</td><td class="infoTableCell"><a href="irc://irc.freenode.net/#sickrage" rel="noreferrer"><i>#sickrage</i> on <i>irc.freenode.net</i></a></td></tr>
<tr><td class="infoTableHeader"><i class="icon16-mirc"></i> IRChat</td><td class="infoTableCell"><a href="irc://irc.freenode.net/#sickrage-issues" rel="noreferrer"><i>#sickrage-issues</i> on <i>irc.freenode.net</i></a></td></tr>
</table>
</div>
</%block>
......@@ -13,7 +13,6 @@
%>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/lib/jquery.bookmarkscroll.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/new/displayShow.js"></script>
<script type="text/javascript" src="${srRoot}/js/plotTooltip.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/sceneExceptionsTooltip.js?${sbPID}"></script>
<script type="text/javascript" src="${srRoot}/js/ratingTooltip.js?${sbPID}"></script>
......
......@@ -9,9 +9,6 @@
<%block name="metas">
<meta data-var="max_download_count" data-content="${max_download_count}">
</%block>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/new/home.js?${sbPID}"></script>
</%block>
<%block name="content">
<%namespace file="/inc_defs.mako" import="renderQualityPill"/>
% if not header is UNDEFINED:
......
......@@ -16,13 +16,13 @@
<div id="postProcess">
<form name="processForm" method="post" action="processEpisode" style="line-height: 40px;">
<table>
<input type="hidden" id="type" name="proc_type" value="manual">
<input type="hidden" id="type" name="type" value="manual">
<tr>
<td style="padding-right:10px;">
<b>Enter the folder containing the episode:</b>
</td>
<td>
<input type="text" name="proc_dir" id="episodeDir" class="form-control form-control-inline input-sm input350" />
<input type="text" name="dir" id="episodeDir" class="form-control form-control-inline input-sm input350" />
</td>
</tr>
<tr>
......
......@@ -9,10 +9,6 @@
from sickbeard.common import SKIPPED, WANTED, UNAIRED, ARCHIVED, IGNORED, SNATCHED, SNATCHED_PROPER, SNATCHED_BEST, FAILED
from sickbeard.common import Quality, qualityPresets, qualityPresetStrings, statusStrings, Overview
%>
<%block name="scripts">
<script type="text/javascript" src="${srRoot}/js/new/manage_failedDownloads.js"></script>
<script type="text/javascript" src="${srRoot}/js/failedDownloads.js?${sbPID}"></script>
</%block>
<%block name="content">
% if not header is UNDEFINED:
<h1 class="header">${header}</h1>
......
......@@ -58,4 +58,4 @@ A full list can be found here: [Link](https://github.com/SickRage/sickrage-issue
![image](https://raw.githubusercontent.com/SickRage/SickRage/master/gui/slick/images/providers/dognzb.png)[DOGnzb](dognzb.cr)
#### News and Changelog
[news.md and CHANGES.md have moved to a separate repo, click here](http://github.com/SickRage/sickrage-news)
[news.md and CHANGES.md have moved to a separate repo, click here](https://github.com/SickRage/sickrage.github.io)
......@@ -97,12 +97,13 @@ class BTDiggCache(tvcache.TVCache):
tvcache.TVCache.__init__(self, provider_obj)
# set this 0 to suppress log line, since we aren't updating it anyways
self.minTime = 0
# Cache results for a hour ,since BTDigg takes some time to crawl
self.minTime = 60
def _getRSSData(self):
# no rss for btdigg, can't search with empty string
# newest results are always > 1 day since added anyways
return {'entries': {}}
# Use x264 for RSS search since most results will use that codec and since the site doesnt have latest results search
search_params = {'RSS': ['x264']}
return {'entries': self.provider._doSearch(search_params)}
provider = BTDIGGProvider()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment