diff --git a/couchpotato/core/downloaders/blackhole/__init__.py b/couchpotato/core/downloaders/blackhole/__init__.py index 6b5279a1..91164d66 100644 --- a/couchpotato/core/downloaders/blackhole/__init__.py +++ b/couchpotato/core/downloaders/blackhole/__init__.py @@ -13,7 +13,7 @@ config = [{ 'list': 'download_providers', 'name': 'blackhole', 'label': 'Black hole', - 'description': 'Download the NZB/Torrent to a specific folder.', + 'description': 'Download the NZB/Torrent to a specific folder. Note: Seeding and copying/linking features do not work with Black hole.', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/helpers/encoding.py b/couchpotato/core/helpers/encoding.py index bfebcc1f..e88c6ca3 100644 --- a/couchpotato/core/helpers/encoding.py +++ b/couchpotato/core/helpers/encoding.py @@ -49,8 +49,17 @@ def ss(original, *args): return u_original.encode('UTF-8') def sp(path, *args): + # Standardise encoding, normalise case, path and strip trailing '/' or '\' - return os.path.normcase(os.path.normpath(ss(path, *args))).rstrip(os.path.sep) + if not path or len(path) == 0: + return path + + path = os.path.normcase(os.path.normpath(ss(path, *args))) + + if path != os.path.sep: + path = path.rstrip(os.path.sep) + + return path def ek(original, *args): if isinstance(original, (str, unicode)): diff --git a/couchpotato/core/media/movie/_base/main.py b/couchpotato/core/media/movie/_base/main.py index 817b0a38..3ca36eda 100644 --- a/couchpotato/core/media/movie/_base/main.py +++ b/couchpotato/core/media/movie/_base/main.py @@ -53,6 +53,7 @@ class MovieBase(MovieTypeBase): 'params': { 'identifier': {'desc': 'IMDB id of the movie your want to add.'}, 'profile_id': {'desc': 'ID of quality profile you want the add the movie in. If empty will use the default profile.'}, + 'category_id': {'desc': 'ID of category you want the add the movie in. If empty will use no category.'}, 'title': {'desc': 'Movie title to use for searches. Has to be one of the titles returned by movie.search.'}, } }) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index f99c92c0..54bdcdc7 100755 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -83,6 +83,7 @@ class Renamer(Plugin): } def scan(self, release_download = None): + if not release_download: release_download = {} if self.isDisabled(): return @@ -95,7 +96,7 @@ class Renamer(Plugin): to_folder = sp(self.conf('to')) # Get movie folder to process - movie_folder = release_download and release_download.get('folder') + movie_folder = release_download.get('folder') # Get all folders that should not be processed no_process = [to_folder] @@ -122,7 +123,7 @@ class Renamer(Plugin): log.debug('The provided movie folder %s does not exist. Trying to find it in the \'from\' folder.', movie_folder) # Update to the from folder - if len(release_download.get('files')) == 1: + if len(splitString(release_download.get('files'), '|')) == 1: new_movie_folder = from_folder else: new_movie_folder = os.path.join(from_folder, os.path.basename(movie_folder)) diff --git a/couchpotato/templates/index.html b/couchpotato/templates/index.html index d45dcb9b..52a4491b 100644 --- a/couchpotato/templates/index.html +++ b/couchpotato/templates/index.html @@ -4,6 +4,8 @@
+ + {% for url in fireEvent('clientscript.get_styles', as_html = True, location = 'front', single = True) %} {% end %}