예제 #1
0
    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)
예제 #2
0
    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)