mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fixes issues #333 and problems with converting str to int via prettyName func
This commit is contained in:
parent
c29b29a7e7
commit
afde3b4c28
11 changed files with 165 additions and 131 deletions
|
@ -176,7 +176,7 @@ a{
|
|||
#header .wrapper {
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
width: 850px;
|
||||
width: 960px;
|
||||
}
|
||||
#header a:hover {
|
||||
background: none;
|
||||
|
@ -192,7 +192,7 @@ a{
|
|||
float: left;
|
||||
position: relative;
|
||||
top: 0px;
|
||||
left: 5px;
|
||||
left: -5px;
|
||||
}
|
||||
#versiontext {
|
||||
color: #FFFFFF;
|
||||
|
@ -201,7 +201,7 @@ a{
|
|||
position: relative;
|
||||
/* text-transform: lowercase;*/
|
||||
top: 42px;
|
||||
left: 5px;
|
||||
left: -5px
|
||||
}
|
||||
|
||||
.update {
|
||||
|
@ -1863,3 +1863,12 @@ pre {
|
|||
height: 37px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#donate_form{
|
||||
position: absolute;
|
||||
border: 5px solid gray;
|
||||
padding: 10px;
|
||||
background: white;
|
||||
width: 270px;
|
||||
height: 220px;
|
||||
}
|
BIN
gui/slick/images/google/google.donate.gif
Normal file
BIN
gui/slick/images/google/google.donate.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
gui/slick/images/payza.jpg
Normal file
BIN
gui/slick/images/payza.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -19,9 +19,6 @@
|
|||
<b>Backlog</b>: $sbdatetime.sbdatetime.sbfdate($sickbeard.backlogSearchScheduler.nextRun())
|
||||
</div>
|
||||
<ul style="float:right;">
|
||||
<li>
|
||||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=elmarkou%40gmail%2ecom&lc=NL&item_name=I%20Like%20to%20donate%20because%20I%20like%20this%20Sick-Beard%20Interface&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest" target="_blank"><img src="$sbRoot/images/like.png"> I like this interface!</a>
|
||||
</li>
|
||||
<li><a href="$sbRoot/manage/manageSearches/forceVersionCheck"><img src="$sbRoot/images/menu/update16.png" alt="" width="16" height="16" />Force Version Check</a></li>
|
||||
<li><a href="$sbRoot/home/restart/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/restart16.png" alt="" width="16" height="16" />Restart</a></li>
|
||||
<li><a href="$sbRoot/home/shutdown/?pid=$sbPID" class="confirm"><img src="$sbRoot/images/menu/shutdown16.png" alt="" width="16" height="16" />Shutdown</a></li>
|
||||
|
|
|
@ -156,7 +156,6 @@ a > i.icon-question-sign { background-image: url("$sbRoot/images/glyphicons-half
|
|||
\$("#SubMenu a[href$='/home/updateXBMC/']").addClass('btn').html('<span class="ui-icon ui-icon-refresh pull-left"></span> Update XBMC');
|
||||
}
|
||||
\$(document).ready(function(){
|
||||
|
||||
initActions();
|
||||
\$("ul.sf-menu").supersubs({
|
||||
minWidth: 12, // minimum width of sub-menus in em units
|
||||
|
@ -199,10 +198,7 @@ a > i.icon-question-sign { background-image: url("$sbRoot/images/glyphicons-half
|
|||
location.href = target;
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
//-->
|
||||
</script>
|
||||
</head>
|
||||
|
@ -266,6 +262,7 @@ a > i.icon-question-sign { background-image: url("$sbRoot/images/glyphicons-half
|
|||
<li><a href="$sbRoot/config/notifications/"><img src="$sbRoot/images/menu/config16.png" alt="" width="16" height="16" />Notifications</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,89 +1,93 @@
|
|||
function initHeader() {
|
||||
//settings
|
||||
var header = $("#header");
|
||||
var fadeSpeed = 100, fadeTo = 0.8, topDistance = 20;
|
||||
var topbarME = function() { $(header).fadeTo(fadeSpeed,1); }, topbarML = function() { $(header).fadeTo(fadeSpeed,fadeTo); };
|
||||
var inside = false;
|
||||
//do
|
||||
$(window).scroll(function() {
|
||||
position = $(window).scrollTop();
|
||||
if(position > topDistance && !inside) {
|
||||
//add events
|
||||
topbarML();
|
||||
$(header).bind('mouseenter',topbarME);
|
||||
$(header).bind('mouseleave',topbarML);
|
||||
inside = true;
|
||||
}
|
||||
else if (position < topDistance){
|
||||
topbarME();
|
||||
$(header).unbind('mouseenter',topbarME);
|
||||
$(header).unbind('mouseleave',topbarML);
|
||||
inside = false;
|
||||
}
|
||||
});
|
||||
|
||||
function initHeader() {
|
||||
//settings
|
||||
var header = $("#header");
|
||||
var fadeSpeed = 100, fadeTo = 0.8, topDistance = 20;
|
||||
var topbarME = function () {
|
||||
$(header).fadeTo(fadeSpeed, 1);
|
||||
}, topbarML = function () {
|
||||
$(header).fadeTo(fadeSpeed, fadeTo);
|
||||
};
|
||||
var inside = false;
|
||||
//do
|
||||
$(window).scroll(function () {
|
||||
position = $(window).scrollTop();
|
||||
if (position > topDistance && !inside) {
|
||||
//add events
|
||||
topbarML();
|
||||
$(header).bind('mouseenter', topbarME);
|
||||
$(header).bind('mouseleave', topbarML);
|
||||
inside = true;
|
||||
}
|
||||
else if (position < topDistance) {
|
||||
topbarME();
|
||||
$(header).unbind('mouseenter', topbarME);
|
||||
$(header).unbind('mouseleave', topbarML);
|
||||
inside = false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
function showMsg(msg,loader,timeout,ms) {
|
||||
var feedback = $("#ajaxMsg");
|
||||
update = $("#updatebar");
|
||||
if ( update.is(":visible") ) {
|
||||
var height = update.height() + 35;
|
||||
feedback.css("bottom",height + "px");
|
||||
} else {
|
||||
feedback.removeAttr("style");
|
||||
}
|
||||
feedback.fadeIn();
|
||||
var message = $("<div class='msg'>" + msg + "</div>");
|
||||
if (loader) {
|
||||
var message = $("<div class='msg'><img src='interfaces/default/images/loader_black.gif' alt='loading' class='loader' style='position: relative;top:10px;margin-top:-15px; margin-left:-10px;'/>" + msg + "</div>");
|
||||
feedback.css("padding","14px 10px")
|
||||
}
|
||||
$(feedback).prepend(message);
|
||||
if (timeout) {
|
||||
setTimeout(function(){
|
||||
message.fadeOut(function(){
|
||||
$(this).remove();
|
||||
feedback.fadeOut();
|
||||
});
|
||||
},ms);
|
||||
}
|
||||
function showMsg(msg, loader, timeout, ms) {
|
||||
var feedback = $("#ajaxMsg");
|
||||
update = $("#updatebar");
|
||||
if (update.is(":visible")) {
|
||||
var height = update.height() + 35;
|
||||
feedback.css("bottom", height + "px");
|
||||
} else {
|
||||
feedback.removeAttr("style");
|
||||
}
|
||||
feedback.fadeIn();
|
||||
var message = $("<div class='msg'>" + msg + "</div>");
|
||||
if (loader) {
|
||||
var message = $("<div class='msg'><img src='interfaces/default/images/loader_black.gif' alt='loading' class='loader' style='position: relative;top:10px;margin-top:-15px; margin-left:-10px;'/>" + msg + "</div>");
|
||||
feedback.css("padding", "14px 10px")
|
||||
}
|
||||
$(feedback).prepend(message);
|
||||
if (timeout) {
|
||||
setTimeout(function () {
|
||||
message.fadeOut(function () {
|
||||
$(this).remove();
|
||||
feedback.fadeOut();
|
||||
});
|
||||
}, ms);
|
||||
}
|
||||
}
|
||||
|
||||
function resetFilters(text){
|
||||
if ( $(".dataTables_filter").length > 0 ) {
|
||||
$(".dataTables_filter input").attr("placeholder","filter " + text + "");
|
||||
}
|
||||
function resetFilters(text) {
|
||||
if ($(".dataTables_filter").length > 0) {
|
||||
$(".dataTables_filter input").attr("placeholder", "filter " + text + "");
|
||||
}
|
||||
}
|
||||
|
||||
function preventDefault(){
|
||||
$("a[href='#']").live('click', function(){
|
||||
return false;
|
||||
});
|
||||
function preventDefault() {
|
||||
$("a[href='#']").live('click', function () {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function initFancybox() {
|
||||
if ( $("a[rel=dialog]").length > 0 ) {
|
||||
$.getScript(sbRoot + '/js/fancybox/jquery.fancybox-1.3.4.js', function() {
|
||||
$("head").append("<link rel='stylesheet' href='" + sbRoot + "/js/fancybox/jquery.fancybox-1.3.4.css'>");
|
||||
$("a[rel=dialog]").fancybox({
|
||||
type: "image"
|
||||
});
|
||||
});
|
||||
}
|
||||
if ($("a[rel=dialog]").length > 0) {
|
||||
$.getScript(sbRoot + '/js/fancybox/jquery.fancybox-1.3.4.js', function () {
|
||||
$("head").append("<link rel='stylesheet' href='" + sbRoot + "/js/fancybox/jquery.fancybox-1.3.4.css'>");
|
||||
$("a[rel=dialog]").fancybox({
|
||||
type: "image"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function initTabs() {
|
||||
$("#config-components").tabs({
|
||||
activate: function(event, ui) {
|
||||
$("#config-components").tabs({
|
||||
activate: function (event, ui) {
|
||||
|
||||
var lastOpenedPanel = $(this).data("lastOpenedPanel");
|
||||
var selected = $(this).tabs('option', 'selected');
|
||||
|
||||
if (lastOpenedPanel) {
|
||||
} else {
|
||||
lastOpenedPanel = $(ui.oldPanel)
|
||||
lastOpenedPanel = $(ui.oldPanel)
|
||||
}
|
||||
|
||||
if (!$(this).data("topPositionTab")) {
|
||||
|
@ -104,9 +108,9 @@ function initTabs() {
|
|||
.toggleClass("ui-tabs-hide")
|
||||
.css("position", "absolute")
|
||||
.css("top", $(this).data("topPositionTab") + "px")
|
||||
.fadeOut(700, function() {
|
||||
.fadeOut(700, function () {
|
||||
$(this)
|
||||
.css("position", "");
|
||||
.css("position", "");
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -119,13 +123,41 @@ function initTabs() {
|
|||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
initHeader();
|
||||
preventDefault();
|
||||
initFancybox();
|
||||
initTabs();
|
||||
function initDonateBox() {
|
||||
//open popup
|
||||
$("#donate").click(function () {
|
||||
$("#donate_form").fadeIn(1000);
|
||||
positionPopup();
|
||||
});
|
||||
|
||||
//close popup
|
||||
$("#close").click(function () {
|
||||
$("#donate_form").fadeOut(500);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
init();
|
||||
});
|
||||
//position the popup at the center of the page
|
||||
function positionPopup() {
|
||||
if (!$("#donate_form").is(':visible')) {
|
||||
return;
|
||||
}
|
||||
$("#donate_form").css({
|
||||
left: ($(window).width() - $('#donate_form').width()) / 2,
|
||||
top: ($(window).width() - $('#donate_form').width()) / 4,
|
||||
position: 'absolute'
|
||||
});
|
||||
}
|
||||
|
||||
//maintain the popup at center of the page when browser resized
|
||||
$(window).bind('resize', positionPopup);
|
||||
function init() {
|
||||
initHeader();
|
||||
preventDefault();
|
||||
initFancybox();
|
||||
initTabs();
|
||||
initDonateBox();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
init();
|
||||
});
|
|
@ -987,6 +987,9 @@ def initialize(consoleLogging=True):
|
|||
newznabProviderList = providers.getNewznabProviderList(NEWZNAB_DATA)
|
||||
providerList = providers.makeProviderList()
|
||||
|
||||
# fix scene numbering in mainDB
|
||||
scene_numbering.fix_scene_numbering()
|
||||
|
||||
# initialize newznab providers
|
||||
currentSearchScheduler = scheduler.Scheduler(searchCurrent.CurrentSearcher(),
|
||||
cycleTime=datetime.timedelta(minutes=SEARCH_FREQUENCY),
|
||||
|
|
|
@ -35,7 +35,6 @@ class MainSanityCheck(db.DBSanityCheck):
|
|||
self.fix_duplicate_shows()
|
||||
self.fix_duplicate_episodes()
|
||||
self.fix_orphan_episodes()
|
||||
self.fix_scene_numbering()
|
||||
|
||||
def fix_duplicate_shows(self):
|
||||
|
||||
|
@ -124,35 +123,6 @@ class MainSanityCheck(db.DBSanityCheck):
|
|||
logger.log(u"Missing idx_sta_epi_sta_air for TV Episodes table detected!, fixing...")
|
||||
self.connection.action("CREATE INDEX idx_sta_epi_sta_air ON tv_episodes (season,episode, status, airdate)")
|
||||
|
||||
|
||||
def fix_scene_numbering(self):
|
||||
ql = []
|
||||
|
||||
sqlResults = self.connection.select(
|
||||
"SELECT showid, indexerid, indexer, episode_id, season, episode FROM tv_episodes WHERE scene_season = -1 OR scene_episode = -1")
|
||||
|
||||
for epResult in sqlResults:
|
||||
indexerid = int(str(epResult["showid"]).encode('UTF-8'))
|
||||
indexer = int(str(epResult["indexer"]).encode('UTF-8'))
|
||||
season = int(str(epResult["season"]).encode('UTF-8'))
|
||||
episode = int(str(epResult["episode"]).encode('UTF-8'))
|
||||
|
||||
logger.log(
|
||||
u"Repairing any scene numbering issues for showid: " + str(epResult["showid"]) + u" season: " + str(
|
||||
epResult["season"]) + u" episode: " + str(epResult["episode"]), logger.DEBUG)
|
||||
|
||||
scene_season, scene_episode = sickbeard.scene_numbering.get_scene_numbering(indexerid,
|
||||
indexer,
|
||||
season,
|
||||
episode)
|
||||
|
||||
ql.append(["UPDATE tv_episodes SET scene_season = ? WHERE indexerid = ?", [scene_season, epResult["indexerid"]]])
|
||||
ql.append(
|
||||
["UPDATE tv_episodes SET scene_episode = ? WHERE indexerid = ?", [scene_episode, epResult["indexerid"]]])
|
||||
|
||||
self.connection.mass_action(ql)
|
||||
|
||||
|
||||
def backupDatabase(version):
|
||||
logger.log(u"Backing up database before upgrade")
|
||||
if not helpers.backupVersionedFile(db.dbFilename(), version):
|
||||
|
|
|
@ -360,4 +360,36 @@ def get_xem_numbering_for_season(indexer_id, indexer, season):
|
|||
else:
|
||||
result.setdefault(int(season), []).append(int(season))
|
||||
|
||||
return result
|
||||
return result
|
||||
|
||||
|
||||
def fix_scene_numbering():
|
||||
ql = []
|
||||
|
||||
myDB = db.DBConnection()
|
||||
|
||||
sqlResults = myDB.select(
|
||||
"SELECT showid, indexerid, indexer, episode_id, season, episode FROM tv_episodes WHERE scene_season = -1 OR scene_episode = -1")
|
||||
|
||||
for epResult in sqlResults:
|
||||
|
||||
indexerid = int(epResult["showid"])
|
||||
indexer = int(epResult["indexer"])
|
||||
season = int(epResult["season"])
|
||||
episode = int(epResult["episode"])
|
||||
|
||||
logger.log(
|
||||
u"Repairing any scene numbering issues for showid: " + str(epResult["showid"]) + u" season: " + str(
|
||||
epResult["season"]) + u" episode: " + str(epResult["episode"]), logger.DEBUG)
|
||||
|
||||
scene_season, scene_episode = sickbeard.scene_numbering.get_scene_numbering(indexerid,
|
||||
indexer,
|
||||
season,
|
||||
episode)
|
||||
|
||||
ql.append(
|
||||
["UPDATE tv_episodes SET scene_season = ? WHERE indexerid = ?", [scene_season, epResult["indexerid"]]])
|
||||
ql.append(
|
||||
["UPDATE tv_episodes SET scene_episode = ? WHERE indexerid = ?", [scene_episode, epResult["indexerid"]]])
|
||||
|
||||
myDB.mass_action(ql)
|
||||
|
|
|
@ -52,12 +52,6 @@ def filterBadReleases(name):
|
|||
logger.log(u"Unable to parse the filename " + name + " into a valid episode", logger.WARNING)
|
||||
return False
|
||||
|
||||
# if we can't find the show then there's nothing we can really do
|
||||
if not parse_result.show:
|
||||
logger.log(u"This show isn't in your list, skipping ...",
|
||||
logger.DEBUG)
|
||||
return False
|
||||
|
||||
# if any of the bad strings are in the name then say no
|
||||
if sickbeard.IGNORE_WORDS:
|
||||
resultFilters.extend(sickbeard.IGNORE_WORDS.split(','))
|
||||
|
|
|
@ -1778,7 +1778,7 @@ class TVEpisode(object):
|
|||
Returns: A string representing the episode's name and season/ep numbers
|
||||
"""
|
||||
|
||||
return self._format_pattern('%SN - %XMSx%0XME - %EN')
|
||||
return self._format_pattern('%SN - %XSx%0XE - %EN')
|
||||
|
||||
def _ep_name(self):
|
||||
"""
|
||||
|
@ -1876,13 +1876,13 @@ class TVEpisode(object):
|
|||
'%Q.N': dot(Quality.qualityStrings[epQual]),
|
||||
'%Q_N': us(Quality.qualityStrings[epQual]),
|
||||
'%S': str(self.season),
|
||||
'%0S': '%02d' % self.season,
|
||||
'%0S': '%02d' % int(self.season),
|
||||
'%E': str(self.episode),
|
||||
'%0E': '%02d' % self.episode,
|
||||
'%XMS': str(self.scene_season),
|
||||
'%0XMS': '%02d' % self.scene_season,
|
||||
'%XME': str(self.scene_episode),
|
||||
'%0XME': '%02d' % self.scene_episode,
|
||||
'%0E': '%02d' % int(self.episode),
|
||||
'%XS': str(self.scene_season),
|
||||
'%0XS': '%02d' % int(self.scene_season),
|
||||
'%XE': str(self.scene_episode),
|
||||
'%0XE': '%02d' % int(self.scene_episode),
|
||||
'%RN': release_name(self.release_name),
|
||||
'%RG': release_group(self.release_name),
|
||||
'%AD': str(self.airdate).replace('-', ' '),
|
||||
|
|
Loading…
Reference in a new issue