Filter adult keywords in runtime of torrent parsing to extra protection

This commit is contained in:
mhdzumair
2024-07-12 16:37:52 +05:30
parent fa12e086f3
commit 59bc3322d9
+7
View File
@@ -37,6 +37,13 @@ async def filter_and_sort_streams(
and stream.size <= user_data.max_size
]
# Filter any adult content based on keywords
filtered_streams = [
stream
for stream in filtered_streams
if not is_contain_18_plus_keywords(stream.torrent_name)
]
if not filtered_streams:
return []