Snatched not giving enough data to show notification. fix #3564
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
from httplib import HTTPSConnection
|
from httplib import HTTPSConnection
|
||||||
|
|
||||||
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode
|
from couchpotato.core.helpers.encoding import toUnicode, tryUrlencode
|
||||||
from couchpotato.core.helpers.variable import getTitle
|
from couchpotato.core.helpers.variable import getTitle, getIdentifier
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
from couchpotato.core.notifications.base import Notification
|
from couchpotato.core.notifications.base import Notification
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ class Pushover(Notification):
|
|||||||
'sound': self.conf('sound'),
|
'sound': self.conf('sound'),
|
||||||
}
|
}
|
||||||
|
|
||||||
if data and data.get('identifier'):
|
if data and getIdentifier(data):
|
||||||
api_data.update({
|
api_data.update({
|
||||||
'url': toUnicode('http://www.imdb.com/title/%s/' % data['identifier']),
|
'url': toUnicode('http://www.imdb.com/title/%s/' % getIdentifier(data)),
|
||||||
'url_title': toUnicode('%s on IMDb' % getTitle(data)),
|
'url_title': toUnicode('%s on IMDb' % getTitle(data)),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ class Release(Plugin):
|
|||||||
log_movie = '%s (%s) in %s' % (getTitle(media), media['info']['year'], rls['quality'])
|
log_movie = '%s (%s) in %s' % (getTitle(media), media['info']['year'], rls['quality'])
|
||||||
snatch_message = 'Snatched "%s": %s' % (data.get('name'), log_movie)
|
snatch_message = 'Snatched "%s": %s' % (data.get('name'), log_movie)
|
||||||
log.info(snatch_message)
|
log.info(snatch_message)
|
||||||
fireEvent('%s.snatched' % data['type'], message = snatch_message, data = rls)
|
fireEvent('%s.snatched' % data['type'], message = snatch_message, data = media)
|
||||||
|
|
||||||
# Mark release as snatched
|
# Mark release as snatched
|
||||||
if renamer_enabled:
|
if renamer_enabled:
|
||||||
|
|||||||
Reference in New Issue
Block a user