From d8fc9d937e5b147b35b5023778fbbff7b372c08e Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 8 May 2013 12:47:17 +0200 Subject: [PATCH 01/13] Filmweb userscript fix --- couchpotato/core/providers/userscript/filmweb/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/providers/userscript/filmweb/main.py b/couchpotato/core/providers/userscript/filmweb/main.py index 5e6adbe1..66c5fcdb 100644 --- a/couchpotato/core/providers/userscript/filmweb/main.py +++ b/couchpotato/core/providers/userscript/filmweb/main.py @@ -4,7 +4,9 @@ import re class Filmweb(UserscriptBase): - includes = ['http://www.filmweb.pl/*'] + version = 2 + + includes = ['http://www.filmweb.pl/film/*'] def getMovie(self, url): From f467d1c4f77b5ed53b940f35e3f3c8d26ab5776e Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 8 May 2013 12:54:34 +0200 Subject: [PATCH 02/13] Dashboard thumbnails height not set properly. fix #1698 --- couchpotato/core/plugins/file/static/file.js | 11 ++++-- .../core/plugins/movie/static/movie.css | 16 ++++---- .../providers/movie/couchpotatoapi/main.py | 1 - couchpotato/static/scripts/page/home.js | 38 +++++++++++-------- 4 files changed, 36 insertions(+), 30 deletions(-) diff --git a/couchpotato/core/plugins/file/static/file.js b/couchpotato/core/plugins/file/static/file.js index 7b893e88..6659c882 100644 --- a/couchpotato/core/plugins/file/static/file.js +++ b/couchpotato/core/plugins/file/static/file.js @@ -1,11 +1,11 @@ var File = new Class({ - initialize: function(file){ + initialize: function(type, file){ var self = this; if(!file){ self.empty = true; - self.el = new Element('div'); + self.el = new Element('div.empty_file.'+type); return } @@ -22,7 +22,10 @@ var File = new Class({ var file_name = self.data.path.replace(/^.*[\\\/]/, ''); 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( new Element('img', { 'src': Api.createUrl('file.cache') + file_name @@ -45,7 +48,7 @@ var FileSelect = new Class({ }); if(single) - return new File(results.pop()); + return new File(type, results.pop()); return results; diff --git a/couchpotato/core/plugins/movie/static/movie.css b/couchpotato/core/plugins/movie/static/movie.css index 66c0ef00..68677bbf 100644 --- a/couchpotato/core/plugins/movie/static/movie.css +++ b/couchpotato/core/plugins/movie/static/movie.css @@ -11,7 +11,6 @@ .movies.thumbs_list > div:not(.description) { margin-right: -4px; - text-align: center; } .movies .loading { @@ -165,14 +164,6 @@ background: 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 { background: rgba(0,0,0,0.9); @@ -222,7 +213,13 @@ width: 100%; height: 100%; transition: none; + background: no-repeat center; + background-size: cover; } + .movies.thumbs_list .no_thumbnail .empty_file { + width: 100%; + height: 100%; + } .movies .poster img, .options .poster img { @@ -235,6 +232,7 @@ top: 0; bottom: 0; border-radius: 0; + opacity: 0; } .movies .info { diff --git a/couchpotato/core/providers/movie/couchpotatoapi/main.py b/couchpotato/core/providers/movie/couchpotatoapi/main.py index 2beb7e28..3646d1f0 100644 --- a/couchpotato/core/providers/movie/couchpotatoapi/main.py +++ b/couchpotato/core/providers/movie/couchpotatoapi/main.py @@ -2,7 +2,6 @@ from couchpotato import get_session from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.request import jsonified, getParams -from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.providers.movie.base import MovieProvider from couchpotato.core.settings.model import Movie diff --git a/couchpotato/static/scripts/page/home.js b/couchpotato/static/scripts/page/home.js index f874acdb..f425662c 100644 --- a/couchpotato/static/scripts/page/home.js +++ b/couchpotato/static/scripts/page/home.js @@ -65,31 +65,37 @@ Page.Home = new Class({ // Make all thumbnails the same size self.soon_list.addEvent('loaded', function(){ - var images = $(self.soon_list).getElements('img'), + var images = $(self.soon_list).getElements('.poster'), timer, - lowest = null; + highest = 100; - images.addEvent('load', function(){ - var height = this.getSize().y; - if(!lowest || lowest > height){ - lowest = height; - if(timer) clearTimeout(timer); - timer = (function(){ - images.getParent().setStyle('height', lowest); - }).delay(300) - } + images.each(function(img_container){ + img_container.getElements('img').addEvent('load', function(){ + var img = this, + height = img.getSize().y; + if(!highest || highest < height){ + highest = height; + if(timer) clearTimeout(timer); + timer = (function(){ + images.setStyle('height', highest); + }).delay(300); + } + }); }); $(window).addEvent('resize', function(){ if(timer) clearTimeout(timer); timer = (function(){ - var lowest; - images.each(function(img){ + var highest = 100; + images.each(function(img_container){ + var img = img_container.getElement('img'); + if(!img) return + var height = img.getSize().y; - if(!lowest || lowest > height) - lowest = height; + if(!highest || highest < height) + highest = height; }); - images.getParent().setStyle('height', lowest); + images.setStyle('height', highest); }).delay(300); }); }); From 9e3f978677722686dd843561dbcae2dd0990881c Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 9 May 2013 23:36:54 +0200 Subject: [PATCH 03/13] Styling fixes --- .../notifications/core/static/notification.js | 4 +- couchpotato/core/plugins/log/static/log.js | 13 - couchpotato/core/plugins/movie/static/list.js | 163 ++++----- .../plugins/movie/static/movie.actions.js | 15 +- .../core/plugins/movie/static/movie.css | 313 ++++++++++-------- .../core/plugins/movie/static/movie.js | 6 +- .../core/plugins/movie/static/search.css | 1 - couchpotato/static/scripts/block/menu.js | 23 +- .../static/scripts/block/navigation.js | 12 +- couchpotato/static/scripts/couchpotato.js | 58 ++-- couchpotato/static/scripts/page/home.js | 2 +- couchpotato/static/scripts/page/settings.js | 14 - couchpotato/static/style/main.css | 95 +++--- couchpotato/static/style/settings.css | 3 +- 14 files changed, 387 insertions(+), 335 deletions(-) diff --git a/couchpotato/core/notifications/core/static/notification.js b/couchpotato/core/notifications/core/static/notification.js index 2b74364a..74d14451 100644 --- a/couchpotato/core/notifications/core/static/notification.js +++ b/couchpotato/core/notifications/core/static/notification.js @@ -28,10 +28,8 @@ var NotificationBase = new Class({ $(App.block.notification).inject(App.getBlock('search'), 'after'); self.badge = new Element('div.badge').inject(App.block.notification, 'top').hide(); - }); + self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 1000, self); - window.addEvent('load', function(){ - self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 300, self) }); }, diff --git a/couchpotato/core/plugins/log/static/log.js b/couchpotato/core/plugins/log/static/log.js index 0e276b58..e9e4af05 100644 --- a/couchpotato/core/plugins/log/static/log.js +++ b/couchpotato/core/plugins/log/static/log.js @@ -6,19 +6,6 @@ Page.Log = new Class({ title: 'Show recent logs.', 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(){ var self = this; diff --git a/couchpotato/core/plugins/movie/static/list.js b/couchpotato/core/plugins/movie/static/list.js index 6f577012..aa29e923 100644 --- a/couchpotato/core/plugins/movie/static/list.js +++ b/couchpotato/core/plugins/movie/static/list.js @@ -48,7 +48,7 @@ var MovieList = new Class({ self.changeView('list'); else self.changeView(self.getSavedView() || self.options.view || 'details'); - + self.getMovies(); App.addEvent('movie.added', self.movieAdded.bind(self)) @@ -151,66 +151,65 @@ var MovieList = new Class({ self.el.addClass('with_navigation') - self.navigation = new Element('div.alph_nav').grab( - new Element('div').adopt( - self.navigation_alpha = new Element('ul.numbers', { + self.navigation = new Element('div.alph_nav').adopt( + self.mass_edit_form = new Element('div.mass_edit_form').adopt( + 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': { 'click:relay(li)': function(e, el){ - self.movie_list.empty() - self.activateLetter(el.get('data-letter')) - self.getMovies() + var a = 'active'; + self.navigation_actions.getElements('.'+a).removeClass(a); + self.changeView(el.get('data-view')); + this.addClass(a); + + el.inject(el.getParent(), 'top') } } }), - self.navigation_counter = new Element('span.counter[title=Total]'), - self.navigation_actions = new Element('ul.inlay.actions.reversed'), - 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.filter_menu = new Block.Menu(self, { + 'class': 'filter' }), - self.navigation_menu = new Block.Menu(self), - self.mass_edit_form = new Element('div.mass_edit_form').adopt( - 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) - } - }) - ) - ) + self.navigation_menu = new Block.Menu(self, { + 'class': 'extra' + }) ) ).inject(self.el, 'top'); @@ -223,20 +222,35 @@ var MovieList = new Class({ }).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 ['mass_edit', 'details', 'list'].each(function(view){ - self.navigation_actions.adopt( - new Element('li.'+view+(self.current_view == view ? '.active' : '')+'[data-view='+view+']', { - 'events': { - 'click': function(e){ - var a = 'active'; - self.navigation_actions.getElements('.'+a).removeClass(a); - self.changeView(this.get('data-view')); - this.addClass(a); - } - } - }).adopt(new Element('span')) - ) + var current = self.current_view == view; + new Element('li', { + 'class': 'icon2 ' + view + (current ? ' active ' : ''), + 'data-view': view + }).inject(self.navigation_actions, current ? 'top' : 'bottom'); }); // All @@ -260,11 +274,11 @@ var MovieList = new Class({ 'status': self.options.status }, self.filter), 'onSuccess': function(json){ - + json.chars.split('').each(function(c){ self.letters[c.capitalize()].addClass('available') }) - + } }); @@ -448,8 +462,7 @@ var MovieList = new Class({ self.activateLetter(); self.filter.search = search_value; - self.movie_list.empty(); - self.getMovies(); + self.getMovies(true); self.last_search_value = search_value; @@ -461,11 +474,10 @@ var MovieList = new Class({ var self = this; self.reset(); - self.movie_list.empty(); - self.getMovies(); + self.getMovies(true); }, - getMovies: function(){ + getMovies: function(reset){ var self = this; if(self.scrollspy){ @@ -495,6 +507,9 @@ var MovieList = new Class({ 'limit_offset': self.options.limit + ',' + self.offset }, self.filter), 'onSuccess': function(json){ + + if(reset) + self.movie_list.empty(); if(self.loader_first){ var lf = self.loader_first; diff --git a/couchpotato/core/plugins/movie/static/movie.actions.js b/couchpotato/core/plugins/movie/static/movie.actions.js index cf30e8a5..546120f6 100644 --- a/couchpotato/core/plugins/movie/static/movie.actions.js +++ b/couchpotato/core/plugins/movie/static/movie.actions.js @@ -100,10 +100,8 @@ MA.Release = new Class({ var self = this; if(!self.options_container){ - self.options_container = new Element('div.options').adopt( - self.release_container = new Element('div.releases.table').adopt( - self.trynext_container = new Element('div.buttons.try_container') - ) + self.options_container = new Element('div.options').grab( + self.release_container = new Element('div.releases.table') ); // Header @@ -190,7 +188,9 @@ MA.Release = new Class({ 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( new Element('span.or', { @@ -237,9 +237,10 @@ MA.Release = new Class({ (e).preventDefault(); 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.next_release ? [new Element('a.icon.readd', { diff --git a/couchpotato/core/plugins/movie/static/movie.css b/couchpotato/core/plugins/movie/static/movie.css index 68677bbf..2e82638a 100644 --- a/couchpotato/core/plugins/movie/static/movie.css +++ b/couchpotato/core/plugins/movie/static/movie.css @@ -78,24 +78,36 @@ .movies .movie { position: relative; - border-radius: 4px; margin: 10px 0; padding-left: 20px; overflow: hidden; width: 100%; height: 180px; 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 { padding-left: 120px; } - + .movies.list_list .movie:not(.details_view), .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 { width: 16.66667%; height: auto; @@ -103,9 +115,6 @@ margin: 0; padding: 0; vertical-align: top; - border-radius: 0; - box-shadow: none; - border: 0; } @media all and (max-width: 800px) { @@ -124,16 +133,7 @@ .movies.list_list .movie:not(.details_view), .movies.mass_edit_list .movie { - margin: 1px 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); + margin: 0; } .movies .data { @@ -141,18 +141,18 @@ height: 100%; width: 100%; position: relative; - right: 0; - border-radius: 0; transition: all .6s cubic-bezier(0.9,0,0.1,1); + right: 0; } .movies.list_list .movie:not(.details_view) .data, .movies.mass_edit_list .movie .data { - height: 30px; - padding: 3px 0 3px 10px; - box-shadow: none; + padding: 0 0 0 10px; border: 0; background: #4e5969; } + .movies.mass_edit_list .movie .data { + padding-left: 8px; + } .movies.thumbs_list .data { position: absolute; @@ -192,18 +192,16 @@ line-height: 0; overflow: hidden; height: 100%; - border-radius: 4px 0 0 4px; transition: all .6s cubic-bezier(0.9,0,0.1,1); + background: rgba(0,0,0,.1); } .movies.thumbs_list .poster { position: relative; - border-radius: 0; } .movies.list_list .movie:not(.details_view) .poster, .movies.mass_edit_list .poster { width: 20px; height: 30px; - border-radius: 1px 0 0 1px; } .movies.mass_edit_list .poster { display: none; @@ -231,7 +229,6 @@ width: 100%; top: 0; bottom: 0; - border-radius: 0; opacity: 0; } @@ -246,22 +243,27 @@ font-weight: bold; margin-bottom: 10px; margin-top: 2px; - left: 0; - top: 0; width: 100%; padding-right: 80px; 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 { - display: block; + display: inline-block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; width: 100%; - height: 30px; + height: 100%; line-height: 30px; - top: -5px; - position: relative; } .movies.thumbs_list .info .title span { @@ -298,13 +300,14 @@ font-size: 21px; word-wrap: break-word; padding: 0; + height: 100%; } .movies .info .year { position: absolute; color: #bbb; right: 0; - top: 1px; + top: 6px; text-align: right; transition: all 0.2s linear; font-weight: normal; @@ -348,6 +351,10 @@ min-height: 20px; } + .movies.list_list .movie:hover .data .quality { + display: none; + } + @media all and (max-width: 480px) { .movies .data .quality { display: none; @@ -380,12 +387,12 @@ right: 0; margin-right: 60px; z-index: 1; + top: 5px; } .movies .data .quality .available, .movies .data .quality .snatched { opacity: 1; - box-shadow: 1px 1px 0 rgba(0,0,0,0.2); cursor: pointer; } @@ -471,7 +478,7 @@ text-align: center; font-size: 20px; position: absolute; - padding: 70px 0 0; + padding: 80px 0 0; left: 120px; right: 0; } @@ -496,9 +503,9 @@ } .movies .options .form { - margin: 70px 20px 0; - float: left; + margin: 80px 0 0; font-size: 20px; + text-align: center; } .movies .options .form select { @@ -508,6 +515,7 @@ .movies .options .table { height: 180px; overflow: auto; + line-height: 2em; } .movies .options .table .item { border-bottom: 1px solid rgba(255,255,255,0.1); @@ -599,7 +607,6 @@ text-align: center; padding: 3px 10px; background: #4e5969; - border-radius: 0 0 2px 2px; transition: all .2s cubic-bezier(0.9,0,0.1,1) .2s; z-index: 11; } @@ -635,14 +642,13 @@ .movies .movie .trynext { display: inline; position: absolute; - right: 135px; + right: 145px; z-index: 2; opacity: 0; background: #4e5969; min-width: 300px; text-align: right; height: 100%; - padding: 3px 0; top: 0; } @@ -661,10 +667,9 @@ .movies.details_list .movie .trynext { background: #47515f; - padding: 0; + padding: 2px 0; right: 0; - bottom: 35px; - height: auto; + height: 25px; } .movies .movie .trynext a { @@ -672,10 +677,14 @@ padding: 0 5px 0 25px; margin-right: 10px; color: #FFF; - border-radius: 2px; + height: 100%; + line-height: 30px; } + .movies.details_list .movie .trynext a { + line-height: 23px; + } .movies .movie .trynext a:last-child { - margin: 0; + margin: 0; } .movies .movie .trynext a:hover { background-color: #369545; @@ -692,14 +701,7 @@ } .movies .alph_nav { - transition: box-shadow .4s linear; - position: relative; - z-index: 4; - top: 0px; - right: 0; - margin: 0 auto; - width: 100%; - padding: 10px 0; + height: 44px; } @media all and (max-width: 480px) { @@ -707,13 +709,10 @@ display: none; } } - - .movies .alph_nav > div { - position: relative; - max-width: 980px; - margin: 0 auto; - padding: 0; - min-height: 24px; + + .movies .alph_nav .menus { + display: inline-block; + float: right; } .movies .alph_nav .numbers, @@ -722,118 +721,150 @@ list-style: none; padding: 0 0 1px; margin: 0; - float: left; user-select: none; } .movies .alph_nav .counter { + display: inline-block; text-align: right; - position: absolute; - right: 270px; - background: #4e5969; - padding: 4px 10px; + padding: 0 10px; + height: 100%; + line-height: 43px; + border-right: 1px solid rgba(255,255,255,.07); } .movies .alph_nav .numbers li, .movies .alph_nav .actions li { display: inline-block; vertical-align: top; - height: 24px; - line-height: 23px; + height: 100%; + line-height: 30px; text-align: center; - cursor: pointer; - color: rgba(255,255,255,0.2); border: 1px solid transparent; transition: all 0.1s ease-in-out; } - - @media all and (max-width: 900px) { - .movies .alph_nav .numbers { - display: none; - } - } .movies .alph_nav .numbers li { - width: auto; - padding: 0 4px; + width: 30px; + height: 30px; + opacity: 0.3; } + .movies .alph_nav .numbers li.letter_all { + width: 60px; + } .movies .alph_nav li.available { - color: #FFF; - font-weight: bolder; + font-weight: bold; + cursor: pointer; + opacity: 1; } .movies .alph_nav li.active.available, .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; - margin: 0 0 0 20px; - position: absolute; - right: 30px; - width: 154px; - height: 25px; - transition: all 0.6s cubic-bezier(0.9,0,0.1,1); + width: 100%; + height: 44px; + display: inline-block; + border: 0; + background: none; + 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 { - margin: 0 6px 0 0; -moz-user-select: none; - position: absolute; - right: 183px; + width: 44px; + 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 { - border-radius: 1px; - width: auto; + width: 100%; + height: 45px; + line-height: 40px; + position: relative; + z-index: 20; + display: none; + cursor: pointer; } - .movies .alph_nav .actions li.active { - background: none; - border: 1px solid transparent; - box-shadow: none; - } - .movies .alph_nav .actions li span { - display: block; - background: url('../images/sprite.png') no-repeat; - width: 25px; - height: 100%; - } - - .movies .alph_nav .actions li.mass_edit span { - background-position: 3px 3px; + .movies .alph_nav .actions:hover li:not(.active) { + display: block; + background: #FFF; + color: #444; + } + .movies .alph_nav .actions li:hover:not(.active) { + background: #ccc; + } + .movies .alph_nav .actions li.active { + display: block; } - .movies .alph_nav .actions li.list span { - background-position: 3px -95px; + .movies .alph_nav .actions li.mass_edit:before { + content: "\e070"; } - .movies .alph_nav .actions li.details span { - background-position: 3px -74px; + .movies .alph_nav .actions li.list:before { + content: "\e0d8"; } - .movies .alph_nav .actions li:first-child { - border-radius: 3px 0 0 3px; - } - .movies .alph_nav .actions li:last-child { - border-radius: 0 3px 3px 0; - } + .movies .alph_nav .actions li.details:before { + content: "\e022"; + } .movies .alph_nav .mass_edit_form { clear: both; text-align: center; display: none; + overflow: hidden; + float: left; + height: 44px; + line-height: 44px; } .movies.mass_edit_list .mass_edit_form { - display: block; + display: inline-block; } .movies.mass_edit_list .mass_edit_form .select { - float: left; - margin: 5px 0 0 5px; 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; + margin: -4px 0 0 5px; + } + .movies.mass_edit_list .mass_edit_form .select span { opacity: 0.7; } .movies.mass_edit_list .mass_edit_form .select .count { @@ -842,8 +873,7 @@ } .movies .alph_nav .mass_edit_form .quality { - float: left; - padding: 8px 0 0; + display: inline-block; margin: 0 0 0 16px; } .movies .alph_nav .mass_edit_form .quality select { @@ -856,8 +886,8 @@ .movies .alph_nav .mass_edit_form .refresh, .movies .alph_nav .mass_edit_form .delete { - float: left; - padding: 8px 0 0 8px; + display: inline-block; + margin-left: 8px; } .movies .alph_nav .mass_edit_form .refresh span, @@ -865,16 +895,36 @@ margin: 0 10px 0 0; } - .movies .alph_nav .more_menu { - right: 0; - position: absolute; - } - .movies .alph_nav .more_menu > a { - background-color: #4e5969; - background-position: center -158px; + background: none; } + .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 { background-image: url('../images/emptylist.png'); height: 750px; @@ -887,6 +937,7 @@ text-align: center; font-size: 25px; line-height: 150%; + padding: 40px 0; } .movies .empty_manage .after_manage { @@ -895,7 +946,6 @@ } .movies .progress { - border-radius: 2px; padding: 10px; margin: 5px 0; text-align: left; @@ -910,7 +960,6 @@ width: 49%; background: rgba(255, 255, 255, 0.05); margin: 2px 0.5%; - border-radius: 3px; } .movies .progress > div .folder { diff --git a/couchpotato/core/plugins/movie/static/movie.js b/couchpotato/core/plugins/movie/static/movie.js index 95fd1de5..872f4bf1 100644 --- a/couchpotato/core/plugins/movie/static/movie.js +++ b/couchpotato/core/plugins/movie/static/movie.js @@ -11,7 +11,7 @@ var Movie = new Class({ self.view = options.view || 'details'; self.list = list; - self.el = new Element('div.movie.inlay'); + self.el = new Element('div.movie'); self.profile = Quality.getProfile(data.profile_id) || {}; self.parent(self, options); @@ -149,8 +149,8 @@ var Movie = new Class({ 'events': { 'click': function(e){ var releases = self.el.getElement('.actions .releases'); - if(releases) - releases.fireEvent('click', [e]) + if(releases.isVisible()) + releases.fireEvent('click', [e]) } } }) diff --git a/couchpotato/core/plugins/movie/static/search.css b/couchpotato/core/plugins/movie/static/search.css index fb0cadd2..59750088 100644 --- a/couchpotato/core/plugins/movie/static/search.css +++ b/couchpotato/core/plugins/movie/static/search.css @@ -44,7 +44,6 @@ .search_form .input input { border-radius: 0; display: block; - width: 100%; border: 0; background: rgba(255,255,255,.08); color: #FFF; diff --git a/couchpotato/static/scripts/block/menu.js b/couchpotato/static/scripts/block/menu.js index cdd7875b..8d315f59 100644 --- a/couchpotato/static/scripts/block/menu.js +++ b/couchpotato/static/scripts/block/menu.js @@ -15,19 +15,21 @@ Block.Menu = new Class({ self.wrapper = new Element('div.wrapper').adopt( 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': { 'click': function(){ self.el.toggleClass('show') self.fireEvent(self.el.hasClass('show') ? 'open' : 'close') - if(self.el.hasClass('show')) - this.addEvent('outerClick', function(){ - self.el.removeClass('show') - this.removeEvents('outerClick'); + if(self.el.hasClass('show')){ + self.el.addEvent('outerClick', self.removeOuterClick.bind(self)) + this.addEvent('outerClick', function(e){ + if(e.target.get('tag') != 'input') + self.removeOuterClick() }) + } 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){ var self = this; var el = new Element('li').adopt(tab).inject(self.more_option_ul, position || 'bottom'); diff --git a/couchpotato/static/scripts/block/navigation.js b/couchpotato/static/scripts/block/navigation.js index feda3795..8389ff9f 100644 --- a/couchpotato/static/scripts/block/navigation.js +++ b/couchpotato/static/scripts/block/navigation.js @@ -67,12 +67,12 @@ Block.Navigation = new Class({ if(!self.added){ new Element('li.separator').inject(self.nav); - body.getElements('.header .more_menu.menu li a').each(function(el, nr){ - if([0, 1, 2, 5].indexOf(nr) > -1){ - self.nav.grab( - new Element('li').grab(el.clone().cloneEvents(el)) - ); - } + body.getElements('.header .more_menu.menu li a, .header .more_menu.menu li span.separator').each(function(el, nr){ + if(nr <= 2) return; + if(el.get('tag') == 'a') + self.nav.grab(new Element('li').grab(el.clone().cloneEvents(el))); + else + self.nav.grab(new Element('li.separator')); }); self.added = true; diff --git a/couchpotato/static/scripts/couchpotato.js b/couchpotato/static/scripts/couchpotato.js index 673323b6..25bddb4e 100644 --- a/couchpotato/static/scripts/couchpotato.js +++ b/couchpotato/static/scripts/couchpotato.js @@ -68,28 +68,42 @@ var CouchPotato = new Class({ self.block.footer = new Block.Footer(self, {}) ); - [new Element('a.orange', { - 'text': 'Restart', - 'events': { - 'click': self.restartQA.bind(self) - } - }), - new Element('a.red', { - 'text': 'Shutdown', - 'events': { - 'click': self.shutdownQA.bind(self) - } - }), - new Element('a', { - 'text': 'Update to latest', - 'events': { - 'click': self.checkForUpdate.bind(self, null) - } - }), - new Element('a', { - 'text': 'Run install wizard', - 'href': App.createUrl('wizard') - })].each(function(a){ + var setting_links = [ + new Element('a', { + 'text': 'About CouchPotato', + 'href': App.createUrl('settings/about') + }), + new Element('a', { + 'text': 'Check for Updates', + 'events': { + 'click': self.checkForUpdate.bind(self, null) + } + }), + new Element('span.separator'), + new Element('a', { + 'text': 'Settings', + 'href': App.createUrl('settings/general') + }), + new Element('a', { + 'text': 'Logs', + 'href': App.createUrl('log') + }), + new Element('span.separator'), + 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) }) diff --git a/couchpotato/static/scripts/page/home.js b/couchpotato/static/scripts/page/home.js index f425662c..bb4e5e9f 100644 --- a/couchpotato/static/scripts/page/home.js +++ b/couchpotato/static/scripts/page/home.js @@ -78,7 +78,7 @@ Page.Home = new Class({ if(timer) clearTimeout(timer); timer = (function(){ images.setStyle('height', highest); - }).delay(300); + }).delay(50); } }); }); diff --git a/couchpotato/static/scripts/page/settings.js b/couchpotato/static/scripts/page/settings.js index 6e563bff..5302f92f 100644 --- a/couchpotato/static/scripts/page/settings.js +++ b/couchpotato/static/scripts/page/settings.js @@ -11,20 +11,6 @@ Page.Settings = new Class({ current: 'about', 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){ var self = this; self.action = action == 'index' ? self.default_action : action; diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index 02dda3d1..7d076513 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -178,13 +178,10 @@ body > .spinner, .mask{ margin: 0; width: 100%; z-index: 5; - background: #4e5969; + background: #5c697b; box-shadow: 0 0 10px rgba(0,0,0,.1); transition: all .4s ease-in-out; } - .header.with_shadow { - background-color: #46505e; - } @media all and (max-width: 480px) { .header { @@ -315,7 +312,7 @@ body > .spinner, .mask{ } .menu_shown body { - left: 160px; + left: 240px; } .header .navigation { @@ -327,13 +324,13 @@ body > .spinner, .mask{ right: 0; top: 0; bottom: 0; - left: 160px; + left: 240px; } .header .navigation ul { - width: 160px; + width: 240px; position: fixed; - left: -160px; + left: -240px; background: rgba(0,0,0,.5); transition: all .5s cubic-bezier(0.9,0,0.1,1); } @@ -374,26 +371,15 @@ body > .spinner, .mask{ .header .more_menu .button { height: 100%; - width: 44px; - border: 0; - box-shadow: none; - border-radius: 0; - background: none; line-height: 66px; text-align: center; 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 { - width: 150px; + width: 200px; margin-left: -106px; - margin-top: 66px; + margin-top: 22px; } @media all and (max-width: 480px) { @@ -402,7 +388,7 @@ body > .spinner, .mask{ } .header .more_menu .wrapper { - margin-top: 44px; + margin-top: 0; } } @@ -439,12 +425,10 @@ body > .spinner, .mask{ } .header .notification_menu ul { + min-height: 80px; max-height: 300px; overflow: auto; - } - - .header .notification_menu > a { - background-position: center -209px; + text-align: center; } .header .notification_menu li > span { @@ -491,6 +475,7 @@ body > .spinner, .mask{ width: 16px; cursor: pointer; background: url('../images/sprite.png') no-repeat -200px; + border-radius: 3px; } .check.highlighted { background-color: #424c59; } .check.checked { background-position: -2px 0; } @@ -566,15 +551,14 @@ body > .spinner, .mask{ .inlay { color: #fff; border: 0; - border-radius:3px; 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 { background-color: #47515f; 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 { @@ -585,7 +569,7 @@ body > .spinner, .mask{ .onlay, .inlay .selected, .inlay:not(.reversed) > li:hover, .inlay > li.active, .inlay.reversed > li { border-radius:3px; 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-image: linear-gradient( 0, @@ -597,7 +581,7 @@ body > .spinner, .mask{ color: #fff; border: 1px solid transparent; 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 { @@ -648,38 +632,37 @@ body > .spinner, .mask{ .more_menu > a { display: block; - background: url('../images/sprite.png') no-repeat center -137px; - height: 25px; - width: 25px; - border: 1px solid rgba(0,0,0,0.3); + height: 44px; + width: 44px; 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 { display: none; - background: rgba(255,255,255,0.98); top: 0; right: 0; - padding: 4px; - margin: 26px 0 0 0; + margin: 11px 0 0 0; position: absolute; z-index: 90; width: 185px; - box-shadow: 0 20px 20px -5px rgba(0,0,0,0.1); - text-align: center; - color: #000; - background-image: linear-gradient( - -45deg, - rgb(200,200,200) 0%, - rgb(255,255,255) 100% - ); + box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55); + color: #444; + background: #fff; } .more_menu.show .wrapper { display: block; + top: 44px; } .more_menu ul { @@ -698,11 +681,19 @@ body > .spinner, .mask{ border-bottom: 1px solid rgba(255,255,255,0.2); box-shadow: none; font-weight: normal; - font-size: 11px; - text-transform: uppercase; + font-size: 1.2em; letter-spacing: 1px; - padding: 3px 0; - color: #000; + padding: 2px 10px; + 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 { diff --git a/couchpotato/static/style/settings.css b/couchpotato/static/style/settings.css index 7bfeb3aa..9507f332 100644 --- a/couchpotato/static/style/settings.css +++ b/couchpotato/static/style/settings.css @@ -576,7 +576,8 @@ .page .tab_about .usenet { padding: 20px 30px 0; - font-size: 17px; + font-size: 1.5em; + line-height: 1.3em; } .page .tab_about .usenet a { From 666771fb0f6347f122ce4c165d4b0e722538626d Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 00:02:11 +0200 Subject: [PATCH 04/13] Notification is empty styling --- couchpotato/static/style/main.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index 7d076513..638f3762 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -425,11 +425,20 @@ body > .spinner, .mask{ } .header .notification_menu ul { - min-height: 80px; + min-height: 60px; max-height: 300px; overflow: auto; - text-align: center; } + .header .notification_menu ul:empty:after { + content: 'No notifications (yet)'; + text-align: center; + width: 100%; + position: absolute; + padding: 18px 0; + font-size: 15px; + font-style: italic; + opacity: .4; + } .header .notification_menu li > span { padding: 5px; From 368fced0c42f6cd4b86d73f2abe9a0531e3892cb Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 00:03:42 +0200 Subject: [PATCH 05/13] Cancel autocomplete searches when starting new one --- couchpotato/core/plugins/movie/static/search.css | 4 ++-- couchpotato/core/plugins/movie/static/search.js | 15 ++++++--------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/couchpotato/core/plugins/movie/static/search.css b/couchpotato/core/plugins/movie/static/search.css index 59750088..82fd13cc 100644 --- a/couchpotato/core/plugins/movie/static/search.css +++ b/couchpotato/core/plugins/movie/static/search.css @@ -45,7 +45,7 @@ border-radius: 0; display: block; border: 0; - background: rgba(255,255,255,.08); + background: none; color: #FFF; font-size: 25px; height: 100%; @@ -105,7 +105,7 @@ background: #5c697b; margin: 4px 0 0; width: 470px; - min-height: 140px; + min-height: 50px; box-shadow: 0 20px 20px -10px rgba(0,0,0,0.55); display: none; } diff --git a/couchpotato/core/plugins/movie/static/search.js b/couchpotato/core/plugins/movie/static/search.js index c61b1624..8fa4fb0c 100644 --- a/couchpotato/core/plugins/movie/static/search.js +++ b/couchpotato/core/plugins/movie/static/search.js @@ -98,6 +98,9 @@ Block.Search = new Class({ self.el[self.q() ? 'addClass' : 'removeClass']('filled') 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) self.autocomplete_timer = self.autocomplete.delay(300, self) } @@ -116,12 +119,9 @@ Block.Search = new Class({ }, list: function(){ - var self = this; - - if(self.api_request && self.api_request.running) return - - var q = self.q(); - var cache = self.cache[q]; + var self = this, + q = self.q(), + cache = self.cache[q]; self.hideResults(false); @@ -164,9 +164,6 @@ Block.Search = new Class({ }); - if(q != self.q()) - self.list() - // Calculate result heights var w = window.getSize(), rc = self.result_container.getCoordinates(); From 00e53439edf69da02fa0724ef7016e34f7d9306e Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 00:07:06 +0200 Subject: [PATCH 06/13] Don't wait between xbmc calls --- couchpotato/core/notifications/xbmc/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/couchpotato/core/notifications/xbmc/main.py b/couchpotato/core/notifications/xbmc/main.py index 84b9f7e4..f60b917f 100755 --- a/couchpotato/core/notifications/xbmc/main.py +++ b/couchpotato/core/notifications/xbmc/main.py @@ -13,6 +13,7 @@ class XBMC(Notification): listen_to = ['renamer.after'] use_json_notifications = {} + http_time_between_calls = 0 def notify(self, message = '', data = {}, listener = None): From f3c60e8fa6f430a61d3e24ed72966701f8e04717 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 12:00:12 +0200 Subject: [PATCH 07/13] Added TPB proxies --- couchpotato/core/providers/torrent/thepiratebay/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/providers/torrent/thepiratebay/main.py b/couchpotato/core/providers/torrent/thepiratebay/main.py index 1e47a710..db63a231 100644 --- a/couchpotato/core/providers/torrent/thepiratebay/main.py +++ b/couchpotato/core/providers/torrent/thepiratebay/main.py @@ -35,8 +35,11 @@ class ThePirateBay(TorrentMagnetProvider): 'https://piratereverse.info', 'https://tpb.pirateparty.org.uk', 'https://argumentomteemigreren.nl', - 'https://livepirate.com/', - 'https://www.getpirate.com/', + 'https://livepirate.com', + 'https://www.getpirate.com', + 'https://tpb.partipirate.org', + 'https://tpb.piraten.lu', + 'https://kuiken.co', ] def __init__(self): From fede348fbd6e7ac4cfcdc15b6b1ec8ace12107b7 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 15:14:47 +0200 Subject: [PATCH 08/13] Icon replacements --- .../plugins/movie/static/movie.actions.js | 20 +++---- .../core/plugins/movie/static/movie.css | 57 ++++++++++++------- .../core/plugins/movie/static/movie.js | 6 -- .../core/plugins/profile/static/profile.css | 9 ++- .../core/plugins/profile/static/profile.js | 4 +- couchpotato/static/scripts/page/settings.js | 4 +- couchpotato/static/style/main.css | 40 +++++++++---- couchpotato/static/style/settings.css | 57 +++++++++++++------ 8 files changed, 125 insertions(+), 72 deletions(-) diff --git a/couchpotato/core/plugins/movie/static/movie.actions.js b/couchpotato/core/plugins/movie/static/movie.actions.js index 546120f6..f091e7da 100644 --- a/couchpotato/core/plugins/movie/static/movie.actions.js +++ b/couchpotato/core/plugins/movie/static/movie.actions.js @@ -1,6 +1,6 @@ var MovieAction = new Class({ - class_name: 'action icon', + class_name: 'action icon2', initialize: function(movie){ var self = this; @@ -82,7 +82,7 @@ MA.Release = new Class({ create: function(){ 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(), 'events': { 'click': self.show.bind(self) @@ -147,11 +147,11 @@ MA.Release = new Class({ new Element('span.age', {'text': self.get(release, 'age')}), new Element('span.score', {'text': self.get(release, 'score')}), 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'], 'target': '_blank' - }) : null, - new Element('a.download.icon', { + }) : new Element('a'), + new Element('a.download.icon2', { 'events': { 'click': function(e){ (e).preventDefault(); @@ -160,7 +160,7 @@ MA.Release = new Class({ } } }), - new Element('a.delete.icon', { + new Element('a.delete.icon2', { 'events': { 'click': function(e){ (e).preventDefault(); @@ -243,13 +243,13 @@ MA.Release = new Class({ self.trynext_container = new Element('div.buttons.trynext').inject(self.movie.info_container); 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', 'events': { 'click': self.tryNextRelease.bind(self) } }), - new Element('a.icon.download', { + new Element('a.icon2.download', { 'text': 'pick one yourself', 'events': { 'click': function(){ @@ -257,7 +257,7 @@ MA.Release = new Class({ } } })] : null, - new Element('a.icon.completed', { + new Element('a.icon2.completed', { 'text': 'mark this movie done', 'events': { 'click': function(){ @@ -293,7 +293,7 @@ MA.Release = new Class({ var self = this; 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); diff --git a/couchpotato/core/plugins/movie/static/movie.css b/couchpotato/core/plugins/movie/static/movie.css index 2e82638a..5e691e6f 100644 --- a/couchpotato/core/plugins/movie/static/movie.css +++ b/couchpotato/core/plugins/movie/static/movie.css @@ -412,13 +412,14 @@ .movies .data .actions { position: absolute; - bottom: 20px; + bottom: 17px; right: 20px; line-height: 0; top: 0; + display: block; + width: auto; opacity: 0; display: none; - width: 0; } @media all and (max-width: 480px) { .movies .data .actions { @@ -429,7 +430,6 @@ .movies .movie:hover .data .actions { opacity: 1; display: inline-block; - width: auto; } .movies.details_list .data .actions { @@ -451,14 +451,24 @@ .movies .movie:hover .action:hover { opacity: 1; } .movies .data .action { - background-repeat: no-repeat; - background-position: center; display: inline-block; - width: 26px; - height: 26px; - padding: 3px; + height: 22px; + min-width: 33px; + 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 { display: none; } @@ -524,8 +534,10 @@ text-decoration: line-through; color: rgba(255,255,255,0.4); } - .movies .options .table .item.ignored .delete { - background-image: url('../images/icon.undo.png'); + .movies .options .table .item.ignored .delete:before { + display: inline-block; + content: "\e04b"; + transform: scale(-1, 1); } .movies .options .table .item:last-child { border: 0; } @@ -571,10 +583,12 @@ width: 30px !important; height: 20px; opacity: 0.8; + line-height: 25px; } - .movies .options .table a:hover { - opacity: 1; - } + .movies .options .table a:hover { 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 > * { font-weight: bold; @@ -642,11 +656,10 @@ .movies .movie .trynext { display: inline; position: absolute; - right: 145px; + right: 180px; z-index: 2; opacity: 0; background: #4e5969; - min-width: 300px; text-align: right; height: 100%; top: 0; @@ -659,7 +672,7 @@ } .movies.mass_edit_list .trynext { display: none; } .wanted .movies .movie .trynext { - padding-right: 50px; + padding-right: 30px; } .movies .movie:hover .trynext { opacity: 1; @@ -667,7 +680,7 @@ .movies.details_list .movie .trynext { background: #47515f; - padding: 2px 0; + padding: 0; right: 0; height: 25px; } @@ -678,8 +691,14 @@ margin-right: 10px; color: #FFF; height: 100%; - line-height: 30px; + 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; } diff --git a/couchpotato/core/plugins/movie/static/movie.js b/couchpotato/core/plugins/movie/static/movie.js index 872f4bf1..9871cfba 100644 --- a/couchpotato/core/plugins/movie/static/movie.js +++ b/couchpotato/core/plugins/movie/static/movie.js @@ -139,9 +139,6 @@ var Movie = new Class({ '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', { 'text': self.data.library.plot }), @@ -199,9 +196,6 @@ var Movie = new Class({ self.actions.adopt(action) }); - if(!self.data.library.rating) - self.rating.hide(); - }, addQuality: function(quality_id){ diff --git a/couchpotato/core/plugins/profile/static/profile.css b/couchpotato/core/plugins/profile/static/profile.css index cdb33945..d94576b9 100644 --- a/couchpotato/core/plugins/profile/static/profile.css +++ b/couchpotato/core/plugins/profile/static/profile.css @@ -13,11 +13,11 @@ .profile > .delete { position: absolute; - padding: 25px 20px; - background-position: center; + padding: 16px; right: 0; cursor: pointer; opacity: 0.6; + color: #fd5353; } .profile > .delete:hover { opacity: 1; @@ -29,6 +29,7 @@ .profile .qualities { min-height: 80px; + padding-top: 0; } .profile .formHint { @@ -97,11 +98,13 @@ } .profile .types .type .delete { - background-position: left center; height: 20px; width: 20px; + line-height: 20px; visibility: hidden; cursor: pointer; + font-size: 13px; + color: #fd5353; } .profile .types .type:hover:not(.is_empty) .delete { diff --git a/couchpotato/core/plugins/profile/static/profile.js b/couchpotato/core/plugins/profile/static/profile.js index 3bb44989..a93ca1bc 100644 --- a/couchpotato/core/plugins/profile/static/profile.js +++ b/couchpotato/core/plugins/profile/static/profile.js @@ -24,7 +24,7 @@ var Profile = new Class({ var data = self.data; self.el = new Element('div.profile').adopt( - self.delete_button = new Element('span.delete.icon', { + self.delete_button = new Element('span.delete.icon2', { 'events': { 'click': self.del.bind(self) } @@ -256,7 +256,7 @@ Profile.Type = new Class({ } }) ), - new Element('span.delete.icon', { + new Element('span.delete.icon2', { 'events': { 'click': self.del.bind(self) } diff --git a/couchpotato/static/scripts/page/settings.js b/couchpotato/static/scripts/page/settings.js index 5302f92f..0d7ebe7f 100644 --- a/couchpotato/static/scripts/page/settings.js +++ b/couchpotato/static/scripts/page/settings.js @@ -862,7 +862,7 @@ Option.Directories = new Class({ $(dir).addClass('is_empty'); // Add remove button - new Element('a.icon.delete', { + new Element('a.icon2.delete', { 'events': { 'click': self.delItem.bind(self, dir) } @@ -1371,7 +1371,7 @@ Option.Combined = new Class({ item[value_empty == value_count ? 'addClass' : 'removeClass']('is_empty'); - new Element('a.icon.delete', { + new Element('a.icon2.delete', { 'events': { 'click': self.deleteCombinedItem.bind(self) } diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index 638f3762..5ed0f003 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -108,7 +108,7 @@ body > .spinner, .mask{ } .button { - background: #5082bc url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAyCAYAAACd+7GKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpi/v//vwMTAwPDfzjBgMpFI/7hFSOT9Y8qRuF3JLoHAQIMAHYtMmRA+CugAAAAAElFTkSuQmCC") repeat-x; + background: #5082bc; padding: 5px 10px 6px; color: #fff; text-decoration: none; @@ -154,6 +154,7 @@ body > .spinner, .mask{ line-height: 1; -webkit-font-smoothing: antialiased; font-size: 15px; + color: #FFF; } .icon2.cog:before { content: "\e109"; } @@ -161,6 +162,30 @@ body > .spinner, .mask{ .icon2.search:before { content: "\e03e"; } .icon2.return-key:before { content: "\e111"; } .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 { content: "\e076 \e076 \e076"; line-height: 6px; @@ -502,14 +527,7 @@ body > .spinner, .mask{ .select .selection { display: inline-block; padding: 0 30px 0 20px; - border-radius:30px; - - 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% - ); + background: #5b9bd1 url('../images/sprite.png') no-repeat 94% -53px; } .select .selection .selectionDisplay { @@ -529,11 +547,9 @@ body > .spinner, .mask{ .select .list { display: none; background: #282d34; - border: 1px solid #1f242b; position: absolute; - margin: 28px 0 0 0; + margin: 25px 0 0 0; box-shadow: 0 20px 20px -10px rgba(0,0,0,0.4); - border-radius:3px; z-index: 3; } .select.active .list { diff --git a/couchpotato/static/style/settings.css b/couchpotato/static/style/settings.css index 9507f332..132d9c53 100644 --- a/couchpotato/static/style/settings.css +++ b/couchpotato/static/style/settings.css @@ -252,7 +252,7 @@ display: block; text-align: right; height: 20px; - margin: 0 0 -37px; + margin: 0 0 -38px; } .page .advanced_toggle .check { margin: 0; @@ -262,18 +262,24 @@ color: #edc07f; } - .page .directory { + .page form .directory { display: inline-block; padding: 0 4% 0 4px; font-size: 13px; width: 30%; - background-image: url('../images/icon.folder.gif'); - background-repeat: no-repeat; - background-position: 97% center; overflow: hidden; 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; display: inline-block; float: right; @@ -281,15 +287,19 @@ white-space: nowrap; cursor: pointer; } + .page form .directory span:empty:before { + content: 'No folder selected'; + font-style: italic; + opacity: .3; + } .page .directory_list { z-index: 2; position: absolute; width: 450px; - margin: 28px 0 20px 18%; + margin: 28px 0 20px 18.4%; background: #5c697b; - border-radius: 3px; - box-shadow: 0 0 50px rgba(0,0,0,0.55); + box-shadow: 0 20px 40px -20px rgba(0,0,0,0.55); } .page .directory_list .pointer { @@ -299,7 +309,7 @@ display: block; position: absolute; width: 0px; - margin: -6px 0 0 22%; + margin: -6px 0 0 45%; } .page .directory_list ul { @@ -311,11 +321,14 @@ } .page .directory_list li { - padding: 4px 10px; + padding: 4px 30px 4px 10px; cursor: pointer; margin: 0 !important; border-top: 1px solid rgba(255,255,255,0.1); background: url('../images/right.arrow.png') no-repeat 98% center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .page .directory_list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.1); @@ -341,7 +354,10 @@ .page .directory_list .actions { clear: both; padding: 4% 4% 2%; - min-height: 25px; + min-height: 45px; + position: relative; + width: 100%; + text-align: right; } .page .directory_list .actions label { @@ -350,7 +366,7 @@ padding: 0; } .page .directory_list .actions .inlay { - margin: -2px 0 0 7px; + margin: 0 0 0 7px; } .page .directory_list .actions .back { @@ -360,6 +376,9 @@ padding: 0; line-height: 120%; vertical-align: top; + position: absolute; + text-align: left; + left: 4%; } .page .directory_list .actions:last-child { @@ -373,10 +392,10 @@ } .page .directory_list .actions:last-child > .clear { - left: -90%; - position: relative; - background-color: #af3128; -} + left: 4%; + position: absolute; + background-color: #af3128; + } .page .directory_list .actions:last-child > .cancel { font-weight: bold; @@ -563,8 +582,10 @@ display: none; width: 22px; height: 22px; + line-height: 22px; + text-align: center; vertical-align: middle; - background-position: left center; + color: #fe3d3d; } .page .combined_table .ctrlHolder:hover .delete { display: inline-block; From c1d35e8a57c76c3013dcf9495663567e2ba8da93 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 15:19:39 +0200 Subject: [PATCH 09/13] Stop blinking text when scrolling in webkit --- couchpotato/static/style/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/couchpotato/static/style/main.css b/couchpotato/static/style/main.css index 5ed0f003..39aa2693 100644 --- a/couchpotato/static/style/main.css +++ b/couchpotato/static/style/main.css @@ -7,6 +7,7 @@ body, html { margin: 0; padding: 0; background: #4e5969; + -webkit-font-smoothing: subpixel-antialiased; } body { overflow-y: scroll; } body.noscroll { overflow: hidden; } From a11cad619db8915a0a926bd12b720927b0bce32e Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 18:06:10 +0200 Subject: [PATCH 10/13] Don't unicode css --- libs/cssprefixer/engine.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/cssprefixer/engine.py b/libs/cssprefixer/engine.py index 894f6e7f..ee75527b 100755 --- a/libs/cssprefixer/engine.py +++ b/libs/cssprefixer/engine.py @@ -13,10 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +from rules import prefixRegex, rules as tr_rules import cssutils import re -from rules import rules as tr_rules -from rules import prefixRegex 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 return if minify or not hasattr(ruleset, 'style'): - return unicode(cssText) - return unicode(cssText) + '\n' + return cssText + return cssText + '\n' def process(string, debug = False, minify = False, filt = ['webkit', 'moz', 'o', 'ms'], **prefs): - loglevel = 'DEBUG' if debug else 'ERROR' parser = cssutils.CSSParser(loglevel = 'CRITICAL') if minify: cssutils.ser.prefs.useMinified() From 49cf72e0585c17aa6269715f51ce88d0cb28de0c Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 18:28:52 +0200 Subject: [PATCH 11/13] Load notification after window load --- couchpotato/core/notifications/core/static/notification.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/notifications/core/static/notification.js b/couchpotato/core/notifications/core/static/notification.js index 74d14451..b05eb1a3 100644 --- a/couchpotato/core/notifications/core/static/notification.js +++ b/couchpotato/core/notifications/core/static/notification.js @@ -28,10 +28,12 @@ var NotificationBase = new Class({ $(App.block.notification).inject(App.getBlock('search'), 'after'); self.badge = new Element('div.badge').inject(App.block.notification, 'top').hide(); - self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 1000, self); - }); + window.addEvent('load', function(){ + self.startInterval.delay($(window).getSize().x <= 480 ? 2000 : 100, self); + }) + }, notify: function(result){ From 7b0806355f8358982ee2d42491c79dc26bf7468e Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 10 May 2013 19:36:48 +0200 Subject: [PATCH 12/13] Thumbnail list action position --- couchpotato/core/plugins/movie/static/movie.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/movie/static/movie.css b/couchpotato/core/plugins/movie/static/movie.css index 5e691e6f..90510c11 100644 --- a/couchpotato/core/plugins/movie/static/movie.css +++ b/couchpotato/core/plugins/movie/static/movie.css @@ -442,7 +442,7 @@ display: inline-block; } .movies.thumbs_list .data .actions { - bottom: 2px; + bottom: 12px; right: 10px; top: auto; } From 7314b5ecae77c2331cf49063771c6ce8cea96c6a Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 11 May 2013 00:04:59 +0200 Subject: [PATCH 13/13] Run async event in thread so the on_complete is fired properly --- couchpotato/core/event.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/event.py b/couchpotato/core/event.py index 2f872a6a..1fd6ab25 100644 --- a/couchpotato/core/event.py +++ b/couchpotato/core/event.py @@ -139,8 +139,13 @@ def fireEvent(name, *args, **kwargs): log.error('%s: %s', (name, traceback.format_exc())) def fireEventAsync(*args, **kwargs): - kwargs['async'] = True - fireEvent(*args, **kwargs) + try: + 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): etype, value, tb = error