diff --git a/gui/slick/css/default.css b/gui/slick/css/default.css
index 4a40a788..abff4f01 100644
--- a/gui/slick/css/default.css
+++ b/gui/slick/css/default.css
@@ -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;
+}
\ No newline at end of file
diff --git a/gui/slick/images/google/google.donate.gif b/gui/slick/images/google/google.donate.gif
new file mode 100644
index 00000000..4bc23a30
Binary files /dev/null and b/gui/slick/images/google/google.donate.gif differ
diff --git a/gui/slick/images/payza.jpg b/gui/slick/images/payza.jpg
new file mode 100644
index 00000000..84118d1c
Binary files /dev/null and b/gui/slick/images/payza.jpg differ
diff --git a/gui/slick/interfaces/default/inc_bottom.tmpl b/gui/slick/interfaces/default/inc_bottom.tmpl
index 02ee0e8b..2ef35410 100644
--- a/gui/slick/interfaces/default/inc_bottom.tmpl
+++ b/gui/slick/interfaces/default/inc_bottom.tmpl
@@ -19,9 +19,6 @@
Backlog: $sbdatetime.sbdatetime.sbfdate($sickbeard.backlogSearchScheduler.nextRun())
--
- I like this interface!
-
- Force Version Check
- Restart
- Shutdown
diff --git a/gui/slick/interfaces/default/inc_top.tmpl b/gui/slick/interfaces/default/inc_top.tmpl
index b9affab3..169e3f82 100644
--- a/gui/slick/interfaces/default/inc_top.tmpl
+++ b/gui/slick/interfaces/default/inc_top.tmpl
@@ -156,7 +156,6 @@ a > i.icon-question-sign { background-image: url("$sbRoot/images/glyphicons-half
\$("#SubMenu a[href$='/home/updateXBMC/']").addClass('btn').html(' 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;
});
-
});
-
-
//-->
@@ -266,6 +262,7 @@ a > i.icon-question-sign { background-image: url("$sbRoot/images/glyphicons-half
- Notifications
+
diff --git a/gui/slick/js/script.js b/gui/slick/js/script.js
index 5306cfee..171cc2ec 100644
--- a/gui/slick/js/script.js
+++ b/gui/slick/js/script.js
@@ -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 = $("" + msg + "
");
- if (loader) {
- var message = $("" + msg + "
");
- 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 = $("" + msg + "
");
+ if (loader) {
+ var message = $("" + msg + "
");
+ 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("");
- $("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("");
+ $("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();
+});
\ No newline at end of file
diff --git a/sickbeard/__init__.py b/sickbeard/__init__.py
index 706d1bca..6fd784f2 100644
--- a/sickbeard/__init__.py
+++ b/sickbeard/__init__.py
@@ -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),
diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py
index 0bb06aa4..302d0ed3 100644
--- a/sickbeard/databases/mainDB.py
+++ b/sickbeard/databases/mainDB.py
@@ -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):
diff --git a/sickbeard/scene_numbering.py b/sickbeard/scene_numbering.py
index 5a51c57d..ebe5b154 100644
--- a/sickbeard/scene_numbering.py
+++ b/sickbeard/scene_numbering.py
@@ -360,4 +360,36 @@ def get_xem_numbering_for_season(indexer_id, indexer, season):
else:
result.setdefault(int(season), []).append(int(season))
- return result
\ No newline at end of file
+ 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)
diff --git a/sickbeard/show_name_helpers.py b/sickbeard/show_name_helpers.py
index 3953936f..c16db05c 100644
--- a/sickbeard/show_name_helpers.py
+++ b/sickbeard/show_name_helpers.py
@@ -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(','))
diff --git a/sickbeard/tv.py b/sickbeard/tv.py
index 3bbb45ab..5fd514a2 100644
--- a/sickbeard/tv.py
+++ b/sickbeard/tv.py
@@ -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('-', ' '),