Implement new return object format for files

develop
Sven Slootweg 12 years ago
parent a7113a77fd
commit c5448ab655

@ -19,4 +19,10 @@ def resolve(url):
except:
raise ResolverError("Could not find the download title.")
return { 'title': file_title, 'files': { 'file': file_url } }
file_dict = {
'url' : file_url,
'priority' : 1,
'format' : "unknown"
}
return { 'title': file_title, 'files': [file_dict] }

@ -21,4 +21,10 @@ def resolve(url):
paste_title = unescape(matches.group(1))
return { 'title': paste_title, 'files': { 'file': "http://pastebin.com/download.php?i=%s" % paste_id } }
file_dict = {
'url' : "http://pastebin.com/download.php?i=%s" % paste_id,
'priority' : 1,
'format' : "text"
}
return { 'title': paste_title, 'files': [file_dict] }

Loading…
Cancel
Save