async sound monitor & clean-up

This commit is contained in:
bkfox
2020-09-21 15:19:06 +02:00
parent 659e06670d
commit 6773481fe6
5 changed files with 145 additions and 247 deletions

View File

@ -99,17 +99,8 @@ class Program(Page):
while path[0] == '/':
path = path[1:]
while path[-1] == '/':
path = path[:-2]
if '/' in path:
path = path[:path.index('/')]
path = path.split('_')
path = path[-1]
qs = cl.objects.filter(id=int(path))
return qs[0] if qs else None
path = path[:path.index('/')]
return cl.objects.filter(slug=path.replace('_','-')).first()
def ensure_dir(self, subdir=None):
"""