Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2751 commits
Select commit Hold shift + click to select a range
bb41b10
Make sure snatched colors are different
RuudBurger Jun 26, 2015
b3b9b93
Scroll logs to bottom
RuudBurger Jun 26, 2015
96cf3b0
Movie list descript button
RuudBurger Jun 26, 2015
cc9b82a
Add RARBG to torrent providers
fernandog Jun 29, 2015
cbd30f5
Merge pull request #5080 from DavidDeSloovere/patch-1
RuudBurger Jun 29, 2015
54dc576
Merge pull request #5076 from Grogdor/patch-2
RuudBurger Jun 29, 2015
e1cc8d0
Slack notifications.
kjagiello Jun 30, 2015
6cf3b5b
Corrected name of the required config parameter
kjagiello Jun 30, 2015
5a2de0f
Update renamer.py
Jul 3, 2015
734e420
Update base.py
Jul 3, 2015
6c5ee5d
Merge pull request #5093 from fernandog/add_rarbg
RuudBurger Jul 3, 2015
1209e09
Merge pull request #5105 from skarekrow/patch-2
RuudBurger Jul 3, 2015
1e64d1a
Merge pull request #5104 from skarekrow/patch-1
RuudBurger Jul 3, 2015
2156b0a
Merge pull request #5095 from kjagiello/develop
RuudBurger Jul 3, 2015
41cafdd
Ignore ssl verification errors
RuudBurger Jul 3, 2015
537dc2b
Merge branch 'develop' of github.com:RuudBurger/CouchPotatoServer int…
RuudBurger Jul 3, 2015
195a476
Merge branch 'develop' into redesign
RuudBurger Jul 3, 2015
4e6ab1a
Update pyasn1
RuudBurger Jul 3, 2015
71bb7e7
Update requests
RuudBurger Jul 3, 2015
1539931
Use chardet from libs
RuudBurger Jul 3, 2015
9026afb
Cleanup rarbg provider
RuudBurger Jul 3, 2015
a7cd242
Merge branch 'develop' into redesign
RuudBurger Jul 3, 2015
8ebd410
Optimize import
RuudBurger Jul 3, 2015
7e95a36
ndg httpsclient lib
RuudBurger Jul 3, 2015
d4a8eba
Merge branch 'develop' into redesign
RuudBurger Jul 3, 2015
82a1cb5
Update packages
RuudBurger Jul 3, 2015
1731789
Working delete button
RuudBurger Jul 3, 2015
43fc43b
Mass edit popup
RuudBurger Jul 3, 2015
eb55cb7
Only show checkbox on hover
RuudBurger Jul 7, 2015
abce313
User proper cookie for listings
RuudBurger Jul 7, 2015
84d0e7d
Also show checkbox on thumbnails
RuudBurger Jul 7, 2015
94b7ca4
Mass edit animated bar
RuudBurger Jul 8, 2015
68a0531
Managed files styling
RuudBurger Jul 8, 2015
d8df8c3
ETA
RuudBurger Jul 8, 2015
7013e81
Suggestions rating stars
RuudBurger Jul 8, 2015
fc34094
Revert debug code
RuudBurger Jul 8, 2015
75572e2
Removed RottenTomatoes automation
RuudBurger Jul 9, 2015
a9dc443
Updated Hadouken downloader to support both v4 and v5.
vktr Jul 9, 2015
cc7b446
Combine javascript files
RuudBurger Jul 9, 2015
7b8b4ef
Charts
RuudBurger Jul 13, 2015
c2b7353
Cache suggestions images
RuudBurger Jul 15, 2015
27b8c98
Fix scanning of DVD (VIDEO_TS) files
h3llrais3r Jul 16, 2015
2e0d87c
Style login page
RuudBurger Jul 17, 2015
0e7b787
Simplify mixin loading
RuudBurger Jul 17, 2015
24d9c37
Merge branch 'redesign' of github.com:RuudBurger/CouchPotatoServer in…
RuudBurger Jul 18, 2015
8bbe4b3
Charts listing on dashboard
RuudBurger Jul 19, 2015
0d9eec2
Don't refresh suggestion on add from chart listings
RuudBurger Jul 19, 2015
e6e3ce3
Merge pull request #5150 from h3llrais3r/develop
RuudBurger Jul 19, 2015
a2e6297
Merge branch 'develop' into redesign
RuudBurger Jul 19, 2015
13dce85
Var typo
RuudBurger Jul 19, 2015
866896f
Cache chart listing per provider
RuudBurger Jul 20, 2015
5610010
Use different shell runner
RuudBurger Jul 20, 2015
4ee48ba
Remove log
RuudBurger Jul 20, 2015
96e8496
Loading flashing when not needed
RuudBurger Jul 20, 2015
2bb1c10
Search in_wanted styling
RuudBurger Jul 22, 2015
9479611
Add movie styling in movie details
RuudBurger Jul 22, 2015
c2120ad
Mobile IE fixes
RuudBurger Jul 22, 2015
1b3e837
Chrome and iOS fixes
RuudBurger Jul 23, 2015
b1b269e
ETA date not working on Safari
RuudBurger Jul 23, 2015
a52a686
Menu icons cut-off on iOS
RuudBurger Jul 23, 2015
a514e7d
Content overflow hiding back button on webkit
RuudBurger Jul 23, 2015
96a5c23
Use element for delegated click event
RuudBurger Jul 23, 2015
0bd8eb9
Disable hover on correct element
RuudBurger Jul 23, 2015
f4f1fd7
Content cutoff on scroll
RuudBurger Jul 24, 2015
c8e4111
Content scrolling slow on mobiel
RuudBurger Jul 24, 2015
8f54638
Search not triggered on mobile
RuudBurger Jul 24, 2015
b44a18a
Add Emby notifications
josh4trunks Aug 2, 2015
49f6eb4
Package update
RuudBurger Aug 7, 2015
2abd0c6
Nicer size
RuudBurger Aug 7, 2015
8390869
Allow bigger size label
RuudBurger Aug 7, 2015
2a2d05e
Show advanced toggle not working anymore
RuudBurger Aug 7, 2015
ba5483c
Simplify the wizard
RuudBurger Aug 7, 2015
5b4b08c
Don't do scroll detection in dev mode
RuudBurger Aug 7, 2015
a254496
Add support for HTTP proxies
mescon Aug 8, 2015
6c0e1ab
Settings update
RuudBurger Aug 8, 2015
53f400c
Merge branch 'redesign' of github.com:RuudBurger/CouchPotatoServer in…
RuudBurger Aug 8, 2015
38fa045
Build css and js
RuudBurger Aug 8, 2015
4e57311
Show rating on charts also
RuudBurger Aug 10, 2015
3f3cd07
Whitespace fixes
RuudBurger Aug 10, 2015
3551db8
Mark as done
RuudBurger Aug 10, 2015
9f92a2a
Merge pull request #5122 from vktr/feature/update-hadouken-integration
RuudBurger Aug 10, 2015
483f7d1
Merge pull request #5204 from mescon/develop
RuudBurger Aug 10, 2015
58a90c0
Only get proxy settings when enabled
RuudBurger Aug 10, 2015
f198899
Merge branch 'develop' into redesign
RuudBurger Aug 10, 2015
2345e5e
Merge pull request #4970 from git-jimroberts2/develop
RuudBurger Aug 10, 2015
8bce15e
Navigation ripple contain
RuudBurger Aug 10, 2015
aef2f3f
IE Fixes
RuudBurger Aug 10, 2015
a93aac9
Limit suggestions
RuudBurger Aug 10, 2015
a4b062d
Don't return suggestions if there aren't any left
RuudBurger Aug 10, 2015
a6946df
Rename XBMC labels to Kodi
RuudBurger Aug 10, 2015
ef1eedb
Merge branch 'develop' into redesign
RuudBurger Aug 11, 2015
ec9ce4b
Clean tmp folder on load
RuudBurger Aug 11, 2015
6ef9e61
Kinda styled the manual folder renamer
RuudBurger Aug 11, 2015
1e73af7
Remove Form replacements
RuudBurger Aug 11, 2015
2e92034
Optimize movie inject
RuudBurger Aug 11, 2015
0601b70
Don't catch error in develop mode
RuudBurger Aug 12, 2015
9864cb0
Hide poster so image isn't loaded
RuudBurger Aug 12, 2015
0f413b4
Empty manage
RuudBurger Aug 12, 2015
6442eb7
Adopt > grab
RuudBurger Aug 12, 2015
4c5d127
Posters
RuudBurger Aug 12, 2015
e1e3c49
Try TheMovieDB poster first for suggestions and charts
RuudBurger Aug 12, 2015
20cc5ab
Don't use empty list as dict
RuudBurger Aug 12, 2015
1f87d39
Merge pull request #5187 from josh4trunks/emby_notify
RuudBurger Aug 12, 2015
acac9d4
Add warning if LXML isn't installed if running from source
RuudBurger Aug 12, 2015
575d56a
Kickass Proxy
RuudBurger Aug 12, 2015
a3441f6
Use https base url if cert and key has been set
RuudBurger Aug 12, 2015
c66891f
Update NZBClub rss
RuudBurger Aug 12, 2015
e603054
Return empty list when no releases found
RuudBurger Aug 12, 2015
656b130
Skip if no media_id is set for release
RuudBurger Aug 12, 2015
057394f
Don't loop over nonetype
RuudBurger Aug 12, 2015
3483b97
Movie list buttons not visible
RuudBurger Aug 12, 2015
9a71b0e
stop propagation
RuudBurger Aug 12, 2015
d540199
Remove yify
RuudBurger Aug 14, 2015
7222aec
Overwrite force re-add parameter
RuudBurger Aug 18, 2015
8ef106a
Make dereferer editable
RuudBurger Aug 18, 2015
9afc538
Remove trailing seperator when setting directory in Transmission
RuudBurger Aug 18, 2015
24ad054
Alternative docker file
RuudBurger Aug 18, 2015
4ba7387
SAB fail when no ids are returned
RuudBurger Aug 19, 2015
0061e6f
Merge pull request #5075 from Grogdor/patch-1
RuudBurger Aug 19, 2015
61b7f05
Merge branch 'develop' into redesign
RuudBurger Aug 19, 2015
c1fa314
Merge pull request #5208 from gitter-badger/gitter-badge
Aug 11, 2015
163b79a
Development description
RuudBurger Aug 19, 2015
3c57965
Use env if available
RuudBurger Aug 19, 2015
94a7b59
Don't need build tools if you only add .py files
RuudBurger Aug 19, 2015
03b0407
Ignore env dir
RuudBurger Aug 19, 2015
3711842
TMDB https
RuudBurger Aug 19, 2015
7fa4bc5
Requests update
RuudBurger Aug 19, 2015
8b0c392
Dependencies warnings
RuudBurger Aug 19, 2015
fe8f461
Log filtering not working
RuudBurger Aug 19, 2015
54224bd
Update DB lib
RuudBurger Aug 19, 2015
c7491df
Delete corrupted release items
RuudBurger Aug 19, 2015
f8af8a9
Do a compact every 7 days
RuudBurger Aug 19, 2015
01be3f3
Don't merge js and css files
RuudBurger Aug 19, 2015
8f9aafa
Sort images for poster
RuudBurger Aug 20, 2015
595654b
Layout tweaks
RuudBurger Aug 21, 2015
47bca33
Search on home
RuudBurger Aug 21, 2015
3e4e1a5
Big search
RuudBurger Aug 23, 2015
a23fadb
SABnzbd fails on id check
RuudBurger Aug 23, 2015
04d9d8d
Merge pull request #5041 from jonnyboy/develop
RuudBurger Aug 24, 2015
843d771
Kickass failed searching
RuudBurger Aug 24, 2015
ee23067
Merge branch 'develop' of github.com:RuudBurger/CouchPotatoServer int…
RuudBurger Aug 24, 2015
5314fc7
Log cleanup
RuudBurger Aug 24, 2015
76cd7d7
Nice movie scanning progress
RuudBurger Aug 24, 2015
6cac91c
Clearer overlay
RuudBurger Aug 24, 2015
c790b1e
Don't show title on suggestion add
RuudBurger Aug 24, 2015
69fb89d
Add menu button
RuudBurger Aug 24, 2015
1c20e97
IE/Edge fixes
RuudBurger Aug 25, 2015
cf4dd41
Log report fixes
RuudBurger Aug 25, 2015
9dc4708
Optimize search UI
RuudBurger Aug 25, 2015
ec68e42
Move suggestion class
RuudBurger Aug 25, 2015
d7e88d3
Remove old CSS
RuudBurger Aug 25, 2015
414f63b
Responsive movie details header
RuudBurger Aug 25, 2015
b3c7155
Userscript styling
RuudBurger Aug 25, 2015
d19a6cf
Userscript popup styling
RuudBurger Aug 25, 2015
fbceb38
Userscript fixes and tests
RuudBurger Aug 25, 2015
30ced68
Nice userscript message on empty list
RuudBurger Aug 25, 2015
f9393a1
Flexbox IE bug
RuudBurger Aug 25, 2015
74bc950
Update user agent
RuudBurger Aug 26, 2015
3a8ce97
Add TPB proxies
RuudBurger Aug 26, 2015
e050742
Don't run test on load
RuudBurger Aug 26, 2015
feecba8
Log provider on download
RuudBurger Aug 26, 2015
ca94512
Force view
RuudBurger Aug 26, 2015
6bff272
Maximum width on thumbnails
RuudBurger Aug 26, 2015
d11ba10
Don't use flexbox for thumbnail view
RuudBurger Aug 26, 2015
dee84c0
Suggestion & Charts cleanup
RuudBurger Aug 26, 2015
f300fc2
Show ETA and genres in movie details
RuudBurger Aug 26, 2015
9027599
Delete icons missing for category and profiles
RuudBurger Aug 26, 2015
cac3209
Userscript gif on next line
RuudBurger Aug 26, 2015
8ffdcf6
Collapse hint on next line when needed
RuudBurger Aug 26, 2015
7c5f3eb
Indentation
RuudBurger Aug 26, 2015
ccd0cef
Hint icons missing
RuudBurger Aug 26, 2015
84e2209
Hint for non h2 items
RuudBurger Aug 26, 2015
546e43c
Show view icon it's switching to
RuudBurger Aug 26, 2015
230d5c0
Actions blocked movie detail button
RuudBurger Aug 26, 2015
c8560b0
Hide mass edit on mobile
RuudBurger Aug 26, 2015
72b8c3e
Hide movie count on tablet and down
RuudBurger Aug 26, 2015
8b79dd7
Wobble origin
RuudBurger Aug 26, 2015
0c1c6bf
Pushbullet not working when no device added
RuudBurger Aug 26, 2015
cd1350c
Trakt userscript url change
RuudBurger Aug 26, 2015
4dc1e64
Hover on row when enabler is active
RuudBurger Aug 26, 2015
68102b8
Update popularmovies.py
ebewo Aug 26, 2015
07321e9
Make sure movie detail element are put in GPU layer
RuudBurger Aug 26, 2015
c987313
Failed trailer search, don't show trailer container
RuudBurger Aug 26, 2015
f560a05
Merge pull request #5287 from ebewo/patch-1
RuudBurger Aug 26, 2015
877b363
Put actions below when they don't fit
RuudBurger Aug 26, 2015
8e7fcdb
Mediatotals not matching
RuudBurger Aug 27, 2015
2c41c38
Revert "Mediatotals not matching"
RuudBurger Aug 27, 2015
90cdf31
Move charts dict to IMDBBase
RuudBurger Aug 27, 2015
dad8feb
iOS overflow bug
RuudBurger Aug 27, 2015
fc2585c
Force add actions on detail open
RuudBurger Aug 27, 2015
43b607b
count shows 1 movie
RuudBurger Aug 27, 2015
74f9d71
Settings mobile padding
RuudBurger Aug 27, 2015
d88f77e
Navigation outside of scroll container
RuudBurger Aug 27, 2015
3f866a3
Don't trigger hover on mobile
RuudBurger Aug 27, 2015
d6a9945
"will-change" css
RuudBurger Aug 27, 2015
0162d6a
Text overflow cutting of characters
RuudBurger Aug 27, 2015
6174e49
Update dynamics
RuudBurger Aug 27, 2015
c2d58dc
Updater message at bottom
RuudBurger Aug 27, 2015
cd98374
Logs on mobile
RuudBurger Aug 27, 2015
cea379b
Wrong indentation and log arguments
RuudBurger Aug 27, 2015
1130de9
Don't scale hitarea
RuudBurger Aug 27, 2015
c8ff637
Rounded corner not visible
RuudBurger Aug 27, 2015
9bed702
Overlay opacity transition
RuudBurger Aug 28, 2015
276c412
Maximum trailer height
RuudBurger Aug 28, 2015
59c6808
Close movie details on navigation
RuudBurger Aug 28, 2015
54d3158
Checkbox state missing
RuudBurger Aug 28, 2015
fc74ad0
Release status element class not properly called
RuudBurger Aug 28, 2015
780f24f
Update README with ansible instructions
parberge Aug 28, 2015
4179040
Auto refresh Trakt token
RuudBurger Aug 29, 2015
8307c9e
Category rename folder styling
RuudBurger Aug 29, 2015
ee742cd
Merge pull request #5312 from peerster/update-readme
RuudBurger Aug 29, 2015
3d61851
Optimize trailer load
RuudBurger Aug 29, 2015
e7cead7
Search fixes
RuudBurger Aug 29, 2015
b433ea4
Merge branch 'develop' of github.com:RuudBurger/CouchPotatoServer int…
RuudBurger Aug 29, 2015
50d9aff
Remove unused scrollspy
RuudBurger Aug 29, 2015
b89d2e8
Optimize movie detail animation
RuudBurger Aug 29, 2015
6195ba8
requestTimeout
RuudBurger Aug 29, 2015
f7bb736
Home search icon over text
RuudBurger Aug 29, 2015
9d726c2
Don't clear movie element, but inner
RuudBurger Aug 29, 2015
59b736e
Ripple will-change
RuudBurger Aug 29, 2015
8ba8328
Animation not always started
RuudBurger Aug 29, 2015
bdcd8de
Remove torrentcache services
RuudBurger Aug 30, 2015
807a159
Fade in trailer image
RuudBurger Aug 30, 2015
7f390c5
Dark theme
RuudBurger Aug 30, 2015
5155789
Remove unused chart styling
RuudBurger Aug 30, 2015
4c701a8
Dark theme login
RuudBurger Aug 30, 2015
5ceaff6
Movie details header color
RuudBurger Aug 30, 2015
7fdaf50
Update trakt description
parberge Aug 30, 2015
c64bb38
Merge pull request #5335 from peerster/update-trakt
RuudBurger Aug 30, 2015
04f20cb
Gimme gimme
RuudBurger Aug 31, 2015
6e54c46
Dark theme blue
RuudBurger Aug 31, 2015
d82274e
Change dereferer default to nullrefer.com
SathyaBhat Aug 31, 2015
cde1565
Question button
RuudBurger Aug 31, 2015
6d29226
Merge pull request #5343 from SathyaBhat/develop
RuudBurger Aug 31, 2015
e9575b9
Quality background
RuudBurger Sep 1, 2015
fab356e
Hover styling
RuudBurger Sep 1, 2015
19234be
Vertical align more menu
RuudBurger Sep 1, 2015
5f249a1
Add Telegram notification provider
sandler31 Sep 1, 2015
2c3730b
Add FLV extension to movie scanner plugin.
sunsea Sep 2, 2015
b976c4e
Merge pull request #5367 from sunsea/develop
RuudBurger Sep 3, 2015
fc765c7
Merge pull request #5358 from sandler31/develop
RuudBurger Sep 3, 2015
12c788f
App cache
RuudBurger Sep 3, 2015
ddcc986
Userscript gif loaded when not needed
RuudBurger Sep 3, 2015
1972c2e
Unused images
RuudBurger Sep 3, 2015
0be6704
Menu popop items
RuudBurger Sep 3, 2015
f129e80
appcache fonts
RuudBurger Sep 4, 2015
46867a9
Webapp icons
RuudBurger Sep 4, 2015
60fd1ba
Proper font url
RuudBurger Sep 4, 2015
73a31c0
Don't cache on dev
RuudBurger Sep 4, 2015
40cdb08
Menu hover color
RuudBurger Sep 4, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_style = space

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*.pyc
/data/
/_env/
/_source/
.project
.pydevproject
node_modules
.tmp
28 changes: 17 additions & 11 deletions CouchPotato.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
from logging import handlers
from os.path import dirname
import logging
Expand All @@ -9,7 +10,6 @@
import subprocess
import sys
import traceback
import time

# Root path
base_path = dirname(os.path.abspath(__file__))
Expand All @@ -18,7 +18,12 @@
sys.path.insert(0, os.path.join(base_path, 'libs'))

from couchpotato.environment import Env
from couchpotato.core.helpers.variable import getDataDir
from couchpotato.core.helpers.variable import getDataDir, removePyc


# Remove pyc files before dynamic load (sees .pyc files regular .py modules)
removePyc(base_path)


class Loader(object):

Expand All @@ -28,7 +33,7 @@ def __init__(self):

# Get options via arg
from couchpotato.runner import getOptions
self.options = getOptions(base_path, sys.argv[1:])
self.options = getOptions(sys.argv[1:])

# Load settings
settings = Env.get('settings')
Expand All @@ -49,7 +54,7 @@ def __init__(self):
# Create logging dir
self.log_dir = os.path.join(self.data_dir, 'logs');
if not os.path.isdir(self.log_dir):
os.mkdir(self.log_dir)
os.makedirs(self.log_dir)

# Logging
from couchpotato.core.logger import CPLog
Expand All @@ -66,10 +71,11 @@ def addSignals(self):
signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(1))

from couchpotato.core.event import addEvent
addEvent('app.after_shutdown', self.afterShutdown)
addEvent('app.do_shutdown', self.setRestart)

def afterShutdown(self, restart):
def setRestart(self, restart):
self.do_restart = restart
return True

def onExit(self, signal, frame):
from couchpotato.core.event import fireEvent
Expand Down Expand Up @@ -97,7 +103,6 @@ def restart(self):

# Release log files and shutdown logger
logging.shutdown()
time.sleep(3)

args = [sys.executable] + [os.path.join(base_path, os.path.basename(__file__))] + sys.argv[1:]
subprocess.Popen(args)
Expand Down Expand Up @@ -132,14 +137,15 @@ def runAsDaemon(self):
pass
except SystemExit:
raise
except socket.error as (nr, msg):
except socket.error as e:
# log when socket receives SIGINT, but continue.
# previous code would have skipped over other types of IO errors too.
nr, msg = e
if nr != 4:
try:
l.log.critical(traceback.format_exc())
except:
print traceback.format_exc()
print(traceback.format_exc())
raise
except:
try:
Expand All @@ -148,7 +154,7 @@ def runAsDaemon(self):
if l:
l.log.critical(traceback.format_exc())
else:
print traceback.format_exc()
print(traceback.format_exc())
except:
print traceback.format_exc()
print(traceback.format_exc())
raise
199 changes: 199 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
'use strict';

module.exports = function(grunt){
require('jit-grunt')(grunt);
require('time-grunt')(grunt);

grunt.loadNpmTasks('grunt-shell-spawn');

// Configurable paths
var config = {
python: grunt.file.exists('./_env/bin/python') ? './_env/bin/python' : 'python',
tmp: '.tmp',
base: 'couchpotato',
css_dest: 'couchpotato/static/style/combined.min.css',
scripts_vendor_dest: 'couchpotato/static/scripts/combined.vendor.min.js',
scripts_base_dest: 'couchpotato/static/scripts/combined.base.min.js',
scripts_plugins_dest: 'couchpotato/static/scripts/combined.plugins.min.js'
};

var vendor_scripts_files = [
'couchpotato/static/scripts/vendor/mootools.js',
'couchpotato/static/scripts/vendor/mootools_more.js',
'couchpotato/static/scripts/vendor/Array.stableSort.js',
'couchpotato/static/scripts/vendor/history.js',
'couchpotato/static/scripts/vendor/dynamics.js',
'couchpotato/static/scripts/vendor/fastclick.js',
'couchpotato/static/scripts/vendor/requestAnimationFrame.js'
];

var scripts_files = [
'couchpotato/static/scripts/library/uniform.js',
'couchpotato/static/scripts/library/question.js',
'couchpotato/static/scripts/library/scrollspy.js',
'couchpotato/static/scripts/couchpotato.js',
'couchpotato/static/scripts/api.js',
'couchpotato/static/scripts/page.js',
'couchpotato/static/scripts/block.js',
'couchpotato/static/scripts/block/navigation.js',
'couchpotato/static/scripts/block/header.js',
'couchpotato/static/scripts/block/footer.js',
'couchpotato/static/scripts/block/menu.js',
'couchpotato/static/scripts/page/home.js',
'couchpotato/static/scripts/page/settings.js',
'couchpotato/static/scripts/page/about.js',
'couchpotato/static/scripts/page/login.js'
];

grunt.initConfig({

// Project settings
config: config,

// Make sure code styles are up to par and there are no obvious mistakes
jshint: {
options: {
reporter: require('jshint-stylish'),
unused: false,
camelcase: false,
devel: true
},
all: [
'<%= config.base %>/{,**/}*.js',
'!<%= config.base %>/static/scripts/vendor/{,**/}*.js',
'!<%= config.base %>/static/scripts/combined.*.js'
]
},

// Compiles Sass to CSS and generates necessary files if requested
sass: {
options: {
compass: true,
update: true,
sourcemap: 'none'
},
server: {
files: [{
expand: true,
cwd: '<%= config.base %>/',
src: ['**/*.scss'],
dest: '<%= config.tmp %>/styles/',
ext: '.css'
}]
}
},

// Empties folders to start fresh
clean: {
server: '.tmp'
},

// Add vendor prefixed styles
autoprefixer: {
options: {
browsers: ['last 2 versions'],
remove: false,
cascade: false
},
dist: {
files: [{
expand: true,
cwd: '<%= config.tmp %>/styles/',
src: '{,**/}*.css',
dest: '<%= config.tmp %>/styles/'
}]
}
},

cssmin: {
dist: {
options: {
keepBreaks: true
},
files: {
'<%= config.css_dest %>': ['<%= config.tmp %>/styles/**/*.css']
}
}
},

uglify: {
options: {
mangle: false,
compress: false,
beautify: true,
screwIE8: true
},
vendor: {
files: {
'<%= config.scripts_vendor_dest %>': vendor_scripts_files
}
},
base: {
files: {
'<%= config.scripts_base_dest %>': scripts_files
}
},
plugins: {
files: {
'<%= config.scripts_plugins_dest %>': ['<%= config.base %>/core/**/*.js']
}
}
},

shell: {
runCouchPotato: {
command: '<%= config.python %> CouchPotato.py',
options: {
stdout: true,
stderr: true
}
}
},

// COOL TASKS ==============================================================
watch: {
scss: {
files: ['<%= config.base %>/**/*.{scss,sass}'],
tasks: ['sass:server', 'autoprefixer', 'cssmin']
},
js: {
files: [
'<%= config.base %>/**/*.js',
'!<%= config.base %>/static/scripts/combined.*.js'
],
tasks: ['uglify:base', 'uglify:plugins', 'jshint']
},
livereload: {
options: {
livereload: 35729
},
files: [
'<%= config.css_dest %>',
'<%= config.scripts_vendor_dest %>',
'<%= config.scripts_base_dest %>',
'<%= config.scripts_plugins_dest %>'
]
}
},

concurrent: {
options: {
logConcurrentOutput: true
},
tasks: ['shell:runCouchPotato', 'watch']
}

});

grunt.registerTask('default', [
'clean:server',
'sass:server',
'autoprefixer',
'cssmin',
'uglify:vendor',
'uglify:base',
'uglify:plugins',
'concurrent'
]);

};
Loading