mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
Fix contribution streams via magnet link
This commit is contained in:
+2
-1
@@ -248,7 +248,7 @@ async def add_torrent(
|
||||
|
||||
# Check if torrent already exists
|
||||
if torrent_stream := await get_stream_by_info_hash(info_hash):
|
||||
if torrent_stream.meta_id != meta_id:
|
||||
if meta_id and meta_id != torrent_stream.meta_id:
|
||||
await torrent_stream.delete()
|
||||
elif meta_type == "movie" and torrent_stream.filename is None:
|
||||
await torrent_stream.delete()
|
||||
@@ -724,6 +724,7 @@ async def analyze_torrent(
|
||||
status_code=400, detail="Failed to fetch torrent metadata."
|
||||
)
|
||||
torrent_data = data[0]
|
||||
torrent_data.pop("torrent_file", None)
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ def extract_torrent_metadata(
|
||||
return {}
|
||||
|
||||
metadata = {
|
||||
"info_hash": info_hash,
|
||||
"info_hash": info_hash.lower(),
|
||||
"announce_list": announce_list,
|
||||
"total_size": total_size,
|
||||
"torrent_name": torrent_name,
|
||||
|
||||
Reference in New Issue
Block a user