diff --git a/couchpotato/core/plugins/library/main.py b/couchpotato/core/plugins/library/main.py index 0d3d09e..4cdc323 100644 --- a/couchpotato/core/plugins/library/main.py +++ b/couchpotato/core/plugins/library/main.py @@ -1,7 +1,6 @@ from couchpotato import get_session from couchpotato.core.event import addEvent, fireEventAsync, fireEvent from couchpotato.core.helpers.encoding import toUnicode, simplifyString -from couchpotato.core.helpers.variable import mergeDicts from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.core.settings.model import Library, LibraryTitle, File @@ -137,10 +136,12 @@ class LibraryPlugin(Plugin): db = get_session() library = db.query(Library).filter_by(identifier = identifier).first() + dates = library.info.get('release_date') - if library.info.get('release_date', {}).get('expires', 0) < time.time(): + if dates and dates.get('expires', 0) < time.time(): dates = fireEvent('movie.release_date', identifier = identifier, merge = True) - library.info = mergeDicts(library.info, {'release_date': dates}) + library.info['release_date'] = dates + library.info = library.info db.commit() dates = library.info.get('release_date', {}) diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 9a5f85f..136a196 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -328,6 +328,10 @@ class Scanner(Plugin): # Clean up self.path_identifiers = {} + if len(processed_movies) > 0: + log.info('Found %s movies in the folder %s' % (len(processed_movies), folder)) + else: + log.debug('Found no movies in the folder %s' % (folder)) return processed_movies def getMetaData(self, group):