Browse Source

Merge branch 'refs/heads/develop'

pull/381/merge
Ruud 13 years ago
parent
commit
cb975f6180
  1. 7
      couchpotato/core/plugins/library/main.py
  2. 4
      couchpotato/core/plugins/scanner/main.py

7
couchpotato/core/plugins/library/main.py

@ -1,7 +1,6 @@
from couchpotato import get_session from couchpotato import get_session
from couchpotato.core.event import addEvent, fireEventAsync, fireEvent from couchpotato.core.event import addEvent, fireEventAsync, fireEvent
from couchpotato.core.helpers.encoding import toUnicode, simplifyString from couchpotato.core.helpers.encoding import toUnicode, simplifyString
from couchpotato.core.helpers.variable import mergeDicts
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin from couchpotato.core.plugins.base import Plugin
from couchpotato.core.settings.model import Library, LibraryTitle, File from couchpotato.core.settings.model import Library, LibraryTitle, File
@ -137,10 +136,12 @@ class LibraryPlugin(Plugin):
db = get_session() db = get_session()
library = db.query(Library).filter_by(identifier = identifier).first() 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) 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() db.commit()
dates = library.info.get('release_date', {}) dates = library.info.get('release_date', {})

4
couchpotato/core/plugins/scanner/main.py

@ -328,6 +328,10 @@ class Scanner(Plugin):
# Clean up # Clean up
self.path_identifiers = {} 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 return processed_movies
def getMetaData(self, group): def getMetaData(self, group):

Loading…
Cancel
Save