def process_IN_CLOSE_WRITE(self, event): print "\n%s Finished writing: %s"%(time.strftime('%a %d-%m-%Y %H:%M:%S'),event.pathname) if event.pathname[-3:]=='mkv': print '\n-------------------------------\nStarting conversion of %s' % event.pathname converter.convert(event.pathname) if options.email: mail.send(event.pathname) else: if options.email: mail.send(event.pathname)
def process_IN_MOVED_TO(self, event): print "\n%s Moved: %s"%(time.strftime('%a %d-%m-%Y %H:%M:%S'),event.pathname) if event.pathname[-3:]=='mkv': print '\n-------------------------------\nStarting conversion of %s' % event.pathname converter.convert(event.pathname) if options.email: mail.send(event.pathname) else: if options.email: mail.send(event.pathname)