Prevent multiples of same music for same user

This commit is contained in:
Edgar P. Burkhart 2024-04-10 13:40:16 +02:00
parent 96c6bfa8fa
commit 7d8c152543
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -31,7 +31,7 @@ def generate_list(args):
(re.compile(r"[\?\&]v=(\w+)").search(_musik) or ("", _musik))[1]
for _musik in f.read().splitlines()
]
_musiks = list(filter(lambda _m: _m not in blacklist, _raw_musiks))
_musiks = list(set(filter(lambda _m: _m not in blacklist, _raw_musiks)))
if len(_musiks) < args.number:
logger.error(