From 6aba8e5ff6446eeddc23ee4bcb1ea40cd37c6eb7 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Mar 2014 01:22:59 +0100 Subject: [PATCH 01/23] Add userTracking toggle Add enableUserTracking boolean to app.js to easily turn tracking on and off. --- js/app.js | 5 ++++- js/tracking.js | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 6fa879aa..a779a551 100644 --- a/js/app.js +++ b/js/app.js @@ -33,7 +33,10 @@ var tmpFolder = path.join(os.tmpDir(), 'Popcorn-Time'), // i18n module (translations) - i18n = require("i18n"); + i18n = require("i18n"), + + // Enable User tracking + enableUserTracking = true; isWin = (process.platform === 'win32'); isLinux = (process.platform === 'linux'); diff --git a/js/tracking.js b/js/tracking.js index 9c03536a..32f4bdc2 100644 --- a/js/tracking.js +++ b/js/tracking.js @@ -1,5 +1,7 @@ // Tracking var getTrackingId = function(){ + //Check if user tracking is enabled + if( !enableUserTracking ) return null; var clientId = Settings.get('trackingId'); From 0f1890adb34f27596b3d7bd803540f0187c38393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isra=C3=ABl=20Hall=C3=A9?= Date: Thu, 13 Mar 2014 22:11:08 -0400 Subject: [PATCH 02/23] Update README.md with css dir for compass command On some system it seems like default css directory is `stylesheet` instead of `css`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ec80623..3131798c 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Replace `node_modules/moviedb/node_modules/superagent/index.js` contents with: ## Development -- Run `compass watch` in Terminal for CSS compiling and listen to future changes. +- Run `compass watch --css-dir css` in Terminal for CSS compiling and listen to future changes. - [How to build with SublimeText](https://github.com/rogerwang/node-webkit/wiki/Debugging-with-Sublime-Text-2-and-3) - Currently Gaze to watch all files and reload the app is disabled due to memory leaks and unstability. - Run node-webkit from the root directory with --debug to enable debugging mode like so ```node-webkit . --debug``` From 3e647f0a78801e2f1805788ad5ed65de2748b2d3 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Thu, 13 Mar 2014 22:31:03 -0400 Subject: [PATCH 03/23] Added settings button --- css/app.css | 348 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 1 + sass/_layout.scss | 26 +++- 3 files changed, 369 insertions(+), 6 deletions(-) diff --git a/css/app.css b/css/app.css index fec7d21e..268329c7 100644 --- a/css/app.css +++ b/css/app.css @@ -1,4 +1,5 @@ @import url(../css/font-awesome.min.css); +/* line 17, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, @@ -20,94 +21,114 @@ time, mark, audio, video { vertical-align: baseline; } +/* line 22, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html { line-height: 1; } +/* line 24, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ ol, ul { list-style: none; } +/* line 26, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ table { border-collapse: collapse; border-spacing: 0; } +/* line 28, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } +/* line 30, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q, blockquote { quotes: none; } +/* line 103, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } +/* line 32, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ a img { border: none; } +/* line 116, ../../../.gem/ruby/2.1.0/gems/compass-0.12.3/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; } @-webkit-keyframes sidebareffect { + /* line 2, ../sass/_animations.scss */ from { -webkit-transform: translate(100%, 0); } + /* line 3, ../sass/_animations.scss */ to { -webkit-transform: translate(0, 0); } } @-webkit-keyframes sidebareffect2 { + /* line 7, ../sass/_animations.scss */ from { -webkit-transform: translate(0, 0); } + /* line 8, ../sass/_animations.scss */ to { -webkit-transform: translate(100%, 0); } } @-webkit-keyframes spin { + /* line 12, ../sass/_animations.scss */ from { -webkit-transform: rotate(0deg); } + /* line 13, ../sass/_animations.scss */ to { -webkit-transform: rotate(360deg); } } @-webkit-keyframes backdropFadeIn { + /* line 17, ../sass/_animations.scss */ from { opacity: 0; } + /* line 18, ../sass/_animations.scss */ to { opacity: 0.2; } } +/* line 1, ../sass/_frame.scss */ body { -webkit-user-select: none; } +/* line 5, ../sass/_frame.scss */ button { -webkit-app-region: no-drag; } +/* line 9, ../sass/_frame.scss */ #header { -webkit-user-select: none; -webkit-app-region: drag; } +/* line 1, ../sass/_tooltip.scss */ .tooltip { position: absolute; z-index: 1030; @@ -119,31 +140,37 @@ button { filter: alpha(opacity=0); } +/* line 11, ../sass/_tooltip.scss */ .tooltip.in { opacity: 0.9; filter: alpha(opacity=90); } +/* line 15, ../sass/_tooltip.scss */ .tooltip.top { margin-top: -3px; padding: 5px 0; } +/* line 19, ../sass/_tooltip.scss */ .tooltip.right { margin-left: 3px; padding: 0 5px; } +/* line 23, ../sass/_tooltip.scss */ .tooltip.bottom { margin-top: 3px; padding: 5px 0; } +/* line 27, ../sass/_tooltip.scss */ .tooltip.left { margin-left: -3px; padding: 0 5px; } +/* line 31, ../sass/_tooltip.scss */ .tooltip-inner { max-width: 200px; padding: 5px 10px !important; @@ -154,6 +181,7 @@ button { border-radius: 4px; } +/* line 40, ../sass/_tooltip.scss */ .tooltip-arrow { position: absolute !important; width: 0; @@ -163,6 +191,7 @@ button { padding: 0 !important; } +/* line 48, ../sass/_tooltip.scss */ .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; @@ -171,6 +200,7 @@ button { border-top-color: #000000; } +/* line 55, ../sass/_tooltip.scss */ .tooltip.top-left .tooltip-arrow { bottom: 0; left: 5px; @@ -178,6 +208,7 @@ button { border-top-color: #000000; } +/* line 61, ../sass/_tooltip.scss */ .tooltip.top-right .tooltip-arrow { bottom: 0; right: 5px; @@ -185,6 +216,7 @@ button { border-top-color: #000000; } +/* line 67, ../sass/_tooltip.scss */ .tooltip.right .tooltip-arrow { top: 50%; left: 0; @@ -193,6 +225,7 @@ button { border-right-color: #000000; } +/* line 74, ../sass/_tooltip.scss */ .tooltip.left .tooltip-arrow { top: 50%; right: 0; @@ -201,6 +234,7 @@ button { border-left-color: #000000; } +/* line 81, ../sass/_tooltip.scss */ .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; @@ -209,6 +243,7 @@ button { border-bottom-color: #000000; } +/* line 88, ../sass/_tooltip.scss */ .tooltip.bottom-left .tooltip-arrow { top: 0; left: 5px; @@ -216,6 +251,7 @@ button { border-bottom-color: #000000; } +/* line 94, ../sass/_tooltip.scss */ .tooltip.bottom-right .tooltip-arrow { top: 0; right: 5px; @@ -224,6 +260,7 @@ button { } /* Global elements */ +/* line 3, ../sass/_layout.scss */ html, body { height: 100%; @@ -231,6 +268,7 @@ body { width: 100%; } +/* line 9, ../sass/_layout.scss */ body { background: #181817; border-radius: 5px; @@ -240,23 +278,28 @@ body { color: white; } +/* line 18, ../sass/_layout.scss */ ::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.4); font-weight: normal; } +/* line 23, ../sass/_layout.scss */ button:hover { cursor: pointer; } +/* line 24, ../sass/_layout.scss */ :focus { outline: 0; } +/* line 25, ../sass/_layout.scss */ a { text-decoration: none; } +/* line 28, ../sass/_layout.scss */ .page { overflow-x: hidden; overflow-y: overlay; @@ -266,43 +309,53 @@ a { position: absolute; width: 100%; } +/* line 11, ../sass/_utils.scss */ .page::-webkit-scrollbar { background: none; width: 9px; } +/* line 15, ../sass/_utils.scss */ .page::-webkit-scrollbar-button { display: none; } +/* line 18, ../sass/_utils.scss */ .page::-webkit-scrollbar-track { display: none; } +/* line 21, ../sass/_utils.scss */ .page::-webkit-scrollbar-track-piece { display: none; } +/* line 24, ../sass/_utils.scss */ .page::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0); background-clip: content-box; border-radius: 10px; border: 2px solid transparent; } +/* line 30, ../sass/_utils.scss */ .page::-webkit-scrollbar-corner { display: none; } +/* line 33, ../sass/_utils.scss */ .page::-webkit-resizer { display: none; } +/* line 38, ../sass/_utils.scss */ .page:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.5); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); } +/* line 44, ../sass/_utils.scss */ .page:hover::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.6); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); } +/* line 35, ../sass/_layout.scss */ .page.notransition .movie { -webkit-transition-delay: 0s, 0s; -moz-transition-delay: 0s, 0s; @@ -310,6 +363,7 @@ a { transition-delay: 0s, 0s; } +/* line 39, ../sass/_layout.scss */ .btn { -webkit-transition: background-color ease; -webkit-transition-delay: 0.3s; @@ -330,6 +384,7 @@ a { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); } +/* line 55, ../sass/_layout.scss */ .btn-action { background: #bb2720; border: 0; @@ -350,6 +405,7 @@ a { /* -- App */ +/* line 77, ../sass/_layout.scss */ #header { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -364,58 +420,70 @@ a { width: 100%; background-image: linear-gradient(to bottom, #282828 0%, #1e1e1e 100%); } +/* line 89, ../sass/_layout.scss */ #header h1 { font-size: 13px; } +/* line 93, ../sass/_layout.scss */ #header .btn-set { position: absolute; left: 15px; top: 17px; } +/* line 98, ../sass/_layout.scss */ #header .btn-set.right { right: 7px; left: initial; top: 5px; } +/* line 106, ../sass/_layout.scss */ #header .btn-set.darwin { position: absolute; left: 15px; top: 17px; } +/* line 111, ../sass/_layout.scss */ #header .btn-set.fs-darwin { right: 7px; left: initial; top: 5px; } +/* line 117, ../sass/_layout.scss */ #header .btn-set.linux { right: 7px; left: initial; top: 15px; } +/* line 122, ../sass/_layout.scss */ #header .btn-set.fs-linux { position: absolute; left: 15px; top: 5px; } +/* line 128, ../sass/_layout.scss */ #header .btn-set.win32 { right: 7px; left: initial; top: 15px; } +/* line 133, ../sass/_layout.scss */ #header .btn-set.fs-win32 { position: absolute; left: 15px; top: 5px; } +/* line 139, ../sass/_layout.scss */ #header .btn-set:hover .btn-os { color: rgba(0, 0, 0, 0.8); } +/* line 141, ../sass/_layout.scss */ #header .btn-set button { display: block; float: left; margin: 0 6px 0 0; background: #000; } +/* line 147, ../sass/_layout.scss */ #header .btn-set button.btn-os { border-radius: 30px; border: 0; @@ -427,6 +495,7 @@ a { text-align: center; width: 12px; } +/* line 160, ../sass/_layout.scss */ #header .btn-set button.debug { background: #fff; content: 'D'; @@ -436,15 +505,19 @@ a { text-transform: uppercase; width: auto; } +/* line 170, ../sass/_layout.scss */ #header .btn-set button.close:hover { background: #e74c3c; } +/* line 171, ../sass/_layout.scss */ #header .btn-set button.max:hover { background: #27ae60; } +/* line 172, ../sass/_layout.scss */ #header .btn-set button.min:hover { background: #f1c40f; } +/* line 173, ../sass/_layout.scss */ #header .btn-set button.fullscreen { color: #000; background: transparent; @@ -454,6 +527,7 @@ a { border-radius: 0; display: block; } +/* line 174, ../sass/_layout.scss */ #header .btn-set button.fullscreen::before { content: "\e000"; font-family: VideoJS; @@ -463,10 +537,30 @@ a { display: block; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1); } +/* line 183, ../sass/_layout.scss */ #header .btn-set button.fullscreen.active::before { content: "\e00B"; } +/* line 186, ../sass/_layout.scss */ +#header .btn-set button.fullscreen:hover { + color: #b2b2b2; +} +/* line 188, ../sass/_layout.scss */ +#header .btn-set button.settings { + background: transparent; + background-image: url(../images/settings.png); + margin: 4px; + width: 24px; + height: 24px; + border-radius: 0; + display: block; +} +/* line 197, ../sass/_layout.scss */ +#header .btn-set button.settings:hover { + background-image: url(../images/settings_over.png); +} +/* line 206, ../sass/_layout.scss */ #notification { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -486,6 +580,7 @@ a { border-top: none; display: none; } +/* line 223, ../sass/_layout.scss */ #notification .btn { position: absolute; top: 6px; @@ -494,6 +589,7 @@ a { background: rgba(0, 0, 0, 0.4); } +/* line 233, ../sass/_layout.scss */ #catalog-select { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -510,54 +606,66 @@ a { border-right: 1px solid #000; font-family: 'Myriad Pro', 'Lucida Grande', sans-serif; } +/* line 11, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar { background: none; width: 9px; } +/* line 15, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar-button { display: none; } +/* line 18, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar-track { display: none; } +/* line 21, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar-track-piece { display: none; } +/* line 24, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0); background-clip: content-box; border-radius: 10px; border: 2px solid transparent; } +/* line 30, ../sass/_utils.scss */ #catalog-select::-webkit-scrollbar-corner { display: none; } +/* line 33, ../sass/_utils.scss */ #catalog-select::-webkit-resizer { display: none; } +/* line 38, ../sass/_utils.scss */ #catalog-select:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.5); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); } +/* line 44, ../sass/_utils.scss */ #catalog-select:hover::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.6); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); } +/* line 245, ../sass/_layout.scss */ #catalog-select h4 { margin-top: 40px; color: #404040; font-weight: bold; margin-bottom: 10px; } +/* line 253, ../sass/_layout.scss */ #catalog-select ul li { display: block; font-weight: bold; font-size: 13px; } +/* line 258, ../sass/_layout.scss */ #catalog-select ul li a { -webkit-transition: background-color ease; -webkit-transition-delay: 0.3s; @@ -569,9 +677,11 @@ a { border-radius: 3px; padding: 8px; } +/* line 265, ../sass/_layout.scss */ #catalog-select ul li a:hover { background: #010101; } +/* line 270, ../sass/_layout.scss */ #catalog-select ul li.active a, #catalog-select ul li.active a:hover { background: #286dc4; @@ -581,11 +691,13 @@ a { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); cursor: default; } +/* line 282, ../sass/_layout.scss */ #catalog-select .search { position: absolute; right: 20px; top: 12px; } +/* line 287, ../sass/_layout.scss */ #catalog-select .search input { border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 5px; @@ -597,6 +709,7 @@ a { background: transparent; font-weight: bold; } +/* line 299, ../sass/_layout.scss */ #catalog-select .search i { position: absolute; top: 10px; @@ -604,6 +717,7 @@ a { color: rgba(255, 255, 255, 0.4); } +/* line 310, ../sass/_layout.scss */ .container { height: calc(100% - 45px); overflow: hidden; @@ -611,18 +725,22 @@ a { position: relative; } +/* line 320, ../sass/_layout.scss */ body.has-notification .container { height: calc(100% - 45px - 45px); margin: 90px 0 0 180px; } +/* line 325, ../sass/_layout.scss */ body.has-notification #catalog-select { top: 90px; height: calc(100% - 45px - 45px); } +/* line 330, ../sass/_layout.scss */ body.has-notification #notification { display: block; } +/* line 335, ../sass/_layout.scss */ .popcorn-load { -webkit-transition: opacity ease; -webkit-transition-delay: 1s; @@ -639,15 +757,18 @@ body.has-notification #notification { width: 100%; z-index: 999; } +/* line 347, ../sass/_layout.scss */ .popcorn-load.hidden { opacity: 0; z-index: 0; margin-left: 100%; pointer-events: none; } +/* line 354, ../sass/_layout.scss */ .popcorn-load.hidden .spinner { -webkit-animation: none; } +/* line 358, ../sass/_layout.scss */ .popcorn-load .wrapper { -webkit-transform: translateY(-100%); -moz-transform: translateY(-100%); @@ -660,9 +781,11 @@ body.has-notification #notification { text-align: center; width: 100%; } +/* line 367, ../sass/_layout.scss */ .popcorn-load .text { font-size: 22px; } +/* line 369, ../sass/_layout.scss */ .popcorn-load .spinner { background: url(../images/spinner.svg) no-repeat 0 0; background-size: cover; @@ -672,6 +795,7 @@ body.has-notification #notification { -webkit-animation: 1.05s spin infinite linear; width: 45px; } +/* line 379, ../sass/_layout.scss */ .popcorn-load .progressbar { display: none; height: 14px; @@ -683,6 +807,7 @@ body.has-notification #notification { overflow: hidden; padding: 3px; } +/* line 390, ../sass/_layout.scss */ .popcorn-load .progressbar .progress { -webkit-transition: width 0.2s ease; -moz-transition: width 0.2s ease; @@ -695,6 +820,7 @@ body.has-notification #notification { background: #FFF; border-radius: 40px; } +/* line 401, ../sass/_layout.scss */ .popcorn-load .progressinfo { display: none; position: absolute; @@ -707,6 +833,7 @@ body.has-notification #notification { opacity: 0.5; bottom: -40px; } +/* line 414, ../sass/_layout.scss */ .popcorn-load .btn-close { display: none; position: absolute; @@ -715,19 +842,24 @@ body.has-notification #notification { left: 15px; -webkit-app-region: no-drag; } +/* line 424, ../sass/_layout.scss */ .popcorn-load.withProgressBar .progressbar { display: block; } +/* line 425, ../sass/_layout.scss */ .popcorn-load.withProgressBar .progressinfo { display: block; } +/* line 426, ../sass/_layout.scss */ .popcorn-load.withProgressBar .spinner { display: none; } +/* line 430, ../sass/_layout.scss */ .popcorn-load.cancellable .btn-close { display: block; } +/* line 434, ../sass/_layout.scss */ .popcorn-disclaimer { -webkit-transition: opacity ease; -webkit-transition-delay: 0.3s; @@ -744,20 +876,24 @@ body.has-notification #notification { width: 100%; z-index: 999; } +/* line 446, ../sass/_layout.scss */ .popcorn-disclaimer.hidden { opacity: 0; pointer-events: none; } +/* line 452, ../sass/_layout.scss */ .popcorn-disclaimer.quitting .text, .popcorn-disclaimer.quitting .btn { opacity: 0.0; pointer-events: none; } +/* line 457, ../sass/_layout.scss */ .popcorn-disclaimer .text, .popcorn-disclaimer .btn { -webkit-transition: opacity 2s ease-out; -moz-transition: opacity 2s ease-out; -o-transition: opacity 2s ease-out; transition: opacity 2s ease-out; } +/* line 461, ../sass/_layout.scss */ .popcorn-disclaimer .wrapper { -webkit-transform: translateY(-50%); -moz-transform: translateY(-50%); @@ -770,6 +906,7 @@ body.has-notification #notification { text-align: center; width: 100%; } +/* line 470, ../sass/_layout.scss */ .popcorn-disclaimer .text { display: block; font-size: 22px; @@ -778,24 +915,29 @@ body.has-notification #notification { margin: 0px auto; margin-bottom: 15px; } +/* line 479, ../sass/_layout.scss */ .popcorn-disclaimer .btn { padding: 1.1em 3em; font-size: 18px; } +/* line 483, ../sass/_layout.scss */ .popcorn-disclaimer .btn.continue { font-size: 18px; font-weight: bold; background: #53A93F; } +/* line 488, ../sass/_layout.scss */ .popcorn-disclaimer .btn.quit { font-size: 18px; background: #e20f3c; font-weight: normal; } +/* line 2, ../sass/_movielist.scss */ .movie-list { margin-bottom: 15px; } +/* line 5, ../sass/_movielist.scss */ .movie-list li { height: 195px; width: 132px; @@ -806,9 +948,11 @@ body.has-notification #notification { position: relative; background: #000; } +/* line 15, ../sass/_movielist.scss */ .movie-list li:hover i { opacity: 1; } +/* line 17, ../sass/_movielist.scss */ .movie-list li i { -webkit-transition: all ease; -webkit-transition-delay: 0.3s; @@ -831,6 +975,7 @@ body.has-notification #notification { height: 101%; z-index: 10; } +/* line 36, ../sass/_movielist.scss */ .movie-list li .cover { width: 133px; height: 196px; @@ -841,6 +986,7 @@ body.has-notification #notification { background: url(../images/posterholder.png) no-repeat 50% 50%; -webkit-transform: translateZ(0); } +/* line 47, ../sass/_movielist.scss */ .movie-list li img { -webkit-transition: all ease; -webkit-transition-delay: 1s; @@ -857,27 +1003,32 @@ body.has-notification #notification { border-radius: 3px; -webkit-transform: translateZ(0); } +/* line 59, ../sass/_movielist.scss */ .movie-list li img.placeholder { -webkit-filter: grayscale(1); -webkit-transform: scale(1.15) translateY(-5px); z-index: 1; border-radius: 3px; } +/* line 66, ../sass/_movielist.scss */ .movie-list li img.real { opacity: 1; z-index: 2; border-radius: 3px; } +/* line 72, ../sass/_movielist.scss */ .movie-list li img.hidden { opacity: 0; visibility: hidden; border-radius: 3px; } +/* line 79, ../sass/_movielist.scss */ .movie-list li a { display: block; height: 196px; width: 133px; } +/* line 85, ../sass/_movielist.scss */ .movie-list li strong { color: #FFF; display: block; @@ -887,10 +1038,12 @@ body.has-notification #notification { text-overflow: ellipsis; white-space: nowrap; } +/* line 95, ../sass/_movielist.scss */ .movie-list li small { font-size: 12px; color: #666; } +/* line 100, ../sass/_movielist.scss */ .movie-list li::before { display: block; content: ''; @@ -903,6 +1056,7 @@ body.has-notification #notification { z-index: 3; } +/* line 116, ../sass/_movielist.scss */ .movie { -webkit-transform: scale(0, 0); -moz-transform: scale(0, 0); @@ -915,306 +1069,357 @@ body.has-notification #notification { transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(1) { -webkit-transition-delay: 0s, 0s; -moz-transition-delay: 0s, 0s; -o-transition-delay: 0s, 0s; transition-delay: 0s, 0s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(2) { -webkit-transition-delay: 0s, 0.1s; -moz-transition-delay: 0s, 0.1s; -o-transition-delay: 0s, 0.1s; transition-delay: 0s, 0.1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(3) { -webkit-transition-delay: 0s, 0.2s; -moz-transition-delay: 0s, 0.2s; -o-transition-delay: 0s, 0.2s; transition-delay: 0s, 0.2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(4) { -webkit-transition-delay: 0s, 0.3s; -moz-transition-delay: 0s, 0.3s; -o-transition-delay: 0s, 0.3s; transition-delay: 0s, 0.3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(5) { -webkit-transition-delay: 0s, 0.4s; -moz-transition-delay: 0s, 0.4s; -o-transition-delay: 0s, 0.4s; transition-delay: 0s, 0.4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(6) { -webkit-transition-delay: 0s, 0.5s; -moz-transition-delay: 0s, 0.5s; -o-transition-delay: 0s, 0.5s; transition-delay: 0s, 0.5s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(7) { -webkit-transition-delay: 0s, 0.6s; -moz-transition-delay: 0s, 0.6s; -o-transition-delay: 0s, 0.6s; transition-delay: 0s, 0.6s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(8) { -webkit-transition-delay: 0s, 0.7s; -moz-transition-delay: 0s, 0.7s; -o-transition-delay: 0s, 0.7s; transition-delay: 0s, 0.7s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(9) { -webkit-transition-delay: 0s, 0.8s; -moz-transition-delay: 0s, 0.8s; -o-transition-delay: 0s, 0.8s; transition-delay: 0s, 0.8s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(10) { -webkit-transition-delay: 0s, 0.9s; -moz-transition-delay: 0s, 0.9s; -o-transition-delay: 0s, 0.9s; transition-delay: 0s, 0.9s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(11) { -webkit-transition-delay: 0s, 1s; -moz-transition-delay: 0s, 1s; -o-transition-delay: 0s, 1s; transition-delay: 0s, 1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(12) { -webkit-transition-delay: 0s, 1.1s; -moz-transition-delay: 0s, 1.1s; -o-transition-delay: 0s, 1.1s; transition-delay: 0s, 1.1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(13) { -webkit-transition-delay: 0s, 1.2s; -moz-transition-delay: 0s, 1.2s; -o-transition-delay: 0s, 1.2s; transition-delay: 0s, 1.2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(14) { -webkit-transition-delay: 0s, 1.3s; -moz-transition-delay: 0s, 1.3s; -o-transition-delay: 0s, 1.3s; transition-delay: 0s, 1.3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(15) { -webkit-transition-delay: 0s, 1.4s; -moz-transition-delay: 0s, 1.4s; -o-transition-delay: 0s, 1.4s; transition-delay: 0s, 1.4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(16) { -webkit-transition-delay: 0s, 1.5s; -moz-transition-delay: 0s, 1.5s; -o-transition-delay: 0s, 1.5s; transition-delay: 0s, 1.5s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(17) { -webkit-transition-delay: 0s, 1.6s; -moz-transition-delay: 0s, 1.6s; -o-transition-delay: 0s, 1.6s; transition-delay: 0s, 1.6s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(18) { -webkit-transition-delay: 0s, 1.7s; -moz-transition-delay: 0s, 1.7s; -o-transition-delay: 0s, 1.7s; transition-delay: 0s, 1.7s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(19) { -webkit-transition-delay: 0s, 1.8s; -moz-transition-delay: 0s, 1.8s; -o-transition-delay: 0s, 1.8s; transition-delay: 0s, 1.8s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(20) { -webkit-transition-delay: 0s, 1.9s; -moz-transition-delay: 0s, 1.9s; -o-transition-delay: 0s, 1.9s; transition-delay: 0s, 1.9s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(21) { -webkit-transition-delay: 0s, 2s; -moz-transition-delay: 0s, 2s; -o-transition-delay: 0s, 2s; transition-delay: 0s, 2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(22) { -webkit-transition-delay: 0s, 2.1s; -moz-transition-delay: 0s, 2.1s; -o-transition-delay: 0s, 2.1s; transition-delay: 0s, 2.1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(23) { -webkit-transition-delay: 0s, 2.2s; -moz-transition-delay: 0s, 2.2s; -o-transition-delay: 0s, 2.2s; transition-delay: 0s, 2.2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(24) { -webkit-transition-delay: 0s, 2.3s; -moz-transition-delay: 0s, 2.3s; -o-transition-delay: 0s, 2.3s; transition-delay: 0s, 2.3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(25) { -webkit-transition-delay: 0s, 2.4s; -moz-transition-delay: 0s, 2.4s; -o-transition-delay: 0s, 2.4s; transition-delay: 0s, 2.4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(26) { -webkit-transition-delay: 0s, 2.5s; -moz-transition-delay: 0s, 2.5s; -o-transition-delay: 0s, 2.5s; transition-delay: 0s, 2.5s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(27) { -webkit-transition-delay: 0s, 2.6s; -moz-transition-delay: 0s, 2.6s; -o-transition-delay: 0s, 2.6s; transition-delay: 0s, 2.6s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(28) { -webkit-transition-delay: 0s, 2.7s; -moz-transition-delay: 0s, 2.7s; -o-transition-delay: 0s, 2.7s; transition-delay: 0s, 2.7s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(29) { -webkit-transition-delay: 0s, 2.8s; -moz-transition-delay: 0s, 2.8s; -o-transition-delay: 0s, 2.8s; transition-delay: 0s, 2.8s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(30) { -webkit-transition-delay: 0s, 2.9s; -moz-transition-delay: 0s, 2.9s; -o-transition-delay: 0s, 2.9s; transition-delay: 0s, 2.9s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(31) { -webkit-transition-delay: 0s, 3s; -moz-transition-delay: 0s, 3s; -o-transition-delay: 0s, 3s; transition-delay: 0s, 3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(32) { -webkit-transition-delay: 0s, 3.1s; -moz-transition-delay: 0s, 3.1s; -o-transition-delay: 0s, 3.1s; transition-delay: 0s, 3.1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(33) { -webkit-transition-delay: 0s, 3.2s; -moz-transition-delay: 0s, 3.2s; -o-transition-delay: 0s, 3.2s; transition-delay: 0s, 3.2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(34) { -webkit-transition-delay: 0s, 3.3s; -moz-transition-delay: 0s, 3.3s; -o-transition-delay: 0s, 3.3s; transition-delay: 0s, 3.3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(35) { -webkit-transition-delay: 0s, 3.4s; -moz-transition-delay: 0s, 3.4s; -o-transition-delay: 0s, 3.4s; transition-delay: 0s, 3.4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(36) { -webkit-transition-delay: 0s, 3.5s; -moz-transition-delay: 0s, 3.5s; -o-transition-delay: 0s, 3.5s; transition-delay: 0s, 3.5s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(37) { -webkit-transition-delay: 0s, 3.6s; -moz-transition-delay: 0s, 3.6s; -o-transition-delay: 0s, 3.6s; transition-delay: 0s, 3.6s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(38) { -webkit-transition-delay: 0s, 3.7s; -moz-transition-delay: 0s, 3.7s; -o-transition-delay: 0s, 3.7s; transition-delay: 0s, 3.7s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(39) { -webkit-transition-delay: 0s, 3.8s; -moz-transition-delay: 0s, 3.8s; -o-transition-delay: 0s, 3.8s; transition-delay: 0s, 3.8s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(40) { -webkit-transition-delay: 0s, 3.9s; -moz-transition-delay: 0s, 3.9s; -o-transition-delay: 0s, 3.9s; transition-delay: 0s, 3.9s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(41) { -webkit-transition-delay: 0s, 4s; -moz-transition-delay: 0s, 4s; -o-transition-delay: 0s, 4s; transition-delay: 0s, 4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(42) { -webkit-transition-delay: 0s, 4.1s; -moz-transition-delay: 0s, 4.1s; -o-transition-delay: 0s, 4.1s; transition-delay: 0s, 4.1s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(43) { -webkit-transition-delay: 0s, 4.2s; -moz-transition-delay: 0s, 4.2s; -o-transition-delay: 0s, 4.2s; transition-delay: 0s, 4.2s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(44) { -webkit-transition-delay: 0s, 4.3s; -moz-transition-delay: 0s, 4.3s; -o-transition-delay: 0s, 4.3s; transition-delay: 0s, 4.3s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(45) { -webkit-transition-delay: 0s, 4.4s; -moz-transition-delay: 0s, 4.4s; -o-transition-delay: 0s, 4.4s; transition-delay: 0s, 4.4s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(46) { -webkit-transition-delay: 0s, 4.5s; -moz-transition-delay: 0s, 4.5s; -o-transition-delay: 0s, 4.5s; transition-delay: 0s, 4.5s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(47) { -webkit-transition-delay: 0s, 4.6s; -moz-transition-delay: 0s, 4.6s; -o-transition-delay: 0s, 4.6s; transition-delay: 0s, 4.6s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(48) { -webkit-transition-delay: 0s, 4.7s; -moz-transition-delay: 0s, 4.7s; -o-transition-delay: 0s, 4.7s; transition-delay: 0s, 4.7s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(49) { -webkit-transition-delay: 0s, 4.8s; -moz-transition-delay: 0s, 4.8s; -o-transition-delay: 0s, 4.8s; transition-delay: 0s, 4.8s; } +/* line 122, ../sass/_movielist.scss */ .movie:nth-child(50) { -webkit-transition-delay: 0s, 4.9s; -moz-transition-delay: 0s, 4.9s; -o-transition-delay: 0s, 4.9s; transition-delay: 0s, 4.9s; } +/* line 127, ../sass/_movielist.scss */ .movie.loaded { opacity: 1; -webkit-transform: scale(1, 1); @@ -1224,6 +1429,7 @@ body.has-notification #notification { transform: scale(1, 1); } +/* line 134, ../sass/_movielist.scss */ .no-results { text-align: center; font-size: 24px; @@ -1236,6 +1442,7 @@ body.has-notification #notification { -webkit-transform: translateY(-50%); } +/* line 148, ../sass/_movielist.scss */ .pagination { border-radius: 4px; display: block; @@ -1244,21 +1451,25 @@ body.has-notification #notification { text-align: center; } +/* line 155, ../sass/_movielist.scss */ .pagination ul li { display: inline-block; } +/* line 158, ../sass/_movielist.scss */ .pagination li:first-child > a, .pagination li:first-child > span { border-bottom-left-radius: 4px; border-top-left-radius: 4px; margin-left: 0; } +/* line 163, ../sass/_movielist.scss */ .pagination li:last-child > a, .pagination li:last-child > span { border-bottom-right-radius: 4px; border-top-right-radius: 4px; } +/* line 167, ../sass/_movielist.scss */ .pagination li > a, .pagination li > span { border: 1px solid rgba(255, 255, 255, 0.2); color: #999999; @@ -1277,16 +1488,19 @@ body.has-notification #notification { background-image: linear-gradient(to bottom, #2a2a2a 0%, #1b1b1b 100%); } +/* line 182, ../sass/_movielist.scss */ .pagination li > a:hover { opacity: 0.8; } +/* line 186, ../sass/_movielist.scss */ .pagination ul li.active a, .pagination li > a:active { background-image: linear-gradient(to bottom, #121212 0%, #191919 100%); box-shadow: 0 1px 0px rgba(255, 255, 255, 0.1), inset 0 1px 1px rgba(0, 0, 0, 0.5); color: #fff; } +/* line 2, ../sass/_moviedetails.scss */ sidebar { right: 0; position: absolute; @@ -1298,12 +1512,14 @@ sidebar { -webkit-animation: sidebareffect .5s; -webkit-transform: translateZ(0); } +/* line 13, ../sass/_moviedetails.scss */ sidebar.hidden { right: -10px; animation: sidebareffect2 .5s; -webkit-animation: sidebareffect2 .5s; -webkit-transform: translate(100%, 0); } +/* line 20, ../sass/_moviedetails.scss */ sidebar .play { overflow-x: hidden; overflow-y: overlay; @@ -1319,46 +1535,57 @@ sidebar .play { background-size: cover; position: relative; } +/* line 11, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar { background: none; width: 9px; } +/* line 15, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar-button { display: none; } +/* line 18, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar-track { display: none; } +/* line 21, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar-track-piece { display: none; } +/* line 24, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0); background-clip: content-box; border-radius: 10px; border: 2px solid transparent; } +/* line 30, ../sass/_utils.scss */ sidebar .play::-webkit-scrollbar-corner { display: none; } +/* line 33, ../sass/_utils.scss */ sidebar .play::-webkit-resizer { display: none; } +/* line 38, ../sass/_utils.scss */ sidebar .play:hover::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.5); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.15); } +/* line 44, ../sass/_utils.scss */ sidebar .play:hover::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.6); background-clip: content-box; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); } +/* line 34, ../sass/_moviedetails.scss */ sidebar .play:hover a.play-over { display: block; } +/* line 37, ../sass/_moviedetails.scss */ sidebar .play .backdrop-image { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity: 0; @@ -1372,9 +1599,11 @@ sidebar .play .backdrop-image { z-index: -1; background-position: center; } +/* line 52, ../sass/_moviedetails.scss */ sidebar .play .loaded { -webkit-animation: backdropFadeIn .5s ease-in forwards; } +/* line 57, ../sass/_moviedetails.scss */ sidebar .play a.play-over { position: absolute; top: 40%; @@ -1388,6 +1617,7 @@ sidebar .play a.play-over { display: none; z-index: 10; } +/* line 71, ../sass/_moviedetails.scss */ sidebar .play .poster { display: block; width: 100%; @@ -1401,6 +1631,7 @@ sidebar .play .poster { background-size: cover; -webkit-transform: translateZ(0); } +/* line 88, ../sass/_moviedetails.scss */ sidebar .play .poster img.big-poster { display: block; position: absolute; @@ -1410,6 +1641,7 @@ sidebar .play .poster img.big-poster { height: 100%; border-radius: 4px; } +/* line 99, ../sass/_moviedetails.scss */ sidebar .play a.play-button { text-align: center; color: #FFF; @@ -1424,13 +1656,16 @@ sidebar .play a.play-button { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); background: #cc181e; } +/* line 112, ../sass/_moviedetails.scss */ sidebar .play a.play-button:hover { background: #eb282e; } +/* line 115, ../sass/_moviedetails.scss */ sidebar .play .movie-detail { height: 100%; display: table; } +/* line 120, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .closer { position: absolute; top: 0; @@ -1440,9 +1675,11 @@ sidebar .play .movie-detail .closer { z-index: 300; cursor: pointer; } +/* line 129, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .closer:hover i { opacity: 1; } +/* line 131, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .closer i { color: #fff; position: absolute; @@ -1451,11 +1688,13 @@ sidebar .play .movie-detail .closer i { opacity: 0.5; text-shadow: 0 0 5px #000; } +/* line 142, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont, sidebar .play .movie-detail .side-content { display: table-cell; vertical-align: middle; } +/* line 148, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont { position: relative; width: 40%; @@ -1465,12 +1704,15 @@ sidebar .play .movie-detail .poster-cont { -webkit-box-sizing: border-box; box-sizing: border-box; } +/* line 157, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont:hover .movie-config { bottom: 2px; } +/* line 158, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .poster-inner { position: relative; } +/* line 160, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont img.big-poster { background: #000; width: 100%; @@ -1478,12 +1720,14 @@ sidebar .play .movie-detail .poster-cont img.big-poster { border-radius: 4px; vertical-align: bottom; } +/* line 169, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config h4 { font-weight: bold; font-size: 14px; margin-left: 10px; margin-top: 8px; } +/* line 176, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont { position: absolute; bottom: 0; @@ -1495,35 +1739,43 @@ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont { background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%); -webkit-transform: translateZ(0); } +/* line 187, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont .quality-off { margin-left: 10px; font-size: 12px; } +/* line 195, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.extra-data { font-weight: bold; color: #FFF; float: right; font-size: 15px; } +/* line 202, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.good { color: #27ae60; } +/* line 203, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.bad { color: #c0392b; } +/* line 204, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.epic { color: #8e44ad; } +/* line 207, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config input { font-family: inherit; font-size: 100%; line-height: normal; margin: 0; } +/* line 213, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config input[type="radio"] { box-sizing: border-box; padding: 0; } +/* line 219, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch { background: transparent; border-radius: 32px; @@ -1536,6 +1788,7 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch { top: 28px; cursor: pointer; } +/* line 231, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label { -webkit-transition: color 0.2s ease; -moz-transition: color 0.2s ease; @@ -1548,16 +1801,19 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch label { width: 20px; cursor: pointer; } +/* line 240, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label:nth-of-type(1) { left: -38px; position: absolute; text-align: right; } +/* line 246, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label:nth-of-type(2) { position: absolute; right: -30px; text-align: left; } +/* line 253, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input { height: 12px; left: 0; @@ -1568,27 +1824,35 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch input { z-index: 2; cursor: pointer; } +/* line 263, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked { z-index: 0; } +/* line 267, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ label:nth-of-type(1) { color: #286dc4; } +/* line 268, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ label:nth-of-type(2) { color: #FFF; } +/* line 271, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ .toggle { left: 2px; } +/* line 275, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ label:nth-of-type(1) { color: #FFF; } +/* line 276, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ label:nth-of-type(2) { color: #286dc4; } +/* line 279, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ .toggle { left: 13px; } +/* line 283, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .toggle { -webkit-transition: left 0.2s ease; -moz-transition: left 0.2s ease; @@ -1603,6 +1867,7 @@ sidebar .play .movie-detail .poster-cont .movie-config .toggle { width: 10px; z-index: 1; } +/* line 298, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content { z-index: 500; width: 60%; @@ -1613,10 +1878,12 @@ sidebar .play .movie-detail .side-content { -webkit-box-sizing: border-box; box-sizing: border-box; } +/* line 308, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title { position: relative; padding: 0; } +/* line 312, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title h2 { font-weight: 200; font-size: 34px; @@ -1624,9 +1891,11 @@ sidebar .play .movie-detail .side-content .title h2 { color: #f5f7fa; padding-right: 30px; } +/* line 320, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info { margin-bottom: 5px; } +/* line 323, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li { display: inline-block; vertical-align: top; @@ -1634,13 +1903,16 @@ sidebar .play .movie-detail .side-content .title .movie-quick-info li { color: #286dc4; font-weight: bold; } +/* line 330, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li::after { content: '\b7\a0'; margin-left: 2px; } +/* line 335, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li:last-child::after { display: none; } +/* line 339, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health { font-size: 24px; width: 20px; @@ -1652,41 +1924,50 @@ sidebar .play .movie-detail .side-content .title .health { top: 10px; right: 0; } +/* line 350, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.bad { color: red; border-color: red; } +/* line 355, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.medium { color: yellow; border-color: yellow; } +/* line 360, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.good { color: limegreen; border-color: limegreen; } +/* line 365, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.excellent { color: green; border-color: green; } +/* line 372, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .rating { display: inline-block; position: relative; font-size: 14px; margin: 0 10px 0 0; } +/* line 378, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .rating ul { color: #f5f7fa; } +/* line 381, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content p { margin-top: 10px; color: #babdc2; font-size: 14px; line-height: 24px; } +/* line 388, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list { margin-top: 10px; margin-bottom: 10px; } +/* line 392, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list h4 { font-size: 12px; color: #f5f7fa; @@ -1694,52 +1975,67 @@ sidebar .play .movie-detail .side-content .subtitles-list h4 { vertical-align: middle; margin-right: 5px; } +/* line 400, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul { display: inline-block; vertical-align: middle; } +/* line 404, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li { display: inline-block; vertical-align: top; } +/* line 408, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li span { width: 22px; height: 16px; display: inline-block; } +/* line 415, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-english { background-image: url(../images/english.png); } +/* line 416, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-french { background-image: url(../images/french.png); } +/* line 417, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-dutch { background-image: url(../images/dutch.png); } +/* line 418, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-portuguese { background-image: url(../images/portuguese.png); } +/* line 419, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-romanian { background-image: url(../images/romanian.png); } +/* line 420, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-spanish { background-image: url(../images/spanish.png); } +/* line 421, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-turkish { background-image: url(../images/turkish.png); } +/* line 422, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-brazilian { background-image: url(../images/brazilian.png); } +/* line 423, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-italian { background-image: url(../images/italian.png); } +/* line 424, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-hungarian { background-image: url(../images/hungarian.png); } +/* line 425, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-bulgarian { background-image: url(../images/bulgarian.png); } +/* line 431, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content a.play-button { background: #286dc4; background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); @@ -1752,30 +2048,37 @@ sidebar .play .movie-detail .side-content a.play-button { margin-top: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } +/* line 443, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content a.play-button:hover { background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); } +/* line 452, ../sass/_moviedetails.scss */ .sidebar-open li.movie { opacity: 0.25; } +/* line 455, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active { opacity: 1; } +/* line 458, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active a { box-shadow: 0 0 0 3px #3498db; border-radius: 3px; } +/* line 462, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active a i { opacity: 0 !important; } +/* line 468, ../sass/_moviedetails.scss */ .subtitles button { background: transparent; border: 0; padding: 0; } +/* line 475, ../sass/_moviedetails.scss */ .dropdown { position: relative; display: inline-block; @@ -1785,16 +2088,19 @@ sidebar .play .movie-detail .side-content a.play-button:hover { margin-right: 20px; margin-top: -8px; } +/* line 485, ../sass/_moviedetails.scss */ .dropdown.active .dropdown-text { background-color: white; z-index: 2; border-radius: 3px 3px 0 0; } +/* line 491, ../sass/_moviedetails.scss */ .dropdown.active .dropdown-content { opacity: 1; visibility: visible; } +/* line 498, ../sass/_moviedetails.scss */ .dropdown-text { cursor: pointer; position: absolute; @@ -1804,6 +2110,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { color: #333; text-shadow: 0 1px #fff; } +/* line 507, ../sass/_moviedetails.scss */ .dropdown-text:after { position: absolute; right: -10px; @@ -1816,6 +2123,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { border-color: #FFF transparent transparent transparent; } +/* line 520, ../sass/_moviedetails.scss */ .dropdown-toggle { font-size: 0; z-index: 1; @@ -1830,10 +2138,12 @@ sidebar .play .movie-detail .side-content a.play-button:hover { height: 37px; width: 60px; } +/* line 534, ../sass/_moviedetails.scss */ .dropdown-toggle:focus { outline: 0; } +/* line 537, ../sass/_moviedetails.scss */ .dropdown-content { list-style-type: none; position: absolute; @@ -1847,16 +2157,19 @@ sidebar .play .movie-detail .side-content a.play-button:hover { width: 40px; text-align: center; } +/* line 550, ../sass/_moviedetails.scss */ .dropdown-content a { display: block; padding: 4px; color: #333; text-shadow: 0 1px #fff; } +/* line 556, ../sass/_moviedetails.scss */ .dropdown-content a:hover { background: #E1E1E1; } +/* line 2, ../sass/_player.scss */ #video-container { display: none; height: 100%; @@ -1868,6 +2181,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { -webkit-app-region: no-drag; } +/* line 16, ../sass/_player.scss */ #video_player_close { position: absolute; z-index: 9999; @@ -1876,6 +2190,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { -webkit-app-region: no-drag; } +/* line 24, ../sass/_player.scss */ .vjs-default-skin .vjs_smallersub_button.vjs-control { float: right; line-height: 1.6em; @@ -1883,6 +2198,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { top: 5px; } +/* line 31, ../sass/_player.scss */ .vjs-default-skin .vjs_biggersub_button.vjs-control { float: right; line-height: 1.6em; @@ -1890,6 +2206,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { top: 6px; } +/* line 38, ../sass/_player.scss */ .vjs-default-skin .vjs_biggersub_button.vjs-control:before { font-family: FontAwesome; content: "\f031"; @@ -1901,6 +2218,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { vertical-align: inherit; } +/* line 49, ../sass/_player.scss */ .vjs-default-skin .vjs_smallersub_button.vjs-control:before { font-family: FontAwesome; content: "\f031"; @@ -1912,6 +2230,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { line-height: 2.4em; } +/* line 62, ../sass/_player.scss */ #video_player.vjs-user-inactive + #video_player_close { -webkit-transition: opacity 0.8s ease; -moz-transition: opacity 0.8s ease; @@ -1921,6 +2240,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { pointer-events: none; } +/* line 68, ../sass/_player.scss */ #video_player.vjs-user-active + #video_player_close { -webkit-transition: opacity 0.2s ease-out; -moz-transition: opacity 0.2s ease-out; @@ -1930,13 +2250,16 @@ sidebar .play .movie-detail .side-content a.play-button:hover { pointer-events: all; } +/* line 74, ../sass/_player.scss */ #video_player.vjs-user-inactive video { cursor: none; } +/* line 79, ../sass/_player.scss */ #video_player.video-js { font-size: inherit; } +/* line 82, ../sass/_player.scss */ #video_player.video-js .vjs-text-track { font-size: 1em; line-height: 140%; @@ -1944,34 +2267,43 @@ sidebar .play .movie-detail .side-content a.play-button:hover { margin-bottom: 1em; text-shadow: 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black, 0 0 0.2em black; } +/* line 92, ../sass/_player.scss */ #video_player.video-js .vjs-menu-item.vjs-selected { font-weight: bold; color: #286dc4; } +/* line 97, ../sass/_player.scss */ #video_player.video-js .vjs-text-track-display { font-size: 1em; pointer-events: none; } +/* line 101, ../sass/_player.scss */ #video_player.video-js .vjs-loading-spinner { font-size: 1em; } +/* line 102, ../sass/_player.scss */ #video_player.video-js .vjs-big-play-button { font-size: 1em; } +/* line 103, ../sass/_player.scss */ #video_player.video-js .vjs-control-bar { font-size: 10px; } +/* line 104, ../sass/_player.scss */ #video_player.video-js .vjs-menu-item { color: #000; } +/* line 105, ../sass/_player.scss */ #video_player.video-js .vjs-seek-handle { display: none; } +/* line 111, ../sass/_player.scss */ body.watching #header, body.watching #notification, body.watching #catalog-select, body.watching .container { visibility: hidden; } +/* line 2, ../sass/_probablyuseless.scss */ .torrent-health { display: inline-block; padding: 3px 5px; @@ -1981,36 +2313,44 @@ body.watching #header, body.watching #notification, body.watching #catalog-selec font-weight: bold; text-transform: capitalize; } +/* line 11, ../sass/_probablyuseless.scss */ .torrent-health.bad { background: red; } +/* line 12, ../sass/_probablyuseless.scss */ .torrent-health.medium { background: yellow; } +/* line 13, ../sass/_probablyuseless.scss */ .torrent-health.good { background: limegreen; } +/* line 14, ../sass/_probablyuseless.scss */ .torrent-health.excellent { background: green; } +/* line 17, ../sass/_probablyuseless.scss */ .content { float: left; margin-left: 30px; text-shadow: 0 -1px 0 #000; width: 660px; } +/* line 23, ../sass/_probablyuseless.scss */ .content h2 { font-size: 32px; margin: 0; font-weight: bold; } +/* line 30, ../sass/_probablyuseless.scss */ .content p.metadata { color: #196cb2; font-size: 14px; font-weight: 700; margin: 10px 0; } +/* line 37, ../sass/_probablyuseless.scss */ .content p.description { color: #777; font-family: 'Helvetica Neue', sans-serif; @@ -2020,9 +2360,11 @@ body.watching #header, body.watching #notification, body.watching #catalog-selec /* -- Don't find any of this properties anywhere in the popcorn-app */ +/* line 51, ../sass/_probablyuseless.scss */ .tabs { border-bottom: 1px solid #272727; } +/* line 54, ../sass/_probablyuseless.scss */ .tabs li { bottom: -1px; color: #333; @@ -2030,9 +2372,11 @@ body.watching #header, body.watching #notification, body.watching #catalog-selec padding: 10px 20px; position: relative; } +/* line 61, ../sass/_probablyuseless.scss */ .tabs li:hover { color: #FFF; } +/* line 63, ../sass/_probablyuseless.scss */ .tabs li.active { border-bottom: 3px solid #FFF; color: #FFF; @@ -2040,19 +2384,23 @@ body.watching #header, body.watching #notification, body.watching #catalog-selec font-weight: 700; } +/* line 72, ../sass/_probablyuseless.scss */ .tab-content { margin: 20px 0; } +/* line 74, ../sass/_probablyuseless.scss */ .cast ul li { font-size: 15px; font-weight: 700; padding: 10px; position: relative; } +/* line 80, ../sass/_probablyuseless.scss */ .cast ul li:hover { background: #222; } +/* line 82, ../sass/_probablyuseless.scss */ .cast ul li span { color: #444; font-weight: 400; diff --git a/index.html b/index.html index cf5b5b34..b5324211 100644 --- a/index.html +++ b/index.html @@ -21,6 +21,7 @@

Popcorn Time

diff --git a/sass/_layout.scss b/sass/_layout.scss index 12a5deea..0c5535fa 100644 --- a/sass/_layout.scss +++ b/sass/_layout.scss @@ -135,7 +135,7 @@ a { text-decoration: none; } left: 15px; top: 5px; } - + &:hover .btn-os { color: rgba(0, 0, 0, 0.8); } button { @@ -183,7 +183,21 @@ a { text-decoration: none; } &.fullscreen.active::before { content: "\e00B"; } - + &.fullscreen:hover{color:#b2b2b2;} + + &.settings { + background: transparent; + background-image: url(../images/settings.png); + margin: 4px; + width: 24px; + height: 24px; + border-radius: 0; + display:block; + + &:hover { + background-image: url(../images/settings_over.png); + } + } } } } @@ -372,13 +386,13 @@ body.has-notification { border: 2px solid #FFF; overflow: hidden; padding: 3px; - + .progress { @include transition(width 0.2s ease); display: block; height: 14px; width: 0%; - min-width: 5.5%; + min-width: 5.5%; background: #FFF; border-radius: 40px; } @@ -405,7 +419,7 @@ body.has-notification { left: 15px; -webkit-app-region: no-drag; } - + &.withProgressBar { .progressbar { display: block; } .progressinfo { display: block; } @@ -465,7 +479,7 @@ body.has-notification { .btn { padding: 1.1em 3em; font-size:18px; - + &.continue { font-size: 18px; font-weight: bold; From c94773bc30d30c27bdc1c84937b4b825464ef881 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Thu, 13 Mar 2014 22:47:55 -0400 Subject: [PATCH 04/23] Fixed hidden popular page --- js/frontend/views/page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/frontend/views/page.js b/js/frontend/views/page.js index c3adc9d5..e88346f9 100644 --- a/js/frontend/views/page.js +++ b/js/frontend/views/page.js @@ -14,8 +14,8 @@ App.View.Page = Backbone.View.extend({ show: function () { // Fuck you UI. var $el = this.$el.hide(), - $pages = $('.page').addClass('notransition'), - $movies = $('.movie').removeClass('loaded'); + $pages = $el.find('.page').addClass('notransition'), + $movies = $el.find('.movie').removeClass('loaded'); // ontransitionend could be buggy here. setTimeout(function () { From 8fd45e16396950f2701e9545b9e8c59a7ff8a871 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Thu, 13 Mar 2014 23:05:07 -0400 Subject: [PATCH 05/23] Changed id of all page view to movies-list --- js/frontend/controllers/filter.js | 6 +++--- js/frontend/controllers/search.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/frontend/controllers/filter.js b/js/frontend/controllers/filter.js index ba259e52..f15ede26 100644 --- a/js/frontend/controllers/filter.js +++ b/js/frontend/controllers/filter.js @@ -3,7 +3,7 @@ App.Controller.FilterGenre = function (genre, page) { if (!App.Page.FilterGenre) { // Create page App.Page.FilterGenre = new App.View.Page({ - id: 'category-list' + id: 'movie-list' }); } // Create movie list @@ -17,9 +17,9 @@ App.Controller.FilterGenre = function (genre, page) { $('.movie-list').first().empty(); App.Page.FilterGenre.show(); } - + userTracking.pageview('/movies/'+genre + ((page && page > 1) ? '?page='+page : ''), genre.capitalize() + ' Movies').send(); - + setTimeout(function(){ movieList.constructor.busy = false; }, 5000); diff --git a/js/frontend/controllers/search.js b/js/frontend/controllers/search.js index f1f4a1a1..4739f633 100644 --- a/js/frontend/controllers/search.js +++ b/js/frontend/controllers/search.js @@ -3,8 +3,8 @@ App.Controller.Search = function (searchTerm, page) { if (App.Page.Search) { // Create page App.Page.Search = new App.View.Page({ - id: 'search-list' - }); + id: 'movie-list' + }); } // Create movie list var movieList = new App.View.MovieList({ @@ -12,7 +12,7 @@ App.Controller.Search = function (searchTerm, page) { genre: null, page: page }); - + // Clean up if first page if (!page || page == '1'){ console.log('Searching for ' + searchTerm); @@ -21,7 +21,7 @@ App.Controller.Search = function (searchTerm, page) { window.initialLoading = true; App.Page.Search.show(); } - + userTracking.pageview('/movies/search?q='+encodeURIComponent(searchTerm)+((page && page > 1) ? '&page='+page : '')).send(); setTimeout(function(){ From 3452ceff9df567a2d13a402cf5bffa4e8b7315da Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 00:08:06 -0400 Subject: [PATCH 06/23] Added missing settings icon --- images/settings.png | Bin 0 -> 958 bytes images/settings_over.png | Bin 0 -> 1174 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/settings.png create mode 100644 images/settings_over.png diff --git a/images/settings.png b/images/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb0e0c5f2b66fcbe0d894e15684181e1f91a8f1 GIT binary patch literal 958 zcmV;v13~b7R?$_ybr`v>{d=Q831d=crPz(|SNfv=@q$i6+99)Eef`a%P zq)~BW77=lX5SYd60&d-yKQIds#W2X=$0GBg9b4kGlaD@b>V>9_CLJxfJg9ng?>+b2 za|^iqN|0Q4&P@YA7=|U1p8yE)f2{HG@jS_gB=@bg?~?o(K%-nP_x@MkVRv_TzQ4bJ zl;mRoij8EwSS*fbv)SCGk&yftz#k-k1t4qfPq|#~Q|H`0AEXB0G0D$5b}q?GOiWxi z#yp6fODagpO3FLucH=;Ehn|+?-BLFhS+?Qm1aBHpo+9P<_)6;Y9TxZtWm#wu+01`2RAP8=etQ%wYy|a5H zKO`ADuai7*&fWf31pe>|0QL6v7GnM%E}AIm|9yG{Z^?|rmNLzX=7uf z(9VG)`MxpcCIEDGb{x6=6TNCrW0w-xePM)LQmsj2He%e16WlJnnmd*;TAM*xm9nat-c1V1R1N^eh2 zPQIE-rM^79U`%a(e*Oml#{e1t4oMyZI0Vojd2$w~&*by@agzH!)5FEZ#TO-YNs1)p zQmNDz{_JTKMXyIuRE)dpT=B$Y#%8VEm6VcXyal79qc_^iWvyL4&%Xg+NIvmF;-Gm? zc9Uciz)7uEOSRlPCV7}nr+Kbgz07;Iwzi&4Bog2F?3!U1zSW}MtHzl7EhOKNl)un8 z@Ev3&h2?VjW?RSnNb)X#r}3V1ZrAhTIvQq!gM$NYz5h>kluRaHyXYW0&7fYdKPRc1 zWMgDx;gG3_n6#&<4Hm5H&hR4RnURhmTy(THMy}f{vcxQ8SGk=*`Z@e1g`5yX`om487A;0H5vF^ezU^^18YIw8p1 zgFpKa`yf6PBgPde?OM`o*b5p%A1oqmCBc9uX&aNEA^&QOo91qI@9w=bzRZ@z(j=P; z19zC2bLRUwa|pZq48w49&QEjB`y-LawTl-oKA@`VTa2+c!r`!0+{bpCU~X>CPejKR zMHw6z82G^Da{a&Brn|_ma=& z%Z9^Yt84_E^N+n=?|di}`iY3D9LJeAP4jcxwx@}xA{Y!_@%enyobyisKrJ&qTUc25 z;=q9e5ysekj^oTXH8ni~zy_cslgVqUsy--$_;+Pxgwt)F~$xNQB=BUePm?h*_oM{KQoz3 z8UU#!_ES0M9|D+YY;64c!i5Wu18_+yj`jBTeiaM`_bZC>-rCyQ>8Yuyc_LCc=l__d zdCu?mzeGe{&iNnx{r#%|H~@ZI1KYM=W{kbV7(1IvrLOC`K3H^_rfHw--Me?f?RNjH zD9S6LQ0U#Ep`o;8S%Z_4lTEFyt?!SGjUBTr>ry6@F{P`V(n2EuS~8iuqN?hnTdFL? z#`N^`6VYh&1^{A0MBU zfwKVe@;@)<&K*yMVHi~#8yolf{r;;&6a-Kh9UXl#7K=?tF5P{7eSMmyJq;jlS=K2b z#5cOGuSs{^y)tEzgq&^W99(-O+<&KV_@6% zZ;?pkh!nMma7zRLfOtHv?R8=`5hh2>-8QXq6#5Ic5!j> zq;12!CYQ1}IaNU!^j(kA!4!EQvmh= zxF;Tuzg}NoAKGcVrT?LEN!ShmHI+*JMMVDL;o Date: Fri, 14 Mar 2014 00:09:10 -0400 Subject: [PATCH 07/23] Added Settings page --- css/app.css | 236 ++++++++++++++++++---------------- index.html | 9 ++ js/frontend/ui.js | 10 +- js/frontend/views/settings.js | 39 ++++++ sass/_moviedetails.scss | 54 ++++---- sass/_settings.scss | 12 ++ sass/app.scss | 1 + 7 files changed, 223 insertions(+), 138 deletions(-) create mode 100644 js/frontend/views/settings.js create mode 100644 sass/_settings.scss diff --git a/css/app.css b/css/app.css index 268329c7..66ed4211 100644 --- a/css/app.css +++ b/css/app.css @@ -1501,7 +1501,7 @@ body.has-notification #notification { } /* line 2, ../sass/_moviedetails.scss */ -sidebar { +sidebar, #settings { right: 0; position: absolute; height: 100%; @@ -1513,13 +1513,37 @@ sidebar { -webkit-transform: translateZ(0); } /* line 13, ../sass/_moviedetails.scss */ -sidebar.hidden { +sidebar.hidden, #settings.hidden { right: -10px; animation: sidebareffect2 .5s; -webkit-animation: sidebareffect2 .5s; -webkit-transform: translate(100%, 0); } -/* line 20, ../sass/_moviedetails.scss */ +/* line 21, ../sass/_moviedetails.scss */ +sidebar .closer, #settings .closer { + position: absolute; + top: 0; + left: 0; + height: 30px; + width: 30px; + z-index: 300; + cursor: pointer; +} +/* line 30, ../sass/_moviedetails.scss */ +sidebar .closer:hover i, #settings .closer:hover i { + opacity: 1; +} +/* line 32, ../sass/_moviedetails.scss */ +sidebar .closer i, #settings .closer i { + color: #fff; + position: absolute; + left: 8px; + top: 8px; + opacity: 0.5; + text-shadow: 0 0 5px #000; +} + +/* line 44, ../sass/_moviedetails.scss */ sidebar .play { overflow-x: hidden; overflow-y: overlay; @@ -1581,11 +1605,11 @@ sidebar .play:hover::-webkit-scrollbar-thumb:hover { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); } -/* line 34, ../sass/_moviedetails.scss */ +/* line 58, ../sass/_moviedetails.scss */ sidebar .play:hover a.play-over { display: block; } -/* line 37, ../sass/_moviedetails.scss */ +/* line 61, ../sass/_moviedetails.scss */ sidebar .play .backdrop-image { filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity: 0; @@ -1599,11 +1623,11 @@ sidebar .play .backdrop-image { z-index: -1; background-position: center; } -/* line 52, ../sass/_moviedetails.scss */ +/* line 76, ../sass/_moviedetails.scss */ sidebar .play .loaded { -webkit-animation: backdropFadeIn .5s ease-in forwards; } -/* line 57, ../sass/_moviedetails.scss */ +/* line 81, ../sass/_moviedetails.scss */ sidebar .play a.play-over { position: absolute; top: 40%; @@ -1617,7 +1641,7 @@ sidebar .play a.play-over { display: none; z-index: 10; } -/* line 71, ../sass/_moviedetails.scss */ +/* line 95, ../sass/_moviedetails.scss */ sidebar .play .poster { display: block; width: 100%; @@ -1631,7 +1655,7 @@ sidebar .play .poster { background-size: cover; -webkit-transform: translateZ(0); } -/* line 88, ../sass/_moviedetails.scss */ +/* line 112, ../sass/_moviedetails.scss */ sidebar .play .poster img.big-poster { display: block; position: absolute; @@ -1641,7 +1665,7 @@ sidebar .play .poster img.big-poster { height: 100%; border-radius: 4px; } -/* line 99, ../sass/_moviedetails.scss */ +/* line 123, ../sass/_moviedetails.scss */ sidebar .play a.play-button { text-align: center; color: #FFF; @@ -1656,45 +1680,22 @@ sidebar .play a.play-button { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); background: #cc181e; } -/* line 112, ../sass/_moviedetails.scss */ +/* line 136, ../sass/_moviedetails.scss */ sidebar .play a.play-button:hover { background: #eb282e; } -/* line 115, ../sass/_moviedetails.scss */ +/* line 139, ../sass/_moviedetails.scss */ sidebar .play .movie-detail { height: 100%; display: table; } -/* line 120, ../sass/_moviedetails.scss */ -sidebar .play .movie-detail .closer { - position: absolute; - top: 0; - left: 0; - height: 30px; - width: 30px; - z-index: 300; - cursor: pointer; -} -/* line 129, ../sass/_moviedetails.scss */ -sidebar .play .movie-detail .closer:hover i { - opacity: 1; -} -/* line 131, ../sass/_moviedetails.scss */ -sidebar .play .movie-detail .closer i { - color: #fff; - position: absolute; - left: 8px; - top: 8px; - opacity: 0.5; - text-shadow: 0 0 5px #000; -} -/* line 142, ../sass/_moviedetails.scss */ +/* line 144, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont, sidebar .play .movie-detail .side-content { display: table-cell; vertical-align: middle; } -/* line 148, ../sass/_moviedetails.scss */ +/* line 150, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont { position: relative; width: 40%; @@ -1704,15 +1705,15 @@ sidebar .play .movie-detail .poster-cont { -webkit-box-sizing: border-box; box-sizing: border-box; } -/* line 157, ../sass/_moviedetails.scss */ +/* line 159, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont:hover .movie-config { bottom: 2px; } -/* line 158, ../sass/_moviedetails.scss */ +/* line 160, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .poster-inner { position: relative; } -/* line 160, ../sass/_moviedetails.scss */ +/* line 162, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont img.big-poster { background: #000; width: 100%; @@ -1720,14 +1721,14 @@ sidebar .play .movie-detail .poster-cont img.big-poster { border-radius: 4px; vertical-align: bottom; } -/* line 169, ../sass/_moviedetails.scss */ +/* line 171, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config h4 { font-weight: bold; font-size: 14px; margin-left: 10px; margin-top: 8px; } -/* line 176, ../sass/_moviedetails.scss */ +/* line 178, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont { position: absolute; bottom: 0; @@ -1739,43 +1740,43 @@ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont { background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 100%); -webkit-transform: translateZ(0); } -/* line 187, ../sass/_moviedetails.scss */ +/* line 189, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .quality-cont .quality-off { margin-left: 10px; font-size: 12px; } -/* line 195, ../sass/_moviedetails.scss */ +/* line 197, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.extra-data { font-weight: bold; color: #FFF; float: right; font-size: 15px; } -/* line 202, ../sass/_moviedetails.scss */ +/* line 204, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.good { color: #27ae60; } -/* line 203, ../sass/_moviedetails.scss */ +/* line 205, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.bad { color: #c0392b; } -/* line 204, ../sass/_moviedetails.scss */ +/* line 206, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config li.options span.epic { color: #8e44ad; } -/* line 207, ../sass/_moviedetails.scss */ +/* line 209, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config input { font-family: inherit; font-size: 100%; line-height: normal; margin: 0; } -/* line 213, ../sass/_moviedetails.scss */ +/* line 215, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config input[type="radio"] { box-sizing: border-box; padding: 0; } -/* line 219, ../sass/_moviedetails.scss */ +/* line 221, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch { background: transparent; border-radius: 32px; @@ -1788,7 +1789,7 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch { top: 28px; cursor: pointer; } -/* line 231, ../sass/_moviedetails.scss */ +/* line 233, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label { -webkit-transition: color 0.2s ease; -moz-transition: color 0.2s ease; @@ -1801,19 +1802,19 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch label { width: 20px; cursor: pointer; } -/* line 240, ../sass/_moviedetails.scss */ +/* line 242, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label:nth-of-type(1) { left: -38px; position: absolute; text-align: right; } -/* line 246, ../sass/_moviedetails.scss */ +/* line 248, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch label:nth-of-type(2) { position: absolute; right: -30px; text-align: left; } -/* line 253, ../sass/_moviedetails.scss */ +/* line 255, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input { height: 12px; left: 0; @@ -1824,35 +1825,35 @@ sidebar .play .movie-detail .poster-cont .movie-config .switch input { z-index: 2; cursor: pointer; } -/* line 263, ../sass/_moviedetails.scss */ +/* line 265, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked { z-index: 0; } -/* line 267, ../sass/_moviedetails.scss */ +/* line 269, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ label:nth-of-type(1) { color: #286dc4; } -/* line 268, ../sass/_moviedetails.scss */ +/* line 270, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ label:nth-of-type(2) { color: #FFF; } -/* line 271, ../sass/_moviedetails.scss */ +/* line 273, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input:checked ~ .toggle { left: 2px; } -/* line 275, ../sass/_moviedetails.scss */ +/* line 277, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ label:nth-of-type(1) { color: #FFF; } -/* line 276, ../sass/_moviedetails.scss */ +/* line 278, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ label:nth-of-type(2) { color: #286dc4; } -/* line 279, ../sass/_moviedetails.scss */ +/* line 281, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .switch input ~ :checked ~ .toggle { left: 13px; } -/* line 283, ../sass/_moviedetails.scss */ +/* line 285, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .poster-cont .movie-config .toggle { -webkit-transition: left 0.2s ease; -moz-transition: left 0.2s ease; @@ -1867,7 +1868,7 @@ sidebar .play .movie-detail .poster-cont .movie-config .toggle { width: 10px; z-index: 1; } -/* line 298, ../sass/_moviedetails.scss */ +/* line 300, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content { z-index: 500; width: 60%; @@ -1878,12 +1879,12 @@ sidebar .play .movie-detail .side-content { -webkit-box-sizing: border-box; box-sizing: border-box; } -/* line 308, ../sass/_moviedetails.scss */ +/* line 310, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title { position: relative; padding: 0; } -/* line 312, ../sass/_moviedetails.scss */ +/* line 314, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title h2 { font-weight: 200; font-size: 34px; @@ -1891,11 +1892,11 @@ sidebar .play .movie-detail .side-content .title h2 { color: #f5f7fa; padding-right: 30px; } -/* line 320, ../sass/_moviedetails.scss */ +/* line 322, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info { margin-bottom: 5px; } -/* line 323, ../sass/_moviedetails.scss */ +/* line 325, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li { display: inline-block; vertical-align: top; @@ -1903,16 +1904,16 @@ sidebar .play .movie-detail .side-content .title .movie-quick-info li { color: #286dc4; font-weight: bold; } -/* line 330, ../sass/_moviedetails.scss */ +/* line 332, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li::after { content: '\b7\a0'; margin-left: 2px; } -/* line 335, ../sass/_moviedetails.scss */ +/* line 337, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .movie-quick-info li:last-child::after { display: none; } -/* line 339, ../sass/_moviedetails.scss */ +/* line 341, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health { font-size: 24px; width: 20px; @@ -1924,50 +1925,50 @@ sidebar .play .movie-detail .side-content .title .health { top: 10px; right: 0; } -/* line 350, ../sass/_moviedetails.scss */ +/* line 352, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.bad { color: red; border-color: red; } -/* line 355, ../sass/_moviedetails.scss */ +/* line 357, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.medium { color: yellow; border-color: yellow; } -/* line 360, ../sass/_moviedetails.scss */ +/* line 362, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.good { color: limegreen; border-color: limegreen; } -/* line 365, ../sass/_moviedetails.scss */ +/* line 367, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .title .health.excellent { color: green; border-color: green; } -/* line 372, ../sass/_moviedetails.scss */ +/* line 374, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .rating { display: inline-block; position: relative; font-size: 14px; margin: 0 10px 0 0; } -/* line 378, ../sass/_moviedetails.scss */ +/* line 380, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .rating ul { color: #f5f7fa; } -/* line 381, ../sass/_moviedetails.scss */ +/* line 383, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content p { margin-top: 10px; color: #babdc2; font-size: 14px; line-height: 24px; } -/* line 388, ../sass/_moviedetails.scss */ +/* line 390, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list { margin-top: 10px; margin-bottom: 10px; } -/* line 392, ../sass/_moviedetails.scss */ +/* line 394, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list h4 { font-size: 12px; color: #f5f7fa; @@ -1975,67 +1976,67 @@ sidebar .play .movie-detail .side-content .subtitles-list h4 { vertical-align: middle; margin-right: 5px; } -/* line 400, ../sass/_moviedetails.scss */ +/* line 402, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul { display: inline-block; vertical-align: middle; } -/* line 404, ../sass/_moviedetails.scss */ +/* line 406, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li { display: inline-block; vertical-align: top; } -/* line 408, ../sass/_moviedetails.scss */ +/* line 410, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li span { width: 22px; height: 16px; display: inline-block; } -/* line 415, ../sass/_moviedetails.scss */ +/* line 417, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-english { background-image: url(../images/english.png); } -/* line 416, ../sass/_moviedetails.scss */ +/* line 418, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-french { background-image: url(../images/french.png); } -/* line 417, ../sass/_moviedetails.scss */ +/* line 419, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-dutch { background-image: url(../images/dutch.png); } -/* line 418, ../sass/_moviedetails.scss */ +/* line 420, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-portuguese { background-image: url(../images/portuguese.png); } -/* line 419, ../sass/_moviedetails.scss */ +/* line 421, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-romanian { background-image: url(../images/romanian.png); } -/* line 420, ../sass/_moviedetails.scss */ +/* line 422, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-spanish { background-image: url(../images/spanish.png); } -/* line 421, ../sass/_moviedetails.scss */ +/* line 423, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-turkish { background-image: url(../images/turkish.png); } -/* line 422, ../sass/_moviedetails.scss */ +/* line 424, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-brazilian { background-image: url(../images/brazilian.png); } -/* line 423, ../sass/_moviedetails.scss */ +/* line 425, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-italian { background-image: url(../images/italian.png); } -/* line 424, ../sass/_moviedetails.scss */ +/* line 426, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-hungarian { background-image: url(../images/hungarian.png); } -/* line 425, ../sass/_moviedetails.scss */ +/* line 427, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content .subtitles-list ul li .flag.flag-bulgarian { background-image: url(../images/bulgarian.png); } -/* line 431, ../sass/_moviedetails.scss */ +/* line 433, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content a.play-button { background: #286dc4; background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); @@ -2048,37 +2049,37 @@ sidebar .play .movie-detail .side-content a.play-button { margin-top: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } -/* line 443, ../sass/_moviedetails.scss */ +/* line 445, ../sass/_moviedetails.scss */ sidebar .play .movie-detail .side-content a.play-button:hover { background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); } -/* line 452, ../sass/_moviedetails.scss */ +/* line 454, ../sass/_moviedetails.scss */ .sidebar-open li.movie { opacity: 0.25; } -/* line 455, ../sass/_moviedetails.scss */ +/* line 457, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active { opacity: 1; } -/* line 458, ../sass/_moviedetails.scss */ +/* line 460, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active a { box-shadow: 0 0 0 3px #3498db; border-radius: 3px; } -/* line 462, ../sass/_moviedetails.scss */ +/* line 464, ../sass/_moviedetails.scss */ .sidebar-open li.movie.active a i { opacity: 0 !important; } -/* line 468, ../sass/_moviedetails.scss */ +/* line 470, ../sass/_moviedetails.scss */ .subtitles button { background: transparent; border: 0; padding: 0; } -/* line 475, ../sass/_moviedetails.scss */ +/* line 477, ../sass/_moviedetails.scss */ .dropdown { position: relative; display: inline-block; @@ -2088,19 +2089,19 @@ sidebar .play .movie-detail .side-content a.play-button:hover { margin-right: 20px; margin-top: -8px; } -/* line 485, ../sass/_moviedetails.scss */ +/* line 487, ../sass/_moviedetails.scss */ .dropdown.active .dropdown-text { background-color: white; z-index: 2; border-radius: 3px 3px 0 0; } -/* line 491, ../sass/_moviedetails.scss */ +/* line 493, ../sass/_moviedetails.scss */ .dropdown.active .dropdown-content { opacity: 1; visibility: visible; } -/* line 498, ../sass/_moviedetails.scss */ +/* line 500, ../sass/_moviedetails.scss */ .dropdown-text { cursor: pointer; position: absolute; @@ -2110,7 +2111,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { color: #333; text-shadow: 0 1px #fff; } -/* line 507, ../sass/_moviedetails.scss */ +/* line 509, ../sass/_moviedetails.scss */ .dropdown-text:after { position: absolute; right: -10px; @@ -2123,7 +2124,7 @@ sidebar .play .movie-detail .side-content a.play-button:hover { border-color: #FFF transparent transparent transparent; } -/* line 520, ../sass/_moviedetails.scss */ +/* line 522, ../sass/_moviedetails.scss */ .dropdown-toggle { font-size: 0; z-index: 1; @@ -2138,12 +2139,12 @@ sidebar .play .movie-detail .side-content a.play-button:hover { height: 37px; width: 60px; } -/* line 534, ../sass/_moviedetails.scss */ +/* line 536, ../sass/_moviedetails.scss */ .dropdown-toggle:focus { outline: 0; } -/* line 537, ../sass/_moviedetails.scss */ +/* line 539, ../sass/_moviedetails.scss */ .dropdown-content { list-style-type: none; position: absolute; @@ -2157,18 +2158,33 @@ sidebar .play .movie-detail .side-content a.play-button:hover { width: 40px; text-align: center; } -/* line 550, ../sass/_moviedetails.scss */ +/* line 552, ../sass/_moviedetails.scss */ .dropdown-content a { display: block; padding: 4px; color: #333; text-shadow: 0 1px #fff; } -/* line 556, ../sass/_moviedetails.scss */ +/* line 558, ../sass/_moviedetails.scss */ .dropdown-content a:hover { background: #E1E1E1; } +/* line 1, ../sass/_settings.scss */ +#settings { + background-color: #181817; +} +/* line 3, ../sass/_settings.scss */ +#settings > form { + margin: 10px 50px 0 50px; +} +/* line 6, ../sass/_settings.scss */ +#settings > form h1 { + font-weight: 200; + font-size: 34px; + color: #f5f7fa; +} + /* line 2, ../sass/_player.scss */ #video-container { display: none; diff --git a/index.html b/index.html index b5324211..ffd36c21 100644 --- a/index.html +++ b/index.html @@ -41,9 +41,17 @@

Movies

+
+ + + diff --git a/js/frontend/ui.js b/js/frontend/ui.js index 0792bb09..fe56547b 100644 --- a/js/frontend/ui.js +++ b/js/frontend/ui.js @@ -56,12 +56,18 @@ jQuery(function ($) { $('.btn-os.close').on('click', function () { win.close(); }); - + $('.btn-os.fullscreen').on('click', function () { win.toggleFullscreen(); $('.btn-os.fullscreen').toggleClass('active'); }); + $('.btn-os.settings').on('click', function () { + if(App.sidebar.isVisible()) { + App.sidebar.hide(); + } + new App.View.Settings(); + }); // The app loading close button $('.popcorn-load .btn-close').click(function(event){ @@ -115,7 +121,7 @@ jQuery(function ($) { $('#catalog-select ul li.active').removeClass('active'); } }); - + $('.search i').on('click', function (evt) { var term = $.trim($('.search input').val()); diff --git a/js/frontend/views/settings.js b/js/frontend/views/settings.js new file mode 100644 index 00000000..2bf7425c --- /dev/null +++ b/js/frontend/views/settings.js @@ -0,0 +1,39 @@ +var SettingsTemplate = $('#settings-tpl').html(); + +App.View.Settings = Backbone.View.extend({ + el: $('#settings'), + template: _.template(SettingsTemplate), + + events: { + 'click .closer': 'hide', + 'click .save': 'save' + }, + + save: function (evt) { + evt.preventDefault(); + }, + + initialize: function() { + this.model = {test: 'asd'}; + this.render(); + }, + + render: function () { + this.$el.html(this.template(this.model)); + this.show(); + }, + + isVisible: function () { + return !this.$el.is('.hidden'); + }, + + hide: function () { + $('body').removeClass('sidebar-open'); + this.$el.addClass('hidden'); + }, + + show: function () { + $('body').removeClass().addClass('sidebar-open'); + this.$el.removeClass('hidden'); + } +}); diff --git a/sass/_moviedetails.scss b/sass/_moviedetails.scss index 4e0d6c36..df376833 100644 --- a/sass/_moviedetails.scss +++ b/sass/_moviedetails.scss @@ -1,5 +1,5 @@ -// Sidebar -sidebar { +// Page loaded on the left +sidebar, #settings { right: 0; position: absolute; height: 100%; @@ -17,6 +17,30 @@ sidebar { -webkit-transform: translate(100%, 0); } + // To close sidebar - .movie-detail + .closer { + position: absolute; + top: 0; + left: 0; + height: 30px; + width: 30px; + z-index: 300; + cursor: pointer; + + &:hover i { opacity: 1; } + + i { + color: #fff; + position: absolute; + left: 8px; + top: 8px; + opacity: 0.5; + text-shadow: 0 0 5px #000; + } + } +} + +sidebar { .play { @include scrollable(); background: #000; @@ -75,7 +99,7 @@ sidebar { // By using padding-bottom with a fixed width we can create a container that always keeps that ratio. width: 100%; padding-bottom: 100% * 1.5; - + overflow: hidden; border-radius: 4px; background: #000; @@ -116,28 +140,6 @@ sidebar { height: 100%; display: table; - // To close sidebar - .movie-detail - .closer { - position: absolute; - top: 0; - left: 0; - height: 30px; - width: 30px; - z-index: 300; - cursor: pointer; - - &:hover i { opacity: 1; } - - i { - color: #fff; - position: absolute; - left: 8px; - top: 8px; - opacity: 0.5; - text-shadow: 0 0 5px #000; - } - } - .poster-cont, .side-content { display: table-cell; @@ -487,7 +489,7 @@ sidebar { z-index: 2; border-radius: 3px 3px 0 0; } - + .dropdown-content { opacity: 1; visibility: visible; diff --git a/sass/_settings.scss b/sass/_settings.scss new file mode 100644 index 00000000..a883bfa8 --- /dev/null +++ b/sass/_settings.scss @@ -0,0 +1,12 @@ +#settings { + background-color: #181817; + & > form { + margin: 10px 50px 0 50px; + + h1 { + font-weight: 200; + font-size: 34px; + color: #f5f7fa; + } + } +} \ No newline at end of file diff --git a/sass/app.scss b/sass/app.scss index a204c9a6..41c5fcee 100644 --- a/sass/app.scss +++ b/sass/app.scss @@ -11,6 +11,7 @@ @import '_layout'; @import '_movielist'; @import '_moviedetails'; +@import '_settings'; @import '_player'; @import '_probablyuseless'; From 47ecd1369351ff257a4f9f57157bff6cbe9503d3 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 01:53:31 -0400 Subject: [PATCH 08/23] Added a settings page with a setting to set the download folder --- css/app.css | 60 +++++++++++++++++++++++++++++++++-- index.html | 7 ++++ js/frontend/player.js | 2 +- js/frontend/settings.js | 36 +++++++++++++++++++++ js/frontend/ui.js | 8 +++-- js/frontend/views/settings.js | 51 +++++++++++++++++++++++------ sass/_settings.scss | 19 ++++++++++- sass/_utils.scss | 39 +++++++++++++++++++++++ 8 files changed, 207 insertions(+), 15 deletions(-) create mode 100644 js/frontend/settings.js diff --git a/css/app.css b/css/app.css index 66ed4211..08eb97f2 100644 --- a/css/app.css +++ b/css/app.css @@ -112,6 +112,48 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, } } +/* line 54, ../sass/_utils.scss */ +.medium-button { + background: #286dc4; + background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); + color: #FFF; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + padding: 14px 26px; + border-radius: 2px; + display: inline-block; + margin-top: 10px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); +} +/* line 66, ../sass/_utils.scss */ +.medium-button:hover { + background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); +} +/* line 70, ../sass/_utils.scss */ +.medium-button[disabled] { + background-image: linear-gradient(to bottom, #cccccc 0%, #777777 100%); +} + +/* line 75, ../sass/_utils.scss */ +.small-button { + background: #286dc4; + background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); + color: #FFF; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + padding: 4px 10px; + border-radius: 2px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); +} +/* line 85, ../sass/_utils.scss */ +.small-button:hover { + background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); +} +/* line 89, ../sass/_utils.scss */ +.small-button[disabled] { + background-image: linear-gradient(to bottom, #cccccc 0%, #777777 100%); +} + /* line 1, ../sass/_frame.scss */ body { -webkit-user-select: none; @@ -2175,14 +2217,28 @@ sidebar .play .movie-detail .side-content a.play-button:hover { background-color: #181817; } /* line 3, ../sass/_settings.scss */ -#settings > form { +#settings form { margin: 10px 50px 0 50px; + label-margin-right: 20px; } /* line 6, ../sass/_settings.scss */ -#settings > form h1 { +#settings form h1 { font-weight: 200; font-size: 34px; color: #f5f7fa; + margin-bottom: 10px; +} +/* line 17, ../sass/_settings.scss */ +#settings form #settings-download-location-input { + display: none; +} +/* line 21, ../sass/_settings.scss */ +#settings form #settings-download-location-value { + display: inline-block; + min-width: 200px; + background-color: #282828; + border-radius: 2px; + padding: 3px; } /* line 2, ../sass/_player.scss */ diff --git a/index.html b/index.html index ffd36c21..25ab8280 100644 --- a/index.html +++ b/index.html @@ -49,6 +49,12 @@

Movies

Settings

+ + Browse... + + <%= downloadLocation %> + +
@@ -186,6 +192,7 @@

<%= i18n.__('subtitledIn') %>

+ diff --git a/js/frontend/player.js b/js/frontend/player.js index 351f4e06..de5afe96 100644 --- a/js/frontend/player.js +++ b/js/frontend/player.js @@ -8,7 +8,7 @@ var playTorrent = window.playTorrent = function (torrent, subs, movieModel, call // Create a unique file to cache the video (with a microtimestamp) to prevent read conflicts var tmpFilename = ( torrent.toLowerCase().split('/').pop().split('.torrent').shift() ).slice(0,100); tmpFilename = tmpFilename.replace(/([^a-zA-Z0-9-_])/g, '_') + '.mp4'; - var tmpFile = path.join(tmpFolder, tmpFilename); + var tmpFile = path.join(App.settings.downloadLocation, tmpFilename); var numCores = (os.cpus().length > 0) ? os.cpus().length : 1; var numConnections = 100; diff --git a/js/frontend/settings.js b/js/frontend/settings.js new file mode 100644 index 00000000..1cc24857 --- /dev/null +++ b/js/frontend/settings.js @@ -0,0 +1,36 @@ +(function() { + +var localStorageKey = "user_settings"; + +var defaultSettings = { + downloadLocation: path.join(os.tmpDir(), 'Popcorn-Time') +}; + +if( !localStorage[localStorageKey] ) { + localStorage[localStorageKey] = "{}"; +} + +var Settings = function(){ + this.load(); +}; + +Settings.prototype.load = function() { + _.extend(this, JSON.parse(localStorage[localStorageKey])); + _.defaults(this, defaultSettings); +}; + +Settings.prototype.save = function() { + var self = this; + var data = {}; + _.each(this, function(v, k) { + if(self.hasOwnProperty(k)) { + data[k] = v; + } + }); + + localStorage[localStorageKey] = JSON.stringify(data); +}; + +App.settings = new Settings(); + +})(); \ No newline at end of file diff --git a/js/frontend/ui.js b/js/frontend/ui.js index fe56547b..6f87b9fc 100644 --- a/js/frontend/ui.js +++ b/js/frontend/ui.js @@ -34,6 +34,7 @@ App.loader(true, i18n.__('loading')); // Handles general UI buttons, like maximization, etc jQuery(function ($) { + App.settingsPage = new App.View.Settings(); // Maximize, minimize $('.btn-os.max').on('click', function () { @@ -63,10 +64,12 @@ jQuery(function ($) { }); $('.btn-os.settings').on('click', function () { - if(App.sidebar.isVisible()) { + if( App.sidebar.isVisible() ) { App.sidebar.hide(); } - new App.View.Settings(); + if( !App.settingsPage.isVisible() ) { + App.settingsPage.show(); + } }); // The app loading close button @@ -104,6 +107,7 @@ jQuery(function ($) { App.Router.on('route', function () { // Ensure sidebar is hidden App.sidebar.hide(); + App.settingsPage.hide(); }); diff --git a/js/frontend/views/settings.js b/js/frontend/views/settings.js index 2bf7425c..c6d3d908 100644 --- a/js/frontend/views/settings.js +++ b/js/frontend/views/settings.js @@ -1,26 +1,37 @@ var SettingsTemplate = $('#settings-tpl').html(); App.View.Settings = Backbone.View.extend({ - el: $('#settings'), + el: '#settings', template: _.template(SettingsTemplate), events: { 'click .closer': 'hide', - 'click .save': 'save' + 'click .save': 'save', + 'click #settings-download-location-browse': 'browseLocation', + 'click #settings-download-location-value': 'browseLocation', + 'change #settings-download-location-input': 'locationChanged', + 'change input': 'makeDirty' }, - save: function (evt) { - evt.preventDefault(); + getSettingsValue: function () { + var data = {}; + this.$el.find('input').each(function(i, input) { + input = $(input); + data[input.attr('name')] = input.val(); + }); + return data; }, - initialize: function() { - this.model = {test: 'asd'}; - this.render(); + save: function (evt) { + evt.preventDefault(); + var data = this.getSettingsValue(); + _.extend(App.settings, data); + App.settings.save(); + this.resetDirty(); }, render: function () { - this.$el.html(this.template(this.model)); - this.show(); + this.$el.html(this.template(App.settings)); }, isVisible: function () { @@ -35,5 +46,27 @@ App.View.Settings = Backbone.View.extend({ show: function () { $('body').removeClass().addClass('sidebar-open'); this.$el.removeClass('hidden'); + this.render(); + this.resetDirty(); + }, + + makeDirty: function () { + this.$el.find('.save').removeAttr('disabled'); + }, + + resetDirty: function () { + this.$el.find('.save').attr('disabled','disabled'); + }, + + browseLocation: function (evt) { + evt.preventDefault(); + $('#settings-download-location-input').click(); + }, + + locationChanged: function (evt) { + var newLoc = $('#settings-download-location-input').val(); + if(newLoc) { + $('#settings-download-location-value').text(newLoc); + } } }); diff --git a/sass/_settings.scss b/sass/_settings.scss index a883bfa8..ac3bcbc5 100644 --- a/sass/_settings.scss +++ b/sass/_settings.scss @@ -1,12 +1,29 @@ #settings { background-color: #181817; - & > form { + form { margin: 10px 50px 0 50px; h1 { font-weight: 200; font-size: 34px; color: #f5f7fa; + margin-bottom: 10px; + } + + label: { + margin-right: 20px; + } + + #settings-download-location-input { + display: none; + } + + #settings-download-location-value { + display: inline-block; + min-width: 200px; + background-color: #282828; + border-radius: 2px; + padding: 3px; } } } \ No newline at end of file diff --git a/sass/_utils.scss b/sass/_utils.scss index c4da3e81..5af52f6f 100644 --- a/sass/_utils.scss +++ b/sass/_utils.scss @@ -49,5 +49,44 @@ } } } +} +.medium-button { + background: #286dc4; + background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); + color: #FFF; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + padding: 14px 26px; + border-radius: 2px; + display: inline-block; + margin-top: 10px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + + &:hover { + background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); + } + + &[disabled] { + background-image: linear-gradient(to bottom, #ccc 0%, #777 100%); + } +} + +.small-button { + background: #286dc4; + background-image: linear-gradient(to bottom, #3076ce 0%, #175ab0 100%); + color: #FFF; + font-weight: bold; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + padding: 4px 10px; + border-radius: 2px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + + &:hover { + background-image: linear-gradient(to bottom, #4387de 0%, #175ab0 100%); + } + + &[disabled] { + background-image: linear-gradient(to bottom, #ccc 0%, #777 100%); + } } \ No newline at end of file From 6aeab6cb2078af60020b7289738635b25b9a238f Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 02:14:51 -0400 Subject: [PATCH 09/23] Localize new string in en and fr --- index.html | 8 ++++---- language/en.json | 8 +++++++- language/fr.json | 7 ++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 25ab8280..bd6a1cb5 100644 --- a/index.html +++ b/index.html @@ -48,13 +48,13 @@

Movies

diff --git a/language/en.json b/language/en.json index f2aab380..894411ab 100644 --- a/language/en.json +++ b/language/en.json @@ -60,4 +60,10 @@ "arabic": "Arabic", "korean": "Korean", "hungarian": "Hungarian", - "bulgarian": "Bulgarian"} + "bulgarian": "Bulgarian", + + "Settings": "Settings", + "Download location": "Download location", + "Browse...": "Browse...", + "Save": "Save" +} diff --git a/language/fr.json b/language/fr.json index 8e3fe38a..5b5628a8 100644 --- a/language/fr.json +++ b/language/fr.json @@ -66,5 +66,10 @@ "arabic": "Arabe", "korean": "Coréen", "hungarian": "Hongrois", - "bulgarian": "Bulgare" + "bulgarian": "Bulgare", + + "Settings": "Paramètres", + "Download location": "Répertoire de téléchargement", + "Browse...": "Parcourir...", + "Save": "Enregistrer" } From 026c10c1c99aa5807a9fa14ea282048a6c56aecd Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 02:27:29 -0400 Subject: [PATCH 10/23] Aligne settings icon with fullscreen icon --- css/app.css | 87 ++++++++++++++++++++++++----------------------- sass/_layout.scss | 9 +++-- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/css/app.css b/css/app.css index 08eb97f2..cba9f67c 100644 --- a/css/app.css +++ b/css/app.css @@ -591,18 +591,21 @@ a { #header .btn-set button.settings { background: transparent; background-image: url(../images/settings.png); - margin: 4px; - width: 24px; - height: 24px; + background-repeat: no-repeat; + background-position: center center; + margin: 0; + margin-top: 3px; + width: 32px; + height: 29px; border-radius: 0; display: block; } -/* line 197, ../sass/_layout.scss */ +/* line 200, ../sass/_layout.scss */ #header .btn-set button.settings:hover { background-image: url(../images/settings_over.png); } -/* line 206, ../sass/_layout.scss */ +/* line 209, ../sass/_layout.scss */ #notification { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -622,7 +625,7 @@ a { border-top: none; display: none; } -/* line 223, ../sass/_layout.scss */ +/* line 226, ../sass/_layout.scss */ #notification .btn { position: absolute; top: 6px; @@ -631,7 +634,7 @@ a { background: rgba(0, 0, 0, 0.4); } -/* line 233, ../sass/_layout.scss */ +/* line 236, ../sass/_layout.scss */ #catalog-select { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -694,20 +697,20 @@ a { border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.2); } -/* line 245, ../sass/_layout.scss */ +/* line 248, ../sass/_layout.scss */ #catalog-select h4 { margin-top: 40px; color: #404040; font-weight: bold; margin-bottom: 10px; } -/* line 253, ../sass/_layout.scss */ +/* line 256, ../sass/_layout.scss */ #catalog-select ul li { display: block; font-weight: bold; font-size: 13px; } -/* line 258, ../sass/_layout.scss */ +/* line 261, ../sass/_layout.scss */ #catalog-select ul li a { -webkit-transition: background-color ease; -webkit-transition-delay: 0.3s; @@ -719,11 +722,11 @@ a { border-radius: 3px; padding: 8px; } -/* line 265, ../sass/_layout.scss */ +/* line 268, ../sass/_layout.scss */ #catalog-select ul li a:hover { background: #010101; } -/* line 270, ../sass/_layout.scss */ +/* line 273, ../sass/_layout.scss */ #catalog-select ul li.active a, #catalog-select ul li.active a:hover { background: #286dc4; @@ -733,13 +736,13 @@ a { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); cursor: default; } -/* line 282, ../sass/_layout.scss */ +/* line 285, ../sass/_layout.scss */ #catalog-select .search { position: absolute; right: 20px; top: 12px; } -/* line 287, ../sass/_layout.scss */ +/* line 290, ../sass/_layout.scss */ #catalog-select .search input { border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 5px; @@ -751,7 +754,7 @@ a { background: transparent; font-weight: bold; } -/* line 299, ../sass/_layout.scss */ +/* line 302, ../sass/_layout.scss */ #catalog-select .search i { position: absolute; top: 10px; @@ -759,7 +762,7 @@ a { color: rgba(255, 255, 255, 0.4); } -/* line 310, ../sass/_layout.scss */ +/* line 313, ../sass/_layout.scss */ .container { height: calc(100% - 45px); overflow: hidden; @@ -767,22 +770,22 @@ a { position: relative; } -/* line 320, ../sass/_layout.scss */ +/* line 323, ../sass/_layout.scss */ body.has-notification .container { height: calc(100% - 45px - 45px); margin: 90px 0 0 180px; } -/* line 325, ../sass/_layout.scss */ +/* line 328, ../sass/_layout.scss */ body.has-notification #catalog-select { top: 90px; height: calc(100% - 45px - 45px); } -/* line 330, ../sass/_layout.scss */ +/* line 333, ../sass/_layout.scss */ body.has-notification #notification { display: block; } -/* line 335, ../sass/_layout.scss */ +/* line 338, ../sass/_layout.scss */ .popcorn-load { -webkit-transition: opacity ease; -webkit-transition-delay: 1s; @@ -799,18 +802,18 @@ body.has-notification #notification { width: 100%; z-index: 999; } -/* line 347, ../sass/_layout.scss */ +/* line 350, ../sass/_layout.scss */ .popcorn-load.hidden { opacity: 0; z-index: 0; margin-left: 100%; pointer-events: none; } -/* line 354, ../sass/_layout.scss */ +/* line 357, ../sass/_layout.scss */ .popcorn-load.hidden .spinner { -webkit-animation: none; } -/* line 358, ../sass/_layout.scss */ +/* line 361, ../sass/_layout.scss */ .popcorn-load .wrapper { -webkit-transform: translateY(-100%); -moz-transform: translateY(-100%); @@ -823,11 +826,11 @@ body.has-notification #notification { text-align: center; width: 100%; } -/* line 367, ../sass/_layout.scss */ +/* line 370, ../sass/_layout.scss */ .popcorn-load .text { font-size: 22px; } -/* line 369, ../sass/_layout.scss */ +/* line 372, ../sass/_layout.scss */ .popcorn-load .spinner { background: url(../images/spinner.svg) no-repeat 0 0; background-size: cover; @@ -837,7 +840,7 @@ body.has-notification #notification { -webkit-animation: 1.05s spin infinite linear; width: 45px; } -/* line 379, ../sass/_layout.scss */ +/* line 382, ../sass/_layout.scss */ .popcorn-load .progressbar { display: none; height: 14px; @@ -849,7 +852,7 @@ body.has-notification #notification { overflow: hidden; padding: 3px; } -/* line 390, ../sass/_layout.scss */ +/* line 393, ../sass/_layout.scss */ .popcorn-load .progressbar .progress { -webkit-transition: width 0.2s ease; -moz-transition: width 0.2s ease; @@ -862,7 +865,7 @@ body.has-notification #notification { background: #FFF; border-radius: 40px; } -/* line 401, ../sass/_layout.scss */ +/* line 404, ../sass/_layout.scss */ .popcorn-load .progressinfo { display: none; position: absolute; @@ -875,7 +878,7 @@ body.has-notification #notification { opacity: 0.5; bottom: -40px; } -/* line 414, ../sass/_layout.scss */ +/* line 417, ../sass/_layout.scss */ .popcorn-load .btn-close { display: none; position: absolute; @@ -884,24 +887,24 @@ body.has-notification #notification { left: 15px; -webkit-app-region: no-drag; } -/* line 424, ../sass/_layout.scss */ +/* line 427, ../sass/_layout.scss */ .popcorn-load.withProgressBar .progressbar { display: block; } -/* line 425, ../sass/_layout.scss */ +/* line 428, ../sass/_layout.scss */ .popcorn-load.withProgressBar .progressinfo { display: block; } -/* line 426, ../sass/_layout.scss */ +/* line 429, ../sass/_layout.scss */ .popcorn-load.withProgressBar .spinner { display: none; } -/* line 430, ../sass/_layout.scss */ +/* line 433, ../sass/_layout.scss */ .popcorn-load.cancellable .btn-close { display: block; } -/* line 434, ../sass/_layout.scss */ +/* line 437, ../sass/_layout.scss */ .popcorn-disclaimer { -webkit-transition: opacity ease; -webkit-transition-delay: 0.3s; @@ -918,24 +921,24 @@ body.has-notification #notification { width: 100%; z-index: 999; } -/* line 446, ../sass/_layout.scss */ +/* line 449, ../sass/_layout.scss */ .popcorn-disclaimer.hidden { opacity: 0; pointer-events: none; } -/* line 452, ../sass/_layout.scss */ +/* line 455, ../sass/_layout.scss */ .popcorn-disclaimer.quitting .text, .popcorn-disclaimer.quitting .btn { opacity: 0.0; pointer-events: none; } -/* line 457, ../sass/_layout.scss */ +/* line 460, ../sass/_layout.scss */ .popcorn-disclaimer .text, .popcorn-disclaimer .btn { -webkit-transition: opacity 2s ease-out; -moz-transition: opacity 2s ease-out; -o-transition: opacity 2s ease-out; transition: opacity 2s ease-out; } -/* line 461, ../sass/_layout.scss */ +/* line 464, ../sass/_layout.scss */ .popcorn-disclaimer .wrapper { -webkit-transform: translateY(-50%); -moz-transform: translateY(-50%); @@ -948,7 +951,7 @@ body.has-notification #notification { text-align: center; width: 100%; } -/* line 470, ../sass/_layout.scss */ +/* line 473, ../sass/_layout.scss */ .popcorn-disclaimer .text { display: block; font-size: 22px; @@ -957,18 +960,18 @@ body.has-notification #notification { margin: 0px auto; margin-bottom: 15px; } -/* line 479, ../sass/_layout.scss */ +/* line 482, ../sass/_layout.scss */ .popcorn-disclaimer .btn { padding: 1.1em 3em; font-size: 18px; } -/* line 483, ../sass/_layout.scss */ +/* line 486, ../sass/_layout.scss */ .popcorn-disclaimer .btn.continue { font-size: 18px; font-weight: bold; background: #53A93F; } -/* line 488, ../sass/_layout.scss */ +/* line 491, ../sass/_layout.scss */ .popcorn-disclaimer .btn.quit { font-size: 18px; background: #e20f3c; diff --git a/sass/_layout.scss b/sass/_layout.scss index 0c5535fa..5e8c0ed1 100644 --- a/sass/_layout.scss +++ b/sass/_layout.scss @@ -188,9 +188,12 @@ a { text-decoration: none; } &.settings { background: transparent; background-image: url(../images/settings.png); - margin: 4px; - width: 24px; - height: 24px; + background-repeat: no-repeat; + background-position: center center; + margin: 0; + margin-top: 3px; + width: 32px; + height: 29px; border-radius: 0; display:block; From 09148851f6a2f8f92357451e3045b35286628bc9 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 03:19:57 -0400 Subject: [PATCH 11/23] Add option to not clear cache after movie --- css/app.css | 25 +++++-- index.html | 15 +++- js/frontend/player.js | 6 +- js/frontend/settings.js | 4 +- js/frontend/views/settings.js | 32 ++++++-- language/en.json | 137 +++++++++++++++++----------------- language/fr.json | 6 +- sass/_settings.scss | 20 +++-- 8 files changed, 150 insertions(+), 95 deletions(-) diff --git a/css/app.css b/css/app.css index cba9f67c..fb4b56d9 100644 --- a/css/app.css +++ b/css/app.css @@ -2222,27 +2222,40 @@ sidebar .play .movie-detail .side-content a.play-button:hover { /* line 3, ../sass/_settings.scss */ #settings form { margin: 10px 50px 0 50px; - label-margin-right: 20px; } /* line 6, ../sass/_settings.scss */ #settings form h1 { font-weight: 200; font-size: 34px; color: #f5f7fa; - margin-bottom: 10px; + margin-bottom: 20px; +} +/* line 13, ../sass/_settings.scss */ +#settings form h2 { + font-size: 20px; + color: #286dc4; + margin-bottom: 15px; +} +/* line 19, ../sass/_settings.scss */ +#settings form .folder-input { + margin-top: 10px; } -/* line 17, ../sass/_settings.scss */ -#settings form #settings-download-location-input { +/* line 23, ../sass/_settings.scss */ +#settings form #settings-cacheLocation-input { display: none; } -/* line 21, ../sass/_settings.scss */ -#settings form #settings-download-location-value { +/* line 27, ../sass/_settings.scss */ +#settings form #settings-cacheLocation-value { display: inline-block; min-width: 200px; background-color: #282828; border-radius: 2px; padding: 3px; } +/* line 35, ../sass/_settings.scss */ +#settings form .option { + margin: 10px 0 10px 20px; +} /* line 2, ../sass/_player.scss */ #video-container { diff --git a/index.html b/index.html index bd6a1cb5..79f52497 100644 --- a/index.html +++ b/index.html @@ -49,10 +49,17 @@

Movies

<%= i18n.__('Settings') %>

- - <%= i18n.__('Browse...') %> - - <%= downloadLocation %> +

<%= i18n.__('Cache')%>

+
+ + <%= i18n.__('Browse...') %> + + <%= cacheLocation %> +
+
+ > + +
diff --git a/js/frontend/player.js b/js/frontend/player.js index de5afe96..e0e0ed0b 100644 --- a/js/frontend/player.js +++ b/js/frontend/player.js @@ -8,7 +8,7 @@ var playTorrent = window.playTorrent = function (torrent, subs, movieModel, call // Create a unique file to cache the video (with a microtimestamp) to prevent read conflicts var tmpFilename = ( torrent.toLowerCase().split('/').pop().split('.torrent').shift() ).slice(0,100); tmpFilename = tmpFilename.replace(/([^a-zA-Z0-9-_])/g, '_') + '.mp4'; - var tmpFile = path.join(App.settings.downloadLocation, tmpFilename); + var tmpFile = path.join(App.settings.cacheLocation, tmpFilename); var numCores = (os.cpus().length > 0) ? os.cpus().length : 1; var numConnections = 100; @@ -68,7 +68,9 @@ var playTorrent = window.playTorrent = function (torrent, subs, movieModel, call $("body").addClass("sidebar-open").removeClass("loading"); // Stop processes - flix.clearCache(); + if(App.settings.autoClearCache) { + flix.clearCache(); + } flix.destroy(); videoStreamer = null; diff --git a/js/frontend/settings.js b/js/frontend/settings.js index 1cc24857..a5660ce6 100644 --- a/js/frontend/settings.js +++ b/js/frontend/settings.js @@ -2,8 +2,10 @@ var localStorageKey = "user_settings"; +// Default settings var defaultSettings = { - downloadLocation: path.join(os.tmpDir(), 'Popcorn-Time') + cacheLocation: path.join(os.tmpDir(), 'Popcorn-Time'), + autoClearCache: true }; if( !localStorage[localStorageKey] ) { diff --git a/js/frontend/views/settings.js b/js/frontend/views/settings.js index c6d3d908..daa0f759 100644 --- a/js/frontend/views/settings.js +++ b/js/frontend/views/settings.js @@ -1,5 +1,9 @@ var SettingsTemplate = $('#settings-tpl').html(); +var checkboxToBool = function (val) { + return val === 'on'?true:false; +}; + App.View.Settings = Backbone.View.extend({ el: '#settings', template: _.template(SettingsTemplate), @@ -7,18 +11,32 @@ App.View.Settings = Backbone.View.extend({ events: { 'click .closer': 'hide', 'click .save': 'save', - 'click #settings-download-location-browse': 'browseLocation', - 'click #settings-download-location-value': 'browseLocation', - 'change #settings-download-location-input': 'locationChanged', + 'click #settings-cacheLocation-browse': 'browseLocation', + 'click #settings-cacheLocation-value': 'browseLocation', + 'change #settings-cacheLocation-input': 'locationChanged', 'change input': 'makeDirty' }, getSettingsValue: function () { var data = {}; - this.$el.find('input').each(function(i, input) { + + var checked = this.$el.find('input[type=checkbox]').each(function(i, input){ + input = $(input); + data[input.attr('name')] = input.is(':checked'); + }); + + this.$el.find('input').not(checked).each(function(i, input) { input = $(input); data[input.attr('name')] = input.val(); }); + + this.$el.find('input[not_empty]').each(function(i, input) { + input = $(input); + if(_.isEmpty(input.val())) { + delete data[input.attr('name')]; + } + }); + return data; }, @@ -60,13 +78,13 @@ App.View.Settings = Backbone.View.extend({ browseLocation: function (evt) { evt.preventDefault(); - $('#settings-download-location-input').click(); + $('#settings-cacheLocation-input').click(); }, locationChanged: function (evt) { - var newLoc = $('#settings-download-location-input').val(); + var newLoc = $('#settings-cacheLocation-input').val(); if(newLoc) { - $('#settings-download-location-value').text(newLoc); + $('#settings-cacheLocation-value').text(newLoc); } } }); diff --git a/language/en.json b/language/en.json index 894411ab..5d726dcd 100644 --- a/language/en.json +++ b/language/en.json @@ -1,69 +1,70 @@ { - "quit": "Quit", - "cancel": "Cancel", - "beforeQuit": "Are you sure you want to quit?", - "loading": "Please wait...", - "loadingVideo": "Buffering video, please wait", - "searchLoading": "Searching...", - "noResults": "No results found for your query.", - "search": "Search", - "movies": "Movies", - "subtitledIn": "Subtitled in", - "quality": "Quality", - "watchItNow": "Watch It Now", - "durationUnit": "min", - "connecting": "Connecting...", - "startingDownload": "Starting Download...", - "downloading": "Downloading...", - "UpgradeVersion": "Update Popcorn Time", - "UpgradeVersionDescription": "Popcorn Time %s was just released. You should get it now!", - "legalDisclaimer": "Popcorn Time downloads and seeds movies using torrents, which may not be legal in your country.", - "legalDisclaimerResponsible": "We are not responsible for any problems that may arise, so make sure you understand our Terms and Conditions before using the app.", - "legalDisclaimerAccept": "I understand", - "legalDisclaimerCancel": "Leave", - "genres": { - "all": "Popular", - "action": "Action", - "adventure": "Adventure", - "animation": "Animation", - "biography": "Biography", - "comedy": "Comedy", - "crime": "Crime", - "documentary": "Documentary", - "drama": "Drama", - "family": "Family", - "fantasy": "Fantasy", - "film-noir": "Film-Noir", - "history": "History", - "horror": "Horror", - "music": "Music", - "musical": "Musical", - "mystery": "Mystery", - "romance": "Romance", - "sci-fi": "Sci-Fi", - "short": "Short", - "sport": "Sport", - "thriller": "Thriller", - "war": "War", - "western": "Western" - }, - "french": "French", - "english": "English", - "spanish": "Spanish", - "swedish": "Swedish", - "portuguese": "Portuguese", - "romanian": "Romanian", - "turkish": "Turkish", - "dutch": "Dutch", - "italian": "Italian", - "danish": "Danish", - "arabic": "Arabic", - "korean": "Korean", - "hungarian": "Hungarian", - "bulgarian": "Bulgarian", - - "Settings": "Settings", - "Download location": "Download location", - "Browse...": "Browse...", - "Save": "Save" -} + "quit": "Quit", + "cancel": "Cancel", + "beforeQuit": "Are you sure you want to quit?", + "loading": "Please wait...", + "loadingVideo": "Buffering video, please wait", + "searchLoading": "Searching...", + "noResults": "No results found for your query.", + "search": "Search", + "movies": "Movies", + "subtitledIn": "Subtitled in", + "quality": "Quality", + "watchItNow": "Watch It Now", + "durationUnit": "min", + "connecting": "Connecting...", + "startingDownload": "Starting Download...", + "downloading": "Downloading...", + "UpgradeVersion": "Update Popcorn Time", + "UpgradeVersionDescription": "Popcorn Time %s was just released. You should get it now!", + "legalDisclaimer": "Popcorn Time downloads and seeds movies using torrents, which may not be legal in your country.", + "legalDisclaimerResponsible": "We are not responsible for any problems that may arise, so make sure you understand our Terms and Conditions before using the app.", + "legalDisclaimerAccept": "I understand", + "legalDisclaimerCancel": "Leave", + "genres": { + "all": "Popular", + "action": "Action", + "adventure": "Adventure", + "animation": "Animation", + "biography": "Biography", + "comedy": "Comedy", + "crime": "Crime", + "documentary": "Documentary", + "drama": "Drama", + "family": "Family", + "fantasy": "Fantasy", + "film-noir": "Film-Noir", + "history": "History", + "horror": "Horror", + "music": "Music", + "musical": "Musical", + "mystery": "Mystery", + "romance": "Romance", + "sci-fi": "Sci-Fi", + "short": "Short", + "sport": "Sport", + "thriller": "Thriller", + "war": "War", + "western": "Western" + }, + "french": "French", + "english": "English", + "spanish": "Spanish", + "swedish": "Swedish", + "portuguese": "Portuguese", + "romanian": "Romanian", + "turkish": "Turkish", + "dutch": "Dutch", + "italian": "Italian", + "danish": "Danish", + "arabic": "Arabic", + "korean": "Korean", + "hungarian": "Hungarian", + "bulgarian": "Bulgarian", + "Settings": "Settings", + "Cache": "Cache", + "Cache location": "Cache location", + "Browse...": "Browse...", + "Save": "Save", + "Auto clear cache": "Auto clear cache" +} \ No newline at end of file diff --git a/language/fr.json b/language/fr.json index 5b5628a8..a774d139 100644 --- a/language/fr.json +++ b/language/fr.json @@ -69,7 +69,9 @@ "bulgarian": "Bulgare", "Settings": "Paramètres", - "Download location": "Répertoire de téléchargement", + "Cache": "Cache", + "Cache location": "Répertoire de téléchargement", "Browse...": "Parcourir...", - "Save": "Enregistrer" + "Save": "Enregistrer", + "Auto clear cache": "Vider automatiquement la cache" } diff --git a/sass/_settings.scss b/sass/_settings.scss index ac3bcbc5..3b0e9166 100644 --- a/sass/_settings.scss +++ b/sass/_settings.scss @@ -7,23 +7,33 @@ font-weight: 200; font-size: 34px; color: #f5f7fa; - margin-bottom: 10px; + margin-bottom: 20px; } - label: { - margin-right: 20px; + h2 { + font-size: 20px; + color: #286dc4; + margin-bottom: 15px; } - #settings-download-location-input { + .folder-input { + margin-top: 10px; + } + + #settings-cacheLocation-input { display: none; } - #settings-download-location-value { + #settings-cacheLocation-value { display: inline-block; min-width: 200px; background-color: #282828; border-radius: 2px; padding: 3px; } + + .option { + margin: 10px 0 10px 20px; + } } } \ No newline at end of file From eef2797a7f45538ac7df5c265c1e23abcaeff16b Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Mar 2014 09:08:05 +0100 Subject: [PATCH 12/23] Add Maltese language Translate interface string to the Maltese language Add maltese flag to the images folder and in the css code --- images/maltese.png | Bin 0 -> 3087 bytes js/language.js | 2 +- language/mt.json | 64 ++++++++++++++++++++++++++++++++++++++++ sass/_moviedetails.scss | 1 + 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 images/maltese.png create mode 100644 language/mt.json diff --git a/images/maltese.png b/images/maltese.png new file mode 100644 index 0000000000000000000000000000000000000000..2a6239f38c78d5e407776369d9e40b28eea6161a GIT binary patch literal 3087 zcmV+q4Dj=bP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0003xNkl|RRIx9mBnwPvtHw?Rq+1ETz`5@g05cQ z2-#@N9AgtB9vF^BTsNDvdcC6onSA1$1HjDw)I0f38&xHkDq;$v7={9e498`I-M4J9Bg;2s>$H|V^rvo*&L}~lmnCEm56M7xm6^A zqhKyCm)KN_|CWei|4Hm%e Date: Fri, 14 Mar 2014 15:52:24 -0400 Subject: [PATCH 13/23] Torrent source is now configurable --- index.html | 10 ++-- js/app.js | 4 +- js/frontend/controllers/filter.js | 18 +++++-- js/frontend/controllers/home.js | 16 ++++-- js/frontend/controllers/search.js | 21 +++++--- js/frontend/providers/torrents.js | 90 ------------------------------- js/frontend/views/listview.js | 12 ++--- 7 files changed, 55 insertions(+), 116 deletions(-) delete mode 100644 js/frontend/providers/torrents.js diff --git a/index.html b/index.html index cf5b5b34..d509af4d 100644 --- a/index.html +++ b/index.html @@ -180,11 +180,15 @@

<%= i18n.__('subtitledIn') %>

+ + + - + + + - - + diff --git a/js/app.js b/js/app.js index 6fa879aa..9c19e69c 100644 --- a/js/app.js +++ b/js/app.js @@ -50,10 +50,10 @@ var App = { Controller: {}, View: {}, Model: {}, - Page: {} + Page: {}, + Scrapers: {} }; - // render header buttons $("#header").html(_.template($('#header-tpl').html(), {buttons: BUTTON_ORDER})); diff --git a/js/frontend/controllers/filter.js b/js/frontend/controllers/filter.js index ba259e52..1c4fbcda 100644 --- a/js/frontend/controllers/filter.js +++ b/js/frontend/controllers/filter.js @@ -6,20 +6,30 @@ App.Controller.FilterGenre = function (genre, page) { id: 'category-list' }); } - // Create movie list - var movieList = new App.View.MovieList({ + + var Scrapper = App.currentScrapper; + + var movieCollection = new Scrapper([], { searchTerm: null, genre: genre, page: page }); + + movieCollection.fetch(); + + // Create movie list + var movieList = new App.View.MovieList({ + model: movieCollection + }); + // Clean up if first page if (!page || page == '1'){ $('.movie-list').first().empty(); App.Page.FilterGenre.show(); } - + userTracking.pageview('/movies/'+genre + ((page && page > 1) ? '?page='+page : ''), genre.capitalize() + ' Movies').send(); - + setTimeout(function(){ movieList.constructor.busy = false; }, 5000); diff --git a/js/frontend/controllers/home.js b/js/frontend/controllers/home.js index ad4ccf53..6c2ccbd1 100644 --- a/js/frontend/controllers/home.js +++ b/js/frontend/controllers/home.js @@ -6,12 +6,22 @@ App.Controller.Home = function (page) { id: 'movie-list' }); } - // Create movie list - var movieList = new App.View.MovieList({ + + var Scrapper = App.currentScrapper; + + var movieCollection = new Scrapper([], { searchTerm: null, genre: null, page: page }); + + movieCollection.fetch(); + + // Create movie list + var movieList = new App.View.MovieList({ + model: movieCollection + }); + // Clean up if first page if (!page || page == '1'){ $('.movie-list').first().empty(); @@ -23,7 +33,7 @@ App.Controller.Home = function (page) { } userTracking.pageview('/movies/popular'+((page && page > 1) ? '?page='+page : ''), 'Popular Movies').send(); - + setTimeout(function(){ movieList.constructor.busy = false; }, 5000); diff --git a/js/frontend/controllers/search.js b/js/frontend/controllers/search.js index f1f4a1a1..c93407a9 100644 --- a/js/frontend/controllers/search.js +++ b/js/frontend/controllers/search.js @@ -4,15 +4,24 @@ App.Controller.Search = function (searchTerm, page) { // Create page App.Page.Search = new App.View.Page({ id: 'search-list' - }); + }); } - // Create movie list - var movieList = new App.View.MovieList({ - keywords: searchTerm, + + var Scrapper = App.currentScrapper; + + var movieCollection = new Scrapper([], { + searchTerm: searchTerm, genre: null, page: page }); - + + movieCollection.fetch(); + + // Create movie list + var movieList = new App.View.MovieList({ + model: movieCollection + }); + // Clean up if first page if (!page || page == '1'){ console.log('Searching for ' + searchTerm); @@ -21,7 +30,7 @@ App.Controller.Search = function (searchTerm, page) { window.initialLoading = true; App.Page.Search.show(); } - + userTracking.pageview('/movies/search?q='+encodeURIComponent(searchTerm)+((page && page > 1) ? '&page='+page : '')).send(); setTimeout(function(){ diff --git a/js/frontend/providers/torrents.js b/js/frontend/providers/torrents.js deleted file mode 100644 index ab21f355..00000000 --- a/js/frontend/providers/torrents.js +++ /dev/null @@ -1,90 +0,0 @@ -App.getTorrentsCollection = function (options) { - - var url = 'http://subapi.com/'; - - var supportedLanguages = ['english', 'french', 'dutch', 'portuguese', 'romanian', 'spanish', 'turkish', 'brazilian', - 'italian', 'german', 'hungarian', 'russian', 'ukrainian', 'finnish', 'bulgarian', 'latvian']; - if (options.genre) { - url += options.genre.toLowerCase() + '.json'; - } else { - if (options.keywords) { - url += 'search.json?query=' + options.keywords; - } else { - url += 'popular.json'; - } - } - - if (options.page && options.page.match(/\d+/)) { - var str = url.match(/\?/) ? '&' : '?'; - url += str + 'page=' + options.page; - } - - var MovieTorrentCollection = Backbone.Collection.extend({ - url: url, - model: App.Model.Movie, - parse: function (data) { - - var movies = []; - - data.movies.forEach(function (movie) { - - var videos = {}; - var torrents = {}; - torrent = ''; - quality = ''; - var subtitles = {}; - - // Put the video and torrent list into a {quality: url} format - for( var k in movie.videos ) { - if( typeof videos[movie.videos[k].quality] == 'undefined' ) { - videos[movie.videos[k].quality] = movie.videos[k].url; - } - } - - for( var k in movie.torrents ) { - if( typeof torrents[movie.torrents[k].quality] == 'undefined' ) { - torrents[movie.torrents[k].quality] = movie.torrents[k].url; - } - } - - // Pick the worst quality by default - if( typeof torrents['720p'] != 'undefined' ){ quality = '720p'; torrent = torrents['720p']; } - else if( typeof torrents['1080p'] != 'undefined' ){ quality = '1080p'; torrent = torrents['1080p']; } - - for( var k in movie.subtitles ) { - if( supportedLanguages.indexOf(movie.subtitles[k].language) < 0 ){ continue; } - if( typeof subtitles[movie.subtitles[k].language] == 'undefined' ) { - subtitles[movie.subtitles[k].language] = movie.subtitles[k].url; - } - } - - if( (typeof movie.subtitles == 'undefined' || movie.subtitles.length == 0) && (typeof movie.videos == 'undefined' || movie.videos.length == 0) ){ return; } - - movies.push({ - imdb: movie.imdb_id, - title: movie.title, - year: movie.year, - runtime: movie.runtime, - synopsis: movie.synopsis, - voteAverage:movie.vote_average, - - image: movie.poster, - bigImage: movie.poster, - backdrop: movie.backdrop, - - quality: quality, - torrent: torrent, - torrents: torrents, - videos: videos, - subtitles: subtitles, - seeders: movie.seeders, - leechers: movie.leechers - }); - }); - - return movies; - } - }); - - return new MovieTorrentCollection(); -}; diff --git a/js/frontend/views/listview.js b/js/frontend/views/listview.js index 78238b77..9174589f 100644 --- a/js/frontend/views/listview.js +++ b/js/frontend/views/listview.js @@ -15,12 +15,8 @@ App.View.MovieList = Backbone.View.extend({ // Bind element on existing list this.$el = $('.movie-list').first(); - this.collection = App.getTorrentsCollection(options); - - this.collection.fetch(); - - this.listenTo(this.collection, 'sync', this.render); - this.listenTo(this.collection, 'rottenloaded', this.render); + this.listenTo(this.model, 'sync', this.render); + this.listenTo(this.model, 'rottenloaded', this.render); }, empty: function () { @@ -34,14 +30,14 @@ App.View.MovieList = Backbone.View.extend({ App.loader(false); } - if (this.collection.length === 0) { + if (this.model.length === 0) { return this.empty(); } var movieList = this; - $.each(this.collection.models, function (index) { + $.each(this.model.models, function (index) { // Only append not yet appended elements this.view.render(); From 1be8a05d1a399145c469ac625fe88ddf13c01873 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:17:22 -0400 Subject: [PATCH 14/23] Add Yts scraper --- js/frontend/scrapers/foo.js | 6 +++ js/frontend/scrapers/scrapers.js | 1 + js/frontend/scrapers/subapi.js | 91 ++++++++++++++++++++++++++++++++ js/frontend/scrapers/yts.js | 73 +++++++++++++++++++++++++ 4 files changed, 171 insertions(+) create mode 100644 js/frontend/scrapers/foo.js create mode 100644 js/frontend/scrapers/scrapers.js create mode 100644 js/frontend/scrapers/subapi.js create mode 100644 js/frontend/scrapers/yts.js diff --git a/js/frontend/scrapers/foo.js b/js/frontend/scrapers/foo.js new file mode 100644 index 00000000..be950fbe --- /dev/null +++ b/js/frontend/scrapers/foo.js @@ -0,0 +1,6 @@ +var Foo = Backbone.Collection.extend({ + model: App.Model.Movie, + url: 'http://foo' +}); + +App.Scrapers.Foo = Foo; \ No newline at end of file diff --git a/js/frontend/scrapers/scrapers.js b/js/frontend/scrapers/scrapers.js new file mode 100644 index 00000000..5e426037 --- /dev/null +++ b/js/frontend/scrapers/scrapers.js @@ -0,0 +1 @@ +App.currentScrapper = App.Scrapers.Yts; \ No newline at end of file diff --git a/js/frontend/scrapers/subapi.js b/js/frontend/scrapers/subapi.js new file mode 100644 index 00000000..4766e83b --- /dev/null +++ b/js/frontend/scrapers/subapi.js @@ -0,0 +1,91 @@ +var url = 'http://subapi.com/'; + +var supportedLanguages = ['english', 'french', 'dutch', 'portuguese', 'romanian', 'spanish', 'turkish', 'brazilian', + 'italian', 'german', 'hungarian', 'russian', 'ukrainian', 'finnish', 'bulgarian', 'latvian']; + +var SubApi = Backbone.Collection.extend({ + url: url, + model: App.Model.Movie, + + initialize: function(models, options) { + if (options.genre) { + this.url += options.genre.toLowerCase() + '.json'; + } else { + if (options.keywords) { + this.url += 'search.json?query=' + options.keywords; + } else { + this.url += 'popular.json'; + } + } + + if (options.page && options.page.match(/\d+/)) { + var str = this.url.match(/\?/) ? '&' : '?'; + this.url += str + 'page=' + options.page; + } + }, + + parse: function (data) { + + var movies = []; + + data.movies.forEach(function (movie) { + + var videos = {}; + var torrents = {}; + torrent = ''; + quality = ''; + var subtitles = {}; + + // Put the video and torrent list into a {quality: url} format + for( var k in movie.videos ) { + if( typeof videos[movie.videos[k].quality] == 'undefined' ) { + videos[movie.videos[k].quality] = movie.videos[k].url; + } + } + + for( var k in movie.torrents ) { + if( typeof torrents[movie.torrents[k].quality] == 'undefined' ) { + torrents[movie.torrents[k].quality] = movie.torrents[k].url; + } + } + + // Pick the worst quality by default + if( typeof torrents['720p'] != 'undefined' ){ quality = '720p'; torrent = torrents['720p']; } + else if( typeof torrents['1080p'] != 'undefined' ){ quality = '1080p'; torrent = torrents['1080p']; } + + for( var k in movie.subtitles ) { + if( supportedLanguages.indexOf(movie.subtitles[k].language) < 0 ){ continue; } + if( typeof subtitles[movie.subtitles[k].language] == 'undefined' ) { + subtitles[movie.subtitles[k].language] = movie.subtitles[k].url; + } + } + + if( (typeof movie.subtitles == 'undefined' || movie.subtitles.length == 0) && (typeof movie.videos == 'undefined' || movie.videos.length == 0) ){ return; } + + movies.push({ + imdb: movie.imdb_id, + title: movie.title, + year: movie.year, + runtime: movie.runtime, + synopsis: movie.synopsis, + voteAverage:movie.vote_average, + + image: movie.poster, + bigImage: movie.poster, + backdrop: movie.backdrop, + + quality: quality, + torrent: torrent, + torrents: torrents, + videos: videos, + subtitles: subtitles, + seeders: movie.seeders, + leechers: movie.leechers + }); + }); + + return movies; + } +}); + +App.Scrapers.SubApi = SubApi; \ No newline at end of file diff --git a/js/frontend/scrapers/yts.js b/js/frontend/scrapers/yts.js new file mode 100644 index 00000000..b1dcf306 --- /dev/null +++ b/js/frontend/scrapers/yts.js @@ -0,0 +1,73 @@ +var url = 'http://yts.re/api/list.json?sort=seeds&limit=50'; + +var Yts = Backbone.Collection.extend({ + url: url, + model: App.Model.Movie, + + initialize: function(models, options) { + if (options.keywords) { + this.url += '&keywords=' + options.keywords; + } + + if (options.genre) { + this.url += '&genre=' + options.genre; + } + + if (options.page && options.page.match(/\d+/)) { + this.url += '&set=' + options.page; + } + }, + + parse: function (data) { + var movies = [], + memory = {}; + + if (data.error || typeof data.MovieList === 'undefined') { + return movies; + } + + data.MovieList.forEach(function (movie) { + // No imdb, no movie. + if( typeof movie.ImdbCode != 'string' || movie.ImdbCode.replace('tt', '') == '' ){ return; } + + // Temporary object + var movieModel = { + imdb: movie.ImdbCode.replace('tt', ''), + coverImage: movie.CoverImage, + year: movie.MovieYear, + title: movie.MovieTitleClean, + torrent: movie.TorrentUrl, + torrents: {}, + quality: movie.Quality, + seeders: movie.TorrentSeeds, + leechers: movie.TorrentPeers + }; + + var stored = memory[movieModel.imdb]; + + // Create it on memory map if it doesn't exist. + if (typeof stored === 'undefined') { + stored = memory[movieModel.imdb] = movieModel; + } + + if (stored.quality !== movieModel.quality && movieModel.quality === '720p') { + stored.torrent = movieModel.torrent; + stored.quality = '720p'; + } + + // Set it's correspondent quality torrent URL. + stored.torrents[movie.Quality] = movie.TorrentUrl; + + // Push it if not currently on array. + if (movies.indexOf(stored) === -1) { + movies.push(stored); + } + }); + + console.log('Torrents found:', data.MovieList.length); + + return movies; + } +}); + +App.Scrapers.Yts = Yts; \ No newline at end of file From 8e57f004542a1dc57935a0259085bbd4fe1f58a8 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:18:14 -0400 Subject: [PATCH 15/23] Remove broken updater --- js/updater.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 js/updater.js diff --git a/js/updater.js b/js/updater.js deleted file mode 100644 index 3b8f1e20..00000000 --- a/js/updater.js +++ /dev/null @@ -1,34 +0,0 @@ - -// Check if there's a newer version and shows a prompt if that's the case -var checkForUpdates = function() { - var http = require('http'); - - var currentOs = getOperatingSystem(); - // We may want to change this in case the detection fails - if( ! currentOs ){ return; } - - http.get(Settings.get('updateNotificationUrl'), function(res){ - var data = ''; - res.on('data', function(chunk){ data += chunk; }); - - res.on('end', function(){ - try { - var updateInfo = JSON.parse(data); - } catch(e){ return; } - - if( ! updateInfo ){ return; } - - if( updateInfo[currentOs].version > Settings.get('version') ) { - // Check if there's a newer version and show the update notification - $('#notification').html( - i18n.__('UpgradeVersionDescription', updateInfo[currentOs].versionName) + - ' '+ i18n.__('UpgradeVersion') + '' - ); - $('body').addClass('has-notification'); - } - }); - - }) -}; - -checkForUpdates(); From 5d446c042474c2606b7be838a704db2455e54dab Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:19:05 -0400 Subject: [PATCH 16/23] Disable tracking --- js/tracking.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/tracking.js b/js/tracking.js index 9c03536a..562fcc7e 100644 --- a/js/tracking.js +++ b/js/tracking.js @@ -1,6 +1,7 @@ // Tracking var getTrackingId = function(){ - + // Disable tracking TODO: Remove all tracking code + return null; var clientId = Settings.get('trackingId'); if( typeof clientId == 'undefined' || clientId == null || clientId == '' ) { @@ -82,9 +83,9 @@ else if( typeof __isUpgradeInstall != 'undefined' && __isUpgradeInstall == true // Todo: Remove Upgrade in the next version to prevent double counting of device stats (we'd send stats once per version) -if( (typeof __isNewInstall != 'undefined' && __isNewInstall == true) || +if( (typeof __isNewInstall != 'undefined' && __isNewInstall == true) || (typeof __isUpgradeInstall != 'undefined' && __isUpgradeInstall == true) ) { - + // General Device Stats userTracking.event('Device Stats', 'Version', Settings.get('version') + (isDebug ? '-debug' : '') ).send(); userTracking.event('Device Stats', 'Type', getOperatingSystem().capitalize()).send(); From bf2938c14298a59b0c8e30d30033f5d032b29050 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:19:31 -0400 Subject: [PATCH 17/23] Remove updater.js reference --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index cf5b5b34..9b09cc63 100644 --- a/index.html +++ b/index.html @@ -174,7 +174,6 @@

<%= i18n.__('subtitledIn') %>

- From 414322ac1e43be00f31176834d623155880d98a7 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:26:02 -0400 Subject: [PATCH 18/23] Add yts scraper --- index.html | 2 +- js/tracking.js | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/index.html b/index.html index fd2d93ad..f3c78d12 100644 --- a/index.html +++ b/index.html @@ -207,7 +207,7 @@

<%= i18n.__('subtitledIn') %>

- + diff --git a/js/tracking.js b/js/tracking.js index 562fcc7e..fbb2d29f 100644 --- a/js/tracking.js +++ b/js/tracking.js @@ -26,9 +26,6 @@ var getTrackingId = function(){ return clientId; }; -var ua = require('universal-analytics'); - - if( getTrackingId() == null ) { // Don't report anything if we don't have a trackingId var dummyMethod = function(){ return {send:function(){}}; }; From c43d596bc21b95d0da6e4f05c45900e376ad9d12 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 16:35:42 -0400 Subject: [PATCH 19/23] Updated movie parsing with last beta --- js/frontend/scrapers/yts.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/js/frontend/scrapers/yts.js b/js/frontend/scrapers/yts.js index b1dcf306..e9841e84 100644 --- a/js/frontend/scrapers/yts.js +++ b/js/frontend/scrapers/yts.js @@ -30,15 +30,27 @@ var Yts = Backbone.Collection.extend({ // No imdb, no movie. if( typeof movie.ImdbCode != 'string' || movie.ImdbCode.replace('tt', '') == '' ){ return; } + var torrents = {}; + torrents[movie.Quality] = movie.TorrentUrl; + // Temporary object var movieModel = { imdb: movie.ImdbCode.replace('tt', ''), - coverImage: movie.CoverImage, - year: movie.MovieYear, title: movie.MovieTitleClean, - torrent: movie.TorrentUrl, - torrents: {}, + year: movie.MovieYear, + runtime: 0, + synopsis: "", + voteAverage:parseInt(movie.MovieRating, 10), + + image: movie.CoverImage, + bigImage: movie.CoverImage, + backdrop: "", + quality: movie.Quality, + torrent: movie.TorrentUrl, + torrents: torrents, + videos: {}, + subtitles: {}, seeders: movie.TorrentSeeds, leechers: movie.TorrentPeers }; From fd3189a09a9788aca616890231e950ded94df866 Mon Sep 17 00:00:00 2001 From: Daniel Faria Gomes Date: Fri, 14 Mar 2014 17:35:52 -0300 Subject: [PATCH 20/23] removing old popcorntime repository references --- js/frontend/player.js | 6 +++--- package.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/frontend/player.js b/js/frontend/player.js index e0e0ed0b..5bd10214 100644 --- a/js/frontend/player.js +++ b/js/frontend/player.js @@ -13,10 +13,10 @@ var playTorrent = window.playTorrent = function (torrent, subs, movieModel, call var numCores = (os.cpus().length > 0) ? os.cpus().length : 1; var numConnections = 100; - // Start Popcornflix (Peerflix) - var popcornflix = require('peerflix'); + // Start Peerflix + var peerflix = require('peerflix'); - videoStreamer = popcornflix(torrent, { + videoStreamer = peerflix(torrent, { // Set the custom temp file path: tmpFile, //port: 554, diff --git a/package.json b/package.json index 7205320f..48a72c87 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,13 @@ "name": "Popcorn-Time", "repository": { "type": "git", - "url": "https://github.com/popcorn-time/popcorn-app.git" + "url": "https://github.com/isra17/popcorn-app.git" }, "main": "app://host/index.html", "version": "0.2.0", "repository": { "type": "git", - "url": "https://github.com/popcorn-time/popcorn-app" + "url": "https://github.com/isra17/popcorn-app" }, "window": { "title": "Popcorn Time", @@ -32,7 +32,7 @@ "network-address" : "git+https://github.com/gpt-modules/network-address.git", "node-uuid" : "git+https://github.com/gpt-modules/node-uuid.git", "numeral" : "git+https://github.com/gpt-modules/numeral-js.git", - "popcornflix" : "git+https://github.com/popcorn-time/popcornflix.git", + "peerflix" : "git+https://github.com/mafintosh/peerflix.git", "request" : "git+https://github.com/gpt-modules/request.git", "universal-analytics" : "git+https://github.com/gpt-modules/universal-analytics.git", "url" : "git+https://github.com/gpt-modules/url.git", From f324731f2338960bdcef6f7c2d8b5b4bbcc05f62 Mon Sep 17 00:00:00 2001 From: Max McDonnell Date: Fri, 14 Mar 2014 18:22:01 -0400 Subject: [PATCH 21/23] Fix search and add support for larger images --- js/frontend/controllers/search.js | 2 +- js/frontend/scrapers/yts.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/frontend/controllers/search.js b/js/frontend/controllers/search.js index c3344e61..a2825d37 100644 --- a/js/frontend/controllers/search.js +++ b/js/frontend/controllers/search.js @@ -10,7 +10,7 @@ App.Controller.Search = function (searchTerm, page) { var Scrapper = App.currentScrapper; var movieCollection = new Scrapper([], { - searchTerm: searchTerm, + keywords: searchTerm, genre: null, page: page }); diff --git a/js/frontend/scrapers/yts.js b/js/frontend/scrapers/yts.js index e9841e84..a4df9226 100644 --- a/js/frontend/scrapers/yts.js +++ b/js/frontend/scrapers/yts.js @@ -43,7 +43,7 @@ var Yts = Backbone.Collection.extend({ voteAverage:parseInt(movie.MovieRating, 10), image: movie.CoverImage, - bigImage: movie.CoverImage, + bigImage: movie.CoverImage.replace(/_med\./, '_large.'), backdrop: "", quality: movie.Quality, From 788f179d6cda6b73ecd3627f61815dbb4b690e84 Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 18:41:22 -0400 Subject: [PATCH 22/23] Add moviedb to get metadata --- index.html | 3 ++- js/app.js | 3 ++- js/frontend/models/movie.js | 38 +++++++++-------------------- js/frontend/providers/themoviedb.js | 27 +++++++++++++++++--- js/frontend/scrapers/foo.js | 6 ----- js/frontend/scrapers/yts.js | 6 ++++- js/frontend/views/movie.js | 4 +-- js/frontend/views/sidebar.js | 3 ++- 8 files changed, 48 insertions(+), 42 deletions(-) delete mode 100644 js/frontend/scrapers/foo.js diff --git a/index.html b/index.html index f3c78d12..c43976b0 100644 --- a/index.html +++ b/index.html @@ -206,7 +206,8 @@

<%= i18n.__('subtitledIn') %>

- + + diff --git a/js/app.js b/js/app.js index 9c19e69c..64e94736 100644 --- a/js/app.js +++ b/js/app.js @@ -51,7 +51,8 @@ var App = { View: {}, Model: {}, Page: {}, - Scrapers: {} + Scrapers: {}, + Providers: {} }; // render header buttons diff --git a/js/frontend/models/movie.js b/js/frontend/models/movie.js index 2c8c1da9..c172f164 100644 --- a/js/frontend/models/movie.js +++ b/js/frontend/models/movie.js @@ -1,7 +1,7 @@ App.Model.Movie = Backbone.Model.extend({ buildBasicView: function () { - + var model = this; // This is mostly used for reporting @@ -11,7 +11,7 @@ App.Model.Movie = Backbone.Model.extend({ model.view = new App.View.MovieListItem({ model: model }); - + model.trigger('rottenloaded'); }, @@ -23,29 +23,6 @@ App.Model.Movie = Backbone.Model.extend({ return this.get('title'); }, - // DEPRECATED - setRottenInfo: function () { - var model = this; - - App.findMovieInfo(model.get('imdb'), function (data) { - - model.set('infoLoaded', true); - model.set('image', data.image); - model.set('bigImage', data.image); - model.set('backdrop', data.backdrop); - model.set('title', data.title); - model.set('synopsis', data.overview); - model.set('voteAverage', data.voteAverage); - model.set('runtime', data.runtime); - - model.view = new App.View.MovieListItem({ - model: model - }); - - model.trigger('rottenloaded'); - }); - }, - // DEPRECATED setSubtitles: function () { var model = this; @@ -61,10 +38,17 @@ App.Model.Movie = Backbone.Model.extend({ }); }, + fetchMissingData: function() { + if ( !this.get('hasMetadata') ) { + App.Providers.metadata.fetch(this); + } + if ( !this.get('hasSubtitle') ) { + App.Providers.subtitle.fetch(this); + } + }, + initialize: function () { this.buildBasicView(); - //this.setRottenInfo(); - //this.setSubtitles(); this.calculateTorrentHealth(); }, diff --git a/js/frontend/providers/themoviedb.js b/js/frontend/providers/themoviedb.js index eb1538b5..d1527865 100644 --- a/js/frontend/providers/themoviedb.js +++ b/js/frontend/providers/themoviedb.js @@ -1,15 +1,16 @@ // Fix for https://github.com/visionmedia/superagent/issues/95 +var windowBak = window; var mdb = require('moviedb')(vendorAPIs.themoviedb.key), POSTER_PREFIX = 'http://image.tmdb.org/t/p/w342/', BACKDROP_PREFIX = 'http://image.tmdb.org/t/p/original/', last = +new Date(); -App.findMovieInfo = function (imdbId, callback) { +var findMovieInfo = function (imdbId, callback) { var doRequest = function () { // 1 sec because limit is 3 calls every second, and we need to use 2. if (last > +new Date() - 1000) { return setTimeout(function () { - App.findMovieInfo(imdbId, callback); + findMovieInfo(imdbId, callback); }, new Date() - last + 1000); } @@ -67,4 +68,24 @@ App.findMovieInfo = function (imdbId, callback) { doRequest(); } }); -}; \ No newline at end of file +}; + +var MdbProvider = { + fetch: function(model) { + var imdbId = model.get('imdb'); + findMovieInfo(imdbId, function(info){ + model.set({ + title: info.title, + voteAverage:info.voteAverage, + synopsis: info.overview, + runtime: info.runtime, + + image: info.image, + bigImage: info.image, + backdrop: info.backdrop + }); + }); + } +}; + +App.Providers.metadata = MdbProvider; diff --git a/js/frontend/scrapers/foo.js b/js/frontend/scrapers/foo.js deleted file mode 100644 index be950fbe..00000000 --- a/js/frontend/scrapers/foo.js +++ /dev/null @@ -1,6 +0,0 @@ -var Foo = Backbone.Collection.extend({ - model: App.Model.Movie, - url: 'http://foo' -}); - -App.Scrapers.Foo = Foo; \ No newline at end of file diff --git a/js/frontend/scrapers/yts.js b/js/frontend/scrapers/yts.js index e9841e84..f0cdc912 100644 --- a/js/frontend/scrapers/yts.js +++ b/js/frontend/scrapers/yts.js @@ -52,7 +52,11 @@ var Yts = Backbone.Collection.extend({ videos: {}, subtitles: {}, seeders: movie.TorrentSeeds, - leechers: movie.TorrentPeers + leechers: movie.TorrentPeers, + + // YTS do not provide metadata and subtitle + hasMetadata:false, + hasSubtitle:true }; var stored = memory[movieModel.imdb]; diff --git a/js/frontend/views/movie.js b/js/frontend/views/movie.js index 05da9162..4dffdbae 100644 --- a/js/frontend/views/movie.js +++ b/js/frontend/views/movie.js @@ -3,11 +3,11 @@ App.View.MovieListItem = Marionette.ItemView.extend({ className: 'movie', model: App.Model.Movie, id: function() { - return 'movie-'+this.model.get('imdb') + return 'movie-'+this.model.get('imdb'); }, events: { - 'click a': 'select' + 'click a': 'select', }, initialize: function () { diff --git a/js/frontend/views/sidebar.js b/js/frontend/views/sidebar.js index 7e5c8333..5d4dbdbc 100644 --- a/js/frontend/views/sidebar.js +++ b/js/frontend/views/sidebar.js @@ -92,7 +92,8 @@ App.View.Sidebar = Backbone.View.extend({ load: function (model) { // TODO: QUEUE PLAY BUTTON - this.listenTo(model, 'change:subtitles', this.render); + this.listenTo(model, 'change', this.render); + model.fetchMissingData(); this.model = model; this.render(); From 80b694fa3419dd54e735d6ba72df49c83d245abf Mon Sep 17 00:00:00 2001 From: Israel Halle Date: Fri, 14 Mar 2014 19:06:27 -0400 Subject: [PATCH 23/23] Add dependancy patch --- README.md | 17 +++-------------- superagent-fix-node-webkit.patch | 8 ++++++++ 2 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 superagent-fix-node-webkit.patch diff --git a/README.md b/README.md index 3131798c..4bd59c46 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ To allow any computer user to watch movies easily streaming from torrents, witho ### Status Under development (RC1) for Mac OSX - Windows - Linux. - + ### APIs **Currently used:** @@ -33,9 +33,10 @@ You will need nodejs and grunt: ### Build -Install the node modules: +Install the node modules and fix dependancies issue: $ npm install + $ patch -p1 node_modules/moviedb/node_modules/superagent/index.js superagent-fix-node-webkit.patch Build with: @@ -53,18 +54,6 @@ You can also build for all platforms with: ## Any problem? -### Regarding superagent dependency -Due to [wrong browser verification](https://github.com/visionmedia/superagent/issues/95) on a dependency, this hard fix must be applied. -Replace `node_modules/moviedb/node_modules/superagent/index.js` contents with: -```javascript -// if (typeof window != 'undefined') { -// module.exports = require('./lib/superagent'); -// } else if (process.env.SUPERAGENT_COV) { -// module.exports = require('./lib-cov/node'); -// } else { - module.exports = require('./lib/node'); -// } -``` ### Regarding Video, MP4 H264 Playback - Info: https://github.com/rogerwang/node-webkit/wiki/Support-mp3-and-h264-in-video-and-audio-tag diff --git a/superagent-fix-node-webkit.patch b/superagent-fix-node-webkit.patch new file mode 100644 index 00000000..e65e8cbb --- /dev/null +++ b/superagent-fix-node-webkit.patch @@ -0,0 +1,8 @@ +--- node_modules/moviedb/node_modules/superagent/index.js 2012-10-09 11:48:42.000000000 -0400 ++++ node_modules-mod/moviedb/node_modules/superagent/index.js 2014-03-14 18:55:42.794616590 -0400 +@@ -1,4 +1,4 @@ +-if (typeof window != 'undefined') { ++if (typeof window != 'undefined' && !(typeof process != 'undefined' && process.versions['node-webkit'])) { + module.exports = require('./lib/superagent'); + } else if (process.env.SUPERAGENT_COV) { + module.exports = require('./lib-cov/node');