mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 22:35:03 -05:00
Merge pull request #1140 from luxmoggy/develop
Catches error from set file date and email when they have special charactors in them
This commit is contained in:
commit
b2d5ef531b
@ -68,7 +68,10 @@ class EmailNotifier:
|
|||||||
1) + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
1) + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
||||||
'html'))
|
'html'))
|
||||||
except:
|
except:
|
||||||
|
try:
|
||||||
msg = MIMEText(ep_name)
|
msg = MIMEText(ep_name)
|
||||||
|
except:
|
||||||
|
msg = MIMEText("Episode Snatched")
|
||||||
|
|
||||||
msg['Subject'] = 'Snatched: ' + ep_name
|
msg['Subject'] = 'Snatched: ' + ep_name
|
||||||
msg['From'] = sickbeard.EMAIL_FROM
|
msg['From'] = sickbeard.EMAIL_FROM
|
||||||
@ -103,7 +106,10 @@ class EmailNotifier:
|
|||||||
1) + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
1) + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
||||||
'html'))
|
'html'))
|
||||||
except:
|
except:
|
||||||
|
try:
|
||||||
msg = MIMEText(ep_name)
|
msg = MIMEText(ep_name)
|
||||||
|
except:
|
||||||
|
mag = 'Episode Downloaded'
|
||||||
|
|
||||||
msg['Subject'] = 'Downloaded: ' + ep_name
|
msg['Subject'] = 'Downloaded: ' + ep_name
|
||||||
msg['From'] = sickbeard.EMAIL_FROM
|
msg['From'] = sickbeard.EMAIL_FROM
|
||||||
@ -138,7 +144,10 @@ class EmailNotifier:
|
|||||||
1) + "</b></p>\n<p>Language: <b>" + lang + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
1) + "</b></p>\n<p>Language: <b>" + lang + "</b></p>\n\n<footer style='margin-top: 2.5em; padding: .7em 0; color: #777; border-top: #BBB solid 1px;'>Powered by SickRage.</footer></body>",
|
||||||
'html'))
|
'html'))
|
||||||
except:
|
except:
|
||||||
|
try:
|
||||||
msg = MIMEText(ep_name + ": " + lang)
|
msg = MIMEText(ep_name + ": " + lang)
|
||||||
|
except:
|
||||||
|
msg = "Episode Subtitle Downloaded"
|
||||||
|
|
||||||
msg['Subject'] = lang + ' Subtitle Downloaded: ' + ep_name
|
msg['Subject'] = lang + ' Subtitle Downloaded: ' + ep_name
|
||||||
msg['From'] = sickbeard.EMAIL_FROM
|
msg['From'] = sickbeard.EMAIL_FROM
|
||||||
|
@ -2498,9 +2498,18 @@ class TVEpisode(object):
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
airdatetime = airdatetime.timetuple()
|
airdatetime = airdatetime.timetuple()
|
||||||
|
logger.log(str(self.show.indexerid) + u": About to modify date of '" + self.location
|
||||||
|
+ "' to show air date " + time.strftime("%b %d,%Y (%H:%M)", airdatetime), logger.DEBUG)
|
||||||
|
try:
|
||||||
if helpers.touchFile(self.location, time.mktime(airdatetime)):
|
if helpers.touchFile(self.location, time.mktime(airdatetime)):
|
||||||
logger.log(str(self.show.indexerid) + u": Changed modify date of " + os.path.basename(self.location)
|
logger.log(str(self.show.indexerid) + u": Changed modify date of " + os.path.basename(self.location)
|
||||||
+ " to show air date " + time.strftime("%b %d,%Y (%H:%M)", airdatetime))
|
+ " to show air date " + time.strftime("%b %d,%Y (%H:%M)", airdatetime))
|
||||||
|
else:
|
||||||
|
logger.log(str(self.show.indexerid) + u": Unable to modify date of " + os.path.basename(self.location)
|
||||||
|
+ " to show air date " + time.strftime("%b %d,%Y (%H:%M)", airdatetime), logger.ERROR)
|
||||||
|
except:
|
||||||
|
logger.log(str(self.show.indexerid) + u": Failed to modify date of '" + os.path.basename(self.location)
|
||||||
|
+ "' to show air date " + time.strftime("%b %d,%Y (%H:%M)", airdatetime), logger.ERROR)
|
||||||
|
|
||||||
def __getstate__(self):
|
def __getstate__(self):
|
||||||
d = dict(self.__dict__)
|
d = dict(self.__dict__)
|
||||||
|
Loading…
Reference in New Issue
Block a user