Putting all the code from the current master branch of TWBlue

This commit is contained in:
2014-10-27 16:29:04 -06:00
parent 58c82e5486
commit 1af4a8b291
284 changed files with 58760 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
from functools import wraps
def matches_url(url):
def url_setter(func):
@wraps(func)
def internal_url_setter(*args, **kwargs):
return func(*args, **kwargs)
internal_url_setter.url = url
return internal_url_setter
return url_setter
def find_url_transformer(url):
from audio_services import services
funcs = []
for i in dir(services):
possible = getattr(services, i)
if callable(possible) and hasattr(possible, 'url'):
funcs.append(possible)
for f in funcs:
if url.lower().startswith(f.url.lower()):
return f
return services.convert_generic_audio