Created
April 1, 2017 12:38
-
-
Save rubyon/8b9f941ed2b9607e371882d5b69ed83d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send request to Synology | |
srpc = SynologyRPC(host[0], host[1], self.conf('username'), self.conf('password'), self.conf('destination')) | |
if data['protocol'] == 'torrent_magnet': | |
log.info('Adding torrent URL %s', data['url']) | |
response = srpc.create_task(url = data['url']) | |
elif data['protocol'] in ['nzb', 'torrent']: | |
log.info('Adding torrent URL %s', data['url']) | |
response = srpc.create_task(url = data['url']) | |
# log.info('Adding %s' % data['protocol']) | |
# if not filedata: | |
# log.error('No %s data found', data['protocol']) | |
# else: | |
# filename = data['name'] + '.' + data['protocol'] | |
# response = srpc.create_task(filename = filename, filedata = filedata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment