Browse Source

Update

pull/5180/head
Ruud 11 years ago
parent
commit
db23f5cdef
  1. 9
      couchpotato/core/media/_base/providers/torrent/bitsoup.py
  2. 4
      couchpotato/core/media/_base/search/static/search.css
  3. 2
      couchpotato/core/media/movie/_base/static/1_wanted.js
  4. 2
      couchpotato/core/media/movie/_base/static/2_manage.js
  5. 8
      couchpotato/core/media/movie/providers/torrent/bitsoup.py
  6. 2
      couchpotato/static/scripts/block/navigation.js
  7. 8
      couchpotato/static/scripts/couchpotato.js
  8. 72
      couchpotato/static/style/fonts.scss
  9. 88
      couchpotato/static/style/main.scss

9
couchpotato/core/media/_base/providers/torrent/bitsoup.py

@ -1,7 +1,6 @@
import traceback import traceback
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import simplifyString, tryUrlencode
from couchpotato.core.helpers.variable import tryInt from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
@ -24,13 +23,7 @@ class Base(TorrentProvider):
def _searchOnTitle(self, title, movie, quality, results): def _searchOnTitle(self, title, movie, quality, results):
q = '"%s" %s' % (simplifyString(title), movie['info']['year']) url = self.urls['search'] % self.buildUrl(title, movie, quality)
arguments = tryUrlencode({
'search': q,
})
url = "%s&%s" % (self.urls['search'], arguments)
url = self.urls['search'] % self.buildUrl(movie, quality)
data = self.getHTMLData(url) data = self.getHTMLData(url)
if data: if data:

4
couchpotato/core/media/_base/search/static/search.css

@ -1,11 +1,7 @@
.search_form { .search_form {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
position: absolute;
right: 105px;
top: 0;
text-align: right; text-align: right;
height: 100%;
transition: all .4s cubic-bezier(0.9,0,0.1,1); transition: all .4s cubic-bezier(0.9,0,0.1,1);
position: absolute; position: absolute;
z-index: 20; z-index: 20;

2
couchpotato/core/media/movie/_base/static/1_wanted.js

@ -1,4 +1,4 @@
Page.Wanted = new Class({ Page.Movies.Wanted = new Class({
Extends: PageBase, Extends: PageBase,

2
couchpotato/core/media/movie/_base/static/2_manage.js

@ -1,4 +1,4 @@
Page.Manage = new Class({ Page.Movies.Manage = new Class({
Extends: PageBase, Extends: PageBase,

8
couchpotato/core/media/movie/providers/torrent/bitsoup.py

@ -1,6 +1,5 @@
from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.encoding import tryUrlencode
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.event import fireEvent
from couchpotato.core.media._base.providers.torrent.bitsoup import Base from couchpotato.core.media._base.providers.torrent.bitsoup import Base
from couchpotato.core.media.movie.providers.base import MovieProvider from couchpotato.core.media.movie.providers.base import MovieProvider
@ -18,12 +17,9 @@ class Bitsoup(MovieProvider, Base):
] ]
cat_backup_id = 0 cat_backup_id = 0
def buildUrl(self, media, quality): def buildUrl(self, title, media, quality):
query = tryUrlencode({ query = tryUrlencode({
'search': '"%s" %s' % ( 'search': '"%s" %s' % (title, media['info']['year']),
fireEvent('library.query', media, include_year = False, single = True),
media['info']['year']
),
'cat': self.getCatId(quality)[0], 'cat': self.getCatId(quality)[0],
}) })
return query return query

2
couchpotato/static/scripts/block/navigation.js

@ -12,7 +12,7 @@ var BlockNavigation = new Class({
} }
}).grab(new Element('span.overlay')), }).grab(new Element('span.overlay')),
self.logo = new Element('a.logo', { self.logo = new Element('a.logo', {
'text': 'CouchPotato', 'html': '<span>Couch</span><span>Potato</span>',
'href': App.createUrl('') 'href': App.createUrl('')
}), }),
self.nav = new Element('ul'), self.nav = new Element('ul'),

8
couchpotato/static/scripts/couchpotato.js

@ -73,14 +73,14 @@
self.c.adopt( self.c.adopt(
$(self.block.header).addClass('header').adopt( $(self.block.header).addClass('header').adopt(
new Element('div').adopt(
self.block.navigation = new BlockNavigation(self, {}), self.block.navigation = new BlockNavigation(self, {}),
self.block.search = new BlockSearch(self, {}), self.block.search = new BlockSearch(self, {}),
self.block.more = new BlockMenu(self, {'button_class': 'icon2.cog'}) self.block.more = new BlockMenu(self, {'button_class': 'icon2.cog'})
)
), ),
self.content = new Element('div.content'), self.content = new Element('div.content').adopt(
self.pages = new Element('div.pages'),
self.block.footer = new BlockFooter(self, {}) self.block.footer = new BlockFooter(self, {})
)
); );
var setting_links = [ var setting_links = [
@ -143,7 +143,7 @@
self.fireEvent('load'+class_name); self.fireEvent('load'+class_name);
$(pg).inject(self.content); $(pg).inject(self.pages);
}); });
self.fireEvent('load'); self.fireEvent('load');

72
couchpotato/static/style/fonts.scss

@ -2,22 +2,34 @@
/* Fonts */ /* Fonts */
@font-face { @font-face {
font-family: 'Elusive-Icons'; font-family: 'Elusive-Icons';
src:url('../fonts/Elusive-Icons.eot'); src:url('../static/fonts/Elusive-Icons.eot');
src:url('../fonts/Elusive-Icons.eot?#iefix') format('embedded-opentype'), src:url('../static/fonts/Elusive-Icons.eot?#iefix') format('embedded-opentype'),
url('../fonts/Elusive-Icons.woff') format('woff'), url('../static/fonts/Elusive-Icons.woff') format('woff'),
url('../fonts/Elusive-Icons.ttf') format('truetype'), url('../static/fonts/Elusive-Icons.ttf') format('truetype'),
url('../fonts/Elusive-Icons.svg#Elusive-Icons') format('svg'); url('../static/fonts/Elusive-Icons.svg#Elusive-Icons') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'OpenSans'; font-family: 'OpenSans';
src: url('../fonts/OpenSans-Regular-webfont.eot'); src: url('../static/fonts/OpenSans-Light-webfont.eot');
src: url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), src: url('../static/fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Regular-webfont.woff') format('woff'), url('../static/fonts/OpenSans-Light-webfont.woff') format('woff'),
url('../fonts/OpenSans-Regular-webfont.ttf') format('truetype'), url('../static/fonts/OpenSans-Light-webfont.ttf') format('truetype'),
url('../fonts/OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg'); url('../static/fonts/OpenSans-Light-webfont.svg#OpenSansRegular') format('svg');
font-weight: 200;
font-style: normal;
}
@font-face {
font-family: 'OpenSans';
src: url('../static/fonts/OpenSans-Regular-webfont.eot');
src: url('../static/fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../static/fonts/OpenSans-Regular-webfont.woff') format('woff'),
url('../static/fonts/OpenSans-Regular-webfont.ttf') format('truetype'),
url('../static/fonts/OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
@ -25,11 +37,11 @@
@font-face { @font-face {
font-family: 'OpenSans'; font-family: 'OpenSans';
src: url('../fonts/OpenSans-Italic-webfont.eot'); src: url('../static/fonts/OpenSans-Italic-webfont.eot');
src: url('../fonts/OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'), src: url('../static/fonts/OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Italic-webfont.woff') format('woff'), url('../static/fonts/OpenSans-Italic-webfont.woff') format('woff'),
url('../fonts/OpenSans-Italic-webfont.ttf') format('truetype'), url('../static/fonts/OpenSans-Italic-webfont.ttf') format('truetype'),
url('../fonts/OpenSans-Italic-webfont.svg#OpenSansItalic') format('svg'); url('../static/fonts/OpenSans-Italic-webfont.svg#OpenSansItalic') format('svg');
font-weight: normal; font-weight: normal;
font-style: italic; font-style: italic;
@ -37,33 +49,33 @@
@font-face { @font-face {
font-family: 'OpenSans'; font-family: 'OpenSans';
src: url('../fonts/OpenSans-Bold-webfont.eot'); src: url('../static/fonts/OpenSans-Bold-webfont.eot');
src: url('../fonts/OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'), src: url('../static/fonts/OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Bold-webfont.woff') format('woff'), url('../static/fonts/OpenSans-Bold-webfont.woff') format('woff'),
url('../fonts/OpenSans-Bold-webfont.ttf') format('truetype'), url('../static/fonts/OpenSans-Bold-webfont.ttf') format('truetype'),
url('../fonts/OpenSans-Bold-webfont.svg#OpenSansBold') format('svg'); url('../static/fonts/OpenSans-Bold-webfont.svg#OpenSansBold') format('svg');
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
} }
@font-face { @font-face {
font-family: 'OpenSans'; font-family: 'OpenSans';
src: url('../fonts/OpenSans-BoldItalic-webfont.eot'); src: url('../static/fonts/OpenSans-BoldItalic-webfont.eot');
src: url('../fonts/OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'), src: url('../static/fonts/OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-BoldItalic-webfont.woff') format('woff'), url('../static/fonts/OpenSans-BoldItalic-webfont.woff') format('woff'),
url('../fonts/OpenSans-BoldItalic-webfont.ttf') format('truetype'), url('../static/fonts/OpenSans-BoldItalic-webfont.ttf') format('truetype'),
url('../fonts/OpenSans-BoldItalic-webfont.svg#OpenSansBoldItalic') format('svg'); url('../static/fonts/OpenSans-BoldItalic-webfont.svg#OpenSansBoldItalic') format('svg');
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
} }
@font-face { @font-face {
font-family: 'Lobster'; font-family: 'Lobster';
src: url('../fonts/Lobster-webfont.eot'); src: url('../static/fonts/Lobster-webfont.eot');
src: url('../fonts/Lobster-webfont.eot?#iefix') format('embedded-opentype'), src: url('../static/fonts/Lobster-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/Lobster-webfont.woff') format('woff'), url('../static/fonts/Lobster-webfont.woff') format('woff'),
url('../fonts/Lobster-webfont.ttf') format('truetype'), url('../static/fonts/Lobster-webfont.ttf') format('truetype'),
url('../fonts/Lobster-webfont.svg#lobster_1.4regular') format('svg'); url('../static/fonts/Lobster-webfont.svg#lobster_1.4regular') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }

88
couchpotato/static/style/main.scss

@ -1,19 +1,99 @@
@import "fonts"; @import "fonts";
@import "mixins";
body, html { body, html {
font-size: 12px; font-size: 14px;
line-height: 1.5; line-height: 1.5;
font-family: OpenSans, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif; font-family: OpenSans, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
background: #FFF; background: #111;
-webkit-font-smoothing: subpixel-antialiased; -webkit-font-smoothing: subpixel-antialiased;
overflow: hidden;
}
body {
@include flexbox();
flex-flow: row nowrap;
}
a {
text-decoration: none;
}
.header {
width: 130px;
font-weight: 200;
a {
color: #FFF;
letter-spacing: 1px;
}
.navigation {
.logo {
background: #ac0000;
display: block;
text-align: center;
font-family: Lobster;
color: #FFF;
font-size: 38px;
line-height: 80px;
height: 80px;
span:nth-child(odd){
display: block;
}
span:nth-child(even){
display: none;
&.noscroll { }
}
ul {
padding: 0;
margin: 0;
li a {
padding: 10px 20px;
display: block;
}
}
}
}
.content {
@include flex(1 auto);
background: #FFF;
border-radius: 3px 0 0 3px;
overflow: hidden; overflow: hidden;
.pages {
height: 100%;
widows: 100%;
}
.footer {
position: fixed;
bottom: 0;
height: 20px;
width: 100%;
} }
} }
body { overflow-y: scroll; } .page {
display: none;
&.active {
display: block;
}
}

Loading…
Cancel
Save