Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: RuudBurger/CouchPotatoV1
base: 9041f8d5ff2998f8b6207311281835872b381d7f
...
head fork: RuudBurger/CouchPotatoV1
compare: 59212f6d9b29d7b4db00fe615838f00aa7071264
Checking mergeability… Don't worry, you can still create the pull request.
  • 8 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
3  CouchPotato.py
@@ -143,8 +143,7 @@ def server_start():
#HTTP Errors
def http_error_hander(status, message, traceback, version):
args = [status, message, traceback, version]
- log.error("CherryPy caught an error: %s" % ", ".join(args))
- return "<html><body><h1>Error %s</h1>Something unexpected has happened. Please check the log.</body></html>" % args[0]
+ return "<html><body><h1>Error %s</h1>Something unexpected has happened.</body></html>" % args[0]
cherrypy.config.update({'error_page.default' : http_error_hander})
# Deamonize
View
10 app/config/updater.py
@@ -140,17 +140,9 @@ def checkForUpdateWindows(self):
for link in results:
if 'windows' in str(link.parent).lower():
- latestUrl = 'http://github.com' + link.get('href').replace(' ', '%20')
+ downloadUrl = 'http://github.com' + link.get('href').replace(' ', '%20')
break
- try:
- latest = urllib2.urlopen(latestUrl, timeout = self.timeout)
- except (IOError, URLError):
- log.error('Failed to open %s.' % latestUrl)
- return False
-
- downloadUrl = latest.geturl()
-
if 'r' + str(version.windows) in downloadUrl:
return False
View
30 app/lib/cron/renamer.py
@@ -66,14 +66,14 @@ def doRename(self):
Go find files and rename them!
'''
- log.debug('RENAMINGFIX: Starting renaming')
+ log.debug('Starting renaming')
if self.isDisabled():
- log.debug('RENAMINGFIX: Renaming is disabled')
+ log.debug('Renaming is disabled')
return
allMovies = self.getMovies(self.conf('download'))
- log.debug('RENAMINGFIX: Movies: %s' % allMovies)
+ log.debug('Movies: %s' % allMovies)
if allMovies:
log.debug("Ready to rename some files.")
@@ -81,23 +81,23 @@ def doRename(self):
for movie in allMovies:
if movie.get('match'):
- log.debug('RENAMINGFIX: self.renameFiles(movie)')
+ log.debug('self.renameFiles(movie)')
finalDestination = self.renameFiles(movie)
# Search for trailer & subtitles
- log.debug('RENAMINGFIX: crons')
+ log.debug('crons')
cherrypy.config['cron']['trailer'].forDirectory(finalDestination['directory'])
cherrypy.config['cron']['subtitle'].forDirectory(finalDestination['directory'])
# Notify XBMC
- log.debug('RENAMINGFIX: XBMC')
+ log.debug('XBMC')
xbmc = XBMC()
xbmc.notify('Downloaded %s (%s)' % (movie['movie'].name, movie['movie'].year))
xbmc.updateLibrary()
# Update Metadata
if self.config.get('Meta', 'enabled'):
- log.debug('RENAMINGFIX: metadata')
+ log.debug('metadata')
nfoFileName = self.config.get('Meta', 'nfoFileName')
fanartFileNaming = self.config.get('Meta', 'fanartFileName')
fanartMinHeight = self.config.get('Meta', 'fanartMinHeight')
@@ -146,7 +146,7 @@ def doRename(self):
# Cleanup
if self.conf('cleanup'):
- log.debug('RENAMINGFIX: cleanup')
+ log.debug('cleanup')
path = self.conf('download')
if self.conf('destination') == path:
@@ -314,28 +314,32 @@ def renameFiles(self, movie):
justAdded.append(subDest) # Add to ignore list when removing stuff.
# Add to renaming history
- log.debug('RENAMINGFIX: renamehistory start')
+ log.debug('renamehistory start')
h = RenameHistory()
Db.add(h)
- h.movieQueue = movie['queue'].id if movie['queue'] else 0
+ try:
+ h.movieQueue = movie['queue'].id
+ except:
+ h.movieQueue = 0
+
h.old = unicode(old.decode('utf-8'))
h.new = unicode(dest.decode('utf-8'))
Db.flush()
- log.debug('RENAMINGFIX: renamehistory end')
+ log.debug('renamehistory end')
if multiple:
cd += 1
# Mark movie downloaded
- log.debug('RENAMINGFIX: queue downloaded start')
+ log.debug('queue downloaded start')
if movie['queue'] and movie['queue'].id > 0:
if movie['queue'].markComplete:
movie['movie'].status = u'downloaded'
movie['queue'].completed = True
Db.flush()
- log.debug('RENAMINGFIX: queue downloaded end')
+ log.debug('queue downloaded end')
return {
'directory': finalDestination,
View
30 app/lib/library.py
@@ -53,7 +53,7 @@ def __init__(self):
noTables = False
def getMovies(self, folder = None, withMeta = True):
- log.debug('RENAMINGFIX: getMoviesStart')
+ log.debug('getMoviesStart')
movies = []
qualities = Qualities()
@@ -63,10 +63,10 @@ def getMovies(self, folder = None, withMeta = True):
log.error('Can\'t find directory: %s' % movieFolder)
return movies
- log.debug('RENAMINGFIX: os.walk(movieFolder) %s' % movieFolder)
+ log.debug('os.walk(movieFolder) %s' % movieFolder)
for root, subfiles, filenames in os.walk(movieFolder):
if self.abort:
- log.debug('RENAMINGFIX: Aborting moviescan')
+ log.debug('Aborting moviescan')
return movies
movie = {
@@ -105,7 +105,7 @@ def getMovies(self, folder = None, withMeta = True):
for pattern in patterns:
for filename in fnmatch.filter(sorted(filenames), pattern):
fullFilePath = os.path.join(root, filename)
- log.debug('RENAMINGFIX: Processing file: %s' % fullFilePath)
+ log.debug('Processing file: %s' % fullFilePath)
new = {
'filename': filename,
@@ -127,36 +127,36 @@ def getMovies(self, folder = None, withMeta = True):
else:
#ignore movies files / or not
if self.keepFile(fullFilePath):
- log.debug('RENAMINGFIX: self.keepFile(fullFilePath)')
+ log.debug('self.keepFile(fullFilePath)')
new['hash'] = hashFile(fullFilePath) # Add movie hash
new['size'] = os.path.getsize(fullFilePath) # File size
movie['files'].append(new)
if movie['files']:
- log.debug('RENAMINGFIX: Files found')
+ log.debug('Files found')
# Find movie by nfo
if movie['nfo']:
- log.debug('RENAMINGFIX: Scanning nfo')
+ log.debug('Scanning nfo')
for nfo in movie['nfo']:
nfoFile = open(os.path.join(movie['path'], nfo), 'r').read()
movie['info']['imdb'] = self.getImdb(nfoFile)
# Find movie via files
- log.debug('RENAMINGFIX: self.determineMovie(movie)')
+ log.debug('self.determineMovie(movie)')
movie['movie'] = self.determineMovie(movie)
if movie['movie']:
movie['match'] = True
- log.debug('RENAMINGFIX: self.getHistory(movie[movie])')
+ log.debug('self.getHistory(movie[movie])')
movie['history'] = self.getHistory(movie['movie'])
movie['queue'] = self.getQueue(movie['movie'])
movie['info']['name'] = movie['movie'].name
movie['info']['year'] = movie['movie'].year
try:
- movie['info']['quality'] = qualities.types.get(movie['queue'].qualityType)
+ movie['info']['quality'] = qualities.types.get(movie['queue'].qualityType).get('label')
except:
movie['info']['quality'] = qualities.guess([os.path.join(movie['path'], file['filename']) for file in movie['files']])
@@ -170,7 +170,7 @@ def getMovies(self, folder = None, withMeta = True):
#get metainfo about file
if withMeta:
- log.debug('RENAMINGFIX: self.getHistory(movie[movie])')
+ log.debug('self.getHistory(movie[movie])')
testFile = os.path.join(movie['path'], movie['files'][0]['filename'])
try:
movie['meta'].update(self.getMeta(testFile))
@@ -197,19 +197,19 @@ def getMovies(self, folder = None, withMeta = True):
movie['info']['sourcemedia'] = self.getSourceMedia(testFile)
# Create filename without cd1/cd2 etc
- log.debug('RENAMINGFIX: removeMultipart')
+ log.debug('removeMultipart')
movie['filename'] = self.removeMultipart(os.path.splitext(movie['files'][0]['filename'])[0])
# Give back ids, not table rows
if self.noTables:
- log.debug('RENAMINGFIX: self.noTables')
+ log.debug('self.noTables')
movie['history'] = [h.id for h in movie['history']] if movie['history'] else movie['history']
movie['movie'] = movie['movie'].id if movie['movie'] else movie['movie']
- log.debug('RENAMINGFIX: movies.append(movie)')
+ log.debug('movies.append(movie)')
movies.append(movie)
- log.debug('RENAMINGFIX: getMoviesEnd')
+ log.debug('getMoviesEnd')
return movies
def removeMultipart(self, name):
View
2  app/version.py
@@ -1,2 +1,2 @@
version = '0.4.0'
-windows = 26
+windows = 27
View
5 app/views/config/index.html
@@ -294,7 +294,7 @@
<fieldset class="inlineLabels">
<a href="${baseUrl}CouchPotato.user.js" class="submit userscriptInstall"><img src="${baseUrl}media/images/userscriptPreview.png" /><br />Install UserScript</a>
<p style="font-size:11px">
- Need a recent version of <a href="http://www.google.com/chrome/" target="_blank">Chrome</a> or when using Firefox, the <a href="https://addons.mozilla.org/en-US/firefox/addon/748/" target="_blank">Greasemonkey addon</a>.
+ To use this UserScript, you need <a href="http://www.google.com/chrome/" target="_blank">Google Chrome</a> or the <a href="https://addons.mozilla.org/en-US/firefox/addon/748/" target="_blank">Greasemonkey addon</a> when using Firefox.
</p>
</fieldset>
</div>
@@ -551,8 +551,7 @@
// Replace Userscript IE
if (Browser.ie){
- form.getElement('fieldset.userscript a').setStyle('display', 'none')
- form.getElement('fieldset.userscript p').setStyles({'height':'300px', 'display':'block'})
+ form.getElement('.userscript fieldset a').setStyle('display', 'none')
}
// Get host and post with Userscript
View
12 changelog.md
@@ -1,7 +1,14 @@
CouchPotato
=====
-Version 26 (not released):
+Version 27 (not released):
+
+* Fix: Quality in naming options not working correctly.
+* Fix: Config not working in IE.
+* Fix: No more "page not found"-errors in log.
+* [More](https://github.com/RuudBurger/CouchPotato/compare/9041f8d5ff2998f8b6207311281835872b381d7f...master)
+
+Version 26:
* New: Preferred words for searching in "Settings >> General".
* New: Download meta-data. Poster, fanart, .nfo file.
@@ -11,11 +18,12 @@ Version 26 (not released):
* Enhancement: Settings page instead of popup.
* Enhancement: R5 DVD-R is allowed
* Enhancement: Added <resolution> and <sourcemedia> to renaming filenames.
+* Fix: Don't autofill usernames and passwords.
* Fix: Updated updater for new GitHub download page layout.
* Fix: Images from TheMovieDB couldn't be downloaded.
* Fix: OpenSubtitle didn't always stay logged in.
* Fix: Move .idx files along with .sub files.
-* [And a lot more fixed here](https://github.com/RuudBurger/CouchPotato/compare/f60d448ad0...dfefbbc9c60aba77171c329406b6050313ce1823)
+* [And a lot more fixed here](https://github.com/RuudBurger/CouchPotato/compare/f60d448ad0...9041f8d5ff2998f8b6207311281835872b381d7f)
Version 25:

No commit comments for this range

Something went wrong with that request. Please try again.