Merge branch 'refs/heads/develop'

This commit is contained in:
Ruud
2013-05-11 00:08:51 +02:00
24 changed files with 582 additions and 453 deletions
+7 -2
View File
@@ -139,8 +139,13 @@ def fireEvent(name, *args, **kwargs):
log.error('%s: %s', (name, traceback.format_exc())) log.error('%s: %s', (name, traceback.format_exc()))
def fireEventAsync(*args, **kwargs): def fireEventAsync(*args, **kwargs):
kwargs['async'] = True try:
fireEvent(*args, **kwargs) t = threading.Thread(target = fireEvent, args = args, kwargs = kwargs)
t.setDaemon(True)
t.start()
return True
except Exception, e:
log.error('%s: %s', (args[0], e))
def errorHandler(error): def errorHandler(error):
etype, value, tb = error etype, value, tb = error
@@ -31,8 +31,8 @@ var NotificationBase = new Class({
}); });
window.addEvent('load', function(){ window.addEvent('load', function(){
self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 300, self) self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 100, self);
}); })
}, },
@@ -13,6 +13,7 @@ class XBMC(Notification):
listen_to = ['renamer.after'] listen_to = ['renamer.after']
use_json_notifications = {} use_json_notifications = {}
http_time_between_calls = 0
def notify(self, message = '', data = {}, listener = None): def notify(self, message = '', data = {}, listener = None):
+7 -4
View File
@@ -1,11 +1,11 @@
var File = new Class({ var File = new Class({
initialize: function(file){ initialize: function(type, file){
var self = this; var self = this;
if(!file){ if(!file){
self.empty = true; self.empty = true;
self.el = new Element('div'); self.el = new Element('div.empty_file.'+type);
return return
} }
@@ -22,7 +22,10 @@ var File = new Class({
var file_name = self.data.path.replace(/^.*[\\\/]/, ''); var file_name = self.data.path.replace(/^.*[\\\/]/, '');
self.el = new Element('div', { self.el = new Element('div', {
'class': 'type_image ' + self.type.identifier 'class': 'type_image ' + self.type.identifier,
'styles': {
'background-image': 'url('+Api.createUrl('file.cache') + file_name+')'
}
}).adopt( }).adopt(
new Element('img', { new Element('img', {
'src': Api.createUrl('file.cache') + file_name 'src': Api.createUrl('file.cache') + file_name
@@ -45,7 +48,7 @@ var FileSelect = new Class({
}); });
if(single) if(single)
return new File(results.pop()); return new File(type, results.pop());
return results; return results;
@@ -6,19 +6,6 @@ Page.Log = new Class({
title: 'Show recent logs.', title: 'Show recent logs.',
has_tab: false, has_tab: false,
initialize: function(options){
var self = this;
self.parent(options)
App.getBlock('more').addLink(new Element('a', {
'href': App.createUrl(self.name),
'text': self.name.capitalize(),
'title': self.title
}))
},
indexAction: function(){ indexAction: function(){
var self = this; var self = this;
+89 -74
View File
@@ -48,7 +48,7 @@ var MovieList = new Class({
self.changeView('list'); self.changeView('list');
else else
self.changeView(self.getSavedView() || self.options.view || 'details'); self.changeView(self.getSavedView() || self.options.view || 'details');
self.getMovies(); self.getMovies();
App.addEvent('movie.added', self.movieAdded.bind(self)) App.addEvent('movie.added', self.movieAdded.bind(self))
@@ -151,66 +151,65 @@ var MovieList = new Class({
self.el.addClass('with_navigation') self.el.addClass('with_navigation')
self.navigation = new Element('div.alph_nav').grab( self.navigation = new Element('div.alph_nav').adopt(
new Element('div').adopt( self.mass_edit_form = new Element('div.mass_edit_form').adopt(
self.navigation_alpha = new Element('ul.numbers', { new Element('span.select').adopt(
self.mass_edit_select = new Element('input[type=checkbox].inlay', {
'events': {
'change': self.massEditToggleAll.bind(self)
}
}),
self.mass_edit_selected = new Element('span.count', {'text': 0}),
self.mass_edit_selected_label = new Element('span', {'text': 'selected'})
),
new Element('div.quality').adopt(
self.mass_edit_quality = new Element('select'),
new Element('a.button.orange', {
'text': 'Change quality',
'events': {
'click': self.changeQualitySelected.bind(self)
}
})
),
new Element('div.delete').adopt(
new Element('span[text=or]'),
new Element('a.button.red', {
'text': 'Delete',
'events': {
'click': self.deleteSelected.bind(self)
}
})
),
new Element('div.refresh').adopt(
new Element('span[text=or]'),
new Element('a.button.green', {
'text': 'Refresh',
'events': {
'click': self.refreshSelected.bind(self)
}
})
)
),
new Element('div.menus').adopt(
self.navigation_counter = new Element('span.counter[title=Total]'),
self.navigation_actions = new Element('ul.actions', {
'events': { 'events': {
'click:relay(li)': function(e, el){ 'click:relay(li)': function(e, el){
self.movie_list.empty() var a = 'active';
self.activateLetter(el.get('data-letter')) self.navigation_actions.getElements('.'+a).removeClass(a);
self.getMovies() self.changeView(el.get('data-view'));
this.addClass(a);
el.inject(el.getParent(), 'top')
} }
} }
}), }),
self.navigation_counter = new Element('span.counter[title=Total]'), self.filter_menu = new Block.Menu(self, {
self.navigation_actions = new Element('ul.inlay.actions.reversed'), 'class': 'filter'
self.navigation_search_input = new Element('input.search.inlay', {
'title': 'Search through ' + self.options.identifier,
'placeholder': 'Search through ' + self.options.identifier,
'events': {
'keyup': self.search.bind(self),
'change': self.search.bind(self)
}
}), }),
self.navigation_menu = new Block.Menu(self), self.navigation_menu = new Block.Menu(self, {
self.mass_edit_form = new Element('div.mass_edit_form').adopt( 'class': 'extra'
new Element('span.select').adopt( })
self.mass_edit_select = new Element('input[type=checkbox].inlay', {
'events': {
'change': self.massEditToggleAll.bind(self)
}
}),
self.mass_edit_selected = new Element('span.count', {'text': 0}),
self.mass_edit_selected_label = new Element('span', {'text': 'selected'})
),
new Element('div.quality').adopt(
self.mass_edit_quality = new Element('select'),
new Element('a.button.orange', {
'text': 'Change quality',
'events': {
'click': self.changeQualitySelected.bind(self)
}
})
),
new Element('div.delete').adopt(
new Element('span[text=or]'),
new Element('a.button.red', {
'text': 'Delete',
'events': {
'click': self.deleteSelected.bind(self)
}
})
),
new Element('div.refresh').adopt(
new Element('span[text=or]'),
new Element('a.button.green', {
'text': 'Refresh',
'events': {
'click': self.refreshSelected.bind(self)
}
})
)
)
) )
).inject(self.el, 'top'); ).inject(self.el, 'top');
@@ -223,20 +222,35 @@ var MovieList = new Class({
}).inject(self.mass_edit_quality) }).inject(self.mass_edit_quality)
}); });
self.filter_menu.addLink(
self.navigation_search_input = new Element('input', {
'title': 'Search through ' + self.options.identifier,
'placeholder': 'Search through ' + self.options.identifier,
'events': {
'keyup': self.search.bind(self),
'change': self.search.bind(self)
}
})
).addClass('search');
self.filter_menu.addLink(
self.navigation_alpha = new Element('ul.numbers', {
'events': {
'click:relay(li.available)': function(e, el){
self.activateLetter(el.get('data-letter'))
self.getMovies(true)
}
}
})
);
// Actions // Actions
['mass_edit', 'details', 'list'].each(function(view){ ['mass_edit', 'details', 'list'].each(function(view){
self.navigation_actions.adopt( var current = self.current_view == view;
new Element('li.'+view+(self.current_view == view ? '.active' : '')+'[data-view='+view+']', { new Element('li', {
'events': { 'class': 'icon2 ' + view + (current ? ' active ' : ''),
'click': function(e){ 'data-view': view
var a = 'active'; }).inject(self.navigation_actions, current ? 'top' : 'bottom');
self.navigation_actions.getElements('.'+a).removeClass(a);
self.changeView(this.get('data-view'));
this.addClass(a);
}
}
}).adopt(new Element('span'))
)
}); });
// All // All
@@ -260,11 +274,11 @@ var MovieList = new Class({
'status': self.options.status 'status': self.options.status
}, self.filter), }, self.filter),
'onSuccess': function(json){ 'onSuccess': function(json){
json.chars.split('').each(function(c){ json.chars.split('').each(function(c){
self.letters[c.capitalize()].addClass('available') self.letters[c.capitalize()].addClass('available')
}) })
} }
}); });
@@ -448,8 +462,7 @@ var MovieList = new Class({
self.activateLetter(); self.activateLetter();
self.filter.search = search_value; self.filter.search = search_value;
self.movie_list.empty(); self.getMovies(true);
self.getMovies();
self.last_search_value = search_value; self.last_search_value = search_value;
@@ -461,11 +474,10 @@ var MovieList = new Class({
var self = this; var self = this;
self.reset(); self.reset();
self.movie_list.empty(); self.getMovies(true);
self.getMovies();
}, },
getMovies: function(){ getMovies: function(reset){
var self = this; var self = this;
if(self.scrollspy){ if(self.scrollspy){
@@ -495,6 +507,9 @@ var MovieList = new Class({
'limit_offset': self.options.limit + ',' + self.offset 'limit_offset': self.options.limit + ',' + self.offset
}, self.filter), }, self.filter),
'onSuccess': function(json){ 'onSuccess': function(json){
if(reset)
self.movie_list.empty();
if(self.loader_first){ if(self.loader_first){
var lf = self.loader_first; var lf = self.loader_first;
@@ -1,6 +1,6 @@
var MovieAction = new Class({ var MovieAction = new Class({
class_name: 'action icon', class_name: 'action icon2',
initialize: function(movie){ initialize: function(movie){
var self = this; var self = this;
@@ -82,7 +82,7 @@ MA.Release = new Class({
create: function(){ create: function(){
var self = this; var self = this;
self.el = new Element('a.releases.icon.download', { self.el = new Element('a.releases.download', {
'title': 'Show the releases that are available for ' + self.movie.getTitle(), 'title': 'Show the releases that are available for ' + self.movie.getTitle(),
'events': { 'events': {
'click': self.show.bind(self) 'click': self.show.bind(self)
@@ -100,10 +100,8 @@ MA.Release = new Class({
var self = this; var self = this;
if(!self.options_container){ if(!self.options_container){
self.options_container = new Element('div.options').adopt( self.options_container = new Element('div.options').grab(
self.release_container = new Element('div.releases.table').adopt( self.release_container = new Element('div.releases.table')
self.trynext_container = new Element('div.buttons.try_container')
)
); );
// Header // Header
@@ -149,11 +147,11 @@ MA.Release = new Class({
new Element('span.age', {'text': self.get(release, 'age')}), new Element('span.age', {'text': self.get(release, 'age')}),
new Element('span.score', {'text': self.get(release, 'score')}), new Element('span.score', {'text': self.get(release, 'score')}),
new Element('span.provider', { 'text': provider, 'title': provider }), new Element('span.provider', { 'text': provider, 'title': provider }),
release.info['detail_url'] ? new Element('a.info.icon', { release.info['detail_url'] ? new Element('a.info.icon2', {
'href': release.info['detail_url'], 'href': release.info['detail_url'],
'target': '_blank' 'target': '_blank'
}) : null, }) : new Element('a'),
new Element('a.download.icon', { new Element('a.download.icon2', {
'events': { 'events': {
'click': function(e){ 'click': function(e){
(e).preventDefault(); (e).preventDefault();
@@ -162,7 +160,7 @@ MA.Release = new Class({
} }
} }
}), }),
new Element('a.delete.icon', { new Element('a.delete.icon2', {
'events': { 'events': {
'click': function(e){ 'click': function(e){
(e).preventDefault(); (e).preventDefault();
@@ -190,7 +188,9 @@ MA.Release = new Class({
self.release_container.getElement('#release_'+self.next_release.id).addClass('next_release'); self.release_container.getElement('#release_'+self.next_release.id).addClass('next_release');
} }
if(self.next_release || self.last_release){ if(self.next_release || (self.last_release && ['ignored', 'failed'].indexOf(self.last_release.status.identifier) === false)){
self.trynext_container = new Element('div.buttons.try_container').inject(self.release_container, 'top');
self.trynext_container.adopt( self.trynext_container.adopt(
new Element('span.or', { new Element('span.or', {
@@ -237,18 +237,19 @@ MA.Release = new Class({
(e).preventDefault(); (e).preventDefault();
self.createReleases(); self.createReleases();
self.trynext_container = new Element('div.buttons.trynext').inject(self.movie.info_container);
if(self.next_release || self.last_release){ if(self.next_release || (self.last_release && ['ignored', 'failed'].indexOf(self.last_release.status.identifier) === false)){
self.trynext_container = new Element('div.buttons.trynext').inject(self.movie.info_container);
self.trynext_container.adopt( self.trynext_container.adopt(
self.next_release ? [new Element('a.icon.readd', { self.next_release ? [new Element('a.icon2.readd', {
'text': self.last_release ? 'Download another release' : 'Download the best release', 'text': self.last_release ? 'Download another release' : 'Download the best release',
'events': { 'events': {
'click': self.tryNextRelease.bind(self) 'click': self.tryNextRelease.bind(self)
} }
}), }),
new Element('a.icon.download', { new Element('a.icon2.download', {
'text': 'pick one yourself', 'text': 'pick one yourself',
'events': { 'events': {
'click': function(){ 'click': function(){
@@ -256,7 +257,7 @@ MA.Release = new Class({
} }
} }
})] : null, })] : null,
new Element('a.icon.completed', { new Element('a.icon2.completed', {
'text': 'mark this movie done', 'text': 'mark this movie done',
'events': { 'events': {
'click': function(){ 'click': function(){
@@ -292,7 +293,7 @@ MA.Release = new Class({
var self = this; var self = this;
var release_el = self.release_container.getElement('#release_'+release.id), var release_el = self.release_container.getElement('#release_'+release.id),
icon = release_el.getElement('.download.icon'); icon = release_el.getElement('.download.icon2');
self.movie.busy(true); self.movie.busy(true);
+223 -157
View File
@@ -11,7 +11,6 @@
.movies.thumbs_list > div:not(.description) { .movies.thumbs_list > div:not(.description) {
margin-right: -4px; margin-right: -4px;
text-align: center;
} }
.movies .loading { .movies .loading {
@@ -79,24 +78,36 @@
.movies .movie { .movies .movie {
position: relative; position: relative;
border-radius: 4px;
margin: 10px 0; margin: 10px 0;
padding-left: 20px; padding-left: 20px;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
height: 180px; height: 180px;
transition: all 0.6s cubic-bezier(0.9,0,0.1,1); transition: all 0.6s cubic-bezier(0.9,0,0.1,1);
transition-property: width, height;
background: rgba(0,0,0,.2);
} }
.movies.mass_edit_list .movie {
padding-left: 22px;
background: none;
}
.movies.details_list .movie { .movies.details_list .movie {
padding-left: 120px; padding-left: 120px;
} }
.movies.list_list .movie:not(.details_view), .movies.list_list .movie:not(.details_view),
.movies.mass_edit_list .movie { .movies.mass_edit_list .movie {
height: 32px; height: 30px;
border-bottom: 1px solid rgba(255,255,255,.15);
} }
.movies.list_list .movie:last-child,
.movies.mass_edit_list .movie:last-child {
border: none;
}
.movies.thumbs_list .movie { .movies.thumbs_list .movie {
width: 16.66667%; width: 16.66667%;
height: auto; height: auto;
@@ -104,9 +115,6 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
vertical-align: top; vertical-align: top;
border-radius: 0;
box-shadow: none;
border: 0;
} }
@media all and (max-width: 800px) { @media all and (max-width: 800px) {
@@ -125,16 +133,7 @@
.movies.list_list .movie:not(.details_view), .movies.list_list .movie:not(.details_view),
.movies.mass_edit_list .movie { .movies.mass_edit_list .movie {
margin: 1px 0; margin: 0;
border-radius: 0;
background: no-repeat;
box-shadow: none;
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.movies.list_list .movie:hover:not(.details_view),
.movies.mass_edit_list .movie {
background: rgba(255,255,255,0.03);
} }
.movies .data { .movies .data {
@@ -142,18 +141,18 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
position: relative; position: relative;
right: 0;
border-radius: 0;
transition: all .6s cubic-bezier(0.9,0,0.1,1); transition: all .6s cubic-bezier(0.9,0,0.1,1);
right: 0;
} }
.movies.list_list .movie:not(.details_view) .data, .movies.list_list .movie:not(.details_view) .data,
.movies.mass_edit_list .movie .data { .movies.mass_edit_list .movie .data {
height: 30px; padding: 0 0 0 10px;
padding: 3px 0 3px 10px;
box-shadow: none;
border: 0; border: 0;
background: #4e5969; background: #4e5969;
} }
.movies.mass_edit_list .movie .data {
padding-left: 8px;
}
.movies.thumbs_list .data { .movies.thumbs_list .data {
position: absolute; position: absolute;
@@ -165,14 +164,6 @@
background: none; background: none;
transition: none; transition: none;
} }
.movies.thumbs_list .movie.no_thumbnail .data { background-image: linear-gradient(-30deg, rgba(255, 0, 85, .2) 0,rgba(125, 185, 235, .2) 100%);
}
.movies.thumbs_list .movie.no_thumbnail:nth-child(2n+6) .data { background-image: linear-gradient(-20deg, rgba(125, 0, 215, .2) 0, rgba(4, 55, 5, .7) 100%); }
.movies.thumbs_list .movie.no_thumbnail:nth-child(3n+6) .data { background-image: linear-gradient(-30deg, rgba(155, 0, 85, .2) 0,rgba(25, 185, 235, .7) 100%); }
.movies.thumbs_list .movie.no_thumbnail:nth-child(4n+6) .data { background-image: linear-gradient(-30deg, rgba(115, 5, 235, .2) 0, rgba(55, 180, 5, .7) 100%); }
.movies.thumbs_list .movie.no_thumbnail:nth-child(5n+6) .data { background-image: linear-gradient(-30deg, rgba(35, 15, 215, .2) 0, rgba(135, 215, 115, .7) 100%); }
.movies.thumbs_list .movie.no_thumbnail:nth-child(6n+6) .data { background-image: linear-gradient(-30deg, rgba(35, 15, 215, .2) 0, rgba(135, 15, 115, .7) 100%); }
.movies.thumbs_list .movie:hover .data { .movies.thumbs_list .movie:hover .data {
background: rgba(0,0,0,0.9); background: rgba(0,0,0,0.9);
@@ -201,18 +192,16 @@
line-height: 0; line-height: 0;
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
border-radius: 4px 0 0 4px;
transition: all .6s cubic-bezier(0.9,0,0.1,1); transition: all .6s cubic-bezier(0.9,0,0.1,1);
background: rgba(0,0,0,.1);
} }
.movies.thumbs_list .poster { .movies.thumbs_list .poster {
position: relative; position: relative;
border-radius: 0;
} }
.movies.list_list .movie:not(.details_view) .poster, .movies.list_list .movie:not(.details_view) .poster,
.movies.mass_edit_list .poster { .movies.mass_edit_list .poster {
width: 20px; width: 20px;
height: 30px; height: 30px;
border-radius: 1px 0 0 1px;
} }
.movies.mass_edit_list .poster { .movies.mass_edit_list .poster {
display: none; display: none;
@@ -222,7 +211,13 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
transition: none; transition: none;
background: no-repeat center;
background-size: cover;
} }
.movies.thumbs_list .no_thumbnail .empty_file {
width: 100%;
height: 100%;
}
.movies .poster img, .movies .poster img,
.options .poster img { .options .poster img {
@@ -234,7 +229,7 @@
width: 100%; width: 100%;
top: 0; top: 0;
bottom: 0; bottom: 0;
border-radius: 0; opacity: 0;
} }
.movies .info { .movies .info {
@@ -248,22 +243,27 @@
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 2px; margin-top: 2px;
left: 0;
top: 0;
width: 100%; width: 100%;
padding-right: 80px; padding-right: 80px;
transition: all 0.2s linear; transition: all 0.2s linear;
height: 35px;
top: -5px;
position: relative;
} }
.movies.list_list .info .title,
.movies.mass_edit_list .info .title {
height: 100%;
top: 0;
margin: 0;
}
.movies .info .title span { .movies .info .title span {
display: block; display: inline-block;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
height: 30px; height: 100%;
line-height: 30px; line-height: 30px;
top: -5px;
position: relative;
} }
.movies.thumbs_list .info .title span { .movies.thumbs_list .info .title span {
@@ -300,13 +300,14 @@
font-size: 21px; font-size: 21px;
word-wrap: break-word; word-wrap: break-word;
padding: 0; padding: 0;
height: 100%;
} }
.movies .info .year { .movies .info .year {
position: absolute; position: absolute;
color: #bbb; color: #bbb;
right: 0; right: 0;
top: 1px; top: 6px;
text-align: right; text-align: right;
transition: all 0.2s linear; transition: all 0.2s linear;
font-weight: normal; font-weight: normal;
@@ -350,6 +351,10 @@
min-height: 20px; min-height: 20px;
} }
.movies.list_list .movie:hover .data .quality {
display: none;
}
@media all and (max-width: 480px) { @media all and (max-width: 480px) {
.movies .data .quality { .movies .data .quality {
display: none; display: none;
@@ -382,12 +387,12 @@
right: 0; right: 0;
margin-right: 60px; margin-right: 60px;
z-index: 1; z-index: 1;
top: 5px;
} }
.movies .data .quality .available, .movies .data .quality .available,
.movies .data .quality .snatched { .movies .data .quality .snatched {
opacity: 1; opacity: 1;
box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
cursor: pointer; cursor: pointer;
} }
@@ -407,13 +412,14 @@
.movies .data .actions { .movies .data .actions {
position: absolute; position: absolute;
bottom: 20px; bottom: 17px;
right: 20px; right: 20px;
line-height: 0; line-height: 0;
top: 0; top: 0;
display: block;
width: auto;
opacity: 0; opacity: 0;
display: none; display: none;
width: 0;
} }
@media all and (max-width: 480px) { @media all and (max-width: 480px) {
.movies .data .actions { .movies .data .actions {
@@ -424,7 +430,6 @@
.movies .movie:hover .data .actions { .movies .movie:hover .data .actions {
opacity: 1; opacity: 1;
display: inline-block; display: inline-block;
width: auto;
} }
.movies.details_list .data .actions { .movies.details_list .data .actions {
@@ -437,7 +442,7 @@
display: inline-block; display: inline-block;
} }
.movies.thumbs_list .data .actions { .movies.thumbs_list .data .actions {
bottom: 2px; bottom: 12px;
right: 10px; right: 10px;
top: auto; top: auto;
} }
@@ -446,14 +451,24 @@
.movies .movie:hover .action:hover { opacity: 1; } .movies .movie:hover .action:hover { opacity: 1; }
.movies .data .action { .movies .data .action {
background-repeat: no-repeat;
background-position: center;
display: inline-block; display: inline-block;
width: 26px; height: 22px;
height: 26px; min-width: 33px;
padding: 3px; padding: 0 5px;
line-height: 26px;
text-align: center;
font-size: 13px;
color: #FFF;
margin-left: 1px;
} }
.movies .data .action.trailer { color: #FFF; }
.movies .data .action.download { color: #b9dec0; }
.movies .data .action.edit { color: #c6b589; }
.movies .data .action.refresh { color: #cbeecc; }
.movies .data .action.delete { color: #e9b0b0; }
.movies .data .action.directory { color: #ffed92; }
.movies .data .action.readd { color: #c2fac5; }
.movies.mass_edit_list .movie .data .actions { .movies.mass_edit_list .movie .data .actions {
display: none; display: none;
} }
@@ -473,7 +488,7 @@
text-align: center; text-align: center;
font-size: 20px; font-size: 20px;
position: absolute; position: absolute;
padding: 70px 0 0; padding: 80px 0 0;
left: 120px; left: 120px;
right: 0; right: 0;
} }
@@ -498,9 +513,9 @@
} }
.movies .options .form { .movies .options .form {
margin: 70px 20px 0; margin: 80px 0 0;
float: left;
font-size: 20px; font-size: 20px;
text-align: center;
} }
.movies .options .form select { .movies .options .form select {
@@ -510,6 +525,7 @@
.movies .options .table { .movies .options .table {
height: 180px; height: 180px;
overflow: auto; overflow: auto;
line-height: 2em;
} }
.movies .options .table .item { .movies .options .table .item {
border-bottom: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);
@@ -518,8 +534,10 @@
text-decoration: line-through; text-decoration: line-through;
color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.4);
} }
.movies .options .table .item.ignored .delete { .movies .options .table .item.ignored .delete:before {
background-image: url('../images/icon.undo.png'); display: inline-block;
content: "\e04b";
transform: scale(-1, 1);
} }
.movies .options .table .item:last-child { border: 0; } .movies .options .table .item:last-child { border: 0; }
@@ -565,10 +583,12 @@
width: 30px !important; width: 30px !important;
height: 20px; height: 20px;
opacity: 0.8; opacity: 0.8;
line-height: 25px;
} }
.movies .options .table a:hover { .movies .options .table a:hover { opacity: 1; }
opacity: 1; .movies .options .table a.download { color: #a7fbaf; }
} .movies .options .table a.delete { color: #fda3a3; }
.movies .options .table .ignored a.delete { color: #b5fda3; }
.movies .options .table .head > * { .movies .options .table .head > * {
font-weight: bold; font-weight: bold;
@@ -601,7 +621,6 @@
text-align: center; text-align: center;
padding: 3px 10px; padding: 3px 10px;
background: #4e5969; background: #4e5969;
border-radius: 0 0 2px 2px;
transition: all .2s cubic-bezier(0.9,0,0.1,1) .2s; transition: all .2s cubic-bezier(0.9,0,0.1,1) .2s;
z-index: 11; z-index: 11;
} }
@@ -637,14 +656,12 @@
.movies .movie .trynext { .movies .movie .trynext {
display: inline; display: inline;
position: absolute; position: absolute;
right: 135px; right: 180px;
z-index: 2; z-index: 2;
opacity: 0; opacity: 0;
background: #4e5969; background: #4e5969;
min-width: 300px;
text-align: right; text-align: right;
height: 100%; height: 100%;
padding: 3px 0;
top: 0; top: 0;
} }
@@ -655,7 +672,7 @@
} }
.movies.mass_edit_list .trynext { display: none; } .movies.mass_edit_list .trynext { display: none; }
.wanted .movies .movie .trynext { .wanted .movies .movie .trynext {
padding-right: 50px; padding-right: 30px;
} }
.movies .movie:hover .trynext { .movies .movie:hover .trynext {
opacity: 1; opacity: 1;
@@ -665,8 +682,7 @@
background: #47515f; background: #47515f;
padding: 0; padding: 0;
right: 0; right: 0;
bottom: 35px; height: 25px;
height: auto;
} }
.movies .movie .trynext a { .movies .movie .trynext a {
@@ -674,10 +690,20 @@
padding: 0 5px 0 25px; padding: 0 5px 0 25px;
margin-right: 10px; margin-right: 10px;
color: #FFF; color: #FFF;
border-radius: 2px; height: 100%;
line-height: 27px;
font-family: OpenSans, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
} }
.movies .movie .trynext a:before {
margin: 2px 0 0 -20px;
position: absolute;
font-family: 'Elusive-Icons';
}
.movies.details_list .movie .trynext a {
line-height: 23px;
}
.movies .movie .trynext a:last-child { .movies .movie .trynext a:last-child {
margin: 0; margin: 0;
} }
.movies .movie .trynext a:hover { .movies .movie .trynext a:hover {
background-color: #369545; background-color: #369545;
@@ -694,14 +720,7 @@
} }
.movies .alph_nav { .movies .alph_nav {
transition: box-shadow .4s linear; height: 44px;
position: relative;
z-index: 4;
top: 0px;
right: 0;
margin: 0 auto;
width: 100%;
padding: 10px 0;
} }
@media all and (max-width: 480px) { @media all and (max-width: 480px) {
@@ -709,13 +728,10 @@
display: none; display: none;
} }
} }
.movies .alph_nav > div { .movies .alph_nav .menus {
position: relative; display: inline-block;
max-width: 980px; float: right;
margin: 0 auto;
padding: 0;
min-height: 24px;
} }
.movies .alph_nav .numbers, .movies .alph_nav .numbers,
@@ -724,118 +740,150 @@
list-style: none; list-style: none;
padding: 0 0 1px; padding: 0 0 1px;
margin: 0; margin: 0;
float: left;
user-select: none; user-select: none;
} }
.movies .alph_nav .counter { .movies .alph_nav .counter {
display: inline-block;
text-align: right; text-align: right;
position: absolute; padding: 0 10px;
right: 270px; height: 100%;
background: #4e5969; line-height: 43px;
padding: 4px 10px; border-right: 1px solid rgba(255,255,255,.07);
} }
.movies .alph_nav .numbers li, .movies .alph_nav .numbers li,
.movies .alph_nav .actions li { .movies .alph_nav .actions li {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
height: 24px; height: 100%;
line-height: 23px; line-height: 30px;
text-align: center; text-align: center;
cursor: pointer;
color: rgba(255,255,255,0.2);
border: 1px solid transparent; border: 1px solid transparent;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
} }
@media all and (max-width: 900px) {
.movies .alph_nav .numbers {
display: none;
}
}
.movies .alph_nav .numbers li { .movies .alph_nav .numbers li {
width: auto; width: 30px;
padding: 0 4px; height: 30px;
opacity: 0.3;
} }
.movies .alph_nav .numbers li.letter_all {
width: 60px;
}
.movies .alph_nav li.available { .movies .alph_nav li.available {
color: #FFF; font-weight: bold;
font-weight: bolder; cursor: pointer;
opacity: 1;
} }
.movies .alph_nav li.active.available, .movies .alph_nav li.active.available,
.movies .alph_nav li.available:hover { .movies .alph_nav li.available:hover {
background: rgba(255,255,255,.1); background: rgba(0,0,0,.1);
} }
.movies .alph_nav .search { .movies .alph_nav .search input {
padding: 6px 5px; padding: 6px 5px;
margin: 0 0 0 20px; width: 100%;
position: absolute; height: 44px;
right: 30px; display: inline-block;
width: 154px; border: 0;
height: 25px; background: none;
transition: all 0.6s cubic-bezier(0.9,0,0.1,1); color: #444;
font-size: 14px;
padding: 10px;
padding: 0 10px 0 30px;
border-bottom: 1px solid rgba(0,0,0,.08);
} }
.movies .alph_nav .search input:focus {
background: rgba(0,0,0,.08);
}
.movies .alph_nav .search input::-webkit-input-placeholder {
color: #444;
opacity: .6;
}
.movies .alph_nav .search:before {
font-family: 'Elusive-Icons';
content: "\e03e";
position: absolute;
height: 100%;
line-height: 45px;
font-size: 12px;
margin: 0 0 0 10px;
opacity: .6;
color: #444;
}
.movies .alph_nav .actions { .movies .alph_nav .actions {
margin: 0 6px 0 0;
-moz-user-select: none; -moz-user-select: none;
position: absolute; width: 44px;
right: 183px; height: 44px;
display: inline-block;
vertical-align: top;
z-index: 200;
position: relative;
} }
.movies .alph_nav .actions:hover {
box-shadow: 0 100px 20px -10px rgba(0,0,0,0.55);
}
.movies .alph_nav .actions li { .movies .alph_nav .actions li {
border-radius: 1px; width: 100%;
width: auto; height: 45px;
line-height: 40px;
position: relative;
z-index: 20;
display: none;
cursor: pointer;
} }
.movies .alph_nav .actions li.active { .movies .alph_nav .actions:hover li:not(.active) {
background: none; display: block;
border: 1px solid transparent; background: #FFF;
box-shadow: none; color: #444;
} }
.movies .alph_nav .actions li span { .movies .alph_nav .actions li:hover:not(.active) {
display: block; background: #ccc;
background: url('../images/sprite.png') no-repeat; }
width: 25px; .movies .alph_nav .actions li.active {
height: 100%; display: block;
}
.movies .alph_nav .actions li.mass_edit span {
background-position: 3px 3px;
} }
.movies .alph_nav .actions li.list span { .movies .alph_nav .actions li.mass_edit:before {
background-position: 3px -95px; content: "\e070";
} }
.movies .alph_nav .actions li.details span { .movies .alph_nav .actions li.list:before {
background-position: 3px -74px; content: "\e0d8";
} }
.movies .alph_nav .actions li:first-child { .movies .alph_nav .actions li.details:before {
border-radius: 3px 0 0 3px; content: "\e022";
} }
.movies .alph_nav .actions li:last-child {
border-radius: 0 3px 3px 0;
}
.movies .alph_nav .mass_edit_form { .movies .alph_nav .mass_edit_form {
clear: both; clear: both;
text-align: center; text-align: center;
display: none; display: none;
overflow: hidden;
float: left;
height: 44px;
line-height: 44px;
} }
.movies.mass_edit_list .mass_edit_form { .movies.mass_edit_list .mass_edit_form {
display: block; display: inline-block;
} }
.movies.mass_edit_list .mass_edit_form .select { .movies.mass_edit_list .mass_edit_form .select {
float: left;
margin: 5px 0 0 5px;
font-size: 14px; font-size: 14px;
display: inline-block;
} }
.movies.mass_edit_list .mass_edit_form .select span { .movies.mass_edit_list .mass_edit_form .select .check {
display: inline-block;
vertical-align: middle; vertical-align: middle;
margin: -4px 0 0 5px;
}
.movies.mass_edit_list .mass_edit_form .select span {
opacity: 0.7; opacity: 0.7;
} }
.movies.mass_edit_list .mass_edit_form .select .count { .movies.mass_edit_list .mass_edit_form .select .count {
@@ -844,8 +892,7 @@
} }
.movies .alph_nav .mass_edit_form .quality { .movies .alph_nav .mass_edit_form .quality {
float: left; display: inline-block;
padding: 8px 0 0;
margin: 0 0 0 16px; margin: 0 0 0 16px;
} }
.movies .alph_nav .mass_edit_form .quality select { .movies .alph_nav .mass_edit_form .quality select {
@@ -858,8 +905,8 @@
.movies .alph_nav .mass_edit_form .refresh, .movies .alph_nav .mass_edit_form .refresh,
.movies .alph_nav .mass_edit_form .delete { .movies .alph_nav .mass_edit_form .delete {
float: left; display: inline-block;
padding: 8px 0 0 8px; margin-left: 8px;
} }
.movies .alph_nav .mass_edit_form .refresh span, .movies .alph_nav .mass_edit_form .refresh span,
@@ -867,16 +914,36 @@
margin: 0 10px 0 0; margin: 0 10px 0 0;
} }
.movies .alph_nav .more_menu {
right: 0;
position: absolute;
}
.movies .alph_nav .more_menu > a { .movies .alph_nav .more_menu > a {
background-color: #4e5969; background: none;
background-position: center -158px;
} }
.movies .alph_nav .more_menu.extra > a:before {
content: '...';
font-size: 1.7em;
line-height: 23px;
text-align: center;
display: block;
}
.movies .alph_nav .more_menu.filter {
border: 1px solid rgba(255,255,255,.07);
border-width: 0 1px;
}
.movies .alph_nav .more_menu.filter > a:before {
content: "\e0e8";
font-family: 'Elusive-Icons';
line-height: 33px;
display: block;
text-align: center;
}
.movies .alph_nav .more_menu.filter .wrapper {
right: 45px;
width: 300px;
}
.movies .empty_wanted { .movies .empty_wanted {
background-image: url('../images/emptylist.png'); background-image: url('../images/emptylist.png');
height: 750px; height: 750px;
@@ -889,6 +956,7 @@
text-align: center; text-align: center;
font-size: 25px; font-size: 25px;
line-height: 150%; line-height: 150%;
padding: 40px 0;
} }
.movies .empty_manage .after_manage { .movies .empty_manage .after_manage {
@@ -897,7 +965,6 @@
} }
.movies .progress { .movies .progress {
border-radius: 2px;
padding: 10px; padding: 10px;
margin: 5px 0; margin: 5px 0;
text-align: left; text-align: left;
@@ -912,7 +979,6 @@
width: 49%; width: 49%;
background: rgba(255, 255, 255, 0.05); background: rgba(255, 255, 255, 0.05);
margin: 2px 0.5%; margin: 2px 0.5%;
border-radius: 3px;
} }
.movies .progress > div .folder { .movies .progress > div .folder {
@@ -11,7 +11,7 @@ var Movie = new Class({
self.view = options.view || 'details'; self.view = options.view || 'details';
self.list = list; self.list = list;
self.el = new Element('div.movie.inlay'); self.el = new Element('div.movie');
self.profile = Quality.getProfile(data.profile_id) || {}; self.profile = Quality.getProfile(data.profile_id) || {};
self.parent(self, options); self.parent(self, options);
@@ -139,9 +139,6 @@ var Movie = new Class({
'text': self.data.library.year || 'n/a' 'text': self.data.library.year || 'n/a'
}) })
), ),
self.rating = new Element('div.rating.icon', {
'text': self.data.library.rating
}),
self.description = new Element('div.description', { self.description = new Element('div.description', {
'text': self.data.library.plot 'text': self.data.library.plot
}), }),
@@ -149,8 +146,8 @@ var Movie = new Class({
'events': { 'events': {
'click': function(e){ 'click': function(e){
var releases = self.el.getElement('.actions .releases'); var releases = self.el.getElement('.actions .releases');
if(releases) if(releases.isVisible())
releases.fireEvent('click', [e]) releases.fireEvent('click', [e])
} }
} }
}) })
@@ -199,9 +196,6 @@ var Movie = new Class({
self.actions.adopt(action) self.actions.adopt(action)
}); });
if(!self.data.library.rating)
self.rating.hide();
}, },
addQuality: function(quality_id){ addQuality: function(quality_id){
@@ -44,9 +44,8 @@
.search_form .input input { .search_form .input input {
border-radius: 0; border-radius: 0;
display: block; display: block;
width: 100%;
border: 0; border: 0;
background: rgba(255,255,255,.08); background: none;
color: #FFF; color: #FFF;
font-size: 25px; font-size: 25px;
height: 100%; height: 100%;
@@ -106,7 +105,7 @@
background: #5c697b; background: #5c697b;
margin: 4px 0 0; margin: 4px 0 0;
width: 470px; width: 470px;
min-height: 140px; min-height: 50px;
box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55); box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55);
display: none; display: none;
} }
@@ -98,6 +98,9 @@ Block.Search = new Class({
self.el[self.q() ? 'addClass' : 'removeClass']('filled') self.el[self.q() ? 'addClass' : 'removeClass']('filled')
if(self.q() != self.last_q){ if(self.q() != self.last_q){
if(self.api_request && self.api_request.isRunning())
self.api_request.cancel();
if(self.autocomplete_timer) clearTimeout(self.autocomplete_timer) if(self.autocomplete_timer) clearTimeout(self.autocomplete_timer)
self.autocomplete_timer = self.autocomplete.delay(300, self) self.autocomplete_timer = self.autocomplete.delay(300, self)
} }
@@ -116,12 +119,9 @@ Block.Search = new Class({
}, },
list: function(){ list: function(){
var self = this; var self = this,
q = self.q(),
if(self.api_request && self.api_request.running) return cache = self.cache[q];
var q = self.q();
var cache = self.cache[q];
self.hideResults(false); self.hideResults(false);
@@ -164,9 +164,6 @@ Block.Search = new Class({
}); });
if(q != self.q())
self.list()
// Calculate result heights // Calculate result heights
var w = window.getSize(), var w = window.getSize(),
rc = self.result_container.getCoordinates(); rc = self.result_container.getCoordinates();
@@ -13,11 +13,11 @@
.profile > .delete { .profile > .delete {
position: absolute; position: absolute;
padding: 25px 20px; padding: 16px;
background-position: center;
right: 0; right: 0;
cursor: pointer; cursor: pointer;
opacity: 0.6; opacity: 0.6;
color: #fd5353;
} }
.profile > .delete:hover { .profile > .delete:hover {
opacity: 1; opacity: 1;
@@ -29,6 +29,7 @@
.profile .qualities { .profile .qualities {
min-height: 80px; min-height: 80px;
padding-top: 0;
} }
.profile .formHint { .profile .formHint {
@@ -97,11 +98,13 @@
} }
.profile .types .type .delete { .profile .types .type .delete {
background-position: left center;
height: 20px; height: 20px;
width: 20px; width: 20px;
line-height: 20px;
visibility: hidden; visibility: hidden;
cursor: pointer; cursor: pointer;
font-size: 13px;
color: #fd5353;
} }
.profile .types .type:hover:not(.is_empty) .delete { .profile .types .type:hover:not(.is_empty) .delete {
@@ -24,7 +24,7 @@ var Profile = new Class({
var data = self.data; var data = self.data;
self.el = new Element('div.profile').adopt( self.el = new Element('div.profile').adopt(
self.delete_button = new Element('span.delete.icon', { self.delete_button = new Element('span.delete.icon2', {
'events': { 'events': {
'click': self.del.bind(self) 'click': self.del.bind(self)
} }
@@ -256,7 +256,7 @@ Profile.Type = new Class({
} }
}) })
), ),
new Element('span.delete.icon', { new Element('span.delete.icon2', {
'events': { 'events': {
'click': self.del.bind(self) 'click': self.del.bind(self)
} }
@@ -2,7 +2,6 @@ from couchpotato import get_session
from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.encoding import tryUrlencode
from couchpotato.core.helpers.request import jsonified, getParams from couchpotato.core.helpers.request import jsonified, getParams
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.providers.movie.base import MovieProvider from couchpotato.core.providers.movie.base import MovieProvider
from couchpotato.core.settings.model import Movie from couchpotato.core.settings.model import Movie
@@ -35,8 +35,11 @@ class ThePirateBay(TorrentMagnetProvider):
'https://piratereverse.info', 'https://piratereverse.info',
'https://tpb.pirateparty.org.uk', 'https://tpb.pirateparty.org.uk',
'https://argumentomteemigreren.nl', 'https://argumentomteemigreren.nl',
'https://livepirate.com/', 'https://livepirate.com',
'https://www.getpirate.com/', 'https://www.getpirate.com',
'https://tpb.partipirate.org',
'https://tpb.piraten.lu',
'https://kuiken.co',
] ]
def __init__(self): def __init__(self):
@@ -4,7 +4,9 @@ import re
class Filmweb(UserscriptBase): class Filmweb(UserscriptBase):
includes = ['http://www.filmweb.pl/*'] version = 2
includes = ['http://www.filmweb.pl/film/*']
def getMovie(self, url): def getMovie(self, url):
+17 -6
View File
@@ -15,19 +15,21 @@ Block.Menu = new Class({
self.wrapper = new Element('div.wrapper').adopt( self.wrapper = new Element('div.wrapper').adopt(
self.more_option_ul = new Element('ul') self.more_option_ul = new Element('ul')
), ),
new Element('a.button.onlay' + (self.options.button_class ? '.' + self.options.button_class : ''), { self.button = new Element('a.button' + (self.options.button_class ? '.' + self.options.button_class : ''), {
'events': { 'events': {
'click': function(){ 'click': function(){
self.el.toggleClass('show') self.el.toggleClass('show')
self.fireEvent(self.el.hasClass('show') ? 'open' : 'close') self.fireEvent(self.el.hasClass('show') ? 'open' : 'close')
if(self.el.hasClass('show')) if(self.el.hasClass('show')){
this.addEvent('outerClick', function(){ self.el.addEvent('outerClick', self.removeOuterClick.bind(self))
self.el.removeClass('show') this.addEvent('outerClick', function(e){
this.removeEvents('outerClick'); if(e.target.get('tag') != 'input')
self.removeOuterClick()
}) })
}
else else
this.removeEvents('outerClick'); self.removeOuterClick()
} }
} }
@@ -36,6 +38,15 @@ Block.Menu = new Class({
}, },
removeOuterClick: function(){
var self = this;
self.el.removeClass('show')
self.el.removeEvents('outerClick');
self.button.removeEvents('outerClick');
},
addLink: function(tab, position){ addLink: function(tab, position){
var self = this; var self = this;
var el = new Element('li').adopt(tab).inject(self.more_option_ul, position || 'bottom'); var el = new Element('li').adopt(tab).inject(self.more_option_ul, position || 'bottom');
@@ -67,12 +67,12 @@ Block.Navigation = new Class({
if(!self.added){ if(!self.added){
new Element('li.separator').inject(self.nav); new Element('li.separator').inject(self.nav);
body.getElements('.header .more_menu.menu li a').each(function(el, nr){ body.getElements('.header .more_menu.menu li a, .header .more_menu.menu li span.separator').each(function(el, nr){
if([0, 1, 2, 5].indexOf(nr) > -1){ if(nr <= 2) return;
self.nav.grab( if(el.get('tag') == 'a')
new Element('li').grab(el.clone().cloneEvents(el)) self.nav.grab(new Element('li').grab(el.clone().cloneEvents(el)));
); else
} self.nav.grab(new Element('li.separator'));
}); });
self.added = true; self.added = true;
+36 -22
View File
@@ -68,28 +68,42 @@ var CouchPotato = new Class({
self.block.footer = new Block.Footer(self, {}) self.block.footer = new Block.Footer(self, {})
); );
[new Element('a.orange', { var setting_links = [
'text': 'Restart', new Element('a', {
'events': { 'text': 'About CouchPotato',
'click': self.restartQA.bind(self) 'href': App.createUrl('settings/about')
} }),
}), new Element('a', {
new Element('a.red', { 'text': 'Check for Updates',
'text': 'Shutdown', 'events': {
'events': { 'click': self.checkForUpdate.bind(self, null)
'click': self.shutdownQA.bind(self) }
} }),
}), new Element('span.separator'),
new Element('a', { new Element('a', {
'text': 'Update to latest', 'text': 'Settings',
'events': { 'href': App.createUrl('settings/general')
'click': self.checkForUpdate.bind(self, null) }),
} new Element('a', {
}), 'text': 'Logs',
new Element('a', { 'href': App.createUrl('log')
'text': 'Run install wizard', }),
'href': App.createUrl('wizard') new Element('span.separator'),
})].each(function(a){ new Element('a', {
'text': 'Restart',
'events': {
'click': self.restartQA.bind(self)
}
}),
new Element('a', {
'text': 'Shutdown',
'events': {
'click': self.shutdownQA.bind(self)
}
})
]
setting_links.each(function(a){
self.block.more.addLink(a) self.block.more.addLink(a)
}) })
+22 -16
View File
@@ -65,31 +65,37 @@ Page.Home = new Class({
// Make all thumbnails the same size // Make all thumbnails the same size
self.soon_list.addEvent('loaded', function(){ self.soon_list.addEvent('loaded', function(){
var images = $(self.soon_list).getElements('img'), var images = $(self.soon_list).getElements('.poster'),
timer, timer,
lowest = null; highest = 100;
images.addEvent('load', function(){ images.each(function(img_container){
var height = this.getSize().y; img_container.getElements('img').addEvent('load', function(){
if(!lowest || lowest > height){ var img = this,
lowest = height; height = img.getSize().y;
if(timer) clearTimeout(timer); if(!highest || highest < height){
timer = (function(){ highest = height;
images.getParent().setStyle('height', lowest); if(timer) clearTimeout(timer);
}).delay(300) timer = (function(){
} images.setStyle('height', highest);
}).delay(50);
}
});
}); });
$(window).addEvent('resize', function(){ $(window).addEvent('resize', function(){
if(timer) clearTimeout(timer); if(timer) clearTimeout(timer);
timer = (function(){ timer = (function(){
var lowest; var highest = 100;
images.each(function(img){ images.each(function(img_container){
var img = img_container.getElement('img');
if(!img) return
var height = img.getSize().y; var height = img.getSize().y;
if(!lowest || lowest > height) if(!highest || highest < height)
lowest = height; highest = height;
}); });
images.getParent().setStyle('height', lowest); images.setStyle('height', highest);
}).delay(300); }).delay(300);
}); });
}); });
+2 -16
View File
@@ -11,20 +11,6 @@ Page.Settings = new Class({
current: 'about', current: 'about',
has_tab: false, has_tab: false,
initialize: function(options){
var self = this;
self.parent(options);
// Add to more menu
if(self.name == 'settings')
App.getBlock('more').addLink(new Element('a', {
'href': App.createUrl(self.name),
'text': self.name.capitalize(),
'title': self.title
}), 'top')
},
open: function(action, params){ open: function(action, params){
var self = this; var self = this;
self.action = action == 'index' ? self.default_action : action; self.action = action == 'index' ? self.default_action : action;
@@ -876,7 +862,7 @@ Option.Directories = new Class({
$(dir).addClass('is_empty'); $(dir).addClass('is_empty');
// Add remove button // Add remove button
new Element('a.icon.delete', { new Element('a.icon2.delete', {
'events': { 'events': {
'click': self.delItem.bind(self, dir) 'click': self.delItem.bind(self, dir)
} }
@@ -1385,7 +1371,7 @@ Option.Combined = new Class({
item[value_empty == value_count ? 'addClass' : 'removeClass']('is_empty'); item[value_empty == value_count ? 'addClass' : 'removeClass']('is_empty');
new Element('a.icon.delete', { new Element('a.icon2.delete', {
'events': { 'events': {
'click': self.deleteCombinedItem.bind(self) 'click': self.deleteCombinedItem.bind(self)
} }
+81 -64
View File
@@ -7,6 +7,7 @@ body, html {
margin: 0; margin: 0;
padding: 0; padding: 0;
background: #4e5969; background: #4e5969;
-webkit-font-smoothing: subpixel-antialiased;
} }
body { overflow-y: scroll; } body { overflow-y: scroll; }
body.noscroll { overflow: hidden; } body.noscroll { overflow: hidden; }
@@ -108,7 +109,7 @@ body > .spinner, .mask{
} }
.button { .button {
background: #5082bc url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpi/v//vwMTAwPDfzjBgMpFI/7hFSOT9Y8qRuF3JLoHAQIMAHYtMmRA+CugAAAAAElFTkSuQmCC") repeat-x; background: #5082bc;
padding: 5px 10px 6px; padding: 5px 10px 6px;
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;
@@ -154,6 +155,7 @@ body > .spinner, .mask{
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font-size: 15px; font-size: 15px;
color: #FFF;
} }
.icon2.cog:before { content: "\e109"; } .icon2.cog:before { content: "\e109"; }
@@ -161,6 +163,30 @@ body > .spinner, .mask{
.icon2.search:before { content: "\e03e"; } .icon2.search:before { content: "\e03e"; }
.icon2.return-key:before { content: "\e111"; } .icon2.return-key:before { content: "\e111"; }
.icon2.close:before { content: "\e04e"; } .icon2.close:before { content: "\e04e"; }
.icon2.trailer:before { content: "\e0e9"; }
.icon2.download:before { content: "\e0c3"; }
.icon2.edit:before { content: "\e068"; }
.icon2.refresh:before { content: "\e04f"; font-weight: bold; }
.icon2.delete:before { content: "\e04e"; }
.icon2.directory:before { content: "\e097"; }
.icon2.completed:before { content: "\e070"; }
.icon2.info:before { content: "\e089"; }
.icon2.attention:before { content: "\e009"; }
.icon2.readd:before {
display: inline-block;
content: "\e04b";
transform: scale(-1, 1);
}
.icon2.imdb:before {
content: "IMDb";
color: #444;
padding: 2px;
border-radius: 3px;
background-color: #fbec98;
font: bold 8px Arial;
position: relative;
top: -3px;
}
.icon2.menu:before { .icon2.menu:before {
content: "\e076 \e076 \e076"; content: "\e076 \e076 \e076";
line-height: 6px; line-height: 6px;
@@ -178,13 +204,10 @@ body > .spinner, .mask{
margin: 0; margin: 0;
width: 100%; width: 100%;
z-index: 5; z-index: 5;
background: #4e5969; background: #5c697b;
box-shadow: 0 0 10px rgba(0,0,0,.1); box-shadow: 0 0 10px rgba(0,0,0,.1);
transition: all .4s ease-in-out; transition: all .4s ease-in-out;
} }
.header.with_shadow {
background-color: #46505e;
}
@media all and (max-width: 480px) { @media all and (max-width: 480px) {
.header { .header {
@@ -315,7 +338,7 @@ body > .spinner, .mask{
} }
.menu_shown body { .menu_shown body {
left: 160px; left: 240px;
} }
.header .navigation { .header .navigation {
@@ -327,13 +350,13 @@ body > .spinner, .mask{
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 160px; left: 240px;
} }
.header .navigation ul { .header .navigation ul {
width: 160px; width: 240px;
position: fixed; position: fixed;
left: -160px; left: -240px;
background: rgba(0,0,0,.5); background: rgba(0,0,0,.5);
transition: all .5s cubic-bezier(0.9,0,0.1,1); transition: all .5s cubic-bezier(0.9,0,0.1,1);
} }
@@ -374,26 +397,15 @@ body > .spinner, .mask{
.header .more_menu .button { .header .more_menu .button {
height: 100%; height: 100%;
width: 44px;
border: 0;
box-shadow: none;
border-radius: 0;
background: none;
line-height: 66px; line-height: 66px;
text-align: center; text-align: center;
padding: 0; padding: 0;
border: 1px solid transparent;
border-width: 0 0 4px;
} }
.header .more_menu .button:hover {
background: none;
border-color: #047792;
}
.header .more_menu .wrapper { .header .more_menu .wrapper {
width: 150px; width: 200px;
margin-left: -106px; margin-left: -106px;
margin-top: 66px; margin-top: 22px;
} }
@media all and (max-width: 480px) { @media all and (max-width: 480px) {
@@ -402,7 +414,7 @@ body > .spinner, .mask{
} }
.header .more_menu .wrapper { .header .more_menu .wrapper {
margin-top: 44px; margin-top: 0;
} }
} }
@@ -439,13 +451,20 @@ body > .spinner, .mask{
} }
.header .notification_menu ul { .header .notification_menu ul {
min-height: 60px;
max-height: 300px; max-height: 300px;
overflow: auto; overflow: auto;
} }
.header .notification_menu ul:empty:after {
.header .notification_menu > a { content: 'No notifications (yet)';
background-position: center -209px; text-align: center;
} width: 100%;
position: absolute;
padding: 18px 0;
font-size: 15px;
font-style: italic;
opacity: .4;
}
.header .notification_menu li > span { .header .notification_menu li > span {
padding: 5px; padding: 5px;
@@ -491,6 +510,7 @@ body > .spinner, .mask{
width: 16px; width: 16px;
cursor: pointer; cursor: pointer;
background: url('../images/sprite.png') no-repeat -200px; background: url('../images/sprite.png') no-repeat -200px;
border-radius: 3px;
} }
.check.highlighted { background-color: #424c59; } .check.highlighted { background-color: #424c59; }
.check.checked { background-position: -2px 0; } .check.checked { background-position: -2px 0; }
@@ -508,14 +528,7 @@ body > .spinner, .mask{
.select .selection { .select .selection {
display: inline-block; display: inline-block;
padding: 0 30px 0 20px; padding: 0 30px 0 20px;
border-radius:30px; background: #5b9bd1 url('../images/sprite.png') no-repeat 94% -53px;
box-shadow: 0 1px 1px rgba(0,0,0,0.35), inset 0 1px 0px rgba(255,255,255,0.20);
background: url('../images/sprite.png') no-repeat 94% -53px, linear-gradient(
180deg,
#5b9bd1 0%,
#406db8 100%
);
} }
.select .selection .selectionDisplay { .select .selection .selectionDisplay {
@@ -535,11 +548,9 @@ body > .spinner, .mask{
.select .list { .select .list {
display: none; display: none;
background: #282d34; background: #282d34;
border: 1px solid #1f242b;
position: absolute; position: absolute;
margin: 28px 0 0 0; margin: 25px 0 0 0;
box-shadow: 0 20px 20px -10px rgba(0,0,0,0.4); box-shadow: 0 20px 20px -10px rgba(0,0,0,0.4);
border-radius:3px;
z-index: 3; z-index: 3;
} }
.select.active .list { .select.active .list {
@@ -566,15 +577,14 @@ body > .spinner, .mask{
.inlay { .inlay {
color: #fff; color: #fff;
border: 0; border: 0;
border-radius:3px;
background-color: #282d34; background-color: #282d34;
box-shadow: inset 0 1px 8px rgba(0,0,0,0.25), 0 1px 0px rgba(255,255,255,0.25); box-shadow: inset 0 1px 8px rgba(0,0,0,0.25);
} }
.inlay.light { .inlay.light {
background-color: #47515f; background-color: #47515f;
outline: none; outline: none;
box-shadow: inset 0 1px 8px rgba(0,0,0,0.05), 0 1px 0px rgba(255,255,255,0.15); box-shadow: none;
} }
.inlay:focus { .inlay:focus {
@@ -585,7 +595,7 @@ body > .spinner, .mask{
.onlay, .inlay .selected, .inlay:not(.reversed) > li:hover, .inlay > li.active, .inlay.reversed > li { .onlay, .inlay .selected, .inlay:not(.reversed) > li:hover, .inlay > li.active, .inlay.reversed > li {
border-radius:3px; border-radius:3px;
border: 1px solid #252930; border: 1px solid #252930;
box-shadow: inset 0 1px 0px rgba(255,255,255,0.20), 0 0 3px rgba(0,0,0, 0.2); box-shadow: inset 0 1px 0px rgba(255,255,255,0.20);
background: rgb(55,62,74); background: rgb(55,62,74);
background-image: linear-gradient( background-image: linear-gradient(
0, 0,
@@ -597,7 +607,7 @@ body > .spinner, .mask{
color: #fff; color: #fff;
border: 1px solid transparent; border: 1px solid transparent;
background-color: #282d34; background-color: #282d34;
box-shadow: inset 0 1px 8px rgba(0,0,0,0.25), 0 1px 0px rgba(255,255,255,0.25); box-shadow: inset 0 1px 8px rgba(0,0,0,0.25);
} }
.question { .question {
@@ -648,38 +658,37 @@ body > .spinner, .mask{
.more_menu > a { .more_menu > a {
display: block; display: block;
background: url('../images/sprite.png') no-repeat center -137px; height: 44px;
height: 25px; width: 44px;
width: 25px;
border: 1px solid rgba(0,0,0,0.3);
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
border-bottom: 4px solid transparent;
border-radius: 0;
} }
.more_menu.show > a:not(:active), .more_menu > a:hover:not(:active) {
background-color: #406db8; .more_menu .button:hover {
border-color: #047792;
}
.more_menu.show .button {
border-color: #04bce6;
} }
.more_menu .wrapper { .more_menu .wrapper {
display: none; display: none;
background: rgba(255,255,255,0.98);
top: 0; top: 0;
right: 0; right: 0;
padding: 4px; margin: 11px 0 0 0;
margin: 26px 0 0 0;
position: absolute; position: absolute;
z-index: 90; z-index: 90;
width: 185px; width: 185px;
box-shadow: 0 20px 20px -5px rgba(0,0,0,0.1); box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55);
text-align: center; color: #444;
color: #000; background: #fff;
background-image: linear-gradient(
-45deg,
rgb(200,200,200) 0%,
rgb(255,255,255) 100%
);
} }
.more_menu.show .wrapper { .more_menu.show .wrapper {
display: block; display: block;
top: 44px;
} }
.more_menu ul { .more_menu ul {
@@ -698,11 +707,19 @@ body > .spinner, .mask{
border-bottom: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2);
box-shadow: none; box-shadow: none;
font-weight: normal; font-weight: normal;
font-size: 11px; font-size: 1.2em;
text-transform: uppercase;
letter-spacing: 1px; letter-spacing: 1px;
padding: 3px 0; padding: 2px 10px;
color: #000; color: #444;
}
.more_menu .wrapper li:first-child a { padding-top: 5px; }
.more_menu .wrapper li:last-child a { padding-bottom: 5px; }
.more_menu .wrapper li .separator {
border-bottom: 1px solid rgba(0,0,0,.1);
display: block;
height: 1;
margin: 5px 0;
} }
.more_menu .wrapper li:last-child a { .more_menu .wrapper li:last-child a {
+41 -19
View File
@@ -252,7 +252,7 @@
display: block; display: block;
text-align: right; text-align: right;
height: 20px; height: 20px;
margin: 0 0 -37px; margin: 0 0 -38px;
} }
.page .advanced_toggle .check { .page .advanced_toggle .check {
margin: 0; margin: 0;
@@ -262,18 +262,24 @@
color: #edc07f; color: #edc07f;
} }
.page .directory { .page form .directory {
display: inline-block; display: inline-block;
padding: 0 4% 0 4px; padding: 0 4% 0 4px;
font-size: 13px; font-size: 13px;
width: 30%; width: 30%;
background-image: url('../images/icon.folder.gif');
background-repeat: no-repeat;
background-position: 97% center;
overflow: hidden; overflow: hidden;
vertical-align: top; vertical-align: top;
position: relative;
} }
.page .directory > span { .page form .directory:after {
content: "\e097";
position: absolute;
right: 7px;
top: 2px;
font-family: 'Elusive-Icons';
color: #f5e39c;
}
.page form .directory > span {
height: 25px; height: 25px;
display: inline-block; display: inline-block;
float: right; float: right;
@@ -281,15 +287,19 @@
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
.page form .directory span:empty:before {
content: 'No folder selected';
font-style: italic;
opacity: .3;
}
.page .directory_list { .page .directory_list {
z-index: 2; z-index: 2;
position: absolute; position: absolute;
width: 450px; width: 450px;
margin: 28px 0 20px 18%; margin: 28px 0 20px 18.4%;
background: #5c697b; background: #5c697b;
border-radius: 3px; box-shadow: 0 20px 40px -20px rgba(0,0,0,0.55);
box-shadow: 0 0 50px rgba(0,0,0,0.55);
} }
.page .directory_list .pointer { .page .directory_list .pointer {
@@ -299,7 +309,7 @@
display: block; display: block;
position: absolute; position: absolute;
width: 0px; width: 0px;
margin: -6px 0 0 22%; margin: -6px 0 0 45%;
} }
.page .directory_list ul { .page .directory_list ul {
@@ -311,11 +321,14 @@
} }
.page .directory_list li { .page .directory_list li {
padding: 4px 10px; padding: 4px 30px 4px 10px;
cursor: pointer; cursor: pointer;
margin: 0 !important; margin: 0 !important;
border-top: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1);
background: url('../images/right.arrow.png') no-repeat 98% center; background: url('../images/right.arrow.png') no-repeat 98% center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.page .directory_list li:last-child { .page .directory_list li:last-child {
border-bottom: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);
@@ -341,7 +354,10 @@
.page .directory_list .actions { .page .directory_list .actions {
clear: both; clear: both;
padding: 4% 4% 2%; padding: 4% 4% 2%;
min-height: 25px; min-height: 45px;
position: relative;
width: 100%;
text-align: right;
} }
.page .directory_list .actions label { .page .directory_list .actions label {
@@ -350,7 +366,7 @@
padding: 0; padding: 0;
} }
.page .directory_list .actions .inlay { .page .directory_list .actions .inlay {
margin: -2px 0 0 7px; margin: 0 0 0 7px;
} }
.page .directory_list .actions .back { .page .directory_list .actions .back {
@@ -360,6 +376,9 @@
padding: 0; padding: 0;
line-height: 120%; line-height: 120%;
vertical-align: top; vertical-align: top;
position: absolute;
text-align: left;
left: 4%;
} }
.page .directory_list .actions:last-child { .page .directory_list .actions:last-child {
@@ -373,10 +392,10 @@
} }
.page .directory_list .actions:last-child > .clear { .page .directory_list .actions:last-child > .clear {
left: -90%; left: 4%;
position: relative; position: absolute;
background-color: #af3128; background-color: #af3128;
} }
.page .directory_list .actions:last-child > .cancel { .page .directory_list .actions:last-child > .cancel {
font-weight: bold; font-weight: bold;
@@ -563,8 +582,10 @@
display: none; display: none;
width: 22px; width: 22px;
height: 22px; height: 22px;
line-height: 22px;
text-align: center;
vertical-align: middle; vertical-align: middle;
background-position: left center; color: #fe3d3d;
} }
.page .combined_table .ctrlHolder:hover .delete { .page .combined_table .ctrlHolder:hover .delete {
display: inline-block; display: inline-block;
@@ -576,7 +597,8 @@
.page .tab_about .usenet { .page .tab_about .usenet {
padding: 20px 30px 0; padding: 20px 30px 0;
font-size: 17px; font-size: 1.5em;
line-height: 1.3em;
} }
.page .tab_about .usenet a { .page .tab_about .usenet a {
+3 -5
View File
@@ -13,10 +13,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from rules import prefixRegex, rules as tr_rules
import cssutils import cssutils
import re import re
from rules import rules as tr_rules
from rules import prefixRegex
keyframesRegex = re.compile(r'@keyframes\s?\w+\s?{(.*)}') keyframesRegex = re.compile(r'@keyframes\s?\w+\s?{(.*)}')
@@ -83,12 +82,11 @@ def magic(ruleset, debug, minify, filt, parser):
if not cssText: # blank rules return None so return an empty string if not cssText: # blank rules return None so return an empty string
return return
if minify or not hasattr(ruleset, 'style'): if minify or not hasattr(ruleset, 'style'):
return unicode(cssText) return cssText
return unicode(cssText) + '\n' return cssText + '\n'
def process(string, debug = False, minify = False, filt = ['webkit', 'moz', 'o', 'ms'], **prefs): def process(string, debug = False, minify = False, filt = ['webkit', 'moz', 'o', 'ms'], **prefs):
loglevel = 'DEBUG' if debug else 'ERROR'
parser = cssutils.CSSParser(loglevel = 'CRITICAL') parser = cssutils.CSSParser(loglevel = 'CRITICAL')
if minify: if minify:
cssutils.ser.prefs.useMinified() cssutils.ser.prefs.useMinified()