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