Allow music ID instead of URLS in music lists

This commit is contained in:
Edgar P. Burkhart 2024-04-09 21:33:03 +02:00
parent 16f909fa0d
commit d0ca4899a6
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -100,7 +100,7 @@ for q in ROOT_PATH.iterdir():
print("> > > Lecture de la liste") print("> > > Lecture de la liste")
with q.open() as f: with q.open() as f:
_raw_musiks = [ _raw_musiks = [
re.compile(r"[\?\&]v=(\w+)").search(_musik)[1] (re.compile(r"[\?\&]v=(\w+)").search(_musik) or ("", _musik))[1]
for _musik in f.read().splitlines() for _musik in f.read().splitlines()
] ]
_musiks = list(filter(lambda _m: not _m in blacklist, _raw_musiks)) _musiks = list(filter(lambda _m: not _m in blacklist, _raw_musiks))