Merge branch 'refs/heads/develop'
This commit is contained in:
@@ -31,7 +31,7 @@ var NotificationBase = new Class({
|
||||
});
|
||||
|
||||
window.addEvent('load', function(){
|
||||
self.startInterval.delay(2000, self)
|
||||
self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 300, self)
|
||||
});
|
||||
|
||||
},
|
||||
@@ -101,11 +101,20 @@ var NotificationBase = new Class({
|
||||
return;
|
||||
}
|
||||
|
||||
Api.request('notification.listener', {
|
||||
self.request = Api.request('notification.listener', {
|
||||
'data': {'init':true},
|
||||
'onSuccess': self.processData.bind(self)
|
||||
}).send()
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
if(self.request && self.request.isRunning()){
|
||||
self.request.cancel();
|
||||
self.startPoll()
|
||||
}
|
||||
|
||||
}, 120000);
|
||||
|
||||
},
|
||||
|
||||
startPoll: function(){
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode
|
||||
from couchpotato.core.helpers.variable import getTitle
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.notifications.base import Notification
|
||||
from httplib import HTTPSConnection
|
||||
@@ -14,17 +15,23 @@ class Pushover(Notification):
|
||||
|
||||
http_handler = HTTPSConnection("api.pushover.net:443")
|
||||
|
||||
data = {
|
||||
api_data = {
|
||||
'user': self.conf('user_key'),
|
||||
'token': self.app_token,
|
||||
'message': toUnicode(message),
|
||||
'priority': self.conf('priority')
|
||||
'priority': self.conf('priority'),
|
||||
}
|
||||
|
||||
if data and data.get('library'):
|
||||
api_data.extend({
|
||||
'url': toUnicode('http://www.imdb.com/title/%s/' % data['library']['identifier']),
|
||||
'url_title': toUnicode('%s on IMDb' % getTitle(data['library'])),
|
||||
})
|
||||
|
||||
http_handler.request('POST',
|
||||
"/1/messages.json",
|
||||
headers = {'Content-type': 'application/x-www-form-urlencoded'},
|
||||
body = tryUrlencode(data)
|
||||
body = tryUrlencode(api_data)
|
||||
)
|
||||
|
||||
response = http_handler.getresponse()
|
||||
|
||||
@@ -315,7 +315,7 @@ class MoviePlugin(Plugin):
|
||||
for title in movie.library.titles:
|
||||
if title.default: default_title = title.title
|
||||
|
||||
fireEvent('notify.frontend', type = 'movie.busy.%s' % id, data = True, message = 'Updating "%s"' % default_title)
|
||||
fireEvent('notify.frontend', type = 'movie.busy.%s' % id, data = True)
|
||||
fireEventAsync('library.update', identifier = movie.library.identifier, default_title = default_title, force = True, on_complete = self.createOnComplete(id))
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,10 @@ var Movie = new Class({
|
||||
addEvents: function(){
|
||||
var self = this;
|
||||
|
||||
App.addEvent('movie.update.'+self.data.id, self.update.bind(self));
|
||||
App.addEvent('movie.update.'+self.data.id, function(notification){
|
||||
self.busy(false)
|
||||
self.update.delay(2000, self, notification);
|
||||
});
|
||||
|
||||
['movie.busy', 'searcher.started'].each(function(listener){
|
||||
App.addEvent(listener+'.'+self.data.id, function(notification){
|
||||
@@ -57,17 +60,19 @@ var Movie = new Class({
|
||||
var self = this;
|
||||
|
||||
if(!set_busy){
|
||||
if(self.spinner){
|
||||
self.mask.fade('out');
|
||||
setTimeout(function(){
|
||||
if(self.mask)
|
||||
self.mask.destroy();
|
||||
if(self.spinner)
|
||||
self.spinner.el.destroy();
|
||||
self.spinner = null;
|
||||
self.mask = null;
|
||||
}, 400);
|
||||
}
|
||||
setTimeout(function(){
|
||||
if(self.spinner){
|
||||
self.mask.fade('out');
|
||||
setTimeout(function(){
|
||||
if(self.mask)
|
||||
self.mask.destroy();
|
||||
if(self.spinner)
|
||||
self.spinner.el.destroy();
|
||||
self.spinner = null;
|
||||
self.mask = null;
|
||||
}, 400);
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
else if(!self.spinner) {
|
||||
self.createMask();
|
||||
|
||||
@@ -143,6 +143,9 @@
|
||||
border-radius: 0;
|
||||
box-shadow: inset 0 1px 8px rgba(0,0,0,0.25);
|
||||
}
|
||||
.movie_result .options > .in_library_wanted {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
.movie_result .options > div {
|
||||
border: 0;
|
||||
@@ -198,7 +201,9 @@
|
||||
|
||||
.movie_result .in_wanted, .movie_result .in_library {
|
||||
position: absolute;
|
||||
margin-top: 105px;
|
||||
bottom: 2px;
|
||||
left: 14px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.movie_result .thumbnail {
|
||||
|
||||
@@ -309,7 +309,9 @@ Block.Search.Item = new Class({
|
||||
}
|
||||
|
||||
self.options_el.grab(
|
||||
new Element('div').adopt(
|
||||
new Element('div', {
|
||||
'class': self.info.in_wanted && self.info.in_wanted.profile || in_library ? 'in_library_wanted' : ''
|
||||
}).adopt(
|
||||
self.info.in_wanted && self.info.in_wanted.profile ? new Element('span.in_wanted', {
|
||||
'text': 'Already in wanted list: ' + self.info.in_wanted.profile.label
|
||||
}) : (in_library ? new Element('span.in_library', {
|
||||
|
||||
@@ -6,15 +6,25 @@
|
||||
border-bottom: 1px solid rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
.profile { border-bottom: 1px solid rgba(255,255,255,0.2) }
|
||||
.profile {
|
||||
border-bottom: 1px solid rgba(255,255,255,0.2);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.profile > .delete {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
position: absolute;
|
||||
margin-left: 690px;
|
||||
padding: 14px;
|
||||
padding: 25px 20px;
|
||||
background-position: center;
|
||||
right: 0;
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.profile > .delete:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.profile .ctrlHolder:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.profile .qualities {
|
||||
@@ -34,7 +44,8 @@
|
||||
|
||||
.profile .wait_for {
|
||||
position: absolute;
|
||||
margin: -45px 0 0 437px;
|
||||
right: 60px;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.profile .wait_for input {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
.page.settings .containers {
|
||||
width: 84%;
|
||||
float: left;
|
||||
padding: 40px 2%;
|
||||
padding: 40px 0 40px 2%;
|
||||
min-height: 300px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user