add silence removal using pydub and multithreading

+ fix favorites endpoint returning items less than limit
+ add endpoint to remove get silence padding
+ add 'the ulitimate' and 'compilation' to compilation album filters
+ misc
This commit is contained in:
mungai-njoroge
2024-01-05 01:08:07 +03:00
parent 6d6c86cb93
commit 258897b649
28 changed files with 4949 additions and 24 deletions
+22
View File
@@ -10,3 +10,25 @@ def background(func):
threading.Thread(target=func, args=a, kwargs=kw).start()
return background_func
class ThreadWithReturnValue(threading.Thread):
"""
A thread class that returns a value on join.
Credit: https://stackoverflow.com/a/6894023
"""
def __init__(
self, group=None, target=None, name=None, args=(), kwargs={}, Verbose=None
):
threading.Thread.__init__(self, group, target, name, args, kwargs)
self._return = None
def run(self):
if self._target is not None:
self._return = self._target(*self._args, **self._kwargs)
def join(self, *args):
threading.Thread.join(self, *args)
return self._return