No error when trailers aren't found. fix #327
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from couchpotato.core.event import addEvent, fireEvent
|
||||
from couchpotato.core.helpers.variable import getExt
|
||||
from couchpotato.core.helpers.variable import getExt, getTitle
|
||||
from couchpotato.core.logger import CPLog
|
||||
from couchpotato.core.plugins.base import Plugin
|
||||
import os
|
||||
@@ -17,6 +17,9 @@ class Trailer(Plugin):
|
||||
if self.isDisabled() or len(group['files']['trailer']) > 0: return
|
||||
|
||||
trailers = fireEvent('trailer.search', group = group, merge = True)
|
||||
if not trailers or trailers == []:
|
||||
log.info('No trailers found for: %s' % getTitle(group['library']))
|
||||
return
|
||||
|
||||
for trailer in trailers.get(self.conf('quality'), []):
|
||||
destination = '%s-trailer.%s' % (self.getRootName(group), getExt(trailer))
|
||||
|
||||
Reference in New Issue
Block a user